summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-18 18:54:49 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-18 18:54:49 +0200
commit7ef14b703f576c4b614e60142b3ce7eb801261da (patch)
treeb1ec94efd37a15c2a8754a052ea03e3881853bb7
parente7ebe17d0127c66dc4aad35e2091c06f8fe5b68e (diff)
downloadhurrycurry-7ef14b703f576c4b614e60142b3ce7eb801261da.tar
hurrycurry-7ef14b703f576c4b614e60142b3ce7eb801261da.tar.bz2
hurrycurry-7ef14b703f576c4b614e60142b3ce7eb801261da.tar.zst
client compiles but broken now
-rw-r--r--client/game.gd14
1 files changed, 6 insertions, 8 deletions
diff --git a/client/game.gd b/client/game.gd
index 621a05af..1bc4ec95 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -70,8 +70,7 @@ func _ready():
func handle_packet(p):
match p.type:
- "joined":
- player_id = p["id"]
+ "joined": player_id = p.id
"data":
item_names = p["data"]["item_names"]
tile_names = p["data"]["tile_names"]
@@ -276,14 +275,13 @@ func handle_packet(p):
"score":
menu.submenu("res://menu/rating/rating.tscn", [p.data.stars, p.data.score])
"server_message":
- var message = p["message"]
- var message_str := get_message_str(message)
- if error:
+ var mstr := get_message_str(p.message)
+ if p.error:
# TODO: Custom popup message style for errors
- popup_message.display_server_msg(message_str)
- push_error("Server error: %s" % message_str)
+ popup_message.display_server_msg(mstr)
+ push_error("Server error: %s" % mstr)
else:
- popup_message.display_server_msg(message_str)
+ popup_message.display_server_msg(mstr)
"environment":
$Environment.update(p["effects"])
"replay_start":