aboutsummaryrefslogtreecommitdiff
path: root/client/scripts/game.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-06-23 00:25:19 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:31:29 +0200
commita3a4e6f2da74c9dd5231269001139071cedf5d55 (patch)
tree767882f1d0d43b406f1b67b50f193b14101436c9 /client/scripts/game.gd
parent04cc939e31ec57b83f811022d408bacfc40ca627 (diff)
downloadhurrycurry-a3a4e6f2da74c9dd5231269001139071cedf5d55.tar
hurrycurry-a3a4e6f2da74c9dd5231269001139071cedf5d55.tar.bz2
hurrycurry-a3a4e6f2da74c9dd5231269001139071cedf5d55.tar.zst
add progress
Diffstat (limited to 'client/scripts/game.gd')
-rw-r--r--client/scripts/game.gd12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/scripts/game.gd b/client/scripts/game.gd
index 44875056..5d127e78 100644
--- a/client/scripts/game.gd
+++ b/client/scripts/game.gd
@@ -38,7 +38,7 @@ func _ready():
players.erase(id)
player.queue_free()
)
-
+
Multiplayer.connect("set_tile_item", func(tile: Vector2i, item: int):
var t: Floor = map.tile_by_pos[str(tile)]
var i = Item.new(item, t.item_base)
@@ -77,6 +77,16 @@ func _ready():
p.put_item(t)
)
+ Multiplayer.connect("set_progress", func(tile: Vector2i, progress: float, warn: bool):
+ var t: FullTile = map.tile_by_pos[str(tile)]
+ t.progress(progress, warn)
+ )
+
+ Multiplayer.connect("set_finished", func(tile: Vector2i, warn: bool):
+ var t: FullTile = map.tile_by_pos[str(tile)]
+ t.finish(warn)
+ )
+
Multiplayer.send_join("Blub", 1)