narrat 2.3.0 → 2.3.3

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 (114) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +128 -128
  3. package/dist/app.vue.d.ts +91 -91
  4. package/dist/components/MainMenu.vue.d.ts +12 -12
  5. package/dist/components/SkillsWindow.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 +11 -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 +54 -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 +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 +211 -194
  29. package/dist/constants.d.ts +10 -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/components.d.ts +2 -2
  34. package/dist/exports/config.d.ts +1 -1
  35. package/dist/exports/display.d.ts +2 -2
  36. package/dist/exports/events.d.ts +1 -1
  37. package/dist/exports/others.d.ts +1 -1
  38. package/dist/exports/plugins.d.ts +38 -38
  39. package/dist/exports/stores.d.ts +11 -11
  40. package/dist/favicon.svg +30 -30
  41. package/dist/lib.d.ts +18 -18
  42. package/dist/main.d.ts +7 -7
  43. package/dist/menu-buttons/menu-buttons.d.ts +4 -4
  44. package/dist/narrat.es.js +11691 -10268
  45. package/dist/narrat.es.js.map +1 -1
  46. package/dist/narrat.umd.js +108 -77
  47. package/dist/narrat.umd.js.map +1 -1
  48. package/dist/plugins/NarratPlugin.d.ts +11 -11
  49. package/dist/stores/audio-store.d.ts +48 -48
  50. package/dist/stores/dialog-store.d.ts +32 -32
  51. package/dist/stores/hud-stats-store.d.ts +22 -22
  52. package/dist/stores/inventory-store.d.ts +37 -37
  53. package/dist/stores/main-store.d.ts +813 -813
  54. package/dist/stores/menu-store.d.ts +36 -36
  55. package/dist/stores/notification-store.d.ts +15 -15
  56. package/dist/stores/quest-log.d.ts +39 -39
  57. package/dist/stores/rendering-store.d.ts +13 -13
  58. package/dist/stores/screens-store.d.ts +35 -35
  59. package/dist/stores/skills.d.ts +40 -40
  60. package/dist/stores/vm-store.d.ts +180 -180
  61. package/dist/types/app-types.d.ts +9 -9
  62. package/dist/types/character-types.d.ts +27 -27
  63. package/dist/types/dialog-box-types.d.ts +11 -11
  64. package/dist/types/game-save.d.ts +36 -36
  65. package/dist/types/parser.d.ts +93 -93
  66. package/dist/types/state.d.ts +3 -3
  67. package/dist/utils/InputsListener.d.ts +9 -9
  68. package/dist/utils/ajax.d.ts +2 -1
  69. package/dist/utils/audio-loader.d.ts +10 -10
  70. package/dist/utils/characters.d.ts +5 -5
  71. package/dist/utils/data-helpers.d.ts +28 -28
  72. package/dist/utils/debounce.d.ts +14 -14
  73. package/dist/utils/error-handling.d.ts +3 -3
  74. package/dist/utils/helpers.d.ts +6 -6
  75. package/dist/utils/images-loader.d.ts +6 -6
  76. package/dist/utils/logger.d.ts +11 -11
  77. package/dist/utils/object-iterators.d.ts +8 -8
  78. package/dist/utils/promises.d.ts +1 -1
  79. package/dist/utils/randomId.d.ts +1 -1
  80. package/dist/utils/save-helpers.d.ts +18 -18
  81. package/dist/utils/skillchecks.d.ts +17 -17
  82. package/dist/utils/string-helpers.d.ts +3 -3
  83. package/dist/utils/time-helpers.d.ts +2 -2
  84. package/dist/utils/transition.d.ts +15 -15
  85. package/dist/utils/type-utils.d.ts +2 -2
  86. package/dist/utils/typed-emitter.d.ts +18 -18
  87. package/dist/vm/commands/arithmetic-commands.d.ts +23 -23
  88. package/dist/vm/commands/audio-commands.d.ts +15 -15
  89. package/dist/vm/commands/choice.d.ts +37 -37
  90. package/dist/vm/commands/clear_dialog.d.ts +2 -2
  91. package/dist/vm/commands/command-helpers.d.ts +3 -3
  92. package/dist/vm/commands/command-plugin.d.ts +43 -43
  93. package/dist/vm/commands/flow-commands.d.ts +24 -24
  94. package/dist/vm/commands/if.d.ts +10 -10
  95. package/dist/vm/commands/index.d.ts +2 -2
  96. package/dist/vm/commands/inventory-commands.d.ts +15 -15
  97. package/dist/vm/commands/logic-command.d.ts +42 -42
  98. package/dist/vm/commands/math-commands.d.ts +30 -30
  99. package/dist/vm/commands/notify.d.ts +6 -6
  100. package/dist/vm/commands/quest-commands.d.ts +30 -30
  101. package/dist/vm/commands/random-commands.d.ts +10 -10
  102. package/dist/vm/commands/screen-commands.d.ts +15 -15
  103. package/dist/vm/commands/set.d.ts +6 -6
  104. package/dist/vm/commands/skill-commands.d.ts +30 -30
  105. package/dist/vm/commands/stats-commands.d.ts +12 -12
  106. package/dist/vm/commands/string-commands.d.ts +9 -9
  107. package/dist/vm/commands/text-field.d.ts +7 -7
  108. package/dist/vm/commands/text.d.ts +14 -14
  109. package/dist/vm/commands/wait.d.ts +4 -4
  110. package/dist/vm/vm-helpers.d.ts +18 -18
  111. package/dist/vm/vm-parser.d.ts +19 -19
  112. package/dist/vm/vm-parser.test.d.ts +1 -1
  113. package/dist/vm/vm.d.ts +21 -21
  114. package/package.json +3 -1
@@ -1,813 +1,813 @@
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 { 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 {};