From 5fde584021fa0d073d068ab7edde44aff6098bed Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 2 Jul 2024 00:59:11 +0200 Subject: passive recipes in player slot --- test-client/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test-client/main.ts') diff --git a/test-client/main.ts b/test-client/main.ts index 580ff755..70c07212 100644 --- a/test-client/main.ts +++ b/test-client/main.ts @@ -121,7 +121,7 @@ function get_item_location(loc: ItemLocation): PlayerData | TileData { function send(p: PacketS) { ws.send(JSON.stringify(p)) } function packet(p: PacketC) { - if (!["position", "set_active", "update_map"].includes(p.type)) + if (!["position", "set_progress", "update_map"].includes(p.type)) console.log(p); switch (p.type) { case "init": @@ -173,7 +173,7 @@ function packet(p: PacketC) { const slot = get_item_location(p.location) if (slot.item !== undefined && slot.item !== null) items_removed.add(slot.item) slot.item = undefined - if (p.item !== undefined && p.item !== null) slot.item = { kind: p.item, x: slot.position.x, y: slot.position.y } + if (p.item !== undefined && p.item !== null) slot.item = { kind: p.item, x: slot.position.x, y: slot.position.y, tracking: slot.position } break; } case "set_progress": { -- cgit v1.2.3-70-g09d2