narrat 2.0.10 → 2.0.11

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 (103) hide show
  1. package/CHANGELOG.md +844 -0
  2. package/LICENSE +21 -21
  3. package/README.md +105 -105
  4. package/dist/.DS_Store +0 -0
  5. package/dist/app.vue.d.ts +96 -96
  6. package/dist/components/MainMenu.vue.d.ts +12 -12
  7. package/dist/components/Skills.vue.d.ts +22 -22
  8. package/dist/components/debug/debug-menu.vue.d.ts +48 -48
  9. package/dist/components/dialog-picture.vue.d.ts +9 -9
  10. package/dist/components/game-dialog.vue.d.ts +65 -65
  11. package/dist/components/hud.vue.d.ts +12 -12
  12. package/dist/components/inventory-ui.vue.d.ts +30 -30
  13. package/dist/components/loading-bar.vue.d.ts +10 -10
  14. package/dist/components/menu-buttons.vue.d.ts +26 -26
  15. package/dist/components/notification-toast.vue.d.ts +6 -6
  16. package/dist/components/quests-ui.vue.d.ts +20 -20
  17. package/dist/components/screens.vue.d.ts +46 -0
  18. package/dist/components/utils/modal.vue.d.ts +6 -6
  19. package/dist/components/volume-controls.vue.d.ts +7 -7
  20. package/dist/config.d.ts +158 -151
  21. package/dist/constants.d.ts +1 -1
  22. package/dist/data/characters.json +62 -62
  23. package/dist/data/config.json +184 -182
  24. package/dist/data/example.rpy +367 -367
  25. package/dist/data/refactor.rpy +30 -30
  26. package/dist/defaultConfig.d.ts +2 -2
  27. package/dist/demo/demo.d.ts +1 -1
  28. package/dist/dialog-box.vue.d.ts +37 -37
  29. package/dist/exports/config.d.ts +1 -1
  30. package/dist/exports/display.d.ts +2 -2
  31. package/dist/exports/plugins.d.ts +20 -20
  32. package/dist/fonts/OpenDyslexic.ttf.svg +2326 -2326
  33. package/dist/img/.DS_Store +0 -0
  34. package/dist/lib/lib.d.ts +15 -15
  35. package/dist/lib.css +1 -1
  36. package/dist/main.d.ts +5 -5
  37. package/dist/music/.DS_Store +0 -0
  38. package/dist/narrat.es.js +320 -283
  39. package/dist/narrat.es.js.map +1 -1
  40. package/dist/narrat.umd.js +90 -89
  41. package/dist/narrat.umd.js.map +1 -1
  42. package/dist/plugins/NarratPlugin.d.ts +11 -11
  43. package/dist/sounds/.DS_Store +0 -0
  44. package/dist/stores/audio-store.d.ts +12 -12
  45. package/dist/stores/dialog-store.d.ts +31 -31
  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 +338 -283
  49. package/dist/stores/notification-store.d.ts +12 -12
  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 +22 -23
  53. package/dist/stores/skills.d.ts +36 -36
  54. package/dist/stores/vm-store.d.ts +155 -155
  55. package/dist/types/app-types.d.ts +4 -4
  56. package/dist/types/character-types.d.ts +27 -27
  57. package/dist/types/dialog-box-types.d.ts +10 -10
  58. package/dist/types/game-save.d.ts +21 -21
  59. package/dist/types/parser.d.ts +93 -93
  60. package/dist/types/state.d.ts +3 -3
  61. package/dist/utils/ajax.d.ts +1 -1
  62. package/dist/utils/audio-loader.d.ts +13 -13
  63. package/dist/utils/characters.d.ts +5 -5
  64. package/dist/utils/data-helpers.d.ts +19 -19
  65. package/dist/utils/debounce.d.ts +14 -14
  66. package/dist/utils/error-handling.d.ts +3 -3
  67. package/dist/utils/helpers.d.ts +6 -6
  68. package/dist/utils/images-loader.d.ts +6 -6
  69. package/dist/utils/logger.d.ts +11 -11
  70. package/dist/utils/object-iterators.d.ts +8 -8
  71. package/dist/utils/promises.d.ts +1 -1
  72. package/dist/utils/randomId.d.ts +1 -1
  73. package/dist/utils/save-helpers.d.ts +3 -3
  74. package/dist/utils/skillchecks.d.ts +17 -17
  75. package/dist/utils/string-helpers.d.ts +3 -3
  76. package/dist/utils/time-helpers.d.ts +2 -2
  77. package/dist/vm/commands/arithmetic-commands.d.ts +17 -17
  78. package/dist/vm/commands/audio-commands.d.ts +8 -8
  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 +2 -2
  82. package/dist/vm/commands/command-plugin.d.ts +43 -43
  83. package/dist/vm/commands/flow-commands.d.ts +14 -14
  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/notify.d.ts +4 -4
  89. package/dist/vm/commands/quest-commands.d.ts +30 -30
  90. package/dist/vm/commands/screen-commands.d.ts +8 -8
  91. package/dist/vm/commands/set.d.ts +6 -6
  92. package/dist/vm/commands/skill-commands.d.ts +33 -33
  93. package/dist/vm/commands/stats-commands.d.ts +12 -12
  94. package/dist/vm/commands/string-commands.d.ts +9 -9
  95. package/dist/vm/commands/text-field.d.ts +7 -7
  96. package/dist/vm/commands/text.d.ts +13 -13
  97. package/dist/vm/commands/wait.d.ts +4 -4
  98. package/dist/vm/vm-helpers.d.ts +16 -16
  99. package/dist/vm/vm-parser.d.ts +19 -19
  100. package/dist/vm/vm-parser.test.d.ts +1 -1
  101. package/dist/vm/vm.d.ts +19 -19
  102. package/package.json +79 -79
  103. package/dist/gameloop.d.ts +0 -3
