summaryrefslogtreecommitdiff
path: root/test-client/protocol.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-04 20:00:30 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-04 20:00:30 +0200
commit740dc4b45cb59ff184e5cebc5b19f402bb9d54d2 (patch)
tree188c59484dc4b4c268a107def8d485919a3b5100 /test-client/protocol.ts
parent406ba2117783f17010f4786a86fa02ae715388e6 (diff)
downloadhurrycurry-740dc4b45cb59ff184e5cebc5b19f402bb9d54d2.tar
hurrycurry-740dc4b45cb59ff184e5cebc5b19f402bb9d54d2.tar.bz2
hurrycurry-740dc4b45cb59ff184e5cebc5b19f402bb9d54d2.tar.zst
refactor interact function and new progress proto
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r--test-client/protocol.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts
index 40532c08..16cfec2c 100644
--- a/test-client/protocol.ts
+++ b/test-client/protocol.ts
@@ -53,7 +53,8 @@ export type PacketC =
| { type: "movement_sync" } // Your movement is difference on the server, you should update your position from a `position` packet
| { type: "move_item", from: ItemLocation, to: ItemLocation } // Item moved
| { type: "set_item", location: ItemLocation, item?: ItemIndex } // the item contained in a tile or player changed
- | { type: "set_progress", item: ItemLocation, progress?: number, warn: boolean } // A tile is doing something. progress goes from 0 to 1, then null when finished
+ | { type: "set_progress", item: ItemLocation, position: number, speed: number, warn: boolean } // A tile is doing something. position goes from 0 to 1, speed unit is in 1 per second
+ | { type: "clear_progress", item: ItemLocation }
| { type: "update_map", tile: Vec2, kind: TileIndex | null, neighbors: [TileIndex | null] } // A map tile was changed
| { type: "communicate", player: PlayerID, message?: Message, timeout?: MessageTimeout } // A player wants to communicate something, message is null when cleared
| { type: "server_message", text: string } // Text message from the server