narrat 2.2.4 → 2.2.7

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 (104) hide show
  1. package/CHANGELOG.md +1081 -0
  2. package/LICENSE +21 -21
  3. package/README.md +120 -120
  4. package/dist/.DS_Store +0 -0
  5. package/dist/app.vue.d.ts +92 -92
  6. package/dist/components/MainMenu.vue.d.ts +12 -12
  7. package/dist/components/Skills.vue.d.ts +22 -22
  8. package/dist/components/StartMenu.vue.d.ts +46 -46
  9. package/dist/components/debug/debug-menu.vue.d.ts +48 -48
  10. package/dist/components/dialog-picture.vue.d.ts +9 -9
  11. package/dist/components/game-dialog.vue.d.ts +65 -65
  12. package/dist/components/hud.vue.d.ts +14 -14
  13. package/dist/components/inventory-ui.vue.d.ts +30 -30
  14. package/dist/components/loading-bar.vue.d.ts +10 -10
  15. package/dist/components/menu-buttons.vue.d.ts +26 -26
  16. package/dist/components/notification-toast.vue.d.ts +6 -6
  17. package/dist/components/quests-ui.vue.d.ts +20 -20
  18. package/dist/components/save-slots.vue.d.ts +58 -58
  19. package/dist/components/screen-layer.vue.d.ts +54 -54
  20. package/dist/components/screens.vue.d.ts +46 -46
  21. package/dist/components/utils/modal.vue.d.ts +6 -6
  22. package/dist/components/volume-controls.vue.d.ts +18 -18
  23. package/dist/config.d.ts +170 -170
  24. package/dist/constants.d.ts +7 -7
  25. package/dist/defaultConfig.d.ts +2 -2
  26. package/dist/demo/demo.d.ts +1 -1
  27. package/dist/dialog-box.vue.d.ts +41 -41
  28. package/dist/exports/config.d.ts +1 -1
  29. package/dist/exports/display.d.ts +2 -2
  30. package/dist/exports/plugins.d.ts +20 -20
  31. package/dist/img/.DS_Store +0 -0
  32. package/dist/lib/lib.d.ts +15 -15
  33. package/dist/main.d.ts +5 -5
  34. package/dist/music/.DS_Store +0 -0
  35. package/dist/narrat.es.js +33797 -30997
  36. package/dist/narrat.es.js.map +1 -1
  37. package/dist/narrat.umd.js +105 -92
  38. package/dist/narrat.umd.js.map +1 -1
  39. package/dist/plugins/NarratPlugin.d.ts +11 -11
  40. package/dist/sounds/.DS_Store +0 -0
  41. package/dist/stores/audio-store.d.ts +48 -48
  42. package/dist/stores/dialog-store.d.ts +32 -32
  43. package/dist/stores/hud-stats-store.d.ts +22 -22
  44. package/dist/stores/inventory-store.d.ts +37 -37
  45. package/dist/stores/main-store.d.ts +390 -390
  46. package/dist/stores/notification-store.d.ts +15 -15
  47. package/dist/stores/quest-log.d.ts +39 -39
  48. package/dist/stores/rendering-store.d.ts +13 -13
  49. package/dist/stores/screens-store.d.ts +23 -23
  50. package/dist/stores/skills.d.ts +40 -40
  51. package/dist/stores/vm-store.d.ts +177 -177
  52. package/dist/types/app-types.d.ts +5 -5
  53. package/dist/types/character-types.d.ts +27 -27
  54. package/dist/types/dialog-box-types.d.ts +11 -11
  55. package/dist/types/game-save.d.ts +30 -30
  56. package/dist/types/parser.d.ts +93 -93
  57. package/dist/types/state.d.ts +3 -3
  58. package/dist/utils/InputsListener.d.ts +9 -9
  59. package/dist/utils/ajax.d.ts +1 -1
  60. package/dist/utils/audio-loader.d.ts +10 -10
  61. package/dist/utils/characters.d.ts +5 -5
  62. package/dist/utils/data-helpers.d.ts +25 -25
  63. package/dist/utils/debounce.d.ts +14 -14
  64. package/dist/utils/error-handling.d.ts +3 -3
  65. package/dist/utils/helpers.d.ts +6 -6
  66. package/dist/utils/images-loader.d.ts +6 -6
  67. package/dist/utils/logger.d.ts +11 -11
  68. package/dist/utils/object-iterators.d.ts +8 -8
  69. package/dist/utils/promises.d.ts +1 -1
  70. package/dist/utils/randomId.d.ts +1 -1
  71. package/dist/utils/save-helpers.d.ts +15 -15
  72. package/dist/utils/skillchecks.d.ts +17 -17
  73. package/dist/utils/string-helpers.d.ts +3 -3
  74. package/dist/utils/time-helpers.d.ts +2 -2
  75. package/dist/utils/type-utils.d.ts +1 -1
  76. package/dist/utils/typed-emitter.d.ts +18 -18
  77. package/dist/vm/commands/arithmetic-commands.d.ts +23 -23
  78. package/dist/vm/commands/audio-commands.d.ts +15 -15
  79. package/dist/vm/commands/choice.d.ts +37 -37
  80. package/dist/vm/commands/clear_dialog.d.ts +2 -2
  81. package/dist/vm/commands/command-helpers.d.ts +3 -3
  82. package/dist/vm/commands/command-plugin.d.ts +43 -43
  83. package/dist/vm/commands/flow-commands.d.ts +17 -17
  84. package/dist/vm/commands/if.d.ts +10 -10
  85. package/dist/vm/commands/index.d.ts +2 -2
  86. package/dist/vm/commands/inventory-commands.d.ts +15 -15
  87. package/dist/vm/commands/logic-command.d.ts +42 -42
  88. package/dist/vm/commands/math-commands.d.ts +30 -30
  89. package/dist/vm/commands/notify.d.ts +6 -6
  90. package/dist/vm/commands/quest-commands.d.ts +30 -30
  91. package/dist/vm/commands/random-commands.d.ts +10 -10
  92. package/dist/vm/commands/screen-commands.d.ts +12 -12
  93. package/dist/vm/commands/set.d.ts +6 -6
  94. package/dist/vm/commands/skill-commands.d.ts +30 -30
  95. package/dist/vm/commands/stats-commands.d.ts +12 -12
  96. package/dist/vm/commands/string-commands.d.ts +9 -9
  97. package/dist/vm/commands/text-field.d.ts +7 -7
  98. package/dist/vm/commands/text.d.ts +14 -14
  99. package/dist/vm/commands/wait.d.ts +4 -4
  100. package/dist/vm/vm-helpers.d.ts +18 -18
  101. package/dist/vm/vm-parser.d.ts +19 -19
  102. package/dist/vm/vm-parser.test.d.ts +1 -1
  103. package/dist/vm/vm.d.ts +18 -18
  104. package/package.json +87 -87
