diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-19 22:52:37 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:21:49 +0200 |
commit | 6ca76cc0568f3d60b280f11ae07a34303c317f34 (patch) | |
tree | ac867e47b3fb4b6ed99189cb302b2741b107d272 /test-client/protocol.ts | |
parent | 3dc8cc2abb4e6a7be8237b86dab6ebed75fa43cb (diff) | |
download | hurrycurry-6ca76cc0568f3d60b280f11ae07a34303c317f34.tar hurrycurry-6ca76cc0568f3d60b280f11ae07a34303c317f34.tar.bz2 hurrycurry-6ca76cc0568f3d60b280f11ae07a34303c317f34.tar.zst |
implement customer communication
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r-- | test-client/protocol.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts index aa3aa063..c20588ce 100644 --- a/test-client/protocol.ts +++ b/test-client/protocol.ts @@ -25,4 +25,9 @@ export type PacketC = | { type: "produce_item", tile: Vec2, item: ItemIndex } // A tile generated a new item | { type: "consume_item", tile: Vec2 } // A tile removed an item | { type: "set_active", tile: Vec2, progress?: number } // A tile is doing something. progress goes from 0 to 1, then null when finished - | { type: "update_map", pos: Vec2, tile: TileIndex, neighbours: [TileIndex | null] } // A map tile was changed + | { type: "update_map", pos: Vec2, tile: TileIndex, neighbors: [TileIndex | null] } // A map tile was changed + | { type: "communicate", player: PlayerID, message?: Message } // A map tile was changed + +export type Message = + { item: number } + | { text: string } |