aboutsummaryrefslogtreecommitdiff
path: root/test-client/protocol.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-09 19:10:15 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-09 19:10:17 +0200
commit7c3165796a65c6b7b30964d0a3e0516b83a55097 (patch)
treea1c28ae3f137a58aab687ecd172effd0ef8fd030 /test-client/protocol.ts
parent6ed0228a1d2d6bee58971f60da11e5281cd3e2c3 (diff)
downloadhurrycurry-7c3165796a65c6b7b30964d0a3e0516b83a55097.tar
hurrycurry-7c3165796a65c6b7b30964d0a3e0516b83a55097.tar.bz2
hurrycurry-7c3165796a65c6b7b30964d0a3e0516b83a55097.tar.zst
Update test-client
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r--test-client/protocol.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts
index 4a80a37d..0a62f557 100644
--- a/test-client/protocol.ts
+++ b/test-client/protocol.ts
@@ -28,12 +28,14 @@ export interface MapMetadata {
}
export interface Gamedata {
+ current_map: string,
item_names: string[], // Look-up table for ItemIndex
tile_names: string[], // Look-up table for TileIndex
- tile_collide: boolean[], // Look-up table for TileIndex to check tile collision with players
- tile_interact: boolean[], // Look-up table for TileIndex to check if a tile is interactable
- spawn: Vec2, // Where players spawn when they join.
+ tile_walkable: number[], // List of TileIndex that have no collision
+ tile_placeable_items: { [key: string]: number[] }, // Map from TileIndex to list of ItemIndex which can be placed on that tile. Not set if not restricted
+ tile_interactable_empty: number[], // List of TileIndex that have "crate recipes"
maps: [string, MapMetadata][], // Metadata for most available maps
+ bot_algos: string[],
hand_count: number,
}
@@ -46,6 +48,7 @@ export type PacketS =
| { type: "communicate", player: PlayerID, message?: Message, timeout?: number, pin?: boolean } // Sends a message
| { type: "effect", player: PlayerID, name: string } // Sends an effect
| { type: "replay_tick", dt: number } // Steps forward in replay.
+ | { type: "ready" }
export type PacketC =
{ type: "version", minor: number, major: number, supports_bincode?: boolean } // Sent once after connecting to ensure you client is compatible