narrat 1.3.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.
@@ -18,7 +18,9 @@ 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;
@@ -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
  };
@@ -222,12 +224,12 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
222
224
  setStack(stack: import("./vm-store").MachineStack): void;
223
225
  setData(path: string, value: any): void;
224
226
  addInstruction(path: string, value: any): void;
225
- addStack(newStack: Partial<import("./vm-store").MachineStack>): void;
227
+ addStack(newStack: Partial<import("./vm-store").MachineStack>): Promise<void>;
226
228
  nextLine(): Promise<any>;
227
229
  previousStack(): void;
228
230
  finishGame(): void;
229
231
  runLine(): Promise<void>;
230
- runLabelFunction(label: string): Promise<void>;
232
+ runLabelFunction(label: string, comeBackToSameLine?: boolean): Promise<void>;
231
233
  runLabel(label: string): void;
232
234
  }>;
233
235
  hud: import("pinia").Store<"hud", import("./hud-stats-store").HudState, {}, {
@@ -262,6 +264,11 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
262
264
  getExistingItem(id: string): import("./inventory-store").ItemState;
263
265
  getItemAmount(id: string): number;
264
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;
265
272
  remove(item: import("./inventory-store").ItemState): void;
266
273
  deleteItem(id: string): void;
267
274
  }>;
@@ -142,11 +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): Promise<void>;
150
+ runLabelFunction(label: string, comeBackToSameLine?: boolean): Promise<void>;
151
151
  runLabel(label: string): void;
152
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narrat",
3
- "version": "1.3.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",