create-pixi-vn 1.2.2 → 1.2.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-pixi-vn",
3
3
  "description": "Create a new Pixi’VN project",
4
- "version": "1.2.2",
4
+ "version": "1.2.3",
5
5
  "type": "module",
6
6
  "license": "GPL-3.0",
7
7
  "author": "DRincs-Productions",
@@ -19,7 +19,7 @@
19
19
  "pixi.js": "^8.9.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@drincs/pixi-vn": "^1.0.1",
22
+ "@drincs/pixi-vn": "^1.0.2",
23
23
  "@types/crypto-js": "^4.2.2",
24
24
  "crypto-js": "^4.2.0",
25
25
  "ts-node": "^10.9.2",
@@ -1,31 +1,6 @@
1
1
  import { LabelAbstract, LabelProps, StepLabelType } from "@drincs/pixi-vn";
2
- import { AdditionalShaSpetsEnum } from "@drincs/pixi-vn/dist/narration/interfaces/HistoryStep";
3
2
  import sha1 from "crypto-js/sha1";
4
3
 
5
- /**
6
- * Label is a class that contains a list of steps, which will be performed as the game continues.
7
- * For Ren'py this is the equivalent of a label.
8
- * @example
9
- * ```typescript
10
- * const START_LABEL_ID = "StartLabel"
11
- *
12
- * export const startLabel = newLabel(START_LABEL_ID,
13
- * [
14
- * (props) => {
15
- * canvas.clear()
16
- * narration.dialogue = { character: liam, text: "Which test do you want to perform?" }
17
- * narration.choiceMenuOptions = [
18
- * new ChoiceMenuOption("Events Test", eventsTestLabel),
19
- * new ChoiceMenuOption("Show Image Test", showImageTest),
20
- * ]
21
- * },
22
- * (props) => narration.jumpLabel(START_LABEL_ID, props),
23
- * ]
24
- * )
25
- *
26
- * narration.callLabel(StartLabel)
27
- * ```
28
- */
29
4
  export default class Label<T extends {} = {}> extends LabelAbstract<Label<T>, T> {
30
5
  public get stepCount(): number {
31
6
  return this.steps.length;
@@ -57,7 +32,7 @@ export default class Label<T extends {} = {}> extends LabelAbstract<Label<T>, T>
57
32
  public getStepSha(index: number): string {
58
33
  if (index < 0 || index >= this.steps.length) {
59
34
  console.warn("stepSha not found, setting to ERROR");
60
- return AdditionalShaSpetsEnum.ERROR;
35
+ return "error";
61
36
  }
62
37
  try {
63
38
  let step = this.steps[index];
@@ -65,7 +40,7 @@ export default class Label<T extends {} = {}> extends LabelAbstract<Label<T>, T>
65
40
  return sha1String.toString();
66
41
  } catch (e) {
67
42
  console.warn("stepSha not found, setting to ERROR", e);
68
- return AdditionalShaSpetsEnum.ERROR;
43
+ return "error";
69
44
  }
70
45
  }
71
46
  }
@@ -129,6 +129,7 @@ export namespace Game {
129
129
  * @param navigate The function to navigate to a path
130
130
  */
131
131
  export async function restoreGameState(data: GameState, navigate: (path: string) => void) {
132
+ stepHistory.restore(data.historyData);
132
133
  await narration.restore(data.stepData, HistoryManagerStatic.lastHistoryStep);
133
134
  storage.restore(data.storageData);
134
135
  await canvas.restore(data.canvasData);
@@ -147,4 +148,4 @@ export namespace Game {
147
148
  }
148
149
 
149
150
  export { Container, ImageContainer, ImageSprite, Sprite, Text, VideoSprite } from "@drincs/pixi-vn";
150
- export { canvas, GameUnifier, narration, PIXIVN, sound, storage };
151
+ export { canvas, GameUnifier, narration, PIXIVN, sound, stepHistory, storage };
@@ -11,7 +11,7 @@
11
11
  "preview": "vite preview"
12
12
  },
13
13
  "dependencies": {
14
- "@drincs/pixi-vn": "^1.0.1",
14
+ "@drincs/pixi-vn": "^1.0.2",
15
15
  "@emotion/react": "^11.14.0",
16
16
  "@emotion/styled": "^11.14.0",
17
17
  "@mui/icons-material": "^7.0.2",
@@ -11,7 +11,7 @@
11
11
  "preview": "vite preview"
12
12
  },
13
13
  "dependencies": {
14
- "@drincs/pixi-vn": "^1.0.1",
14
+ "@drincs/pixi-vn": "^1.0.2",
15
15
  "@drincs/pixi-vn-ink": "^0.6.0",
16
16
  "@emotion/react": "^11.14.0",
17
17
  "@emotion/styled": "^11.14.0",
@@ -12,7 +12,7 @@
12
12
  "tauri": "tauri"
13
13
  },
14
14
  "dependencies": {
15
- "@drincs/pixi-vn": "^1.0.1",
15
+ "@drincs/pixi-vn": "^1.0.2",
16
16
  "@drincs/pixi-vn-ink": "^0.6.0",
17
17
  "@emotion/react": "^11.14.0",
18
18
  "@emotion/styled": "^11.14.0",
@@ -12,7 +12,7 @@
12
12
  "tauri": "tauri"
13
13
  },
14
14
  "dependencies": {
15
- "@drincs/pixi-vn": "^1.0.1",
15
+ "@drincs/pixi-vn": "^1.0.2",
16
16
  "@emotion/react": "^11.14.0",
17
17
  "@emotion/styled": "^11.14.0",
18
18
  "@mui/icons-material": "^7.0.2",