summaryrefslogtreecommitdiff
path: root/test-client/protocol.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r--test-client/protocol.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts
index d5ce67ff..40532c08 100644
--- a/test-client/protocol.ts
+++ b/test-client/protocol.ts
@@ -40,7 +40,7 @@ export type PacketS =
| { type: "leave", player: PlayerID } // Despawns a character
| { type: "movement", player: PlayerID, pos: Vec2, dir: Vec2, boost: boolean }
| { type: "interact", player: PlayerID, pos?: Vec2 } // Interact with some tile. pos is a position when pressing and null when releasing interact button
- | { type: "communicate", player: PlayerID, message?: Message, persist: boolean } // Send a message
+ | { type: "communicate", player: PlayerID, message?: Message, timeout?: number } // Send a message
| { type: "replay_tick", dt: number } // Steps forward in replay.
export type PacketC =
@@ -55,7 +55,7 @@ export type PacketC =
| { 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: "update_map", tile: Vec2, kind: TileIndex | null, neighbors: [TileIndex | null] } // A map tile was changed
- | { type: "communicate", player: PlayerID, message?: Message, persist: boolean } // A player wants to communicate something, message is null when cleared
+ | { 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
| { type: "score" } & Score // Supplies information for score OSD
| { type: "menu" } & Menu // Open a menu on the client-side
@@ -67,6 +67,11 @@ export type Menu =
{ menu: "book" }
| { menu: "score", data: Score }
+export interface MessageTimeout {
+ initial: number,
+ remaining: number
+}
+
export interface Score {
points: number,
demands_failed: number,