aboutsummaryrefslogtreecommitdiff
path: root/client/game.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-10-15 00:04:10 +0200
committernokoe <nokoe@mailbox.org>2024-10-15 00:04:10 +0200
commit5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de (patch)
treea9337a73aed994cba852ba65874df03a6b13637e /client/game.gd
parent55851861d13df210d4c51c932e055e9248b5336c (diff)
downloadhurrycurry-5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de.tar
hurrycurry-5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de.tar.bz2
hurrycurry-5e87146c1f6a1fc59ba7dd41753d9ebfe0b262de.tar.zst
replace old book textures with ui book
Diffstat (limited to 'client/game.gd')
-rw-r--r--client/game.gd8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/game.gd b/client/game.gd
index da09ae9a..3a037be9 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -306,8 +306,8 @@ func handle_packet(p):
tutorial_queue.clear()
"menu":
match p.menu:
- "book":
- menu.submenu("res://menu/book/book.tscn")
+ "document":
+ menu.submenu("res://menu/document/document.tscn", p["data"])
"score":
menu.submenu("res://menu/rating/rating.tscn", [p.data.stars, p.data.points])
"server_message":
@@ -367,11 +367,9 @@ func _process(delta):
mp.send_replay_tick(delta)
func get_message_str(m: Dictionary) -> String:
- if "text" in m: return m.text
- if "translation" in m: return tr(m.translation.id).format(m.translation.params.map(get_message_str))
if "tile" in m: return tile_names[m.tile]
if "item" in m: return item_names[m.item]
- return "[unknown message type]"
+ return Global.get_message_str(m)
func get_tile_collision(pos: Vector2i) -> bool:
var t = map.get_tile_name(pos)