From a99aa006599827ea999a5684e40635175c8d790a Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 17 Jun 2024 23:41:25 +0200 Subject: a --- test-client/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test-client/main.ts') 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) { -- cgit v1.2.3-70-g09d2