narrat 2.3.0 → 2.3.1

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.
Files changed (115) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +128 -128
  3. package/dist/app.vue.d.ts +94 -91
  4. package/dist/components/MainMenu.vue.d.ts +12 -12
  5. package/dist/components/{SkillsWindow.vue.d.ts → Skills.vue.d.ts} +22 -22
  6. package/dist/components/StartMenu.vue.d.ts +46 -46
  7. package/dist/components/debug/debug-menu.vue.d.ts +48 -48
  8. package/dist/components/dialog-picture.vue.d.ts +9 -11
  9. package/dist/components/engine-splash/engine-splash.vue.d.ts +54 -54
  10. package/dist/components/game-dialog.vue.d.ts +65 -65
  11. package/dist/components/game-splash/game-splash.vue.d.ts +46 -46
  12. package/dist/components/hud.vue.d.ts +14 -14
  13. package/dist/components/in-game.vue.d.ts +46 -46
  14. package/dist/components/inventory-ui.vue.d.ts +30 -30
  15. package/dist/components/loading-bar.vue.d.ts +10 -10
  16. package/dist/components/menu-buttons.vue.d.ts +26 -54
  17. package/dist/components/notification-toast.vue.d.ts +6 -6
  18. package/dist/components/quests-ui.vue.d.ts +20 -20
  19. package/dist/components/save-slots.vue.d.ts +79 -79
  20. package/dist/components/saves/save-slot.vue.d.ts +108 -108
  21. package/dist/components/screen-layer.vue.d.ts +76 -76
  22. package/dist/components/screens.vue.d.ts +46 -46
  23. package/dist/components/transitions/NarratTransition.vue.d.ts +101 -101
  24. package/dist/components/utils/alert-modal.vue.d.ts +82 -82
  25. package/dist/components/utils/{modal-window.vue.d.ts → modal.vue.d.ts} +18 -18
  26. package/dist/components/utils/yes-no.vue.d.ts +106 -106
  27. package/dist/components/volume-controls.vue.d.ts +18 -18
  28. package/dist/config.d.ts +181 -194
  29. package/dist/constants.d.ts +8 -10
  30. package/dist/defaultConfig.d.ts +2 -2
  31. package/dist/demo/demo.d.ts +1 -1
  32. package/dist/dialog-box.vue.d.ts +41 -41
  33. package/dist/exports/config.d.ts +1 -1
  34. package/dist/exports/display.d.ts +2 -2
  35. package/dist/exports/plugins.d.ts +20 -38
  36. package/dist/favicon.svg +30 -30
  37. package/dist/lib.d.ts +14 -18
  38. package/dist/main.d.ts +6 -7
  39. package/dist/narrat.es.js +8419 -8981
  40. package/dist/narrat.es.js.map +1 -1
  41. package/dist/narrat.umd.js +73 -73
  42. package/dist/narrat.umd.js.map +1 -1
  43. package/dist/plugins/NarratPlugin.d.ts +11 -11
  44. package/dist/stores/audio-store.d.ts +48 -48
  45. package/dist/stores/dialog-store.d.ts +32 -32
  46. package/dist/stores/hud-stats-store.d.ts +22 -22
  47. package/dist/stores/inventory-store.d.ts +37 -37
  48. package/dist/stores/main-store.d.ts +822 -813
  49. package/dist/stores/notification-store.d.ts +15 -15
  50. package/dist/stores/quest-log.d.ts +39 -39
  51. package/dist/stores/rendering-store.d.ts +13 -13
  52. package/dist/stores/screens-store.d.ts +35 -35
  53. package/dist/stores/skills.d.ts +40 -40
  54. package/dist/stores/vm-store.d.ts +180 -180
  55. package/dist/style.css +1 -1
  56. package/dist/types/app-types.d.ts +5 -9
  57. package/dist/types/character-types.d.ts +27 -27
  58. package/dist/types/dialog-box-types.d.ts +11 -11
  59. package/dist/types/game-save.d.ts +36 -36
  60. package/dist/types/parser.d.ts +93 -93
  61. package/dist/types/state.d.ts +3 -3
  62. package/dist/utils/InputsListener.d.ts +9 -9
  63. package/dist/utils/ajax.d.ts +1 -1
  64. package/dist/utils/audio-loader.d.ts +10 -10
  65. package/dist/utils/characters.d.ts +5 -5
  66. package/dist/utils/data-helpers.d.ts +25 -28
  67. package/dist/utils/debounce.d.ts +14 -14
  68. package/dist/utils/error-handling.d.ts +3 -3
  69. package/dist/utils/helpers.d.ts +6 -6
  70. package/dist/utils/images-loader.d.ts +6 -6
  71. package/dist/utils/logger.d.ts +11 -11
  72. package/dist/utils/object-iterators.d.ts +8 -8
  73. package/dist/utils/promises.d.ts +1 -1
  74. package/dist/utils/randomId.d.ts +1 -1
  75. package/dist/utils/save-helpers.d.ts +18 -18
  76. package/dist/utils/skillchecks.d.ts +17 -17
  77. package/dist/utils/string-helpers.d.ts +3 -3
  78. package/dist/utils/time-helpers.d.ts +2 -2
  79. package/dist/utils/transition.d.ts +15 -15
  80. package/dist/utils/type-utils.d.ts +1 -2
  81. package/dist/utils/typed-emitter.d.ts +18 -18
  82. package/dist/vm/commands/arithmetic-commands.d.ts +23 -23
  83. package/dist/vm/commands/audio-commands.d.ts +15 -15
  84. package/dist/vm/commands/choice.d.ts +37 -37
  85. package/dist/vm/commands/clear_dialog.d.ts +2 -2
  86. package/dist/vm/commands/command-helpers.d.ts +3 -3
  87. package/dist/vm/commands/command-plugin.d.ts +43 -43
  88. package/dist/vm/commands/flow-commands.d.ts +24 -24
  89. package/dist/vm/commands/if.d.ts +10 -10
  90. package/dist/vm/commands/index.d.ts +2 -2
  91. package/dist/vm/commands/inventory-commands.d.ts +15 -15
  92. package/dist/vm/commands/logic-command.d.ts +42 -42
  93. package/dist/vm/commands/math-commands.d.ts +30 -30
  94. package/dist/vm/commands/notify.d.ts +6 -6
  95. package/dist/vm/commands/quest-commands.d.ts +30 -30
  96. package/dist/vm/commands/random-commands.d.ts +10 -10
  97. package/dist/vm/commands/screen-commands.d.ts +15 -15
  98. package/dist/vm/commands/set.d.ts +6 -6
  99. package/dist/vm/commands/skill-commands.d.ts +30 -30
  100. package/dist/vm/commands/stats-commands.d.ts +12 -12
  101. package/dist/vm/commands/string-commands.d.ts +9 -9
  102. package/dist/vm/commands/text-field.d.ts +7 -7
  103. package/dist/vm/commands/text.d.ts +14 -14
  104. package/dist/vm/commands/wait.d.ts +4 -4
  105. package/dist/vm/vm-helpers.d.ts +18 -18
  106. package/dist/vm/vm-parser.d.ts +19 -19
  107. package/dist/vm/vm-parser.test.d.ts +1 -1
  108. package/dist/vm/vm.d.ts +18 -21
  109. package/package.json +1 -1
  110. package/dist/exports/components.d.ts +0 -2
  111. package/dist/exports/events.d.ts +0 -1
  112. package/dist/exports/others.d.ts +0 -1
  113. package/dist/exports/stores.d.ts +0 -11
  114. package/dist/menu-buttons/menu-buttons.d.ts +0 -4
  115. package/dist/stores/menu-store.d.ts +0 -36