@@ -1,12 +1,12 @@
1
- export interface NotificationState {
2
- text: string;
3
- }
4
- export interface NotificationsState {
5
- notifications: {
6
- [key: string]: NotificationState;
7
- };
8
- }
9
- export declare const useNotifications: import("pinia").StoreDefinition<"notifications", NotificationsState, {}, {
10
- addNotification(text: string): Promise<void>;
11
- deleteNotification(id: string): void;
12
- }>;
1
+ export interface NotificationState {
2
+ text: string;
3
+ }
4
+ export interface NotificationsState {
5
+ notifications: {
6
+ [key: string]: NotificationState;
7
+ };
8
+ }
9
+ export declare const useNotifications: import("pinia").StoreDefinition<"notifications", NotificationsState, {}, {
10
+ addNotification(text: string): Promise<void>;
11
+ deleteNotification(id: string): void;
12
+ }>;
@@ -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,22 @@
1
- import { ButtonConfig } from '../config';
2
- export interface ButtonsState {
3
- [key: string]: {
4
- enabled: boolean;
5
- };
6
- }
7
- export interface ScreenState {
8
- currentScreen: string;
9
- buttons: ButtonsState;
10
- }
11
- export declare type ScreenSave = ScreenState;
12
- export declare const useScreens: import("pinia").StoreDefinition<"screens", {
13
- currentScreen: string;
14
- buttons: ButtonsState;
15
- }, {}, {
16
- setScreen(screen: string): void;
17
- setButtons(buttons: {
18
- [key: string]: ButtonConfig;
19
- }): void;
20
- changeButton(button: string, newValue: boolean): void;
21
- generateSaveData(): ScreenSave;
22
- loadSaveData(data: ScreenSave): void;
23
- }>;
1
+ import { Config } from '../config';
2
+ export declare type ButtonStateValue = boolean | 'hidden';
3
+ export interface ButtonsState {
4
+ [key: string]: {
5
+ state: ButtonStateValue;
6
+ };
7
+ }
8
+ export interface ScreenState {
9
+ currentScreen: string;
10
+ buttons: ButtonsState;
11
+ }
12
+ export declare type ScreenSave = ScreenState;
13
+ export declare const useScreens: import("pinia").StoreDefinition<"screens", {
14
+ currentScreen: string;
15
+ buttons: ButtonsState;
16
+ }, {}, {
17
+ setScreen(screen: string): void;
18
+ setButtons(config: Config): void;
19
+ changeButton(button: string, newValue: ButtonStateValue): void;
20
+ generateSaveData(): ScreenSave;
21
+ loadSaveData(data: ScreenSave): void;
22
+ }>;
@@ -1,36 +1,36 @@
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
- addXp(skill: string, xp: number): void;
34
- incrementSkill(skill: string, amount: number): void;
35
- levelledUp(skill: string): void;
36
- }>;
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
+ addXp(skill: string, xp: number): void;
34
+ incrementSkill(skill: string, amount: number): void;
35
+ levelledUp(skill: string): void;
36
+ }>;
@@ -1,155 +1,155 @@
1
- import { Parser } from '../types/parser';
2
- export declare type AddFrameOptions = Omit<SetStackOptions, 'label'> & {
3
- label?: string;
4
- };
5
- export interface MachineFrame {
6
- currentIndex: number;
7
- branchData: Parser.ParsedLabel;
8
- label: string;
9
- scope: {
10
- [key: string]: any;
11
- };
12
- onComplete?: (result: any) => void;
13
- returnValue: any;
14
- }
15
- export interface SetStackOptions {
16
- currentIndex: number;
17
- branchData: Parser.ParsedLabel;
18
- label: string;
19
- scope?: {
20
- [key: string]: any;
21
- };
22
- onComplete?: (result: any) => void;
23
- args?: any[];
24
- }
25
- export interface DataState {
26
- [key: string]: any;
27
- }
28
- export interface VMState {
29
- commandsWaitingForPlayerAnswer: Parser.Command<any, any>[];
30
- stack: MachineFrame[];
31
- script: Parser.ParsedScript;
32
- data: DataState;
33
- lastLabel: string;
34
- currentScope: {
35
- [key: string]: any;
36
- };
37
- }
38
- export interface VMSave {
39
- lastLabel: string;
40
- data: DataState;
41
- }
42
- export declare const useVM: import("pinia").StoreDefinition<"vm", VMState, {
43
- currentFrame(state: {
44
- commandsWaitingForPlayerAnswer: {
45
- args: (Parser.Primitive | {
46
- code: string;
47
- command: {
48
- commandType: string;
49
- operator: string;
50
- args: (Parser.Primitive | any)[];
51
- options: Parser.DefaultArg;
52
- staticOptions: {};
53
- };
54
- fileName: string;
55
- line: number;
56
- })[];
57
- commandType: string;
58
- options: any;
59
- code: string;
60
- staticOptions: any;
61
- operator: string;
62
- line: number;
63
- fileName: string;
64
- finishCommand?: ((res: any) => void) | undefined;
65
- }[];
66
- stack: {
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
- label: string;
84
- scope: {
85
- [key: string]: any;
86
- };
87
- onComplete?: ((result: any) => void) | undefined;
88
- returnValue: any;
89
- }[];
90
- script: Parser.ParsedScript;
91
- data: DataState;
92
- lastLabel: string;
93
- currentScope: {
94
- [key: string]: any;
95
- };
96
- } & import("pinia").PiniaCustomStateProperties<VMState>): MachineFrame | undefined;
97
- currentLine(): Parser.ParsedExpression<Parser.DefaultArg, {}> | undefined;
98
- commandWaitingForAnswer(): Parser.Command<any, any> | undefined;
99
- }, {
100
- generateSaveData(): VMSave;
101
- loadSaveData(data: VMSave): void;
102
- resetScope(): void;
103
- setReturnValue(value: any): void;
104
- waitForPlayerAnswer(cmd: Parser.Command<any, any>): void;
105
- popAnswerQueue(): {
106
- args: (Parser.Primitive | {
107
- code: string;
108
- command: {
109
- commandType: string;
110
- operator: string;
111
- args: (Parser.Primitive | any)[];
112
- options: Parser.DefaultArg;
113
- staticOptions: {};
114
- };
115
- fileName: string;
116
- line: number;
117
- })[];
118
- commandType: string;
119
- options: any;
120
- code: string;
121
- staticOptions: any;
122
- operator: string;
123
- line: number;
124
- fileName: string;
125
- finishCommand?: ((res: any) => void) | undefined;
126
- } | undefined;
127
- removeFromScope(vars: string[]): void;
128
- addScopedVariable(key: string, value: any): void;
129
- extendScope(scope: {
130
- [key: string]: any;
131
- }): void;
132
- loadScripts(scriptPaths: string[]): Promise<void>;
133
- start(): void;
134
- setLastLabel(label: string): void;
135
- reset(): void;
136
- setScript(script: Parser.ParsedScript): void;
137
- overrideData(data: DataState): void;
138
- setStack(stack: SetStackOptions): void;
139
- stackOptionsToStack(stack: SetStackOptions): MachineFrame;
140
- setData(path: string, value: any): void;
141
- addInstruction(path: string, value: any): void;
142
- addFrame(newStackOptions: AddFrameOptions): void;
143
- addAndRunFrame(newStackOptions: AddFrameOptions): Promise<void>;
144
- runFrame(): Promise<void>;
145
- runGame(): Promise<void>;
146
- nextLineOnly(): Promise<boolean>;
147
- nextLine(): Promise<any>;
148
- previousFrame(): Promise<any>;
149
- reachedEndOfScript(): void;
150
- runLineOnly(): Promise<void>;
151
- runLine(): Promise<void>;
152
- runLabelFunction(label: string, ...args: any[]): Promise<unknown>;
153
- runCustomFrame(stack: AddFrameOptions): void;
154
- runLabel(label: string, ...args: any[]): void;
155
- }>;
1
+ import { Parser } from '../types/parser';
2
+ export declare type AddFrameOptions = Omit<SetStackOptions, 'label'> & {
3
+ label?: string;
4
+ };
5
+ export interface MachineFrame {
6
+ currentIndex: number;
7
+ branchData: Parser.ParsedLabel;
8
+ label: string;
9
+ scope: {
10
+ [key: string]: any;
11
+ };
12
+ onComplete?: (result: any) => void;
13
+ returnValue: any;
14
+ }
15
+ export interface SetStackOptions {
16
+ currentIndex: number;
17
+ branchData: Parser.ParsedLabel;
18
+ label: string;
19
+ scope?: {
20
+ [key: string]: any;
21
+ };
22
+ onComplete?: (result: any) => void;
23
+ args?: any[];
24
+ }
25
+ export interface DataState {
26
+ [key: string]: any;
27
+ }
28
+ export interface VMState {
29
+ commandsWaitingForPlayerAnswer: Parser.Command<any, any>[];
30
+ stack: MachineFrame[];
31
+ script: Parser.ParsedScript;
32
+ data: DataState;
33
+ lastLabel: string;
34
+ currentScope: {
35
+ [key: string]: any;
36
+ };
37
+ }
38
+ export interface VMSave {
39
+ lastLabel: string;
40
+ data: DataState;
41
+ }
42
+ export declare const useVM: import("pinia").StoreDefinition<"vm", VMState, {
43
+ currentFrame(state: {
44
+ commandsWaitingForPlayerAnswer: {
45
+ args: (Parser.Primitive | {
46
+ code: string;
47
+ command: {
48
+ commandType: string;
49
+ operator: string;
50
+ args: (Parser.Primitive | any)[];
51
+ options: Parser.DefaultArg;
52
+ staticOptions: {};
53
+ };
54
+ fileName: string;
55
+ line: number;
56
+ })[];
57
+ commandType: string;
58
+ options: any;
59
+ code: string;
60
+ staticOptions: any;
61
+ operator: string;
62
+ line: number;
63
+ fileName: string;
64
+ finishCommand?: ((res: any) => void) | undefined;
65
+ }[];
66
+ stack: {
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
+ label: string;
84
+ scope: {
85
+ [key: string]: any;
86
+ };
87
+ onComplete?: ((result: any) => void) | undefined;
88
+ returnValue: any;
89
+ }[];
90
+ script: Parser.ParsedScript;
91
+ data: DataState;
92
+ lastLabel: string;
93
+ currentScope: {
94
+ [key: string]: any;
95
+ };
96
+ } & import("pinia").PiniaCustomStateProperties<VMState>): MachineFrame | undefined;
97
+ currentLine(): Parser.ParsedExpression<Parser.DefaultArg, {}> | undefined;
98
+ commandWaitingForAnswer(): Parser.Command<any, any> | undefined;
99
+ }, {
100
+ generateSaveData(): VMSave;
101
+ loadSaveData(data: VMSave): void;
102
+ resetScope(): void;
103
+ setReturnValue(value: any): void;
104
+ waitForPlayerAnswer(cmd: Parser.Command<any, any>): void;
105
+ popAnswerQueue(): {
106
+ args: (Parser.Primitive | {
107
+ code: string;
108
+ command: {
109
+ commandType: string;
110
+ operator: string;
111
+ args: (Parser.Primitive | any)[];
112
+ options: Parser.DefaultArg;
113
+ staticOptions: {};
114
+ };
115
+ fileName: string;
116
+ line: number;
117
+ })[];
118
+ commandType: string;
119
+ options: any;
120
+ code: string;
121
+ staticOptions: any;
122
+ operator: string;
123
+ line: number;
124
+ fileName: string;
125
+ finishCommand?: ((res: any) => void) | undefined;
126
+ } | undefined;
127
+ removeFromScope(vars: string[]): void;
128
+ addScopedVariable(key: string, value: any): void;
129
+ extendScope(scope: {
130
+ [key: string]: any;
131
+ }): void;
132
+ loadScripts(scriptPaths: string[]): Promise<void>;
133
+ start(): void;
134
+ setLastLabel(label: string): void;
135
+ reset(): void;
136
+ setScript(script: Parser.ParsedScript): void;
137
+ overrideData(data: DataState): void;
138
+ setStack(stack: SetStackOptions): void;
139
+ stackOptionsToStack(stack: SetStackOptions): MachineFrame;
140
+ setData(path: string, value: any): void;
141
+ addInstruction(path: string, value: any): void;
142
+ addFrame(newStackOptions: AddFrameOptions): void;
143
+ addAndRunFrame(newStackOptions: AddFrameOptions): Promise<void>;
144
+ runFrame(): Promise<void>;
145
+ runGame(): Promise<void>;
146
+ nextLineOnly(): Promise<boolean>;
147
+ nextLine(): Promise<any>;
148
+ previousFrame(): Promise<any>;
149
+ reachedEndOfScript(): void;
150
+ runLineOnly(): Promise<void>;
151
+ runLine(): Promise<void>;
152
+ runLabelFunction(label: string, ...args: any[]): Promise<unknown>;
153
+ runCustomFrame(stack: AddFrameOptions): void;
154
+ runLabel(label: string, ...args: any[]): void;
155
+ }>;
@@ -1,4 +1,4 @@
1
- export interface GameConfig {
2
- charactersPath: string;
3
- configPath: string;
4
- }
1
+ export interface GameConfig {
2
+ charactersPath: string;
3
+ configPath: string;
4
+ }
@@ -1,27 +1,27 @@
1
- export interface CharactersConfigFile {
2
- config: {
3
- imagesPath: string;
4
- };
5
- characters: {
6
- [key: string]: CharacterData;
7
- };
8
- }
9
- export interface CharacterData {
10
- sprites?: {
11
- [key: string]: string;
12
- };
13
- name: string;
14
- style?: DialogStyle;
15
- }
16
- export interface DialogStyle {
17
- color?: string;
18
- boxCss?: {
19
- [key: string]: any;
20
- };
21
- nameCss?: {
22
- [key: string]: any;
23
- };
24
- textCss?: {
25
- [key: string]: any;
26
- };
27
- }
1
+ export interface CharactersConfigFile {
2
+ config: {
3
+ imagesPath: string;
4
+ };
5
+ characters: {
6
+ [key: string]: CharacterData;
7
+ };
8
+ }
9
+ export interface CharacterData {
10
+ sprites?: {
11
+ [key: string]: string;
12
+ };
13
+ name: string;
14
+ style?: DialogStyle;
15
+ }
16
+ export interface DialogStyle {
17
+ color?: string;
18
+ boxCss?: {
19
+ [key: string]: any;
20
+ };
21
+ nameCss?: {
22
+ [key: string]: any;
23
+ };
24
+ textCss?: {
25
+ [key: string]: any;
26
+ };
27
+ }
@@ -1,10 +1,10 @@
1
- import { DialogChoice } from '../stores/dialog-store';
2
- export interface DialogBoxParameters {
3
- title: string;
4
- text: string;
5
- styleId: string;
6
- choices: DialogChoice[];
7
- textField?: boolean;
8
- old: boolean;
9
- interactive: boolean;
10
- }
1
+ import { DialogChoice } from '../stores/dialog-store';
2
+ export interface DialogBoxParameters {
3
+ title: string;
4
+ text: string;
5
+ styleId: string;
6
+ choices: DialogChoice[];
7
+ textField?: boolean;
8
+ old: boolean;
9
+ interactive: boolean;
10
+ }