@@ -1,15 +1,15 @@
1
- export interface NotificationState {
2
- text: string;
3
- }
4
- export interface NotificationsState {
5
- notifications: {
6
- [key: string]: NotificationState;
7
- };
8
- enabled: boolean;
9
- }
10
- export declare const useNotifications: import("pinia").StoreDefinition<"notifications", NotificationsState, {}, {
11
- addNotification(text: string): Promise<void>;
12
- deleteNotification(id: string): void;
13
- disableNotifications(): void;
14
- enableNotifications(): void;
15
- }>;
1
+ export interface NotificationState {
2
+ text: string;
3
+ }
4
+ export interface NotificationsState {
5
+ notifications: {
6
+ [key: string]: NotificationState;
7
+ };
8
+ enabled: boolean;
9
+ }
10
+ export declare const useNotifications: import("pinia").StoreDefinition<"notifications", NotificationsState, {}, {
11
+ addNotification(text: string): Promise<void>;
12
+ deleteNotification(id: string): void;
13
+ disableNotifications(): void;
14
+ enableNotifications(): void;
15
+ }>;
@@ -1,39 +1,39 @@
1
- import { QuestData } from '../config';
2
- export interface QuestLogState {
3
- quests: {
4
- [key: string]: QuestState;
5
- };
6
- }
7
- export interface QuestState {
8
- id: string;
9
- state: 'hidden' | 'unlocked' | 'completed';
10
- ending?: string;
11
- /** Note: Objectives are an object so that it's easy to access specific objectives in game scripts.
12
- * One side effect of this is that the order objectives appear in isn't technicaclly guaranteed. */
13
- objectives: {
14
- [key: string]: ObjectiveState;
15
- };
16
- }
17
- export interface ObjectiveState {
18
- id: string;
19
- state: 'hidden' | 'unlocked' | 'completed';
20
- }
21
- export declare type QuestLogSave = QuestLogState;
22
- export declare const useQuests: import("pinia").StoreDefinition<"quests", QuestLogState, {}, {
23
- getQuest(questId: string): QuestState;
24
- getObjective(questId: string, objectiveId: string): ObjectiveState;
25
- setupQuests(quests: {
26
- [key: string]: QuestData;
27
- }): void;
28
- startQuest(questId: string): void;
29
- startObjective(questId: string, objectiveId: string): void;
30
- completeObjective(questId: string, objectiveId: string): void;
31
- completeQuest(questId: string, ending?: string): void;
32
- isQuestCompleted(questId: string): boolean;
33
- isObjectiveCompleted(questId: string, objectiveId: string): boolean;
34
- isQuestStarted(questId: string): boolean;
35
- isObjectiveStarted(questId: string, objectiveId: string): boolean;
36
- removeQuest(id: string): void;
37
- generateSaveData(): QuestLogSave;
38
- loadSaveData(data: QuestLogSave): void;
39
- }>;
1
+ import { QuestData } from '../config';
2
+ export interface QuestLogState {
3
+ quests: {
4
+ [key: string]: QuestState;
5
+ };
6
+ }
7
+ export interface QuestState {
8
+ id: string;
9
+ state: 'hidden' | 'unlocked' | 'completed';
10
+ ending?: string;
11
+ /** Note: Objectives are an object so that it's easy to access specific objectives in game scripts.
12
+ * One side effect of this is that the order objectives appear in isn't technicaclly guaranteed. */
13
+ objectives: {
14
+ [key: string]: ObjectiveState;
15
+ };
16
+ }
17
+ export interface ObjectiveState {
18
+ id: string;
19
+ state: 'hidden' | 'unlocked' | 'completed';
20
+ }
21
+ export declare type QuestLogSave = QuestLogState;
22
+ export declare const useQuests: import("pinia").StoreDefinition<"quests", QuestLogState, {}, {
23
+ getQuest(questId: string): QuestState;
24
+ getObjective(questId: string, objectiveId: string): ObjectiveState;
25
+ setupQuests(quests: {
26
+ [key: string]: QuestData;
27
+ }): void;
28
+ startQuest(questId: string): void;
29
+ startObjective(questId: string, objectiveId: string): void;
30
+ completeObjective(questId: string, objectiveId: string): void;
31
+ completeQuest(questId: string, ending?: string): void;
32
+ isQuestCompleted(questId: string): boolean;
33
+ isObjectiveCompleted(questId: string, objectiveId: string): boolean;
34
+ isQuestStarted(questId: string): boolean;
35
+ isObjectiveStarted(questId: string, objectiveId: string): boolean;
36
+ removeQuest(id: string): void;
37
+ generateSaveData(): QuestLogSave;
38
+ loadSaveData(data: QuestLogSave): void;
39
+ }>;
@@ -1,13 +1,13 @@
1
- export interface RenderingState {
2
- screenWidth: number;
3
- screenHeight: number;
4
- canvasWidth: number;
5
- canvasHeight: number;
6
- renderRatio: number;
7
- topOffset: number;
8
- leftOffset: number;
9
- layoutMode: 'horizontal' | 'vertical';
10
- }
11
- export declare const useRenderingStore: import("pinia").StoreDefinition<"rendering", RenderingState, {}, {
12
- updateScreenSize(width: number, height: number, textWidth: number): void;
13
- }>;
1
+ export interface RenderingState {
2
+ screenWidth: number;
3
+ screenHeight: number;
4
+ canvasWidth: number;
5
+ canvasHeight: number;
6
+ renderRatio: number;
7
+ topOffset: number;
8
+ leftOffset: number;
9
+ layoutMode: 'horizontal' | 'vertical';
10
+ }
11
+ export declare const useRenderingStore: import("pinia").StoreDefinition<"rendering", RenderingState, {}, {
12
+ updateScreenSize(width: number, height: number, textWidth: number): void;
13
+ }>;
@@ -1,23 +1,23 @@
1
- import { Config } from '../config';
2
- export declare type ButtonStateValue = boolean | 'hidden' | 'greyed';
3
- export interface ButtonsState {
4
- [key: string]: {
5
- state: ButtonStateValue;
6
- };
7
- }
8
- export interface ScreenState {
9
- layers: string[];
10
- buttons: ButtonsState;
11
- }
12
- export declare type ScreenSave = ScreenState;
13
- export declare const useScreens: import("pinia").StoreDefinition<"screens", {
14
- layers: string[];
15
- buttons: ButtonsState;
16
- }, {}, {
17
- setScreen(screen: string, layer?: number): void;
18
- emptyLayer(layer: number): void;
19
- setButtons(config: Config): void;
20
- changeButton(button: string, newValue: ButtonStateValue): void;
21
- generateSaveData(): ScreenSave;
22
- loadSaveData(data: ScreenSave): void;
23
- }>;
1
+ import { Config } from '../config';
2
+ export declare type ButtonStateValue = boolean | 'hidden' | 'greyed';
3
+ export interface ButtonsState {
4
+ [key: string]: {
5
+ state: ButtonStateValue;
6
+ };
7
+ }
8
+ export interface ScreenState {
9
+ layers: string[];
10
+ buttons: ButtonsState;
11
+ }
12
+ export declare type ScreenSave = ScreenState;
13
+ export declare const useScreens: import("pinia").StoreDefinition<"screens", {
14
+ layers: string[];
15
+ buttons: ButtonsState;
16
+ }, {}, {
17
+ setScreen(screen: string, layer?: number): void;
18
+ emptyLayer(layer: number): void;
19
+ setButtons(config: Config): void;
20
+ changeButton(button: string, newValue: ButtonStateValue): void;
21
+ generateSaveData(): ScreenSave;
22
+ loadSaveData(data: ScreenSave): void;
23
+ }>;
@@ -1,40 +1,40 @@
1
- import { SkillData } from '../config';
2
- export interface SkillState {
3
- id: string;
4
- level: number;
5
- xp: number;
6
- }
7
- export interface SkillsState {
8
- [key: string]: SkillState;
9
- }
10
- export interface SkillCheckState {
11
- happened: boolean;
12
- succeeded: boolean;
13
- hidden: boolean;
14
- }
15
- export interface Skills {
16
- skillChecks: {
17
- [key: string]: SkillCheckState;
18
- };
19
- skills: SkillsState;
20
- }
21
- export declare type SkillsSave = Skills;
22
- export declare const useSkills: import("pinia").StoreDefinition<"skills", Skills, {}, {
23
- setupSkillCheck(skillCheck: SkillCheckState, id: string): void;
24
- passSkillCheck(skillCheckId: string, hide?: boolean): void;
25
- failSkillCheck(skillCheckId: string, hide?: boolean): void;
26
- generateSaveData(): SkillsSave;
27
- getSkillCheck(id: string): SkillCheckState;
28
- createSkillCheckState(): SkillCheckState;
29
- loadSaveData(data: SkillsSave): void;
30
- setupSkills(skills: {
31
- [key: string]: SkillData;
32
- }): void;
33
- getSkill(skill: string): SkillState;
34
- getSkillLevel(skill: string): number;
35
- getSkillXp(skill: string): number;
36
- addXp(skill: string, xp: number): void;
37
- setSkillLevel(skill: string, level: number): void;
38
- incrementSkill(skill: string, amount: number): void;
39
- levelledUp(skill: string): void;
40
- }>;
1
+ import { SkillData } from '../config';
2
+ export interface SkillState {
3
+ id: string;
4
+ level: number;
5
+ xp: number;
6
+ }
7
+ export interface SkillsState {
8
+ [key: string]: SkillState;
9
+ }
10
+ export interface SkillCheckState {
11
+ happened: boolean;
12
+ succeeded: boolean;
13
+ hidden: boolean;
14
+ }
15
+ export interface Skills {
16
+ skillChecks: {
17
+ [key: string]: SkillCheckState;
18
+ };
19
+ skills: SkillsState;
20
+ }
21
+ export declare type SkillsSave = Skills;
22
+ export declare const useSkills: import("pinia").StoreDefinition<"skills", Skills, {}, {
23
+ setupSkillCheck(skillCheck: SkillCheckState, id: string): void;
24
+ passSkillCheck(skillCheckId: string, hide?: boolean): void;
25
+ failSkillCheck(skillCheckId: string, hide?: boolean): void;
26
+ generateSaveData(): SkillsSave;
27
+ getSkillCheck(id: string): SkillCheckState;
28
+ createSkillCheckState(): SkillCheckState;
29
+ loadSaveData(data: SkillsSave): void;
30
+ setupSkills(skills: {
31
+ [key: string]: SkillData;
32
+ }): void;
33
+ getSkill(skill: string): SkillState;
34
+ getSkillLevel(skill: string): number;
35
+ getSkillXp(skill: string): number;
36
+ addXp(skill: string, xp: number): void;
37
+ setSkillLevel(skill: string, level: number): void;
38
+ incrementSkill(skill: string, amount: number): void;
39
+ levelledUp(skill: string): void;
40
+ }>;
@@ -1,177 +1,177 @@
1
- import { Parser } from '../types/parser';
2
- export declare type AddFrameOptions = Omit<SetFrameOptions, 'label'> & {
3
- label?: string;
4
- };
5
- export interface MachineBlock {
6
- currentIndex: number;
7
- branchData: Parser.ParsedLabel;
8
- }
9
- export interface MachineFrame {
10
- blocks: MachineBlock[];
11
- label: string;
12
- scope: {
13
- [key: string]: any;
14
- };
15
- returnValue: any;
16
- }
17
- export interface SetFrameOptions {
18
- currentIndex: number;
19
- branchData: Parser.ParsedLabel;
20
- label: string;
21
- scope?: {
22
- [key: string]: any;
23
- };
24
- args?: any[];
25
- }
26
- export interface DataState {
27
- [key: string]: any;
28
- }
29
- export interface VMState {
30
- commandsWaitingForPlayerAnswer: Parser.Command<any, any>[];
31
- stack: MachineFrame[];
32
- script: Parser.ParsedScript;
33
- data: DataState;
34
- lastLabel: string;
35
- jumpTarget?: SetFrameOptions;
36
- }
37
- export interface VMSave {
38
- lastLabel: string;
39
- data: DataState;
40
- }
41
- export declare const useVM: import("pinia").StoreDefinition<"vm", VMState, {
42
- currentFrame(state: {
43
- commandsWaitingForPlayerAnswer: {
44
- args: (Parser.Primitive | {
45
- code: string;
46
- command: {
47
- commandType: string;
48
- operator: string;
49
- args: (Parser.Primitive | any)[];
50
- options: Parser.DefaultArg;
51
- staticOptions: {};
52
- };
53
- fileName: string;
54
- line: number;
55
- })[];
56
- commandType: string;
57
- options: any;
58
- code: string;
59
- staticOptions: any;
60
- operator: string;
61
- line: number;
62
- fileName: string;
63
- finishCommand?: ((res: any) => void) | undefined;
64
- }[];
65
- stack: {
66
- blocks: {
67
- currentIndex: number;
68
- branchData: {
69
- branch: {
70
- code: string;
71
- command: {
72
- commandType: string;
73
- operator: string;
74
- args: (Parser.Primitive | any)[];
75
- options: Parser.DefaultArg;
76
- staticOptions: {};
77
- };
78
- fileName: string;
79
- line: number;
80
- }[];
81
- args?: string[] | undefined;
82
- };
83
- }[];
84
- label: string;
85
- scope: {
86
- [key: string]: any;
87
- };
88
- returnValue: any;
89
- }[];
90
- script: Parser.ParsedScript;
91
- data: DataState;
92
- lastLabel: string;
93
- jumpTarget?: {
94
- currentIndex: number;
95
- branchData: {
96
- branch: {
97
- code: string;
98
- command: {
99
- commandType: string;
100
- operator: string;
101
- args: (Parser.Primitive | any)[];
102
- options: Parser.DefaultArg;
103
- staticOptions: {};
104
- };
105
- fileName: string;
106
- line: number;
107
- }[];
108
- args?: string[] | undefined;
109
- };
110
- label: string;
111
- scope?: {
112
- [key: string]: any;
113
- } | undefined;
114
- args?: any[] | undefined;
115
- } | undefined;
116
- } & import("pinia").PiniaCustomStateProperties<VMState>): MachineFrame | undefined;
117
- scope(): {
118
- [key: string]: any;
119
- };
120
- currentBlock(): MachineBlock | undefined;
121
- currentLine(): Parser.ParsedExpression | undefined;
122
- commandWaitingForAnswer(): Parser.Command<any, any> | undefined;
123
- }, {
124
- generateSaveData(): VMSave;
125
- loadSaveData(data: VMSave): void;
126
- setReturnValue(value: any): void;
127
- waitForPlayerAnswer(cmd: Parser.Command<any, any>): void;
128
- popAnswerQueue(): {
129
- args: (Parser.Primitive | {
130
- code: string;
131
- command: {
132
- commandType: string;
133
- operator: string;
134
- args: (Parser.Primitive | any)[];
135
- options: Parser.DefaultArg;
136
- staticOptions: {};
137
- };
138
- fileName: string;
139
- line: number;
140
- })[];
141
- commandType: string;
142
- options: any;
143
- code: string;
144
- staticOptions: any;
145
- operator: string;
146
- line: number;
147
- fileName: string;
148
- finishCommand?: ((res: any) => void) | undefined;
149
- } | undefined;
150
- addScopedVariable(key: string, value: any): void;
151
- loadScripts(scriptPaths: string[]): Promise<void>;
152
- start(): void;
153
- setLastLabel(label: string): void;
154
- reset(): void;
155
- setScript(script: Parser.ParsedScript): void;
156
- overrideData(data: DataState): void;
157
- setStack(stack: SetFrameOptions): void;
158
- frameOptionsToFrame(frame: SetFrameOptions): MachineFrame;
159
- addBlock(frame: MachineFrame, block: MachineBlock): void;
160
- addAndRunBlock(block: MachineBlock): Promise<any>;
161
- setData(path: string, value: any): void;
162
- addInstruction(path: string, value: any): void;
163
- addFrame(newStackOptions: AddFrameOptions): void;
164
- addAndRunFrame(newStackOptions: AddFrameOptions): Promise<any>;
165
- runFrame(): Promise<any>;
166
- cleanFrame(): any;
167
- runBlock(): Promise<any>;
168
- cleanBlock(): void;
169
- runGame(): Promise<void>;
170
- nextLineOnly(): Promise<boolean>;
171
- isBlockFinished(): boolean;
172
- reachedEndOfScript(): void;
173
- runLineOnly(): Promise<any>;
174
- runLabelFunction(label: string, ...args: any[]): Promise<any>;
175
- runCustomFrame(stack: AddFrameOptions): void;
176
- runLabel(label: string, ...args: any[]): void;
177
- }>;
1
+ import { Parser } from '../types/parser';
2
+ export declare type AddFrameOptions = Omit<SetFrameOptions, 'label'> & {
3
+ label?: string;
4
+ };
5
+ export interface MachineBlock {
6
+ currentIndex: number;
7
+ branchData: Parser.ParsedLabel;
8
+ }
9
+ export interface MachineFrame {
10
+ blocks: MachineBlock[];
11
+ label: string;
12
+ scope: {
13
+ [key: string]: any;
14
+ };
15
+ returnValue: any;
16
+ }
17
+ export interface SetFrameOptions {
18
+ currentIndex: number;
19
+ branchData: Parser.ParsedLabel;
20
+ label: string;
21
+ scope?: {
22
+ [key: string]: any;
23
+ };
24
+ args?: any[];
25
+ }
26
+ export interface DataState {
27
+ [key: string]: any;
28
+ }
29
+ export interface VMState {
30
+ commandsWaitingForPlayerAnswer: Parser.Command<any, any>[];
31
+ stack: MachineFrame[];
32
+ script: Parser.ParsedScript;
33
+ data: DataState;
34
+ lastLabel: string;
35
+ jumpTarget?: SetFrameOptions;
36
+ }
37
+ export interface VMSave {
38
+ lastLabel: string;
39
+ data: DataState;
40
+ }
41
+ export declare const useVM: import("pinia").StoreDefinition<"vm", VMState, {
42
+ currentFrame(state: {
43
+ commandsWaitingForPlayerAnswer: {
44
+ args: (Parser.Primitive | {
45
+ code: string;
46
+ command: {
47
+ commandType: string;
48
+ operator: string;
49
+ args: (Parser.Primitive | any)[];
50
+ options: Parser.DefaultArg;
51
+ staticOptions: {};
52
+ };
53
+ fileName: string;
54
+ line: number;
55
+ })[];
56
+ commandType: string;
57
+ options: any;
58
+ code: string;
59
+ staticOptions: any;
60
+ operator: string;
61
+ line: number;
62
+ fileName: string;
63
+ finishCommand?: ((res: any) => void) | undefined;
64
+ }[];
65
+ stack: {
66
+ blocks: {
67
+ currentIndex: number;
68
+ branchData: {
69
+ branch: {
70
+ code: string;
71
+ command: {
72
+ commandType: string;
73
+ operator: string;
74
+ args: (Parser.Primitive | any)[];
75
+ options: Parser.DefaultArg;
76
+ staticOptions: {};
77
+ };
78
+ fileName: string;
79
+ line: number;
80
+ }[];
81
+ args?: string[] | undefined;
82
+ };
83
+ }[];
84
+ label: string;
85
+ scope: {
86
+ [key: string]: any;
87
+ };
88
+ returnValue: any;
89
+ }[];
90
+ script: Parser.ParsedScript;
91
+ data: DataState;
92
+ lastLabel: string;
93
+ jumpTarget?: {
94
+ currentIndex: number;
95
+ branchData: {
96
+ branch: {
97
+ code: string;
98
+ command: {
99
+ commandType: string;
100
+ operator: string;
101
+ args: (Parser.Primitive | any)[];
102
+ options: Parser.DefaultArg;
103
+ staticOptions: {};
104
+ };
105
+ fileName: string;
106
+ line: number;
107
+ }[];
108
+ args?: string[] | undefined;
109
+ };
110
+ label: string;
111
+ scope?: {
112
+ [key: string]: any;
113
+ } | undefined;
114
+ args?: any[] | undefined;
115
+ } | undefined;
116
+ } & import("pinia").PiniaCustomStateProperties<VMState>): MachineFrame | undefined;
117
+ scope(): {
118
+ [key: string]: any;
119
+ };
120
+ currentBlock(): MachineBlock | undefined;
121
+ currentLine(): Parser.ParsedExpression | undefined;
122
+ commandWaitingForAnswer(): Parser.Command<any, any> | undefined;
123
+ }, {
124
+ generateSaveData(): VMSave;
125
+ loadSaveData(data: VMSave): void;
126
+ setReturnValue(value: any): void;
127
+ waitForPlayerAnswer(cmd: Parser.Command<any, any>): void;
128
+ popAnswerQueue(): {
129
+ args: (Parser.Primitive | {
130
+ code: string;
131
+ command: {
132
+ commandType: string;
133
+ operator: string;
134
+ args: (Parser.Primitive | any)[];
135
+ options: Parser.DefaultArg;
136
+ staticOptions: {};
137
+ };
138
+ fileName: string;
139
+ line: number;
140
+ })[];
141
+ commandType: string;
142
+ options: any;
143
+ code: string;
144
+ staticOptions: any;
145
+ operator: string;
146
+ line: number;
147
+ fileName: string;
148
+ finishCommand?: ((res: any) => void) | undefined;
149
+ } | undefined;
150
+ addScopedVariable(key: string, value: any): void;
151
+ loadScripts(scriptPaths: string[]): Promise<void>;
152
+ start(): void;
153
+ setLastLabel(label: string): void;
154
+ reset(): void;
155
+ setScript(script: Parser.ParsedScript): void;
156
+ overrideData(data: DataState): void;
157
+ setStack(stack: SetFrameOptions): void;
158
+ frameOptionsToFrame(frame: SetFrameOptions): MachineFrame;
159
+ addBlock(frame: MachineFrame, block: MachineBlock): void;
160
+ addAndRunBlock(block: MachineBlock): Promise<any>;
161
+ setData(path: string, value: any): void;
162
+ addInstruction(path: string, value: any): void;
163
+ addFrame(newStackOptions: AddFrameOptions): void;
164
+ addAndRunFrame(newStackOptions: AddFrameOptions): Promise<any>;
165
+ runFrame(): Promise<any>;
166
+ cleanFrame(): any;
167
+ runBlock(): Promise<any>;
168
+ cleanBlock(): void;
169
+ runGame(): Promise<void>;
170
+ nextLineOnly(): Promise<boolean>;
171
+ isBlockFinished(): boolean;
172
+ reachedEndOfScript(): void;
173
+ runLineOnly(): Promise<any>;
174
+ runLabelFunction(label: string, ...args: any[]): Promise<any>;
175
+ runCustomFrame(stack: AddFrameOptions): void;
176
+ runLabel(label: string, ...args: any[]): void;
177
+ }>;
@@ -1,5 +1,5 @@
1
- export interface GameConfig {
2
- baseAssetsPath?: string;
3
- charactersPath: string;
4
- configPath: string;
5
- }
1
+ export interface GameConfig {
2
+ baseAssetsPath?: string;
3
+ charactersPath: string;
4
+ configPath: string;
5
+ }