aboutsummaryrefslogtreecommitdiff
path: root/client/game.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-19 18:33:42 +0200
committertpart <tpart120@proton.me>2024-09-19 18:33:46 +0200
commitfd6dcda54288c5c5fa6d5419f1924ad92b392fc0 (patch)
treec96f3228cf46749da0a91178c565636352d7fd9e /client/game.gd
parent5b4ae38227ab59f1c35008b09604f25d5386d05a (diff)
downloadhurrycurry-fd6dcda54288c5c5fa6d5419f1924ad92b392fc0.tar
hurrycurry-fd6dcda54288c5c5fa6d5419f1924ad92b392fc0.tar.bz2
hurrycurry-fd6dcda54288c5c5fa6d5419f1924ad92b392fc0.tar.zst
Automatically start tutorial for first item requested
Diffstat (limited to 'client/game.gd')
-rw-r--r--client/game.gd6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/game.gd b/client/game.gd
index 74279211..8b2b00c3 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -182,7 +182,11 @@ func handle_packet(p):
var timeout_remaining: float = p["timeout"]["remaining"] if p["timeout"] != null else 5.
if p.message != null:
if "item" in p.message:
- players[p.player].item_message(item_names[p.message.item], timeout_initial, timeout_remaining)
+ var player: Player = players[p.player]
+ var item_name: String = item_names[p.message.item]
+ player.item_message(item_name, timeout_initial, timeout_remaining)
+ if player.is_customer and Global.get_profile("tutorials_played") < 3:
+ mp.send_chat(player_id, "/start-tutorial %s" % item_name)
elif "text" in p.message:
players[p.player].text_message(p.message.text, timeout_initial, timeout_remaining)
var username: String = players[p.player].username