summaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-02 00:59:11 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-02 00:59:11 +0200
commit5fde584021fa0d073d068ab7edde44aff6098bed (patch)
treea744285b7fc26abb07f3c23f3849907c4922b21f /test-client/main.ts
parent8ee3eca5d6de0b950881783821d1be86cd0586d5 (diff)
downloadhurrycurry-5fde584021fa0d073d068ab7edde44aff6098bed.tar
hurrycurry-5fde584021fa0d073d068ab7edde44aff6098bed.tar.bz2
hurrycurry-5fde584021fa0d073d068ab7edde44aff6098bed.tar.zst
passive recipes in player slot
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts4
1 files changed, 2 insertions, 2 deletions
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": {