diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-07 17:22:31 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-07 17:22:31 +0200 |
commit | d68634f23a21e55405cfa835f7e7bc61392f030e (patch) | |
tree | 456ffce3b498a6b4a2e66fe073877c352a9b00d0 /client/player | |
parent | 7273f20f52d5874652eb1ab5c8e92a93892e139e (diff) | |
download | hurrycurry-d68634f23a21e55405cfa835f7e7bc61392f030e.tar hurrycurry-d68634f23a21e55405cfa835f7e7bc61392f030e.tar.bz2 hurrycurry-d68634f23a21e55405cfa835f7e7bc61392f030e.tar.zst |
fix warnings on player constructor
Diffstat (limited to 'client/player')
-rw-r--r-- | client/player/player.gd | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/client/player/player.gd b/client/player/player.gd index dba63cbf..5650c52e 100644 --- a/client/player/player.gd +++ b/client/player/player.gd @@ -55,15 +55,18 @@ const DEFAULT_HAND_BASE_POSITION_CENTER: Vector3 = Vector3(0, .425, .4) const DEFAULT_HAND_BASE_POSITION_LEFT: Vector3 = Vector3(.3, .425, .4) const DEFAULT_HAND_BASE_POSITION_RIGHT: Vector3 = Vector3(-.3, .425, .4) -func _init(_id: int, name_: String, pos: Vector2, character_style: Dictionary, player_class: String, game: Game): +func _init(_id: int, name_: String, pos: Vector2, character_style_: Dictionary, player_class_: String, game_: Game): + character_style = character_style_ + player_class = player_class_ + game = game_ + if name_ != "": + name = name_ + username = name_ + add_child(movement_base) movement_base.add_child(character) position_ = pos position_anim = pos - if name_ != "": - name = name_ - self.game = game - username = name_ if game.hand_count == 1: var center = Node3D.new() @@ -91,8 +94,6 @@ func _init(_id: int, name_: String, pos: Vector2, character_style: Dictionary, p marker.visible = false add_child(marker) - self.character_style = character_style - self.player_class = player_class is_customer = player_class == "customer" is_chef = player_class == "chef" |