aboutsummaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-17 23:41:25 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:20:50 +0200
commita99aa006599827ea999a5684e40635175c8d790a (patch)
tree1b36a73833d3a87384e7bbfb379c4adceb72cd27 /test-client/main.ts
parent6f0424b9b4cddc0495eb673d314c570e27e61e83 (diff)
downloadhurrycurry-a99aa006599827ea999a5684e40635175c8d790a.tar
hurrycurry-a99aa006599827ea999a5684e40635175c8d790a.tar.bz2
hurrycurry-a99aa006599827ea999a5684e40635175c8d790a.tar.zst
a
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index 5f4475f2..6622d37f 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -75,7 +75,9 @@ function packet(p: PacketC) {
items.set(p.produce_item.id, { kind: p.produce_item.kind, x: p.produce_item.pos[0] + 0.5, y: p.produce_item.pos[1] + 0.5, tracking_player: false, tile: { x: p.produce_item.pos[0], y: p.produce_item.pos[1] } })
tiles.get(p.produce_item.pos.toString())!.items.push(p.produce_item.id)
} else if ("consume_item" in p) {
- // TODO
+ const t = tiles.get(p.consume_item.pos.toString())!
+ t.items.splice(t.items.indexOf(p.consume_item.id))
+ items.delete(p.consume_item.id)
} else if ("set_active" in p) {
// TODO
} else if ("update_map" in p) {