aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-07-16 23:03:56 +0200
committertpart <tpart120@proton.me>2024-07-16 23:03:56 +0200
commitd2b89c72427c382838cf36d8a4685bb376c5f1c4 (patch)
treef427ca6689a50d9d16d250e32983649d09f1a582
parent5bd5a92f3c7943ddf7c6e86dc5aa610a98c477ef (diff)
downloadhurrycurry-d2b89c72427c382838cf36d8a4685bb376c5f1c4.tar
hurrycurry-d2b89c72427c382838cf36d8a4685bb376c5f1c4.tar.bz2
hurrycurry-d2b89c72427c382838cf36d8a4685bb376c5f1c4.tar.zst
Fix: Character selection works in both directions
-rw-r--r--client/player/character/character.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/player/character/character.gd b/client/player/character/character.gd
index 701603a3..e64f9e42 100644
--- a/client/player/character/character.gd
+++ b/client/player/character/character.gd
@@ -79,10 +79,11 @@ func _process(delta):
play_animation(next_animation)
func select_hairstyle(id: int):
+ var hairstyle_count = hairstyles.keys().size()
+ id = (id + hairstyle_count) % hairstyle_count
if id < 0:
to_customer()
id *= -1 # TODO: Select customer character
- id = id % hairstyles.keys().size()
var target = hairstyles.keys()[id]
for k in hairstyles.keys():
if k == target: