diff options
author | tpart <tpart120@proton.me> | 2024-09-19 18:33:42 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-09-19 18:33:46 +0200 |
commit | fd6dcda54288c5c5fa6d5419f1924ad92b392fc0 (patch) | |
tree | c96f3228cf46749da0a91178c565636352d7fd9e /client/game.gd | |
parent | 5b4ae38227ab59f1c35008b09604f25d5386d05a (diff) | |
download | hurrycurry-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.gd | 6 |
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 |