diff options
Diffstat (limited to 'test-client')
-rw-r--r-- | test-client/protocol.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test-client/protocol.ts b/test-client/protocol.ts index 8fa15c8d..55d2fc15 100644 --- a/test-client/protocol.ts +++ b/test-client/protocol.ts @@ -69,7 +69,7 @@ export type PacketC = | { type: "set_ingame", state: boolean, lobby: boolean } // Set to false when entering the game or switching maps export type Menu = - { menu: "book" } + { menu: "document", data: DocumentElement } | { menu: "score", data: Score } export interface MessageTimeout { @@ -101,3 +101,12 @@ export type ItemLocation = | { tile: Vec2 } export type PlayerClass = "chef" | "bot" | "customer" + +export type DocumentElement = + { t: "document", es: DocumentElement[] } + | { t: "page", background?: string, es: DocumentElement[] } + | { t: "list", es: DocumentElement[] } + | { t: "table", es: DocumentElement[][] } + | { t: "par", es: DocumentElement[] } + | { t: "text", s: Message, size: number, color?: string, font?: string, bold: boolean } + | { t: "conditional", cond: string, value: boolean, e: DocumentElement } |