@caisual/kit 0.8.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kit.js +529 -56
- package/dist/node.js +297 -77
- package/dist/overlay.js +360 -53
- package/dist/runtime.js +248 -47
- package/dist/server.js +2 -0
- package/dist/types/api.d.ts +2 -1
- package/dist/types/contracts/i18n.d.ts +12 -0
- package/dist/types/contracts/immagine.d.ts +27 -0
- package/dist/types/contracts/index.d.ts +5 -0
- package/dist/types/contracts/manifest.d.ts +14 -6
- package/dist/types/contracts/match-result.d.ts +16 -0
- package/dist/types/contracts/overlay.d.ts +16 -2
- package/dist/types/contracts/player.d.ts +1 -0
- package/dist/types/contracts/room-limits.d.ts +13 -0
- package/dist/types/daily.d.ts +14 -0
- package/dist/types/handshake.d.ts +4 -0
- package/dist/types/index.d.ts +24 -2
- package/dist/types/kit.d.ts +2 -0
- package/dist/types/node/index.d.ts +5 -0
- package/dist/types/overlay/host-bridge.d.ts +16 -0
- package/dist/types/overlay/i18n.d.ts +13 -0
- package/dist/types/overlay/index.d.ts +1 -0
- package/dist/types/overlay/styles.d.ts +1 -1
- package/dist/types/overlay/ui-model.d.ts +4 -0
- package/dist/types/overlay/ui.d.ts +3 -1
- package/dist/types/protocollo.d.ts +13 -0
- package/dist/types/runtime/index.d.ts +6 -1
- package/dist/types/server/index.d.ts +17 -2
- package/dist/types/stanza/nucleo.d.ts +8 -2
- package/dist/types/stanza/tipi.d.ts +13 -0
- package/dist/types/text.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type LocalizedText = string | Record<string, string>;
|
|
2
|
+
export type TextDictionary = Record<string, string>;
|
|
3
|
+
export declare function normalizeLanguage(value: unknown): string | null;
|
|
4
|
+
export declare function manifestLanguages(manifest: {
|
|
5
|
+
languages?: string[];
|
|
6
|
+
language?: string;
|
|
7
|
+
}): string[];
|
|
8
|
+
export declare function languageFallbacks(language: string, defaultLanguage?: string): string[];
|
|
9
|
+
export declare function resolveGameLanguage(preferences: readonly string[], languages?: readonly string[]): string;
|
|
10
|
+
export declare function resolveText(value: LocalizedText | undefined, language: string, defaultLanguage?: string, key?: string): string;
|
|
11
|
+
export declare function isTextDictionary(value: unknown): value is TextDictionary;
|
|
12
|
+
export declare function loadGameTexts(language: string, defaultLanguage: string, read: (language: string) => Promise<unknown>): Promise<TextDictionary>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ImageFormat = 'png' | 'jpeg' | 'webp';
|
|
2
|
+
export interface ImageSize {
|
|
3
|
+
format: ImageFormat;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const MASSIMO_BYTE_IMMAGINE = 2000000;
|
|
8
|
+
export declare const IMMAGINI: {
|
|
9
|
+
readonly cover: {
|
|
10
|
+
readonly width: 1536;
|
|
11
|
+
readonly height: 1024;
|
|
12
|
+
readonly ratio: '3:2';
|
|
13
|
+
};
|
|
14
|
+
readonly card: {
|
|
15
|
+
readonly width: 1024;
|
|
16
|
+
readonly height: 1024;
|
|
17
|
+
readonly ratio: '1:1';
|
|
18
|
+
};
|
|
19
|
+
readonly icon: {
|
|
20
|
+
readonly width: 1024;
|
|
21
|
+
readonly height: 1024;
|
|
22
|
+
readonly ratio: '1:1';
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type ImageField = keyof typeof IMMAGINI;
|
|
26
|
+
export declare function readImageSize(bytes: Uint8Array): ImageSize | null;
|
|
27
|
+
export declare function validaImmagine(campo: ImageField, bytes: Uint8Array): string | null;
|
|
@@ -8,3 +8,8 @@ export * from './biglietto.js';
|
|
|
8
8
|
export * from './token-crew.js';
|
|
9
9
|
export * from './overlay.js';
|
|
10
10
|
export * from './overlay-boards.js';
|
|
11
|
+
export * from './i18n.js';
|
|
12
|
+
export * from './room-limits.js';
|
|
13
|
+
export * from './player.js';
|
|
14
|
+
export * from './match-result.js';
|
|
15
|
+
export * from './immagine.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LocalizedText } from './i18n.js';
|
|
1
2
|
export type Platform = 'desktop' | 'mobile' | 'both';
|
|
2
3
|
export type Orientation = 'landscape' | 'portrait';
|
|
3
4
|
export type Input = 'keyboard' | 'mouse' | 'touch' | 'gamepad';
|
|
@@ -8,7 +9,7 @@ export interface ManifestPlayers {
|
|
|
8
9
|
max: number;
|
|
9
10
|
}
|
|
10
11
|
export interface ManifestRole {
|
|
11
|
-
label?:
|
|
12
|
+
label?: LocalizedText;
|
|
12
13
|
id: string;
|
|
13
14
|
min: number;
|
|
14
15
|
max?: number;
|
|
@@ -40,14 +41,15 @@ export interface ManifestOverlay {
|
|
|
40
41
|
accent?: string;
|
|
41
42
|
}
|
|
42
43
|
export interface ManifestBoard {
|
|
43
|
-
|
|
44
|
+
day?: 'submit' | 'start';
|
|
45
|
+
label?: LocalizedText;
|
|
44
46
|
periods?: BoardPeriod[];
|
|
45
47
|
source: 'client' | 'server';
|
|
46
48
|
}
|
|
47
49
|
export interface ManifestMode {
|
|
48
50
|
execution?: ModeExecution;
|
|
49
|
-
label?:
|
|
50
|
-
instructions?:
|
|
51
|
+
label?: LocalizedText;
|
|
52
|
+
instructions?: LocalizedText;
|
|
51
53
|
id: string;
|
|
52
54
|
players?: ManifestPlayers;
|
|
53
55
|
lobby?: boolean;
|
|
@@ -63,7 +65,9 @@ export type ManifestModalita = ModalitaRisolta & {
|
|
|
63
65
|
export declare function risolviModalita(manifest: ManifestModalita, mode: string | null): ModalitaRisolta;
|
|
64
66
|
export declare function risolviPresentazione(manifest: ManifestModalita & {
|
|
65
67
|
name?: string;
|
|
66
|
-
|
|
68
|
+
languages?: string[];
|
|
69
|
+
language?: string;
|
|
70
|
+
}, mode: string | null, language?: string): {
|
|
67
71
|
execution: ModeExecution | null;
|
|
68
72
|
label: string;
|
|
69
73
|
instructions: string | null;
|
|
@@ -76,9 +80,13 @@ export interface Manifest {
|
|
|
76
80
|
id: string;
|
|
77
81
|
name: string;
|
|
78
82
|
description: string;
|
|
79
|
-
cover: string
|
|
83
|
+
cover: string;
|
|
84
|
+
card: string;
|
|
85
|
+
icon: string;
|
|
80
86
|
screenshots: string[];
|
|
81
87
|
tags: string[];
|
|
88
|
+
languages: string[];
|
|
89
|
+
/** @deprecated Usa languages; il primo elemento e' il default. */
|
|
82
90
|
language: string;
|
|
83
91
|
platform: Platform;
|
|
84
92
|
orientation: Orientation;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ResultJson = null | boolean | number | string | ResultJson[] | {
|
|
2
|
+
[key: string]: ResultJson;
|
|
3
|
+
};
|
|
4
|
+
export type MatchResult = {
|
|
5
|
+
standings: Array<{
|
|
6
|
+
playerId: string;
|
|
7
|
+
score?: number;
|
|
8
|
+
rank?: number;
|
|
9
|
+
}>;
|
|
10
|
+
winners?: string[];
|
|
11
|
+
draw?: boolean;
|
|
12
|
+
unit?: 'points' | 'time' | 'distance' | (string & {});
|
|
13
|
+
data?: ResultJson;
|
|
14
|
+
} & Record<string, ResultJson>;
|
|
15
|
+
export declare function readMatchResult(value: unknown, playerIds: readonly string[]): MatchResult | null;
|
|
16
|
+
export {};
|
|
@@ -9,14 +9,22 @@ export interface ReservedRect {
|
|
|
9
9
|
width: number;
|
|
10
10
|
height: number;
|
|
11
11
|
}
|
|
12
|
+
export interface SafeArea {
|
|
13
|
+
top: number;
|
|
14
|
+
right: number;
|
|
15
|
+
bottom: number;
|
|
16
|
+
left: number;
|
|
17
|
+
}
|
|
12
18
|
export interface OverlayView {
|
|
13
19
|
inputBlocked: boolean;
|
|
14
20
|
reservedRects: ReservedRect[];
|
|
21
|
+
safeArea?: SafeArea;
|
|
15
22
|
shortcutEnabled?: boolean;
|
|
16
23
|
}
|
|
17
24
|
export interface OverlayConfiguration {
|
|
18
25
|
manifest: Manifest;
|
|
19
26
|
coverUrl: string | null;
|
|
27
|
+
iconUrl: string | null;
|
|
20
28
|
invite: string | null;
|
|
21
29
|
}
|
|
22
30
|
export interface OverlayCapabilities {
|
|
@@ -48,9 +56,14 @@ export interface SessionResume {
|
|
|
48
56
|
updatedAt: number;
|
|
49
57
|
}
|
|
50
58
|
export interface OverlayRoom {
|
|
59
|
+
rematch?: {
|
|
60
|
+
keepSetup: boolean;
|
|
61
|
+
autoStart: boolean;
|
|
62
|
+
} | null;
|
|
63
|
+
result?: unknown;
|
|
51
64
|
code: string;
|
|
52
65
|
mode: string | null;
|
|
53
|
-
status: 'lobby' | 'countdown' | 'playing' | 'ended';
|
|
66
|
+
status: 'lobby' | 'countdown' | 'playing' | 'finished' | 'ended';
|
|
54
67
|
host: string | null;
|
|
55
68
|
you: string | null;
|
|
56
69
|
players: OverlayPlayer[];
|
|
@@ -128,6 +141,7 @@ export interface OverlayOperations {
|
|
|
128
141
|
team: number;
|
|
129
142
|
};
|
|
130
143
|
'room.start': Record<string, never>;
|
|
144
|
+
'room.restart': Record<string, never>;
|
|
131
145
|
'session.cancel': Record<string, never>;
|
|
132
146
|
'session.leave': Record<string, never>;
|
|
133
147
|
'session.disconnect': Record<string, never>;
|
|
@@ -204,7 +218,7 @@ export interface OverlayHello {
|
|
|
204
218
|
epoch: string;
|
|
205
219
|
configuration: OverlayConfiguration;
|
|
206
220
|
}
|
|
207
|
-
export declare function overlayConfiguration(manifest: Manifest, coverUrl?: string | null, invite?: string | null): OverlayConfiguration;
|
|
221
|
+
export declare function overlayConfiguration(manifest: Manifest, coverUrl?: string | null, invite?: string | null, iconUrl?: string | null): OverlayConfiguration;
|
|
208
222
|
export declare function record(value: unknown): Record<string, unknown> | null;
|
|
209
223
|
export declare function validOverlayHello(value: unknown): value is OverlayHello;
|
|
210
224
|
export declare function normalizeOverlayHello(value: unknown): OverlayHello | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function guestName(id: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const MESSAGGI_GIOCO_AL_SECONDO = 20;
|
|
2
|
+
export declare const MESSAGGI_SERVIZIO_AL_SECONDO = 20;
|
|
3
|
+
export type EsitoLimiteMessaggi = {
|
|
4
|
+
accetta: boolean;
|
|
5
|
+
avvisa: boolean;
|
|
6
|
+
chiudi: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class LimiteMessaggiStanza {
|
|
9
|
+
private readonly connessioni;
|
|
10
|
+
delete(connessione: string): void;
|
|
11
|
+
clear(): void;
|
|
12
|
+
controlla(connessione: string, gioco: boolean, ora: number): EsitoLimiteMessaggi;
|
|
13
|
+
}
|
package/dist/types/daily.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
export interface DailyContext {
|
|
2
|
+
day: string;
|
|
3
|
+
seed: number;
|
|
4
|
+
expiresAt: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function prossimaMezzanotteUtc(ora: number): number;
|
|
7
|
+
export declare function creaDaily(initial: DailyContext, now: () => number, refresh: () => Promise<DailyContext>): {
|
|
8
|
+
day: string;
|
|
9
|
+
seed: number;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
random: () => number;
|
|
12
|
+
rng: () => () => number;
|
|
13
|
+
onChange(listener: (context: DailyContext) => void): () => void;
|
|
14
|
+
};
|
|
1
15
|
export declare function giornoUtc(ora: number): string;
|
|
2
16
|
export declare function calcolaSeed(gioco: string, giorno: string, subtle: SubtleCrypto): Promise<number>;
|
|
3
17
|
export declare function creaMulberry32(seed: number): () => number;
|
|
@@ -10,6 +10,10 @@ export interface FinestraHandshakeKit extends GenitoreHandshake {
|
|
|
10
10
|
clearTimeout(id: number): void;
|
|
11
11
|
}
|
|
12
12
|
export interface EsitoHandshake {
|
|
13
|
+
language?: string;
|
|
14
|
+
uiLanguage?: string;
|
|
15
|
+
languagePreferences?: string[];
|
|
16
|
+
gameLanguages?: string[];
|
|
13
17
|
overlay?: OverlayHello;
|
|
14
18
|
ticket: string;
|
|
15
19
|
live: string | null;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export type { DailyContext } from './daily.js';
|
|
2
|
+
export type { MatchResult } from './contracts/index.js';
|
|
3
|
+
import type { Text } from './text.js';
|
|
4
|
+
export type { Text } from './text.js';
|
|
1
5
|
import type { ConnectionState, QueuedScore } from './contracts/index.js';
|
|
2
6
|
import type { Session, Overlay } from './session/index.js';
|
|
3
7
|
import type { RoomConfiguration } from './protocollo.js';
|
|
@@ -9,6 +13,8 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
|
9
13
|
[key: string]: JsonValue;
|
|
10
14
|
};
|
|
11
15
|
export interface Player {
|
|
16
|
+
language: string;
|
|
17
|
+
uiLanguage: string;
|
|
12
18
|
id: string;
|
|
13
19
|
name: string;
|
|
14
20
|
guest: boolean;
|
|
@@ -47,7 +53,7 @@ export type BoardOffline = {
|
|
|
47
53
|
reason: 'offline';
|
|
48
54
|
verified: false;
|
|
49
55
|
};
|
|
50
|
-
export type RoomStatus = 'lobby' | 'countdown' | 'playing' | 'ended';
|
|
56
|
+
export type RoomStatus = 'lobby' | 'countdown' | 'playing' | 'finished' | 'ended';
|
|
51
57
|
export interface RoomPlayer {
|
|
52
58
|
id: string;
|
|
53
59
|
name: string;
|
|
@@ -88,6 +94,10 @@ export interface RoomInvite {
|
|
|
88
94
|
url: string;
|
|
89
95
|
}
|
|
90
96
|
export interface RoomMetadata {
|
|
97
|
+
rematch?: {
|
|
98
|
+
keepSetup: boolean;
|
|
99
|
+
autoStart: boolean;
|
|
100
|
+
} | null;
|
|
91
101
|
host: string | null;
|
|
92
102
|
mode: string | null;
|
|
93
103
|
countdownAt: number | null;
|
|
@@ -105,6 +115,8 @@ export interface Room {
|
|
|
105
115
|
disconnect(): void;
|
|
106
116
|
readonly state: JsonValue;
|
|
107
117
|
readonly tick: number;
|
|
118
|
+
readonly tickRate: number;
|
|
119
|
+
readonly latency: number | null;
|
|
108
120
|
readonly seed: number;
|
|
109
121
|
readonly status: RoomStatus;
|
|
110
122
|
readonly players: readonly RoomPlayer[];
|
|
@@ -126,10 +138,12 @@ export interface Room {
|
|
|
126
138
|
onStatus(listener: (status: RoomStatus, result: JsonValue, at: number) => void): () => void;
|
|
127
139
|
onMessage(listener: (message: JsonValue) => void): () => void;
|
|
128
140
|
send(message: JsonValue): void;
|
|
141
|
+
input(value: JsonValue): void;
|
|
129
142
|
ready(ready: boolean): void;
|
|
130
143
|
setRole(role: string): void;
|
|
131
144
|
setTeam(team: number): void;
|
|
132
145
|
start(): void;
|
|
146
|
+
restart(): void;
|
|
133
147
|
leave(): void;
|
|
134
148
|
serverTime(): number;
|
|
135
149
|
}
|
|
@@ -143,6 +157,8 @@ export interface Spectate {
|
|
|
143
157
|
disconnect(): void;
|
|
144
158
|
readonly state: JsonValue;
|
|
145
159
|
readonly tick: number;
|
|
160
|
+
readonly tickRate: number;
|
|
161
|
+
readonly latency: number | null;
|
|
146
162
|
readonly seed: number;
|
|
147
163
|
readonly status: RoomStatus;
|
|
148
164
|
readonly players: readonly RoomPlayer[];
|
|
@@ -177,15 +193,19 @@ export interface Rooms {
|
|
|
177
193
|
match(options: MatchOptions): Promise<Room>;
|
|
178
194
|
}
|
|
179
195
|
export interface CaisualConnection {
|
|
196
|
+
text(): Promise<Text>;
|
|
180
197
|
session: Session;
|
|
181
198
|
overlay: Overlay;
|
|
182
199
|
connected: boolean;
|
|
183
200
|
device: DeviceReport;
|
|
184
201
|
player: Player;
|
|
185
202
|
daily: {
|
|
203
|
+
readonly expiresAt: number;
|
|
204
|
+
onChange(listener: (context: import('./daily.js').DailyContext) => void): () => void;
|
|
186
205
|
day: string;
|
|
187
206
|
seed: number;
|
|
188
207
|
random(): number;
|
|
208
|
+
rng(): () => number;
|
|
189
209
|
};
|
|
190
210
|
time: {
|
|
191
211
|
now(): number;
|
|
@@ -209,7 +229,9 @@ export interface CaisualConnection {
|
|
|
209
229
|
};
|
|
210
230
|
room: Rooms;
|
|
211
231
|
}
|
|
212
|
-
export type BaseConnection = Omit<CaisualConnection, 'device' | 'session' | 'overlay'
|
|
232
|
+
export type BaseConnection = Omit<CaisualConnection, 'device' | 'session' | 'overlay' | 'text' | 'player'> & {
|
|
233
|
+
player: Omit<Player, 'language' | 'uiLanguage'>;
|
|
234
|
+
};
|
|
213
235
|
export interface Caisual {
|
|
214
236
|
connect(): Promise<CaisualConnection>;
|
|
215
237
|
}
|
package/dist/types/kit.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export interface NodeRoomManifest {
|
|
|
21
21
|
};
|
|
22
22
|
lobby: boolean;
|
|
23
23
|
persistent?: boolean;
|
|
24
|
+
boards?: Record<string, {
|
|
25
|
+
source: 'client' | 'server';
|
|
26
|
+
day?: 'submit' | 'start';
|
|
27
|
+
}>;
|
|
24
28
|
spectators?: {
|
|
25
29
|
delayMs: number;
|
|
26
30
|
} | null;
|
|
@@ -79,6 +83,7 @@ export interface NodeRoomFlush {
|
|
|
79
83
|
}
|
|
80
84
|
export interface NodeRoomOptions {
|
|
81
85
|
storageFile?: string;
|
|
86
|
+
dailyDay?: string;
|
|
82
87
|
deposito?: SharedGameStore | null;
|
|
83
88
|
}
|
|
84
89
|
export interface NodeRoom {
|
|
@@ -20,6 +20,8 @@ export interface HostBridgeInput {
|
|
|
20
20
|
frame: FrameHandshake;
|
|
21
21
|
origineGioco: string;
|
|
22
22
|
origineLive: string;
|
|
23
|
+
language?: string;
|
|
24
|
+
languagePreferences?: readonly string[];
|
|
23
25
|
invite: string | null;
|
|
24
26
|
ticket: string;
|
|
25
27
|
configuration?: OverlayConfiguration;
|
|
@@ -56,3 +58,17 @@ export declare function creaPonteOspite(input: HostBridgeInput): {
|
|
|
56
58
|
};
|
|
57
59
|
export type HostBridge = ReturnType<typeof creaPonteOspite>;
|
|
58
60
|
export declare function avviaHandshake(input: HostBridgeInput): () => void;
|
|
61
|
+
export declare function gameViewport(frame: HTMLIFrameElement): {
|
|
62
|
+
left: number;
|
|
63
|
+
top: number;
|
|
64
|
+
right: number;
|
|
65
|
+
bottom: number;
|
|
66
|
+
scaleX: number;
|
|
67
|
+
scaleY: number;
|
|
68
|
+
};
|
|
69
|
+
export declare function measureSafeArea(frame: HTMLIFrameElement, probe: HTMLElement): {
|
|
70
|
+
top: number;
|
|
71
|
+
right: number;
|
|
72
|
+
bottom: number;
|
|
73
|
+
left: number;
|
|
74
|
+
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export declare const languages: readonly ['en', 'it', 'es', 'fr', 'de', 'pt'];
|
|
2
2
|
export type OverlayLanguage = typeof languages[number];
|
|
3
3
|
declare const words: {
|
|
4
|
+
readonly gameLanguages: readonly ["Game languages", "Lingue del gioco", "Idiomas del juego", "Langues du jeu", "Spielsprachen", "Idiomas do jogo"];
|
|
4
5
|
readonly loading: readonly ["Loading game...", "Caricamento...", "Cargando...", "Chargement...", "Spiel wird geladen...", "Carregando..."];
|
|
6
|
+
readonly loadingSlow: readonly ["This game is taking longer than expected. You can wait a little longer or try again.", "Il gioco ci sta mettendo più del previsto. Puoi aspettare ancora un po’ o riprovare.", "El juego está tardando más de lo esperado. Puedes esperar un poco más o volver a intentarlo.", "Le jeu met plus de temps que prévu. Vous pouvez patienter encore un peu ou réessayer.", "Das Spiel braucht länger als erwartet. Du kannst noch etwas warten oder es erneut versuchen.", "O jogo está demorando mais do que o esperado. Você pode esperar mais um pouco ou tentar novamente."];
|
|
5
7
|
readonly home: readonly ["Play", "Gioca", "Jugar", "Jouer", "Spielen", "Jogar"];
|
|
8
|
+
readonly homeMenu: readonly ["Menu", "Menu", "Menú", "Menu", "Menü", "Menu"];
|
|
6
9
|
readonly mode: readonly ["Mode", "Modalità", "Modo", "Mode", "Modus", "Modo"];
|
|
7
10
|
readonly play: readonly ["Play", "Gioca", "Jugar", "Jouer", "Spielen", "Jogar"];
|
|
8
11
|
readonly friendsPlay: readonly ["Play with friends", "Gioca con amici", "Jugar con amigos", "Jouer entre amis", "Mit Freunden spielen", "Jogar com amigos"];
|
|
@@ -38,6 +41,15 @@ declare const words: {
|
|
|
38
41
|
readonly starting: readonly ["Starting in", "Si inizia tra", "Empieza en", "Début dans", "Start in", "Começa em"];
|
|
39
42
|
readonly playing: readonly ["Playing", "In partita", "Jugando", "En jeu", "Im Spiel", "Jogando"];
|
|
40
43
|
readonly ended: readonly ["Game finished", "Partita conclusa", "Partida terminada", "Partie terminée", "Spiel beendet", "Partida encerrada"];
|
|
44
|
+
readonly rematchReady: readonly ["{n}/{max} ready", "{n}/{max} pronti", "{n}/{max} listos", "{n}/{max} prêts", "{n}/{max} bereit", "{n}/{max} prontos"];
|
|
45
|
+
readonly rematchStart: readonly ["Start rematch", "Avvia rivincita", "Iniciar revancha", "Lancer la revanche", "Revanche starten", "Iniciar revanche"];
|
|
46
|
+
readonly won: readonly ["You won", "Hai vinto", "Has ganado", "Vous avez gagné", "Du hast gewonnen", "Você venceu"];
|
|
47
|
+
readonly lost: readonly ["You lost", "Hai perso", "Has perdido", "Vous avez perdu", "Du hast verloren", "Você perdeu"];
|
|
48
|
+
readonly draw: readonly ["Draw", "Pareggio", "Empate", "Égalité", "Unentschieden", "Empate"];
|
|
49
|
+
readonly standings: readonly ["Standings", "Piazzamenti", "Posiciones", "Résultats", "Platzierungen", "Colocações"];
|
|
50
|
+
readonly points: readonly ["points", "punti", "puntos", "points", "Punkte", "pontos"];
|
|
51
|
+
readonly time: readonly ["time", "tempo", "tiempo", "temps", "Zeit", "tempo"];
|
|
52
|
+
readonly distance: readonly ["distance", "distanza", "distancia", "distance", "Distanz", "distância"];
|
|
41
53
|
readonly again: readonly ["Play again", "Gioca ancora", "Jugar de nuevo", "Rejouer", "Erneut spielen", "Jogar novamente"];
|
|
42
54
|
readonly newRoom: readonly ["New room. Share the new invite.", "Nuova stanza. Condividi il nuovo invito.", "Nueva sala. Comparte la invitación.", "Nouvelle salle. Partagez le lien.", "Neuer Raum. Neue Einladung teilen.", "Nova sala. Compartilhe o convite."];
|
|
43
55
|
readonly watching: readonly ["Watching", "In osservazione", "Observando", "Spectateur", "Zuschauen", "Assistindo"];
|
|
@@ -117,6 +129,7 @@ export type TextKey = keyof typeof words;
|
|
|
117
129
|
export type Dictionary = Record<TextKey, string>;
|
|
118
130
|
export declare const dictionaries: Record<OverlayLanguage, Dictionary>;
|
|
119
131
|
export declare function overlayLanguage(raw: string | null | undefined): OverlayLanguage;
|
|
132
|
+
export declare function overlayLocale(raw: string | null | undefined): string;
|
|
120
133
|
export declare function translator(language: string): (key: TextKey, values?: Record<string, string | number>) => string;
|
|
121
134
|
export declare function errorText(code: string): TextKey;
|
|
122
135
|
export {};
|
|
@@ -7,3 +7,4 @@ export type { MountOverlayInput, OverlayCrew, CrewSnapshot } from './ui.js';
|
|
|
7
7
|
export type { BoardReader, BoardQuery, BoardData } from './boards.js';
|
|
8
8
|
export { overlayLanguage } from './i18n.js';
|
|
9
9
|
export { styles as overlayStyles } from './styles.js';
|
|
10
|
+
export { overlayLocale } from './i18n.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const styles = "\n:host{all:initial;position:fixed;inset:0;z-index:10000;pointer-events:none;font:15px/1.45 system-ui,sans-serif;color:#f4f4f1;color-scheme:dark;--accent:#a8efc5}\n[data-layout],[data-surface],.sr{pointer-events:none}*{box-sizing:border-box}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button,select,input{border:1px solid #ffffff30;background:#25292b;color:inherit;border-radius:12px;min-height:44px;padding:10px 14px}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:hover:not(:disabled){background:#343b3a}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}a{color:var(--accent)}.primary{background:var(--accent);color:var(--accent-ink,#11221b);border-color:transparent;font-weight:700}.primary:hover:not(:disabled){filter:brightness(1.1);background:var(--accent)}.quiet{background:transparent}label{display:grid;gap:6px;text-align:left}select,input{width:100%;min-width:0}h1,h2,p{margin:0}h1{font-size:clamp(26px,5vw,42px);line-height:1.1;letter-spacing:-.035em}h2{font-size:20px}small,.muted{color:#bdc5c1}.stack{display:grid;gap:16px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row>*{flex:0 1 auto}.row .grow,.grow{flex:1}.split{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pill{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));display:flex;height:44px;border:1px solid #ffffff35;border-radius:24px;background:#171e20eF;box-shadow:0 4px 20px #0004;pointer-events:auto;overflow:hidden}.pill button{border:0;border-radius:0;padding:8px 13px;background:transparent}.pill
|
|
1
|
+
export declare const styles = "\n.game-icon{width:28px;height:28px;aspect-ratio:1;object-fit:contain;border-radius:7px;flex:none;vertical-align:middle}.game-icon-title{width:56px;height:56px;margin-bottom:12px}\n.safe-area-probe{position:fixed;visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}\n:host{all:initial;position:fixed;inset:0;z-index:10000;pointer-events:none;font:15px/1.45 system-ui,sans-serif;color:#f4f4f1;color-scheme:dark;--accent:#a8efc5}\n[data-layout],[data-surface],.sr{pointer-events:none}*{box-sizing:border-box}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button,select,input{border:1px solid #ffffff30;background:#25292b;color:inherit;border-radius:12px;min-height:44px;padding:10px 14px}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:hover:not(:disabled){background:#343b3a}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}a{color:var(--accent)}.primary{background:var(--accent);color:var(--accent-ink,#11221b);border-color:transparent;font-weight:700}.primary:hover:not(:disabled){filter:brightness(1.1);background:var(--accent)}.quiet{background:transparent}label{display:grid;gap:6px;text-align:left}select,input{width:100%;min-width:0}h1,h2,p{margin:0}h1{font-size:clamp(26px,5vw,42px);line-height:1.1;letter-spacing:-.035em}h2{font-size:20px}small,.muted{color:#bdc5c1}.stack{display:grid;gap:16px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row>*{flex:0 1 auto}.row .grow,.grow{flex:1}.split{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pill{position:absolute;top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));display:flex;height:44px;border:1px solid #ffffff35;border-radius:24px;background:#171e20eF;box-shadow:0 4px 20px #0004;pointer-events:auto;overflow:hidden}.pill button{border:0;border-radius:0;padding:8px 13px;background:transparent}.pill button:focus-visible{outline-offset:-4px}.pill small{margin-left:8px}.backdrop{position:absolute;inset:0;background:#0b151ce8;backdrop-filter:blur(10px);pointer-events:auto;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));overflow:auto}.backdrop.home{background-color:#142127;background-size:contain;background-repeat:no-repeat;background-position:center}.dialog{position:relative;width:min(100%,540px);max-height:100%;overflow:auto;overscroll-behavior:contain;background:#141b1df5;border:1px solid #ffffff25;border-radius:22px;padding:24px;box-shadow:0 20px 80px #0005}.dialog.wide{width:min(100%,700px)}.top{display:flex;align-items:center;gap:12px;margin-bottom:18px}.top h2{flex:1}.tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #ffffff25;padding-bottom:12px}.tabs button{min-height:36px;padding:6px 10px}.tabs [aria-current=true]{border-color:var(--accent)}.roster{list-style:none;padding:0;margin:0;display:grid;gap:8px;max-height:32dvh;overflow:auto}.roster li{display:flex;align-items:center;gap:8px;padding:10px;background:#ffffff08;border-radius:10px}.roster .name{flex:1;overflow-wrap:anywhere}.badge{border:1px solid #ffffff30;border-radius:6px;padding:2px 6px;font-size:12px}.code{font-size:24px;letter-spacing:.13em;font-variant-numeric:tabular-nums}.notice,.error{border-radius:10px;padding:10px;background:#a8efc514;overflow-wrap:anywhere}.error{background:#ff8b7720;color:#ffd2c9}.countdown{font-size:88px;line-height:1;text-align:center;font-variant-numeric:tabular-nums}.ended{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);width:max-content;background:#171e20f5;pointer-events:auto;border:1px solid #ffffff30;border-radius:16px;padding:10px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.ended [data-rematch-players]{max-width:100%;max-height:3.2em;overflow:auto;overflow-wrap:anywhere}.standings{list-style:none;margin:0;padding:0;flex-basis:100%;max-height:20dvh;overflow:auto;font-size:13px}.standings li{display:flex;justify-content:space-between;gap:16px;overflow-wrap:anywhere}.ended{max-height:calc(100dvh - 80px);overflow:auto}.ended strong{padding:0 8px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.table-wrap{overflow:auto;max-height:38dvh}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:9px 6px;border-bottom:1px solid #ffffff20}td:nth-child(3){text-align:right}td small{display:block}.self{background:#ffffff0a}.checkbox{display:flex;align-items:center;gap:8px;font-size:13px}.checkbox input{width:18px;min-height:18px}.full{width:100%}\n[hidden]{display:none!important}.voice-peers{list-style:none;margin:0;padding:0;display:grid;gap:10px}.voice-peers li{border:1px solid #ffffff25;border-radius:12px;padding:12px;display:grid;gap:8px}.voice-peers [data-speaking=true]{border-color:var(--accent)}.voice-peers input{width:100%;accent-color:var(--accent);padding:0}.voice-peers label{font-size:13px}.pill .voice-toggle{width:44px;padding:8px}.voice-toggle[data-voice-state=on][data-muted=false]{color:var(--accent)}\n.boot{position:absolute;inset:0;z-index:2;isolation:isolate;display:grid;place-items:center;overflow:auto;overscroll-behavior:contain;padding:max(100px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(48px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));background:#0b151c;opacity:1;transition:opacity .4s ease;pointer-events:auto;outline:none}\n.boot::before,.boot::after{content:\"\";position:fixed;inset:0;pointer-events:none;z-index:-1}.boot::before{background:radial-gradient(ellipse at 50% 38%,color-mix(in srgb,var(--accent),transparent 80%),transparent 65%)}.boot::after{background:radial-gradient(ellipse at 50% 38%,#0b151c20,#0b151cd9 85%),linear-gradient(#0b151c66,#0b151cbf)}\n.boot-cover{position:fixed;inset:0;z-index:-2;width:100%;height:100%;aspect-ratio:3 / 2;object-fit:contain;filter:blur(20px);opacity:.65;pointer-events:none}\n.boot-brand{position:absolute;top:max(28px,env(safe-area-inset-top));left:max(32px,env(safe-area-inset-left));display:flex;align-items:center;gap:10px;font-size:14px;font-weight:650;letter-spacing:.02em;color:#f4f4f1b3}.boot-brand span{display:grid;place-items:center;width:36px;height:36px;border:1px solid #ffffff25;border-radius:12px;background:#171e20af;box-shadow:0 4px 20px #0004;color:var(--boot-accent);font-size:20px;font-weight:800}\n.boot-content{width:min(100%,900px);text-align:center;display:grid;justify-items:center;gap:24px}.boot h1{max-width:16ch;font-size:clamp(44px,8vw,108px);font-weight:800;line-height:1.04;letter-spacing:-.05em;overflow-wrap:anywhere;text-wrap:balance;color:var(--boot-accent);text-shadow:0 20px 80px #0005}\n.boot-progress{width:112px;height:3px;border-radius:12px;background:#ffffff20;overflow:hidden;margin-top:12px}.boot-progress span{display:block;width:44%;height:100%;border-radius:inherit;background:var(--boot-accent);animation:boot-progress 1.8s ease-in-out infinite}.boot-status{max-width:42ch;min-height:3em;font-size:14px;line-height:1.5;color:#d3dad6;text-wrap:balance}.boot-recovery{min-height:44px}.boot-recovery .row{justify-content:center}.boot-leaving{opacity:0;pointer-events:none}\n@keyframes boot-progress{0%{transform:translateX(-110%)}100%{transform:translateX(340%)}}\n@media(max-width:480px){.dialog{padding:18px;border-radius:18px}.split{grid-template-columns:1fr 1fr;gap:8px}.tabs{gap:4px}.tabs button{font-size:13px;padding:6px 8px}.pill button:focus-visible{outline-offset:-4px}.pill small{display:none}.ended{gap:6px}.standings{list-style:none;margin:0;padding:0;flex-basis:100%;max-height:20dvh;overflow:auto;font-size:13px}.standings li{display:flex;justify-content:space-between;gap:16px;overflow-wrap:anywhere}.ended{max-height:calc(100dvh - 80px);overflow:auto}.ended strong{font-size:13px}.ended button{padding:8px 10px;font-size:13px}.roster{max-height:28dvh}}\n@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.boot{transition:none}.boot-progress span{animation:none;transform:translateX(65%)}}\n";
|
|
@@ -43,3 +43,7 @@ export declare function primaryAction(manifest: Manifest, mode: string): {
|
|
|
43
43
|
export declare function startReason(manifest: Manifest, session: OverlaySessionState | null): string | null;
|
|
44
44
|
export declare function canPlayAgain(session: OverlaySessionState | null): boolean;
|
|
45
45
|
export declare function normalizeInvite(code: string): string | null;
|
|
46
|
+
export declare function matchPresentation(session: OverlaySessionState | null): {
|
|
47
|
+
result: import("../contracts/index.js").MatchResult;
|
|
48
|
+
outcome: "draw" | "ended" | "lost" | "won";
|
|
49
|
+
} | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type OverlayConfiguration } from '../contracts/index.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type HostBridge } from './host-bridge.js';
|
|
3
3
|
import { type BoardReader } from './boards.js';
|
|
4
4
|
export interface CrewPerson {
|
|
5
5
|
id: string;
|
|
@@ -8,6 +8,7 @@ export interface CrewPerson {
|
|
|
8
8
|
game: {
|
|
9
9
|
slug: string;
|
|
10
10
|
name: string;
|
|
11
|
+
iconUrl: string;
|
|
11
12
|
} | null;
|
|
12
13
|
room: {
|
|
13
14
|
code: string;
|
|
@@ -41,6 +42,7 @@ export interface CrewSnapshot {
|
|
|
41
42
|
game: {
|
|
42
43
|
slug: string;
|
|
43
44
|
name: string;
|
|
45
|
+
iconUrl: string;
|
|
44
46
|
};
|
|
45
47
|
code: string;
|
|
46
48
|
} | null;
|
|
@@ -41,6 +41,11 @@ export interface RoomConfiguration {
|
|
|
41
41
|
requestRole: boolean;
|
|
42
42
|
}
|
|
43
43
|
export interface StanzaProtocollo {
|
|
44
|
+
rematch?: {
|
|
45
|
+
keepSetup: boolean;
|
|
46
|
+
autoStart: boolean;
|
|
47
|
+
} | null;
|
|
48
|
+
result?: JsonValue;
|
|
44
49
|
countdownAt?: number | null;
|
|
45
50
|
configuration?: RoomConfiguration;
|
|
46
51
|
id: string;
|
|
@@ -187,6 +192,8 @@ export type MessaggioClientStanza = MessaggioClientVoce | {
|
|
|
187
192
|
team: number;
|
|
188
193
|
} | {
|
|
189
194
|
t: 'start';
|
|
195
|
+
} | {
|
|
196
|
+
t: 'restart';
|
|
190
197
|
} | {
|
|
191
198
|
t: 'msg';
|
|
192
199
|
seq: number;
|
|
@@ -219,6 +226,10 @@ export type MessaggioServerStanza = {
|
|
|
219
226
|
score: QueuedScore;
|
|
220
227
|
} | {
|
|
221
228
|
t: 'status';
|
|
229
|
+
rematch?: {
|
|
230
|
+
keepSetup: boolean;
|
|
231
|
+
autoStart: boolean;
|
|
232
|
+
} | null;
|
|
222
233
|
status: RoomStatus;
|
|
223
234
|
at: number;
|
|
224
235
|
result: JsonValue;
|
|
@@ -226,12 +237,14 @@ export type MessaggioServerStanza = {
|
|
|
226
237
|
host?: string | null;
|
|
227
238
|
} | {
|
|
228
239
|
t: 'state';
|
|
240
|
+
tickRate?: number;
|
|
229
241
|
tick: number;
|
|
230
242
|
serverTime: number;
|
|
231
243
|
base: number;
|
|
232
244
|
patch: OperazioneDiff[];
|
|
233
245
|
} | {
|
|
234
246
|
t: 'snapshot';
|
|
247
|
+
tickRate?: number;
|
|
235
248
|
tick: number;
|
|
236
249
|
serverTime: number;
|
|
237
250
|
state: JsonValue;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { FotografiaStanza } from '../protocollo.js';
|
|
2
2
|
import type { GameDefinition, JsonValue, RoomStatus } from '../server/index.js';
|
|
3
3
|
export interface RoomManifest {
|
|
4
|
+
boards?: Record<string, {
|
|
5
|
+
source: 'client' | 'server';
|
|
6
|
+
day?: 'submit' | 'start';
|
|
7
|
+
}>;
|
|
4
8
|
id: string;
|
|
5
9
|
players: {
|
|
6
10
|
min: number;
|
|
@@ -96,8 +100,9 @@ export interface FacetStanza {
|
|
|
96
100
|
puoEntrare(identita: IdentitaGiocatore): Promise<EsitoIngresso>;
|
|
97
101
|
puoAscoltare(listener: string, speakers: string[]): Promise<EsitoAscolto[]>;
|
|
98
102
|
entra(identita: IdentitaGiocatore, connessione: string): Promise<Esito>;
|
|
99
|
-
ricevi(connessione: string, testo: string): Promise<Esito>;
|
|
103
|
+
ricevi(connessione: string, testo: string, limiteVerificato?: boolean): Promise<Esito>;
|
|
100
104
|
disconnetti(connessione: string): Promise<Esito>;
|
|
105
|
+
riconciliaConnessioni(connessioni: string[]): Promise<Esito>;
|
|
101
106
|
tick(): Promise<Esito>;
|
|
102
107
|
sveglia(): Promise<Esito>;
|
|
103
108
|
flush(): Promise<EsitoFlush>;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
export type { MatchResult } from '../contracts/index.js';
|
|
1
2
|
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
2
3
|
[key: string]: JsonValue;
|
|
3
4
|
};
|
|
4
|
-
export type
|
|
5
|
+
export type RematchOptions = boolean | {
|
|
6
|
+
keepSetup?: boolean;
|
|
7
|
+
autoStart?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type RoomStatus = 'lobby' | 'countdown' | 'playing' | 'finished' | 'ended';
|
|
5
10
|
export type VoiceMode = 'none' | 'room' | 'team' | 'proximity';
|
|
6
11
|
export type LeaveReason = 'left' | 'timeout' | 'kicked';
|
|
7
12
|
export interface SharedGameStore {
|
|
@@ -35,19 +40,27 @@ export interface Room<State extends JsonValue = JsonValue> {
|
|
|
35
40
|
kick(player: Player | string): void;
|
|
36
41
|
setRole(player: Player | string, role: string): void;
|
|
37
42
|
setTeam(player: Player | string, team: number): void;
|
|
38
|
-
end(result: JsonValue
|
|
43
|
+
end(result: JsonValue, options?: {
|
|
44
|
+
rematch?: RematchOptions;
|
|
45
|
+
}): void;
|
|
39
46
|
save(key: string, value: JsonValue): Promise<void>;
|
|
40
47
|
load(key: string): Promise<JsonValue | null>;
|
|
41
48
|
readonly shared: SharedGameStore;
|
|
42
49
|
schedule(milliseconds: number, handler: string, payload: JsonValue): void;
|
|
43
50
|
readonly board: {
|
|
51
|
+
submit(board: string, score: number, options?: {
|
|
52
|
+
daily?: boolean;
|
|
53
|
+
day?: string;
|
|
54
|
+
}): void;
|
|
44
55
|
submit(player: Player | string, board: string, score: number, options?: {
|
|
45
56
|
daily?: boolean;
|
|
57
|
+
day?: string;
|
|
46
58
|
}): void;
|
|
47
59
|
};
|
|
48
60
|
readonly daily: {
|
|
49
61
|
readonly day: string;
|
|
50
62
|
readonly seed: number;
|
|
63
|
+
readonly expiresAt: number;
|
|
51
64
|
};
|
|
52
65
|
readonly time: {
|
|
53
66
|
now(): number;
|
|
@@ -61,8 +74,10 @@ export interface Room<State extends JsonValue = JsonValue> {
|
|
|
61
74
|
export interface GameDefinition<State extends JsonValue = JsonValue> {
|
|
62
75
|
tickRate: number;
|
|
63
76
|
onCreate?(room: Room<State>): void | Promise<void>;
|
|
77
|
+
onRestart?(room: Room<State>): void | Promise<void>;
|
|
64
78
|
onStart?(room: Room<State>): void | Promise<void>;
|
|
65
79
|
onJoin?(room: Room<State>, player: Player): void | Promise<void>;
|
|
80
|
+
onConnection?(room: Room<State>, player: Player, connected: boolean): void | Promise<void>;
|
|
66
81
|
onLeave?(room: Room<State>, player: Player, reason: LeaveReason): void | Promise<void>;
|
|
67
82
|
onRoleRequest?(room: Room<State>, player: Player, role: string): void | Promise<void>;
|
|
68
83
|
onMessage?(room: Room<State>, player: Player, message: JsonValue): void | Promise<void>;
|
|
@@ -14,6 +14,7 @@ export declare class NucleoStanza {
|
|
|
14
14
|
private fineRichiesta;
|
|
15
15
|
private applicandoAzioni;
|
|
16
16
|
private ultimoStatoOsservato;
|
|
17
|
+
private tickRateSincronizzato;
|
|
17
18
|
private voceDaPersistire;
|
|
18
19
|
private constructor();
|
|
19
20
|
static apri(definizione: unknown, manifest: ManifestStanza, adattatore: AdattatoreStanza): Promise<NucleoStanza>;
|
|
@@ -30,11 +31,11 @@ export declare class NucleoStanza {
|
|
|
30
31
|
puoEntrare(identity: IdentitaGiocatore): EsitoIngresso;
|
|
31
32
|
entra(identity: IdentitaGiocatore, connessione: string): Promise<EsitoIngresso>;
|
|
32
33
|
disconnetti(connessione: string): Promise<void>;
|
|
33
|
-
ricevi(connessione: string, frame: string): Promise<void>;
|
|
34
|
+
ricevi(connessione: string, frame: string, limiteVerificato?: boolean): Promise<void>;
|
|
34
35
|
eseguiTick(): Promise<void>;
|
|
35
36
|
sveglia(): Promise<void>;
|
|
36
37
|
flush(): Promise<EsitoFlush>;
|
|
37
|
-
|
|
38
|
+
riconciliaConnessioni(): Promise<void>;
|
|
38
39
|
private ruoloAutomatico;
|
|
39
40
|
private squadraAutomatica;
|
|
40
41
|
private inLobby;
|
|
@@ -44,6 +45,9 @@ export declare class NucleoStanza {
|
|
|
44
45
|
private impostaSquadraDalServer;
|
|
45
46
|
private giocatorePerModificaDalServer;
|
|
46
47
|
private erroreMinimi;
|
|
48
|
+
private rivincita;
|
|
49
|
+
private prontiRivincita;
|
|
50
|
+
private avviaRivincita;
|
|
47
51
|
private avviaCountdown;
|
|
48
52
|
private verificaCountdown;
|
|
49
53
|
private messaggioErrato;
|
|
@@ -52,6 +56,8 @@ export declare class NucleoStanza {
|
|
|
52
56
|
private assegnaHost;
|
|
53
57
|
private eseguiTimer;
|
|
54
58
|
private pianifica;
|
|
59
|
+
private giornata;
|
|
60
|
+
private contestoGiornaliero;
|
|
55
61
|
private accodaPunteggio;
|
|
56
62
|
private richiediFine;
|
|
57
63
|
private salva;
|