diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-18 15:42:19 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-18 15:42:19 +0200 |
commit | fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b (patch) | |
tree | 76b1a77dcd3ae29595caaa6423a18b5ce29e32db /test-client/protocol.ts | |
parent | e5fdbaadbf01f14290e70c49482e1dce3c9816d8 (diff) | |
download | hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar.bz2 hurrycurry-fb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b.tar.zst |
translate server messages
Diffstat (limited to 'test-client/protocol.ts')
-rw-r--r-- | test-client/protocol.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts index 3bceb351..b6ef9046 100644 --- a/test-client/protocol.ts +++ b/test-client/protocol.ts @@ -59,13 +59,12 @@ export type PacketC = | { 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: "effect", player: PlayerID, name: string } // Player sent an effect - | { type: "server_message", text: string } // Text message from the server + | { type: "server_message", message: Message, error: boolean } // Text message from the server | { type: "server_hint", message?: Message, position?: Vec2 } // Hint message from server with optional position. Message is unset to clear previous message | { type: "score" } & Score // Supplies information for score OSD | { type: "menu" } & Menu // Open a menu on the client-side | { type: "environment", effects: string[] } | { type: "set_ingame", state: boolean, lobby: boolean } // Set to false when entering the game or switching maps - | { type: "error", message: string } // Your client did something wrong. export type Menu = { menu: "book" } |