narrat 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,5 @@ export declare const useAudio: import("pinia").StoreDefinition<"audio", AudioSta
8
8
  setMusic(music: string, soundId: number): void;
9
9
  generateSaveData(): AudioSave;
10
10
  loadSaveData(data: AudioSave): void;
11
+ reset(): void;
11
12
  }>;
@@ -18,10 +18,13 @@ declare type DialogState = {
18
18
  dialog: DialogKey[];
19
19
  };
20
20
  export declare type DialogSave = DialogState;
21
- export declare const useDialogStore: import("pinia").StoreDefinition<"dialog", DialogState, {}, {
21
+ export declare const useDialogStore: import("pinia").StoreDefinition<"dialog", DialogState, {
22
+ currentDialog(): DialogKey;
23
+ }, {
22
24
  generateSaveData(): DialogSave;
23
25
  loadSaveData(data: DialogSave): void;
24
26
  addDialog(dialog: AddDialogParams): void;
25
27
  clearDialog(): void;
28
+ reset(): void;
26
29
  }>;
27
30
  export {};
@@ -10,6 +10,11 @@ export interface InventoryState {
10
10
  items: {
11
11
  [key: string]: ItemState;
12
12
  };
13
+ interactionTags: {
14
+ [key: string]: {
15
+ blockedInteraction: boolean;
16
+ };
17
+ };
13
18
  }
14
19
  export declare type InventorySave = InventoryState;
15
20
  export declare const useInventory: import("pinia").StoreDefinition<"inventory", InventoryState, {}, {
@@ -21,6 +26,11 @@ export declare const useInventory: import("pinia").StoreDefinition<"inventory",
21
26
  getExistingItem(id: string): ItemState | undefined;
22
27
  getItemAmount(id: string): number;
23
28
  add(item: ItemState): void;
29
+ enableInteraction(tag?: string): void;
30
+ disableInteraction(tag?: string): void;
31
+ onScriptStart(): void;
32
+ onScriptEnd(): void;
33
+ isInteractionTagBlocked(tag?: string): boolean;
24
34
  remove(item: ItemState): void;
25
35
  deleteItem(id: string): void;
26
36
  }>;
@@ -87,7 +87,9 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
87
87
  }>;
88
88
  dialog: import("pinia").Store<"dialog", {
89
89
  dialog: import("./dialog-store").DialogKey[];
90
- }, {}, {
90
+ }, {
91
+ currentDialog(): import("./dialog-store").DialogKey;
92
+ }, {
91
93
  generateSaveData(): {
92
94
  dialog: import("./dialog-store").DialogKey[];
93
95
  };
@@ -96,6 +98,7 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
96
98
  }): void;
97
99
  addDialog(dialog: import("./dialog-store").AddDialogParams): void;
98
100
  clearDialog(): void;
101
+ reset(): void;
99
102
  }>;
100
103
  vm: import("pinia").Store<"vm", import("./vm-store").VMState, {
101
104
  currentStack(state: {
@@ -221,11 +224,12 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
221
224
  setStack(stack: import("./vm-store").MachineStack): void;
222
225
  setData(path: string, value: any): void;
223
226
  addInstruction(path: string, value: any): void;
224
- addStack(newStack: Partial<import("./vm-store").MachineStack>): void;
227
+ addStack(newStack: Partial<import("./vm-store").MachineStack>): Promise<void>;
225
228
  nextLine(): Promise<any>;
226
229
  previousStack(): void;
227
230
  finishGame(): void;
228
231
  runLine(): Promise<void>;
232
+ runLabelFunction(label: string, comeBackToSameLine?: boolean): Promise<void>;
229
233
  runLabel(label: string): void;
230
234
  }>;
231
235
  hud: import("pinia").Store<"hud", import("./hud-stats-store").HudState, {}, {
@@ -242,6 +246,7 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
242
246
  setMusic(music: string, soundId: number): void;
243
247
  generateSaveData(): import("./audio-store").AudioSave;
244
248
  loadSaveData(data: import("./audio-store").AudioSave): void;
249
+ reset(): void;
245
250
  }>;
246
251
  rendering: import("pinia").Store<"rendering", import("./rendering-store").RenderingState, {}, {
247
252
  updateScreenSize(width: number, height: number, textWidth: number): void;
@@ -259,6 +264,11 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
259
264
  getExistingItem(id: string): import("./inventory-store").ItemState;
260
265
  getItemAmount(id: string): number;
261
266
  add(item: import("./inventory-store").ItemState): void;
267
+ enableInteraction(tag?: string): void;
268
+ disableInteraction(tag?: string): void;
269
+ onScriptStart(): void;
270
+ onScriptEnd(): void;
271
+ isInteractionTagBlocked(tag?: string): boolean;
262
272
  remove(item: import("./inventory-store").ItemState): void;
263
273
  deleteItem(id: string): void;
264
274
  }>;
@@ -142,10 +142,11 @@ export declare const useVM: import("pinia").StoreDefinition<"vm", VMState, {
142
142
  setStack(stack: MachineStack): void;
143
143
  setData(path: string, value: any): void;
144
144
  addInstruction(path: string, value: any): void;
145
- addStack(newStack: AddStackOptions): void;
145
+ addStack(newStack: AddStackOptions): Promise<void>;
146
146
  nextLine(): Promise<any>;
147
147
  previousStack(): void;
148
148
  finishGame(): void;
149
149
  runLine(): Promise<void>;
150
+ runLabelFunction(label: string, comeBackToSameLine?: boolean): Promise<void>;
150
151
  runLabel(label: string): void;
151
152
  }>;
@@ -0,0 +1,5 @@
1
+ import { CommandPlugin } from './command-plugin';
2
+ export declare const addItemPlugin: CommandPlugin;
3
+ export declare const removeItemPlugin: CommandPlugin;
4
+ export declare const enableInteractionPlugin: CommandPlugin;
5
+ export declare const disableInteractionPlugin: CommandPlugin;
@@ -0,0 +1,2 @@
1
+ import { CommandPlugin } from './command-plugin';
2
+ export declare const runLabelPlugin: CommandPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narrat",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "narrat narrative engine",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",