@@ -1,813 +1,822 @@
1
- import { AppOptions } from '../types/app-types';
2
- import { GameSave } from '../types/game-save';
3
- import { ChosenSlot } from '../utils/save-helpers';
4
- import { TypedEmitter } from '../utils/typed-emitter';
5
- export declare function defaultAppOptions(): AppOptions;
6
- export interface MainEvents {
7
- gameLoaded: () => void;
8
- }
9
- export declare class MainStoreListener extends TypedEmitter<MainEvents> {
10
- }
11
- export interface ErrorState {
12
- text: string;
13
- }
14
- interface MainState {
15
- ready: boolean;
16
- playing: boolean;
17
- errors: ErrorState[];
18
- playTime: {
19
- start: number;
20
- previousPlaytime: number;
21
- };
22
- saveSlot: string;
23
- options: AppOptions;
24
- flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
25
- modal: string | false;
26
- paused: boolean;
27
- loading: {
28
- step: string;
29
- percentage: number;
30
- loaded: boolean;
31
- };
32
- alerts: {
33
- title: string;
34
- text: string;
35
- resolver: () => void;
36
- id: string;
37
- }[];
38
- saving: {
39
- withPrompt?: boolean;
40
- name?: string;
41
- resolver: () => void;
42
- } | null;
43
- saveData?: GameSave;
44
- listener: MainStoreListener;
45
- }
46
- export interface MainSaveData {
47
- playTime: number;
48
- }
49
- export declare const useMain: import("pinia").StoreDefinition<"main", MainState, {
50
- isInGame(state: {
51
- ready: boolean;
52
- playing: boolean;
53
- errors: {
54
- text: string;
55
- }[];
56
- playTime: {
57
- start: number;
58
- previousPlaytime: number;
59
- };
60
- saveSlot: string;
61
- options: {
62
- baseAssetsPath: string;
63
- baseDataPath: string;
64
- charactersPath: string;
65
- configPath: string;
66
- logging: boolean;
67
- debug: boolean;
68
- };
69
- flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
70
- modal: string | false;
71
- paused: boolean;
72
- loading: {
73
- step: string;
74
- percentage: number;
75
- loaded: boolean;
76
- };
77
- alerts: {
78
- title: string;
79
- text: string;
80
- resolver: () => void;
81
- id: string;
82
- }[];
83
- saving: {
84
- withPrompt?: boolean | undefined;
85
- name?: string | undefined;
86
- resolver: () => void;
87
- } | null;
88
- saveData?: {
89
- version: string;
90
- skills: {
91
- skillChecks: {
92
- [key: string]: import("./skills").SkillCheckState;
93
- };
94
- skills: import("./skills").SkillsState;
95
- };
96
- screen: {
97
- layers: string[];
98
- buttons: import("./screens-store").ButtonsState;
99
- };
100
- main: {
101
- playTime: number;
102
- };
103
- dialog: {
104
- dialog: {
105
- speaker: string;
106
- text: string;
107
- pose?: string | undefined;
108
- cssClass?: string | undefined;
109
- choices?: {
110
- choice: string;
111
- originalIndex: number;
112
- allowed: boolean;
113
- }[] | undefined;
114
- textField?: boolean | undefined;
115
- interactive: boolean;
116
- id: string;
117
- }[];
118
- };
119
- vm: {
120
- lastLabel: string;
121
- data: import("./vm-store").DataState;
122
- };
123
- audio: {
124
- modes: {
125
- [key: string]: import("./audio-store").AudioModeState;
126
- };
127
- masterVolume: number;
128
- };
129
- hud: {
130
- hudStats: import("./hud-stats-store").HudStatsState;
131
- };
132
- inventory: {
133
- items: {
134
- [key: string]: import("./inventory-store").ItemState;
135
- };
136
- interactionTags: {
137
- [key: string]: {
138
- blockedInteraction: boolean;
139
- };
140
- };
141
- };
142
- quests: {
143
- quests: {
144
- [key: string]: import("./quest-log").QuestState;
145
- };
146
- };
147
- metadata: {
148
- saveDate: string;
149
- name: string;
150
- slotType: "manual" | "auto";
151
- id: string;
152
- createdCounter: number;
153
- };
154
- } | undefined;
155
- listener: {
156
- listeners: {
157
- gameLoaded: Set<() => void>;
158
- };
159
- on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
160
- off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
161
- once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
162
- emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
163
- clear: () => void;
164
- };
165
- } & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
166
- }, {
167
- setup(): Promise<void>;
168
- engineLoading(): Promise<void>;
169
- alert(title: string, text: string): Promise<void>;
170
- closeAlert(id: string): void;
171
- startMachine(): void;
172
- setSaveSlot(slot: string): void;
173
- startGame(saveSlot: string): Promise<void>;
174
- loadGame(save: GameSave, saveSlot: string): Promise<void>;
175
- manualSave({ saveName, withPrompt, }: {
176
- saveName?: string | undefined;
177
- withPrompt?: boolean | undefined;
178
- }): Promise<void>;
179
- finishManualSave(slotData: ChosenSlot | null, yes: boolean): void;
180
- playerAnswered(choice: number | string): void;
181
- menuReturn(): void;
182
- createError(text: string): void;
183
- clearErrors(): void;
184
- setFlowState(flowState: 'menu' | 'playing'): void;
185
- openModal(modal: string): void;
186
- closeModal(): void;
187
- toggleMenu(): void;
188
- pause(): void;
189
- unpause(): void;
190
- setOptions(options: AppOptions): void;
191
- startPlaying(): void;
192
- reset(): void;
193
- resetAllStores(): void;
194
- generateSaveData(): MainSaveData;
195
- loadSaveData(data: MainSaveData): void;
196
- autoSaveGame({ slotId, name }: {
197
- slotId?: string | undefined;
198
- name?: string | undefined;
199
- }): void;
200
- setLoadedData(save: GameSave): void;
201
- getAllStates(): {
202
- main: any & {
203
- ready: boolean;
204
- playing: boolean;
205
- errors: {
206
- text: string;
207
- }[];
208
- playTime: {
209
- start: number;
210
- previousPlaytime: number;
211
- };
212
- saveSlot: string;
213
- options: {
214
- baseAssetsPath: string;
215
- baseDataPath: string;
216
- charactersPath: string;
217
- configPath: string;
218
- logging: boolean;
219
- debug: boolean;
220
- };
221
- flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
222
- modal: string | false;
223
- paused: boolean;
224
- loading: {
225
- step: string;
226
- percentage: number;
227
- loaded: boolean;
228
- };
229
- alerts: {
230
- title: string;
231
- text: string;
232
- resolver: () => void;
233
- id: string;
234
- }[];
235
- saving: {
236
- withPrompt?: boolean | undefined;
237
- name?: string | undefined;
238
- resolver: () => void;
239
- } | null;
240
- saveData?: {
241
- version: string;
242
- skills: {
243
- skillChecks: {
244
- [key: string]: import("./skills").SkillCheckState;
245
- };
246
- skills: import("./skills").SkillsState;
247
- };
248
- screen: {
249
- layers: string[];
250
- buttons: import("./screens-store").ButtonsState;
251
- };
252
- main: {
253
- playTime: number;
254
- };
255
- dialog: {
256
- dialog: {
257
- speaker: string;
258
- text: string;
259
- pose?: string | undefined;
260
- cssClass?: string | undefined;
261
- choices?: {
262
- choice: string;
263
- originalIndex: number;
264
- allowed: boolean;
265
- }[] | undefined;
266
- textField?: boolean | undefined;
267
- interactive: boolean;
268
- id: string;
269
- }[];
270
- };
271
- vm: {
272
- lastLabel: string;
273
- data: import("./vm-store").DataState;
274
- };
275
- audio: {
276
- modes: {
277
- [key: string]: import("./audio-store").AudioModeState;
278
- };
279
- masterVolume: number;
280
- };
281
- hud: {
282
- hudStats: import("./hud-stats-store").HudStatsState;
283
- };
284
- inventory: {
285
- items: {
286
- [key: string]: import("./inventory-store").ItemState;
287
- };
288
- interactionTags: {
289
- [key: string]: {
290
- blockedInteraction: boolean;
291
- };
292
- };
293
- };
294
- quests: {
295
- quests: {
296
- [key: string]: import("./quest-log").QuestState;
297
- };
298
- };
299
- metadata: {
300
- saveDate: string;
301
- name: string;
302
- slotType: "manual" | "auto";
303
- id: string;
304
- createdCounter: number;
305
- };
306
- } | undefined;
307
- listener: {
308
- listeners: {
309
- gameLoaded: Set<() => void>;
310
- };
311
- on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
312
- off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
313
- once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
314
- emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
315
- clear: () => void;
316
- };
317
- } & import("pinia")._StoreWithState<"main", MainState, {
318
- isInGame(state: {
319
- ready: boolean;
320
- playing: boolean;
321
- errors: {
322
- text: string;
323
- }[];
324
- playTime: {
325
- start: number;
326
- previousPlaytime: number;
327
- };
328
- saveSlot: string;
329
- options: {
330
- baseAssetsPath: string;
331
- baseDataPath: string;
332
- charactersPath: string;
333
- configPath: string;
334
- logging: boolean;
335
- debug: boolean;
336
- };
337
- flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
338
- modal: string | false;
339
- paused: boolean;
340
- loading: {
341
- step: string;
342
- percentage: number;
343
- loaded: boolean;
344
- };
345
- alerts: {
346
- title: string;
347
- text: string;
348
- resolver: () => void;
349
- id: string;
350
- }[];
351
- saving: {
352
- withPrompt?: boolean | undefined;
353
- name?: string | undefined;
354
- resolver: () => void;
355
- } | null;
356
- saveData?: {
357
- version: string;
358
- skills: {
359
- skillChecks: {
360
- [key: string]: import("./skills").SkillCheckState;
361
- };
362
- skills: import("./skills").SkillsState;
363
- };
364
- screen: {
365
- layers: string[];
366
- buttons: import("./screens-store").ButtonsState;
367
- };
368
- main: {
369
- playTime: number;
370
- };
371
- dialog: {
372
- dialog: {
373
- speaker: string;
374
- text: string;
375
- pose?: string | undefined;
376
- cssClass?: string | undefined;
377
- choices?: {
378
- choice: string;
379
- originalIndex: number;
380
- allowed: boolean;
381
- }[] | undefined;
382
- textField?: boolean | undefined;
383
- interactive: boolean;
384
- id: string;
385
- }[];
386
- };
387
- vm: {
388
- lastLabel: string;
389
- data: import("./vm-store").DataState;
390
- };
391
- audio: {
392
- modes: {
393
- [key: string]: import("./audio-store").AudioModeState;
394
- };
395
- masterVolume: number;
396
- };
397
- hud: {
398
- hudStats: import("./hud-stats-store").HudStatsState;
399
- };
400
- inventory: {
401
- items: {
402
- [key: string]: import("./inventory-store").ItemState;
403
- };
404
- interactionTags: {
405
- [key: string]: {
406
- blockedInteraction: boolean;
407
- };
408
- };
409
- };
410
- quests: {
411
- quests: {
412
- [key: string]: import("./quest-log").QuestState;
413
- };
414
- };
415
- metadata: {
416
- saveDate: string;
417
- name: string;
418
- slotType: "manual" | "auto";
419
- id: string;
420
- createdCounter: number;
421
- };
422
- } | undefined;
423
- listener: {
424
- listeners: {
425
- gameLoaded: Set<() => void>;
426
- };
427
- on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
428
- off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
429
- once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
430
- emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
431
- clear: () => void;
432
- };
433
- } & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
434
- }, any> & import("pinia")._StoreWithGetters<{
435
- isInGame(state: {
436
- ready: boolean;
437
- playing: boolean;
438
- errors: {
439
- text: string;
440
- }[];
441
- playTime: {
442
- start: number;
443
- previousPlaytime: number;
444
- };
445
- saveSlot: string;
446
- options: {
447
- baseAssetsPath: string;
448
- baseDataPath: string;
449
- charactersPath: string;
450
- configPath: string;
451
- logging: boolean;
452
- debug: boolean;
453
- };
454
- flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
455
- modal: string | false;
456
- paused: boolean;
457
- loading: {
458
- step: string;
459
- percentage: number;
460
- loaded: boolean;
461
- };
462
- alerts: {
463
- title: string;
464
- text: string;
465
- resolver: () => void;
466
- id: string;
467
- }[];
468
- saving: {
469
- withPrompt?: boolean | undefined;
470
- name?: string | undefined;
471
- resolver: () => void;
472
- } | null;
473
- saveData?: {
474
- version: string;
475
- skills: {
476
- skillChecks: {
477
- [key: string]: import("./skills").SkillCheckState;
478
- };
479
- skills: import("./skills").SkillsState;
480
- };
481
- screen: {
482
- layers: string[];
483
- buttons: import("./screens-store").ButtonsState;
484
- };
485
- main: {
486
- playTime: number;
487
- };
488
- dialog: {
489
- dialog: {
490
- speaker: string;
491
- text: string;
492
- pose?: string | undefined;
493
- cssClass?: string | undefined;
494
- choices?: {
495
- choice: string;
496
- originalIndex: number;
497
- allowed: boolean;
498
- }[] | undefined;
499
- textField?: boolean | undefined;
500
- interactive: boolean;
501
- id: string;
502
- }[];
503
- };
504
- vm: {
505
- lastLabel: string;
506
- data: import("./vm-store").DataState;
507
- };
508
- audio: {
509
- modes: {
510
- [key: string]: import("./audio-store").AudioModeState;
511
- };
512
- masterVolume: number;
513
- };
514
- hud: {
515
- hudStats: import("./hud-stats-store").HudStatsState;
516
- };
517
- inventory: {
518
- items: {
519
- [key: string]: import("./inventory-store").ItemState;
520
- };
521
- interactionTags: {
522
- [key: string]: {
523
- blockedInteraction: boolean;
524
- };
525
- };
526
- };
527
- quests: {
528
- quests: {
529
- [key: string]: import("./quest-log").QuestState;
530
- };
531
- };
532
- metadata: {
533
- saveDate: string;
534
- name: string;
535
- slotType: "manual" | "auto";
536
- id: string;
537
- createdCounter: number;
538
- };
539
- } | undefined;
540
- listener: {
541
- listeners: {
542
- gameLoaded: Set<() => void>;
543
- };
544
- on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
545
- off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
546
- once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
547
- emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
548
- clear: () => void;
549
- };
550
- } & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
551
- }> & import("pinia").PiniaCustomProperties<string, import("pinia").StateTree, import("pinia")._GettersTree<import("pinia").StateTree>, import("pinia")._ActionsTree>;
552
- screens: import("pinia").Store<"screens", import("./screens-store").ScreenState, {}, {
553
- setScreen(screen: string, layer: number, transition?: import("../utils/transition").AddTransition | undefined): Promise<void>;
554
- finishTransition(layer: number): void;
555
- transitionScreen(screen: string, transition: import("../utils/transition").AddTransition, layer?: number | undefined): Promise<void>;
556
- emptyLayer(layer: number): void;
557
- setButtons(config: import("../config").Config): void;
558
- changeButton(button: string, newValue: import("./screens-store").ButtonStateValue): void;
559
- generateSaveData(): import("./screens-store").ScreenSave;
560
- loadSaveData(data: import("./screens-store").ScreenSave): void;
561
- }>;
562
- skills: import("pinia").Store<"skills", import("./skills").Skills, {}, {
563
- setupSkillCheck(skillCheck: import("./skills").SkillCheckState, id: string): void;
564
- passSkillCheck(skillCheckId: string, hide?: boolean | undefined): void;
565
- failSkillCheck(skillCheckId: string, hide?: boolean | undefined): void;
566
- generateSaveData(): import("./skills").Skills;
567
- getSkillCheck(id: string): import("./skills").SkillCheckState;
568
- createSkillCheckState(): import("./skills").SkillCheckState;
569
- loadSaveData(data: import("./skills").Skills): void;
570
- setupSkills(skills: {
571
- [key: string]: import("../config").SkillData;
572
- }): void;
573
- getSkill(skill: string): import("./skills").SkillState;
574
- getSkillLevel(skill: string): number;
575
- getSkillXp(skill: string): number;
576
- addXp(skill: string, xp: number): void;
577
- setSkillLevel(skill: string, level: number): void;
578
- incrementSkill(skill: string, amount: number): void;
579
- levelledUp(skill: string): void;
580
- }>;
581
- dialog: import("pinia").Store<"dialog", {
582
- dialog: import("./dialog-store").DialogKey[];
583
- }, {
584
- currentDialog(): import("./dialog-store").DialogKey;
585
- }, {
586
- generateSaveData(): {
587
- dialog: import("./dialog-store").DialogKey[];
588
- };
589
- loadSaveData(data: {
590
- dialog: import("./dialog-store").DialogKey[];
591
- }): void;
592
- addDialog(dialog: import("./dialog-store").AddDialogParams): void;
593
- clearDialog(): void;
594
- reset(): void;
595
- }>;
596
- vm: import("pinia").Store<"vm", import("./vm-store").VMState, {
597
- currentFrame(state: {
598
- commandsWaitingForPlayerAnswer: {
599
- args: (import("../types/parser").Parser.Primitive | {
600
- code: string;
601
- command: {
602
- commandType: string;
603
- operator: string;
604
- args: (import("../types/parser").Parser.Primitive | any)[];
605
- options: import("../types/parser").Parser.DefaultArg;
606
- staticOptions: {};
607
- };
608
- fileName: string;
609
- line: number;
610
- })[];
611
- commandType: string;
612
- options: any;
613
- code: string;
614
- staticOptions: any;
615
- operator: string;
616
- line: number;
617
- fileName: string;
618
- finishCommand?: ((res: any) => void) | undefined;
619
- }[];
620
- stack: {
621
- blocks: {
622
- currentIndex: number;
623
- branchData: {
624
- branch: {
625
- code: string;
626
- command: {
627
- commandType: string;
628
- operator: string;
629
- args: (import("../types/parser").Parser.Primitive | any)[];
630
- options: import("../types/parser").Parser.DefaultArg;
631
- staticOptions: {};
632
- };
633
- fileName: string;
634
- line: number;
635
- }[];
636
- args?: string[] | undefined;
637
- };
638
- }[];
639
- label: string;
640
- scope: {
641
- [key: string]: any;
642
- };
643
- returnValue: any;
644
- }[];
645
- script: import("../types/parser").Parser.ParsedScript;
646
- data: import("./vm-store").DataState;
647
- lastLabel: string;
648
- jumpTarget?: {
649
- currentIndex: number;
650
- branchData: {
651
- branch: {
652
- code: string;
653
- command: {
654
- commandType: string;
655
- operator: string;
656
- args: (import("../types/parser").Parser.Primitive | any)[];
657
- options: import("../types/parser").Parser.DefaultArg;
658
- staticOptions: {};
659
- };
660
- fileName: string;
661
- line: number;
662
- }[];
663
- args?: string[] | undefined;
664
- };
665
- label: string;
666
- scope?: {
667
- [key: string]: any;
668
- } | undefined;
669
- args?: any[] | undefined;
670
- } | undefined;
671
- hasJumped: boolean;
672
- } & import("pinia").PiniaCustomStateProperties<import("./vm-store").VMState>): import("./vm-store").MachineFrame | undefined;
673
- scope(): {
674
- [key: string]: any;
675
- };
676
- currentBlock(): import("./vm-store").MachineBlock | undefined;
677
- currentLine(): import("../types/parser").Parser.ParsedExpression<import("../types/parser").Parser.DefaultArg, {}> | undefined;
678
- commandWaitingForAnswer(): import("../types/parser").Parser.Command<any, any> | undefined;
679
- }, {
680
- generateSaveData(): import("./vm-store").VMSave;
681
- loadSaveData(data: import("./vm-store").VMSave): void;
682
- setReturnValue(value: any): void;
683
- waitForPlayerAnswer(cmd: import("../types/parser").Parser.Command<any, any>): void;
684
- popAnswerQueue(): {
685
- args: (import("../types/parser").Parser.Primitive | {
686
- code: string;
687
- command: {
688
- commandType: string;
689
- operator: string;
690
- args: (import("../types/parser").Parser.Primitive | any)[];
691
- options: import("../types/parser").Parser.DefaultArg;
692
- staticOptions: {};
693
- };
694
- fileName: string;
695
- line: number;
696
- })[];
697
- commandType: string;
698
- options: any;
699
- code: string;
700
- staticOptions: any;
701
- operator: string;
702
- line: number;
703
- fileName: string;
704
- finishCommand?: ((res: any) => void) | undefined;
705
- } | undefined;
706
- addScopedVariable(key: string, value: any): void;
707
- loadScripts(scriptPaths: string[]): Promise<void>;
708
- start(): void;
709
- setLastLabel(label: string): void;
710
- reset(): void;
711
- setScript(script: import("../types/parser").Parser.ParsedScript): void;
712
- overrideData(data: import("./vm-store").DataState): void;
713
- setStack(stack: import("./vm-store").SetFrameOptions): void;
714
- frameOptionsToFrame(frame: import("./vm-store").SetFrameOptions): import("./vm-store").MachineFrame;
715
- addBlock(frame: import("./vm-store").MachineFrame, block: import("./vm-store").MachineBlock): void;
716
- addAndRunBlock(block: import("./vm-store").MachineBlock): Promise<any>;
717
- setData(path: string, value: any): void;
718
- addInstruction(path: string, value: any): void;
719
- addFrame(newStackOptions: import("./vm-store").AddFrameOptions): void;
720
- addAndRunFrame(newStackOptions: import("./vm-store").AddFrameOptions): Promise<any>;
721
- runFrame(): Promise<any>;
722
- cleanFrame(): any;
723
- runBlock(): Promise<any>;
724
- cleanBlock(): void;
725
- runGame(): Promise<void>;
726
- nextLineOnly(): Promise<boolean>;
727
- isBlockFinished(): boolean;
728
- reachedEndOfScript(): void;
729
- runLineOnly(): Promise<any>;
730
- runLabelFunction(label: string, ...args: any[]): Promise<any>;
731
- runCustomFrame(stack: import("./vm-store").AddFrameOptions): void;
732
- jumpToLabel(label: string, ...args: any[]): Promise<void>;
733
- runThenGoBackToPreviousDialog(label: string, ...args: any[]): Promise<any>;
734
- }>;
735
- hud: import("pinia").Store<"hud", import("./hud-stats-store").HudState, {}, {
736
- setupHudStats(stats: {
737
- [key: string]: import("../config").HudStatConfig;
738
- }): void;
739
- setStat(stat: string, value: number): void;
740
- addStat(stat: string, value: number): void;
741
- getStat(stat: string): import("./hud-stats-store").HudStat;
742
- getStatValue(stat: string): number;
743
- generateSaveData(): import("./hud-stats-store").HudState;
744
- loadSaveData(data: import("./hud-stats-store").HudState): void;
745
- }>;
746
- audio: import("pinia").Store<"audio", import("./audio-store").AudioState, {}, {
747
- stopAll(): void;
748
- stopChannel(mode: "sound" | "music" | "ambiant", channelIndex: number): Promise<void>;
749
- pauseChannel(mode: "sound" | "music" | "ambiant", channelIndex: number): Promise<void>;
750
- playChannel(mode: "sound" | "music" | "ambiant", audio: string, channelIndex: number): Promise<void>;
751
- changeChannel(mode: "sound" | "music" | "ambiant", audio: string, channelIndex: number): Promise<void>;
752
- actuallyStopChannel(channel: import("./audio-store").AudioChannel): void;
753
- getAudioChannel(mode: "sound" | "music" | "ambiant", channelIndex: number): import("./audio-store").AudioChannel | null;
754
- setAudioChannel(mode: "sound" | "music" | "ambiant", channelIndex: number, value: import("./audio-store").AudioChannel | null): void;
755
- actuallyPlayChannel(mode: "sound" | "music" | "ambiant", channelIndex: number, audio: string): Promise<void>;
756
- reloadAudio(save: import("./audio-store").AudioSave): void;
757
- stopSound(key: string): void;
758
- generateSaveData(): import("./audio-store").AudioSave;
759
- loadSaveData(data: import("./audio-store").AudioSave): void;
760
- reset(): void;
761
- setModeVolume(mode: "sound" | "music" | "ambiant", volume: number): void;
762
- setMasterVolume(volume: number): void;
763
- modeVolume(mode: "sound" | "music" | "ambiant"): number;
764
- }>;
765
- rendering: import("pinia").Store<"rendering", import("./rendering-store").RenderingState, {}, {
766
- updateScreenSize(width: number, height: number, textWidth: number): void;
767
- }>;
768
- notifications: import("pinia").Store<"notifications", import("./notification-store").NotificationsState, {}, {
769
- addNotification(text: string): Promise<void>;
770
- deleteNotification(id: string): void;
771
- disableNotifications(): void;
772
- enableNotifications(): void;
773
- }>;
774
- inventory: import("pinia").Store<"inventory", import("./inventory-store").InventoryState, {}, {
775
- generateSaveData(): import("./inventory-store").InventoryState;
776
- loadSaveData(save: import("./inventory-store").InventoryState): void;
777
- setupItems(items: {
778
- [key: string]: import("../config").ItemData;
779
- }): void;
780
- hasItem(itemId: string, amount?: number | undefined): boolean;
781
- getExistingItem(id: string): import("./inventory-store").ItemState | undefined;
782
- getItemAmount(id: string): number;
783
- add(item: import("./inventory-store").ItemState): void;
784
- enableInteraction(tag?: string | undefined): void;
785
- disableInteraction(tag?: string | undefined): void;
786
- onScriptStart(): void;
787
- onScriptEnd(): void;
788
- isInteractionTagBlocked(tag?: string | undefined): boolean;
789
- remove(item: import("./inventory-store").ItemState): void;
790
- deleteItem(id: string): void;
791
- }>;
792
- quests: import("pinia").Store<"quests", import("./quest-log").QuestLogState, {}, {
793
- getQuest(questId: string): import("./quest-log").QuestState;
794
- getObjective(questId: string, objectiveId: string): import("./quest-log").ObjectiveState;
795
- setupQuests(quests: {
796
- [key: string]: import("../config").QuestData;
797
- }): void;
798
- startQuest(questId: string): void;
799
- startObjective(questId: string, objectiveId: string): void;
800
- completeObjective(questId: string, objectiveId: string): void;
801
- completeQuest(questId: string, ending?: string | undefined): void;
802
- isQuestCompleted(questId: string): boolean;
803
- isObjectiveCompleted(questId: string, objectiveId: string): boolean;
804
- isQuestStarted(questId: string): boolean;
805
- isObjectiveStarted(questId: string, objectiveId: string): boolean;
806
- removeQuest(id: string): void;
807
- generateSaveData(): import("./quest-log").QuestLogState;
808
- loadSaveData(data: import("./quest-log").QuestLogState): void;
809
- }>;
810
- };
811
- overrideStates(override: any): void;
812
- }>;
813
- export {};
1
+ import { GameConfig } from '../types/app-types';
2
+ import { GameSave } from '../types/game-save';
3
+ import { ChosenSlot } from '../utils/save-helpers';
4
+ import { AppOptions } from '../config';
5
+ import { TypedEmitter } from '../utils/typed-emitter';
6
+ export interface MainEvents {
7
+ gameLoaded: () => void;
8
+ }
9
+ export declare class MainStoreListener extends TypedEmitter<MainEvents> {
10
+ }
11
+ export interface ErrorState {
12
+ text: string;
13
+ }
14
+ interface MainState {
15
+ ready: boolean;
16
+ playing: boolean;
17
+ errors: ErrorState[];
18
+ playTime: {
19
+ start: number;
20
+ previousPlaytime: number;
21
+ };
22
+ saveSlot: string;
23
+ options: AppOptions;
24
+ flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
25
+ modal: string | false;
26
+ paused: boolean;
27
+ appConfig: GameConfig;
28
+ loading: {
29
+ step: string;
30
+ percentage: number;
31
+ loaded: boolean;
32
+ };
33
+ alerts: {
34
+ title: string;
35
+ text: string;
36
+ resolver: () => void;
37
+ id: string;
38
+ }[];
39
+ saving: {
40
+ withPrompt?: boolean;
41
+ name?: string;
42
+ resolver: () => void;
43
+ } | null;
44
+ saveData?: GameSave;
45
+ listener: MainStoreListener;
46
+ }
47
+ export interface MainSaveData {
48
+ playTime: number;
49
+ }
50
+ export declare const useMain: import("pinia").StoreDefinition<"main", MainState, {
51
+ isInGame(state: {
52
+ ready: boolean;
53
+ playing: boolean;
54
+ errors: {
55
+ text: string;
56
+ }[];
57
+ playTime: {
58
+ start: number;
59
+ previousPlaytime: number;
60
+ };
61
+ saveSlot: string;
62
+ options: {
63
+ baseAssetsPath?: string | undefined;
64
+ logging: boolean;
65
+ debug: boolean;
66
+ };
67
+ flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
68
+ modal: string | false;
69
+ paused: boolean;
70
+ appConfig: {
71
+ baseAssetsPath?: string | undefined;
72
+ charactersPath: string;
73
+ configPath: string;
74
+ };
75
+ loading: {
76
+ step: string;
77
+ percentage: number;
78
+ loaded: boolean;
79
+ };
80
+ alerts: {
81
+ title: string;
82
+ text: string;
83
+ resolver: () => void;
84
+ id: string;
85
+ }[];
86
+ saving: {
87
+ withPrompt?: boolean | undefined;
88
+ name?: string | undefined;
89
+ resolver: () => void;
90
+ } | null;
91
+ saveData?: {
92
+ version: string;
93
+ skills: {
94
+ skillChecks: {
95
+ [key: string]: import("./skills").SkillCheckState;
96
+ };
97
+ skills: import("./skills").SkillsState;
98
+ };
99
+ screen: {
100
+ layers: string[];
101
+ buttons: import("./screens-store").ButtonsState;
102
+ };
103
+ main: {
104
+ playTime: number;
105
+ };
106
+ dialog: {
107
+ dialog: {
108
+ speaker: string;
109
+ text: string;
110
+ pose?: string | undefined;
111
+ cssClass?: string | undefined;
112
+ choices?: {
113
+ choice: string;
114
+ originalIndex: number;
115
+ allowed: boolean;
116
+ }[] | undefined;
117
+ textField?: boolean | undefined;
118
+ interactive: boolean;
119
+ id: string;
120
+ }[];
121
+ };
122
+ vm: {
123
+ lastLabel: string;
124
+ data: import("./vm-store").DataState;
125
+ };
126
+ audio: {
127
+ modes: {
128
+ [key: string]: import("./audio-store").AudioModeState;
129
+ };
130
+ masterVolume: number;
131
+ };
132
+ hud: {
133
+ hudStats: import("./hud-stats-store").HudStatsState;
134
+ };
135
+ inventory: {
136
+ items: {
137
+ [key: string]: import("./inventory-store").ItemState;
138
+ };
139
+ interactionTags: {
140
+ [key: string]: {
141
+ blockedInteraction: boolean;
142
+ };
143
+ };
144
+ };
145
+ quests: {
146
+ quests: {
147
+ [key: string]: import("./quest-log").QuestState;
148
+ };
149
+ };
150
+ metadata: {
151
+ saveDate: string;
152
+ name: string;
153
+ slotType: "manual" | "auto";
154
+ id: string;
155
+ createdCounter: number;
156
+ };
157
+ } | undefined;
158
+ listener: {
159
+ listeners: {
160
+ gameLoaded: Set<() => void>;
161
+ };
162
+ on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
163
+ off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
164
+ once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
165
+ emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
166
+ clear: () => void;
167
+ };
168
+ } & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
169
+ }, {
170
+ setup(): Promise<void>;
171
+ engineLoading(): Promise<void>;
172
+ alert(title: string, text: string): Promise<void>;
173
+ closeAlert(id: string): void;
174
+ startMachine(): void;
175
+ setSaveSlot(slot: string): void;
176
+ startGame(saveSlot: string): Promise<void>;
177
+ loadGame(save: GameSave, saveSlot: string): Promise<void>;
178
+ manualSave({ saveName, withPrompt, }: {
179
+ saveName?: string | undefined;
180
+ withPrompt?: boolean | undefined;
181
+ }): Promise<void>;
182
+ finishManualSave(slotData: ChosenSlot | null, yes: boolean): void;
183
+ playerAnswered(choice: number | string): void;
184
+ menuReturn(): void;
185
+ createError(text: string): void;
186
+ clearErrors(): void;
187
+ setFlowState(flowState: 'menu' | 'playing'): void;
188
+ openModal(modal: string): void;
189
+ closeModal(): void;
190
+ toggleMenu(): void;
191
+ pause(): void;
192
+ unpause(): void;
193
+ setOptions(options: AppOptions): void;
194
+ startPlaying(): void;
195
+ reset(): void;
196
+ resetAllStores(): void;
197
+ generateSaveData(): MainSaveData;
198
+ loadSaveData(data: MainSaveData): void;
199
+ autoSaveGame({ slotId, name }: {
200
+ slotId?: string | undefined;
201
+ name?: string | undefined;
202
+ }): void;
203
+ setLoadedData(save: GameSave): void;
204
+ getAllStates(): {
205
+ main: any & {
206
+ ready: boolean;
207
+ playing: boolean;
208
+ errors: {
209
+ text: string;
210
+ }[];
211
+ playTime: {
212
+ start: number;
213
+ previousPlaytime: number;
214
+ };
215
+ saveSlot: string;
216
+ options: {
217
+ baseAssetsPath?: string | undefined;
218
+ logging: boolean;
219
+ debug: boolean;
220
+ };
221
+ flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
222
+ modal: string | false;
223
+ paused: boolean;
224
+ appConfig: {
225
+ baseAssetsPath?: string | undefined;
226
+ charactersPath: string;
227
+ configPath: string;
228
+ };
229
+ loading: {
230
+ step: string;
231
+ percentage: number;
232
+ loaded: boolean;
233
+ };
234
+ alerts: {
235
+ title: string;
236
+ text: string;
237
+ resolver: () => void;
238
+ id: string;
239
+ }[];
240
+ saving: {
241
+ withPrompt?: boolean | undefined;
242
+ name?: string | undefined;
243
+ resolver: () => void;
244
+ } | null;
245
+ saveData?: {
246
+ version: string;
247
+ skills: {
248
+ skillChecks: {
249
+ [key: string]: import("./skills").SkillCheckState;
250
+ };
251
+ skills: import("./skills").SkillsState;
252
+ };
253
+ screen: {
254
+ layers: string[];
255
+ buttons: import("./screens-store").ButtonsState;
256
+ };
257
+ main: {
258
+ playTime: number;
259
+ };
260
+ dialog: {
261
+ dialog: {
262
+ speaker: string;
263
+ text: string;
264
+ pose?: string | undefined;
265
+ cssClass?: string | undefined;
266
+ choices?: {
267
+ choice: string;
268
+ originalIndex: number;
269
+ allowed: boolean;
270
+ }[] | undefined;
271
+ textField?: boolean | undefined;
272
+ interactive: boolean;
273
+ id: string;
274
+ }[];
275
+ };
276
+ vm: {
277
+ lastLabel: string;
278
+ data: import("./vm-store").DataState;
279
+ };
280
+ audio: {
281
+ modes: {
282
+ [key: string]: import("./audio-store").AudioModeState;
283
+ };
284
+ masterVolume: number;
285
+ };
286
+ hud: {
287
+ hudStats: import("./hud-stats-store").HudStatsState;
288
+ };
289
+ inventory: {
290
+ items: {
291
+ [key: string]: import("./inventory-store").ItemState;
292
+ };
293
+ interactionTags: {
294
+ [key: string]: {
295
+ blockedInteraction: boolean;
296
+ };
297
+ };
298
+ };
299
+ quests: {
300
+ quests: {
301
+ [key: string]: import("./quest-log").QuestState;
302
+ };
303
+ };
304
+ metadata: {
305
+ saveDate: string;
306
+ name: string;
307
+ slotType: "manual" | "auto";
308
+ id: string;
309
+ createdCounter: number;
310
+ };
311
+ } | undefined;
312
+ listener: {
313
+ listeners: {
314
+ gameLoaded: Set<() => void>;
315
+ };
316
+ on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
317
+ off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
318
+ once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
319
+ emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
320
+ clear: () => void;
321
+ };
322
+ } & import("pinia")._StoreWithState<"main", MainState, {
323
+ isInGame(state: {
324
+ ready: boolean;
325
+ playing: boolean;
326
+ errors: {
327
+ text: string;
328
+ }[];
329
+ playTime: {
330
+ start: number;
331
+ previousPlaytime: number;
332
+ };
333
+ saveSlot: string;
334
+ options: {
335
+ baseAssetsPath?: string | undefined;
336
+ logging: boolean;
337
+ debug: boolean;
338
+ };
339
+ flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
340
+ modal: string | false;
341
+ paused: boolean;
342
+ appConfig: {
343
+ baseAssetsPath?: string | undefined;
344
+ charactersPath: string;
345
+ configPath: string;
346
+ };
347
+ loading: {
348
+ step: string;
349
+ percentage: number;
350
+ loaded: boolean;
351
+ };
352
+ alerts: {
353
+ title: string;
354
+ text: string;
355
+ resolver: () => void;
356
+ id: string;
357
+ }[];
358
+ saving: {
359
+ withPrompt?: boolean | undefined;
360
+ name?: string | undefined;
361
+ resolver: () => void;
362
+ } | null;
363
+ saveData?: {
364
+ version: string;
365
+ skills: {
366
+ skillChecks: {
367
+ [key: string]: import("./skills").SkillCheckState;
368
+ };
369
+ skills: import("./skills").SkillsState;
370
+ };
371
+ screen: {
372
+ layers: string[];
373
+ buttons: import("./screens-store").ButtonsState;
374
+ };
375
+ main: {
376
+ playTime: number;
377
+ };
378
+ dialog: {
379
+ dialog: {
380
+ speaker: string;
381
+ text: string;
382
+ pose?: string | undefined;
383
+ cssClass?: string | undefined;
384
+ choices?: {
385
+ choice: string;
386
+ originalIndex: number;
387
+ allowed: boolean;
388
+ }[] | undefined;
389
+ textField?: boolean | undefined;
390
+ interactive: boolean;
391
+ id: string;
392
+ }[];
393
+ };
394
+ vm: {
395
+ lastLabel: string;
396
+ data: import("./vm-store").DataState;
397
+ };
398
+ audio: {
399
+ modes: {
400
+ [key: string]: import("./audio-store").AudioModeState;
401
+ };
402
+ masterVolume: number;
403
+ };
404
+ hud: {
405
+ hudStats: import("./hud-stats-store").HudStatsState;
406
+ };
407
+ inventory: {
408
+ items: {
409
+ [key: string]: import("./inventory-store").ItemState;
410
+ };
411
+ interactionTags: {
412
+ [key: string]: {
413
+ blockedInteraction: boolean;
414
+ };
415
+ };
416
+ };
417
+ quests: {
418
+ quests: {
419
+ [key: string]: import("./quest-log").QuestState;
420
+ };
421
+ };
422
+ metadata: {
423
+ saveDate: string;
424
+ name: string;
425
+ slotType: "manual" | "auto";
426
+ id: string;
427
+ createdCounter: number;
428
+ };
429
+ } | undefined;
430
+ listener: {
431
+ listeners: {
432
+ gameLoaded: Set<() => void>;
433
+ };
434
+ on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
435
+ off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
436
+ once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
437
+ emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
438
+ clear: () => void;
439
+ };
440
+ } & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
441
+ }, any> & import("pinia")._StoreWithGetters<{
442
+ isInGame(state: {
443
+ ready: boolean;
444
+ playing: boolean;
445
+ errors: {
446
+ text: string;
447
+ }[];
448
+ playTime: {
449
+ start: number;
450
+ previousPlaytime: number;
451
+ };
452
+ saveSlot: string;
453
+ options: {
454
+ baseAssetsPath?: string | undefined;
455
+ logging: boolean;
456
+ debug: boolean;
457
+ };
458
+ flowState: 'engine-splash' | 'game-splash' | 'menu' | 'playing';
459
+ modal: string | false;
460
+ paused: boolean;
461
+ appConfig: {
462
+ baseAssetsPath?: string | undefined;
463
+ charactersPath: string;
464
+ configPath: string;
465
+ };
466
+ loading: {
467
+ step: string;
468
+ percentage: number;
469
+ loaded: boolean;
470
+ };
471
+ alerts: {
472
+ title: string;
473
+ text: string;
474
+ resolver: () => void;
475
+ id: string;
476
+ }[];
477
+ saving: {
478
+ withPrompt?: boolean | undefined;
479
+ name?: string | undefined;
480
+ resolver: () => void;
481
+ } | null;
482
+ saveData?: {
483
+ version: string;
484
+ skills: {
485
+ skillChecks: {
486
+ [key: string]: import("./skills").SkillCheckState;
487
+ };
488
+ skills: import("./skills").SkillsState;
489
+ };
490
+ screen: {
491
+ layers: string[];
492
+ buttons: import("./screens-store").ButtonsState;
493
+ };
494
+ main: {
495
+ playTime: number;
496
+ };
497
+ dialog: {
498
+ dialog: {
499
+ speaker: string;
500
+ text: string;
501
+ pose?: string | undefined;
502
+ cssClass?: string | undefined;
503
+ choices?: {
504
+ choice: string;
505
+ originalIndex: number;
506
+ allowed: boolean;
507
+ }[] | undefined;
508
+ textField?: boolean | undefined;
509
+ interactive: boolean;
510
+ id: string;
511
+ }[];
512
+ };
513
+ vm: {
514
+ lastLabel: string;
515
+ data: import("./vm-store").DataState;
516
+ };
517
+ audio: {
518
+ modes: {
519
+ [key: string]: import("./audio-store").AudioModeState;
520
+ };
521
+ masterVolume: number;
522
+ };
523
+ hud: {
524
+ hudStats: import("./hud-stats-store").HudStatsState;
525
+ };
526
+ inventory: {
527
+ items: {
528
+ [key: string]: import("./inventory-store").ItemState;
529
+ };
530
+ interactionTags: {
531
+ [key: string]: {
532
+ blockedInteraction: boolean;
533
+ };
534
+ };
535
+ };
536
+ quests: {
537
+ quests: {
538
+ [key: string]: import("./quest-log").QuestState;
539
+ };
540
+ };
541
+ metadata: {
542
+ saveDate: string;
543
+ name: string;
544
+ slotType: "manual" | "auto";
545
+ id: string;
546
+ createdCounter: number;
547
+ };
548
+ } | undefined;
549
+ listener: {
550
+ listeners: {
551
+ gameLoaded: Set<() => void>;
552
+ };
553
+ on: <Event_1 extends "gameLoaded">(event: Event_1, listener: MainEvents[Event_1]) => MainEvents[Event_1];
554
+ off: <Event_2 extends "gameLoaded">(event: Event_2, listener: MainEvents[Event_2]) => MainEvents[Event_2];
555
+ once: <Event_3 extends "gameLoaded">(event: Event_3, listener: MainEvents[Event_3]) => MainEvents[Event_3];
556
+ emit: <Event_4 extends "gameLoaded">(event: Event_4, ...args: any[]) => void;
557
+ clear: () => void;
558
+ };
559
+ } & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
560
+ }> & import("pinia").PiniaCustomProperties<string, import("pinia").StateTree, import("pinia")._GettersTree<import("pinia").StateTree>, import("pinia")._ActionsTree>;
561
+ screens: import("pinia").Store<"screens", import("./screens-store").ScreenState, {}, {
562
+ setScreen(screen: string, layer: number, transition?: import("../utils/transition").AddTransition | undefined): Promise<void>;
563
+ finishTransition(layer: number): void;
564
+ transitionScreen(screen: string, transition: import("../utils/transition").AddTransition, layer?: number | undefined): Promise<void>;
565
+ emptyLayer(layer: number): void;
566
+ setButtons(config: import("../config").Config): void;
567
+ changeButton(button: string, newValue: import("./screens-store").ButtonStateValue): void;
568
+ generateSaveData(): import("./screens-store").ScreenSave;
569
+ loadSaveData(data: import("./screens-store").ScreenSave): void;
570
+ }>;
571
+ skills: import("pinia").Store<"skills", import("./skills").Skills, {}, {
572
+ setupSkillCheck(skillCheck: import("./skills").SkillCheckState, id: string): void;
573
+ passSkillCheck(skillCheckId: string, hide?: boolean | undefined): void;
574
+ failSkillCheck(skillCheckId: string, hide?: boolean | undefined): void;
575
+ generateSaveData(): import("./skills").Skills;
576
+ getSkillCheck(id: string): import("./skills").SkillCheckState;
577
+ createSkillCheckState(): import("./skills").SkillCheckState;
578
+ loadSaveData(data: import("./skills").Skills): void;
579
+ setupSkills(skills: {
580
+ [key: string]: import("../config").SkillData;
581
+ }): void;
582
+ getSkill(skill: string): import("./skills").SkillState;
583
+ getSkillLevel(skill: string): number;
584
+ getSkillXp(skill: string): number;
585
+ addXp(skill: string, xp: number): void;
586
+ setSkillLevel(skill: string, level: number): void;
587
+ incrementSkill(skill: string, amount: number): void;
588
+ levelledUp(skill: string): void;
589
+ }>;
590
+ dialog: import("pinia").Store<"dialog", {
591
+ dialog: import("./dialog-store").DialogKey[];
592
+ }, {
593
+ currentDialog(): import("./dialog-store").DialogKey;
594
+ }, {
595
+ generateSaveData(): {
596
+ dialog: import("./dialog-store").DialogKey[];
597
+ };
598
+ loadSaveData(data: {
599
+ dialog: import("./dialog-store").DialogKey[];
600
+ }): void;
601
+ addDialog(dialog: import("./dialog-store").AddDialogParams): void;
602
+ clearDialog(): void;
603
+ reset(): void;
604
+ }>;
605
+ vm: import("pinia").Store<"vm", import("./vm-store").VMState, {
606
+ currentFrame(state: {
607
+ commandsWaitingForPlayerAnswer: {
608
+ args: (import("../types/parser").Parser.Primitive | {
609
+ code: string;
610
+ command: {
611
+ commandType: string;
612
+ operator: string;
613
+ args: (import("../types/parser").Parser.Primitive | any)[];
614
+ options: import("../types/parser").Parser.DefaultArg;
615
+ staticOptions: {};
616
+ };
617
+ fileName: string;
618
+ line: number;
619
+ })[];
620
+ commandType: string;
621
+ options: any;
622
+ code: string;
623
+ staticOptions: any;
624
+ operator: string;
625
+ line: number;
626
+ fileName: string;
627
+ finishCommand?: ((res: any) => void) | undefined;
628
+ }[];
629
+ stack: {
630
+ blocks: {
631
+ currentIndex: number;
632
+ branchData: {
633
+ branch: {
634
+ code: string;
635
+ command: {
636
+ commandType: string;
637
+ operator: string;
638
+ args: (import("../types/parser").Parser.Primitive | any)[];
639
+ options: import("../types/parser").Parser.DefaultArg;
640
+ staticOptions: {};
641
+ };
642
+ fileName: string;
643
+ line: number;
644
+ }[];
645
+ args?: string[] | undefined;
646
+ };
647
+ }[];
648
+ label: string;
649
+ scope: {
650
+ [key: string]: any;
651
+ };
652
+ returnValue: any;
653
+ }[];
654
+ script: import("../types/parser").Parser.ParsedScript;
655
+ data: import("./vm-store").DataState;
656
+ lastLabel: string;
657
+ jumpTarget?: {
658
+ currentIndex: number;
659
+ branchData: {
660
+ branch: {
661
+ code: string;
662
+ command: {
663
+ commandType: string;
664
+ operator: string;
665
+ args: (import("../types/parser").Parser.Primitive | any)[];
666
+ options: import("../types/parser").Parser.DefaultArg;
667
+ staticOptions: {};
668
+ };
669
+ fileName: string;
670
+ line: number;
671
+ }[];
672
+ args?: string[] | undefined;
673
+ };
674
+ label: string;
675
+ scope?: {
676
+ [key: string]: any;
677
+ } | undefined;
678
+ args?: any[] | undefined;
679
+ } | undefined;
680
+ hasJumped: boolean;
681
+ } & import("pinia").PiniaCustomStateProperties<import("./vm-store").VMState>): import("./vm-store").MachineFrame | undefined;
682
+ scope(): {
683
+ [key: string]: any;
684
+ };
685
+ currentBlock(): import("./vm-store").MachineBlock | undefined;
686
+ currentLine(): import("../types/parser").Parser.ParsedExpression<import("../types/parser").Parser.DefaultArg, {}> | undefined;
687
+ commandWaitingForAnswer(): import("../types/parser").Parser.Command<any, any> | undefined;
688
+ }, {
689
+ generateSaveData(): import("./vm-store").VMSave;
690
+ loadSaveData(data: import("./vm-store").VMSave): void;
691
+ setReturnValue(value: any): void;
692
+ waitForPlayerAnswer(cmd: import("../types/parser").Parser.Command<any, any>): void;
693
+ popAnswerQueue(): {
694
+ args: (import("../types/parser").Parser.Primitive | {
695
+ code: string;
696
+ command: {
697
+ commandType: string;
698
+ operator: string;
699
+ args: (import("../types/parser").Parser.Primitive | any)[];
700
+ options: import("../types/parser").Parser.DefaultArg;
701
+ staticOptions: {};
702
+ };
703
+ fileName: string;
704
+ line: number;
705
+ })[];
706
+ commandType: string;
707
+ options: any;
708
+ code: string;
709
+ staticOptions: any;
710
+ operator: string;
711
+ line: number;
712
+ fileName: string;
713
+ finishCommand?: ((res: any) => void) | undefined;
714
+ } | undefined;
715
+ addScopedVariable(key: string, value: any): void;
716
+ loadScripts(scriptPaths: string[]): Promise<void>;
717
+ start(): void;
718
+ setLastLabel(label: string): void;
719
+ reset(): void;
720
+ setScript(script: import("../types/parser").Parser.ParsedScript): void;
721
+ overrideData(data: import("./vm-store").DataState): void;
722
+ setStack(stack: import("./vm-store").SetFrameOptions): void;
723
+ frameOptionsToFrame(frame: import("./vm-store").SetFrameOptions): import("./vm-store").MachineFrame;
724
+ addBlock(frame: import("./vm-store").MachineFrame, block: import("./vm-store").MachineBlock): void;
725
+ addAndRunBlock(block: import("./vm-store").MachineBlock): Promise<any>;
726
+ setData(path: string, value: any): void;
727
+ addInstruction(path: string, value: any): void;
728
+ addFrame(newStackOptions: import("./vm-store").AddFrameOptions): void;
729
+ addAndRunFrame(newStackOptions: import("./vm-store").AddFrameOptions): Promise<any>;
730
+ runFrame(): Promise<any>;
731
+ cleanFrame(): any;
732
+ runBlock(): Promise<any>;
733
+ cleanBlock(): void;
734
+ runGame(): Promise<void>;
735
+ nextLineOnly(): Promise<boolean>;
736
+ isBlockFinished(): boolean;
737
+ reachedEndOfScript(): void;
738
+ runLineOnly(): Promise<any>;
739
+ runLabelFunction(label: string, ...args: any[]): Promise<any>;
740
+ runCustomFrame(stack: import("./vm-store").AddFrameOptions): void;
741
+ jumpToLabel(label: string, ...args: any[]): Promise<void>;
742
+ runThenGoBackToPreviousDialog(label: string, ...args: any[]): Promise<any>;
743
+ }>;
744
+ hud: import("pinia").Store<"hud", import("./hud-stats-store").HudState, {}, {
745
+ setupHudStats(stats: {
746
+ [key: string]: import("../config").HudStatConfig;
747
+ }): void;
748
+ setStat(stat: string, value: number): void;
749
+ addStat(stat: string, value: number): void;
750
+ getStat(stat: string): import("./hud-stats-store").HudStat;
751
+ getStatValue(stat: string): number;
752
+ generateSaveData(): import("./hud-stats-store").HudState;
753
+ loadSaveData(data: import("./hud-stats-store").HudState): void;
754
+ }>;
755
+ audio: import("pinia").Store<"audio", import("./audio-store").AudioState, {}, {
756
+ stopAll(): void;
757
+ stopChannel(mode: "sound" | "music" | "ambiant", channelIndex: number): Promise<void>;
758
+ pauseChannel(mode: "sound" | "music" | "ambiant", channelIndex: number): Promise<void>;
759
+ playChannel(mode: "sound" | "music" | "ambiant", audio: string, channelIndex: number): Promise<void>;
760
+ changeChannel(mode: "sound" | "music" | "ambiant", audio: string, channelIndex: number): Promise<void>;
761
+ actuallyStopChannel(channel: import("./audio-store").AudioChannel): void;
762
+ getAudioChannel(mode: "sound" | "music" | "ambiant", channelIndex: number): import("./audio-store").AudioChannel | null;
763
+ setAudioChannel(mode: "sound" | "music" | "ambiant", channelIndex: number, value: import("./audio-store").AudioChannel | null): void;
764
+ actuallyPlayChannel(mode: "sound" | "music" | "ambiant", channelIndex: number, audio: string): Promise<void>;
765
+ reloadAudio(save: import("./audio-store").AudioSave): void;
766
+ stopSound(key: string): void;
767
+ generateSaveData(): import("./audio-store").AudioSave;
768
+ loadSaveData(data: import("./audio-store").AudioSave): void;
769
+ reset(): void;
770
+ setModeVolume(mode: "sound" | "music" | "ambiant", volume: number): void;
771
+ setMasterVolume(volume: number): void;
772
+ modeVolume(mode: "sound" | "music" | "ambiant"): number;
773
+ }>;
774
+ rendering: import("pinia").Store<"rendering", import("./rendering-store").RenderingState, {}, {
775
+ updateScreenSize(width: number, height: number, textWidth: number): void;
776
+ }>;
777
+ notifications: import("pinia").Store<"notifications", import("./notification-store").NotificationsState, {}, {
778
+ addNotification(text: string): Promise<void>;
779
+ deleteNotification(id: string): void;
780
+ disableNotifications(): void;
781
+ enableNotifications(): void;
782
+ }>;
783
+ inventory: import("pinia").Store<"inventory", import("./inventory-store").InventoryState, {}, {
784
+ generateSaveData(): import("./inventory-store").InventoryState;
785
+ loadSaveData(save: import("./inventory-store").InventoryState): void;
786
+ setupItems(items: {
787
+ [key: string]: import("../config").ItemData;
788
+ }): void;
789
+ hasItem(itemId: string, amount?: number | undefined): boolean;
790
+ getExistingItem(id: string): import("./inventory-store").ItemState | undefined;
791
+ getItemAmount(id: string): number;
792
+ add(item: import("./inventory-store").ItemState): void;
793
+ enableInteraction(tag?: string | undefined): void;
794
+ disableInteraction(tag?: string | undefined): void;
795
+ onScriptStart(): void;
796
+ onScriptEnd(): void;
797
+ isInteractionTagBlocked(tag?: string | undefined): boolean;
798
+ remove(item: import("./inventory-store").ItemState): void;
799
+ deleteItem(id: string): void;
800
+ }>;
801
+ quests: import("pinia").Store<"quests", import("./quest-log").QuestLogState, {}, {
802
+ getQuest(questId: string): import("./quest-log").QuestState;
803
+ getObjective(questId: string, objectiveId: string): import("./quest-log").ObjectiveState;
804
+ setupQuests(quests: {
805
+ [key: string]: import("../config").QuestData;
806
+ }): void;
807
+ startQuest(questId: string): void;
808
+ startObjective(questId: string, objectiveId: string): void;
809
+ completeObjective(questId: string, objectiveId: string): void;
810
+ completeQuest(questId: string, ending?: string | undefined): void;
811
+ isQuestCompleted(questId: string): boolean;
812
+ isObjectiveCompleted(questId: string, objectiveId: string): boolean;
813
+ isQuestStarted(questId: string): boolean;
814
+ isObjectiveStarted(questId: string, objectiveId: string): boolean;
815
+ removeQuest(id: string): void;
816
+ generateSaveData(): import("./quest-log").QuestLogState;
817
+ loadSaveData(data: import("./quest-log").QuestLogState): void;
818
+ }>;
819
+ };
820
+ overrideStates(override: any): void;
821
+ }>;
822
+ export {};