@drincs/pixi-vn 0.5.0 → 0.5.2
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/dist/classes/CharacterBaseModel.js +6 -6
- package/dist/classes/CharacterBaseModel.js.map +1 -1
- package/dist/classes/CharacterBaseModel.mjs +6 -6
- package/dist/classes/CharacterBaseModel.mjs.map +1 -1
- package/dist/classes/ChoiceMenuOption.d.mts +17 -4
- package/dist/classes/ChoiceMenuOption.d.ts +17 -4
- package/dist/classes/ChoiceMenuOption.js +10 -1
- package/dist/classes/ChoiceMenuOption.js.map +1 -1
- package/dist/classes/ChoiceMenuOption.mjs +10 -1
- package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
- package/dist/classes/StoredClassModel.js.map +1 -1
- package/dist/classes/StoredClassModel.mjs.map +1 -1
- package/dist/classes/index.js +6 -6
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +6 -6
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/ticker/TickerFadeAlpha.js.map +1 -1
- package/dist/classes/ticker/TickerFadeAlpha.mjs.map +1 -1
- package/dist/classes/ticker/TickerMove.js.map +1 -1
- package/dist/classes/ticker/TickerMove.mjs.map +1 -1
- package/dist/classes/ticker/TickerRotate.js.map +1 -1
- package/dist/classes/ticker/TickerRotate.mjs.map +1 -1
- package/dist/classes/ticker/index.js.map +1 -1
- package/dist/classes/ticker/index.mjs.map +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/constants.mjs.map +1 -1
- package/dist/functions/DialogueUtility.js +47 -17
- package/dist/functions/DialogueUtility.js.map +1 -1
- package/dist/functions/DialogueUtility.mjs +47 -17
- package/dist/functions/DialogueUtility.mjs.map +1 -1
- package/dist/functions/FlagsUtility.js.map +1 -1
- package/dist/functions/FlagsUtility.mjs.map +1 -1
- package/dist/functions/GameUtility.js.map +1 -1
- package/dist/functions/GameUtility.mjs.map +1 -1
- package/dist/functions/ImageUtility.js.map +1 -1
- package/dist/functions/ImageUtility.mjs.map +1 -1
- package/dist/functions/SavesUtility.js +25 -7
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +25 -7
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/index.js +48 -18
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +48 -18
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.js +60 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -30
- package/dist/index.mjs.map +1 -1
- package/dist/interface/IDialogueHistory.d.mts +4 -4
- package/dist/interface/IDialogueHistory.d.ts +4 -4
- package/dist/interface/IHistoryStep.d.mts +2 -2
- package/dist/interface/IHistoryStep.d.ts +2 -2
- package/dist/managers/StepManager.d.mts +14 -0
- package/dist/managers/StepManager.d.ts +14 -0
- package/dist/managers/StepManager.js +18 -0
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs +18 -0
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/index.js +24 -6
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +24 -6
- package/dist/managers/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HistoryChoiceMenuOption } from '../classes/ChoiceMenuOption.mjs';
|
|
2
2
|
import DialogueBaseModel from '../classes/DialogueBaseModel.mjs';
|
|
3
3
|
import '../classes/Label.mjs';
|
|
4
4
|
import '../types/StepLabelType.mjs';
|
|
@@ -19,11 +19,11 @@ interface IDialogueHistory<T extends DialogueBaseModel = DialogueBaseModel> {
|
|
|
19
19
|
/**
|
|
20
20
|
* List of choices asked of the player
|
|
21
21
|
*/
|
|
22
|
-
choices?:
|
|
22
|
+
choices?: HistoryChoiceMenuOption[];
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* The player made a choice
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
playerMadeChoice?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* The index of the step in the history.
|
|
29
29
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HistoryChoiceMenuOption } from '../classes/ChoiceMenuOption.js';
|
|
2
2
|
import DialogueBaseModel from '../classes/DialogueBaseModel.js';
|
|
3
3
|
import '../classes/Label.js';
|
|
4
4
|
import '../types/StepLabelType.js';
|
|
@@ -19,11 +19,11 @@ interface IDialogueHistory<T extends DialogueBaseModel = DialogueBaseModel> {
|
|
|
19
19
|
/**
|
|
20
20
|
* List of choices asked of the player
|
|
21
21
|
*/
|
|
22
|
-
choices?:
|
|
22
|
+
choices?: HistoryChoiceMenuOption[];
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* The player made a choice
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
playerMadeChoice?: boolean;
|
|
27
27
|
/**
|
|
28
28
|
* The index of the step in the history.
|
|
29
29
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import deepDiff from 'deep-diff';
|
|
2
|
-
import {
|
|
2
|
+
import { IStoratedChoiceMenuOption } from '../classes/ChoiceMenuOption.mjs';
|
|
3
3
|
import DialogueBaseModel from '../classes/DialogueBaseModel.mjs';
|
|
4
4
|
import { StepHistoryDataType } from '../types/StepHistoryDataType.mjs';
|
|
5
5
|
import { LabelIdType } from '../types/LabelIdType.mjs';
|
|
@@ -69,7 +69,7 @@ interface IHistoryStep<T extends DialogueBaseModel = DialogueBaseModel> {
|
|
|
69
69
|
/**
|
|
70
70
|
* List of choices asked of the player
|
|
71
71
|
*/
|
|
72
|
-
choices?:
|
|
72
|
+
choices?: IStoratedChoiceMenuOption[];
|
|
73
73
|
/**
|
|
74
74
|
* The choice made by the player
|
|
75
75
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import deepDiff from 'deep-diff';
|
|
2
|
-
import {
|
|
2
|
+
import { IStoratedChoiceMenuOption } from '../classes/ChoiceMenuOption.js';
|
|
3
3
|
import DialogueBaseModel from '../classes/DialogueBaseModel.js';
|
|
4
4
|
import { StepHistoryDataType } from '../types/StepHistoryDataType.js';
|
|
5
5
|
import { LabelIdType } from '../types/LabelIdType.js';
|
|
@@ -69,7 +69,7 @@ interface IHistoryStep<T extends DialogueBaseModel = DialogueBaseModel> {
|
|
|
69
69
|
/**
|
|
70
70
|
* List of choices asked of the player
|
|
71
71
|
*/
|
|
72
|
-
choices?:
|
|
72
|
+
choices?: IStoratedChoiceMenuOption[];
|
|
73
73
|
/**
|
|
74
74
|
* The choice made by the player
|
|
75
75
|
*/
|
|
@@ -163,6 +163,20 @@ declare class GameStepManager {
|
|
|
163
163
|
* ```
|
|
164
164
|
*/
|
|
165
165
|
static jumpLabel<T extends {}>(label: typeof Label<T> | Label<T>, props?: StepLabelPropsType<T>): Promise<StepLabelResultType>;
|
|
166
|
+
/**
|
|
167
|
+
* When the player is in a choice menu, can use this function to exit to the choice menu.
|
|
168
|
+
* @param props The props to pass to the step.
|
|
169
|
+
* @returns StepLabelResultType or undefined.
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* GameStepManager.exitToChoiceMenu(yourParams).then((result) => {
|
|
173
|
+
* if (result) {
|
|
174
|
+
* // your code
|
|
175
|
+
* }
|
|
176
|
+
* })
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
static exitToChoiceMenu<T extends {}>(props?: StepLabelPropsType<T>): Promise<StepLabelResultType>;
|
|
166
180
|
/**
|
|
167
181
|
* Go back to the last step and add it to the history.
|
|
168
182
|
* @param navigate The navigate function.
|
|
@@ -163,6 +163,20 @@ declare class GameStepManager {
|
|
|
163
163
|
* ```
|
|
164
164
|
*/
|
|
165
165
|
static jumpLabel<T extends {}>(label: typeof Label<T> | Label<T>, props?: StepLabelPropsType<T>): Promise<StepLabelResultType>;
|
|
166
|
+
/**
|
|
167
|
+
* When the player is in a choice menu, can use this function to exit to the choice menu.
|
|
168
|
+
* @param props The props to pass to the step.
|
|
169
|
+
* @returns StepLabelResultType or undefined.
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* GameStepManager.exitToChoiceMenu(yourParams).then((result) => {
|
|
173
|
+
* if (result) {
|
|
174
|
+
* // your code
|
|
175
|
+
* }
|
|
176
|
+
* })
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
static exitToChoiceMenu<T extends {}>(props?: StepLabelPropsType<T>): Promise<StepLabelResultType>;
|
|
166
180
|
/**
|
|
167
181
|
* Go back to the last step and add it to the history.
|
|
168
182
|
* @param navigate The navigate function.
|
|
@@ -1860,6 +1860,24 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1860
1860
|
return yield _GameStepManager.runCurrentStep(props);
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
|
+
/**
|
|
1864
|
+
* When the player is in a choice menu, can use this function to exit to the choice menu.
|
|
1865
|
+
* @param props The props to pass to the step.
|
|
1866
|
+
* @returns StepLabelResultType or undefined.
|
|
1867
|
+
* @example
|
|
1868
|
+
* ```typescript
|
|
1869
|
+
* GameStepManager.exitToChoiceMenu(yourParams).then((result) => {
|
|
1870
|
+
* if (result) {
|
|
1871
|
+
* // your code
|
|
1872
|
+
* }
|
|
1873
|
+
* })
|
|
1874
|
+
* ```
|
|
1875
|
+
*/
|
|
1876
|
+
static exitToChoiceMenu(props) {
|
|
1877
|
+
return __async(this, null, function* () {
|
|
1878
|
+
return _GameStepManager.runNextStep(props);
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1863
1881
|
/* After Update Methods */
|
|
1864
1882
|
// /**
|
|
1865
1883
|
// * After the update or code edit, some steps or labels may no longer match.
|