aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/player/character/character.gd2
-rw-r--r--client/player/player.gd4
2 files changed, 5 insertions, 1 deletions
diff --git a/client/player/character/character.gd b/client/player/character/character.gd
index 8479af2c..f57eea7d 100644
--- a/client/player/character/character.gd
+++ b/client/player/character/character.gd
@@ -110,6 +110,8 @@ func set_style(style: Dictionary, character_class: String):
if cat_ears.visible:
cat_ears.set_inner_mat(main.get_active_material(0))
cat_ears.set_outer_mat(my_hairstyle.get_active_material(0))
+
+ username_tag.visible = character_class == "chef"
func play_animation(name_: String):
current_animation = name_
diff --git a/client/player/player.gd b/client/player/player.gd
index b483c31d..dba63cbf 100644
--- a/client/player/player.gd
+++ b/client/player/player.gd
@@ -46,6 +46,7 @@ var hand_base
var character_style: Dictionary
var player_class: String
var is_customer: bool
+var is_chef: bool
var current_item_message = null
var _anim_angle: float = 0.0
@@ -93,6 +94,7 @@ func _init(_id: int, name_: String, pos: Vector2, character_style: Dictionary, p
self.character_style = character_style
self.player_class = player_class
is_customer = player_class == "customer"
+ is_chef = player_class == "chef"
movement_base.scale = Vector3.ONE * 0.0001
@@ -110,7 +112,7 @@ func update_position(new_position: Vector2, new_rotation: float, new_boosting: b
func update_username_tag(state):
var tag: Label3D = character.username_tag
tag.text = username
- tag.visible = state
+ tag.visible = state and is_chef
func set_item(i: Item, h: int):
if hand[h] != null: hand[h].remove()