@drincs/pixi-vn 0.4.9 → 0.4.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.
- package/dist/classes/CharacterBaseModel.js.map +1 -1
- package/dist/classes/CharacterBaseModel.mjs.map +1 -1
- package/dist/classes/ChoiceMenuOptionLabel.d.mts +15 -8
- package/dist/classes/ChoiceMenuOptionLabel.d.ts +15 -8
- package/dist/classes/ChoiceMenuOptionLabel.js +9 -1
- package/dist/classes/ChoiceMenuOptionLabel.js.map +1 -1
- package/dist/classes/ChoiceMenuOptionLabel.mjs +9 -1
- package/dist/classes/ChoiceMenuOptionLabel.mjs.map +1 -1
- package/dist/classes/Label.d.mts +4 -3
- package/dist/classes/Label.d.ts +4 -3
- package/dist/classes/Label.js.map +1 -1
- package/dist/classes/Label.mjs.map +1 -1
- package/dist/classes/StoredClassModel.js.map +1 -1
- package/dist/classes/StoredClassModel.mjs.map +1 -1
- package/dist/classes/index.d.mts +3 -3
- package/dist/classes/index.d.ts +3 -3
- package/dist/classes/index.js +9 -1
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +9 -1
- 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/decorators/LabelDecorator.d.mts +2 -1
- package/dist/decorators/LabelDecorator.d.ts +2 -1
- package/dist/decorators/index.d.mts +2 -2
- package/dist/decorators/index.d.ts +2 -2
- package/dist/functions/DialogueUtility.d.mts +6 -6
- package/dist/functions/DialogueUtility.d.ts +6 -6
- package/dist/functions/DialogueUtility.js.map +1 -1
- 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.d.mts +3 -3
- package/dist/functions/SavesUtility.d.ts +3 -3
- package/dist/functions/SavesUtility.js +1 -1
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +1 -1
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/StepLabelUtility.d.mts +2 -1
- package/dist/functions/StepLabelUtility.d.ts +2 -1
- package/dist/functions/StepLabelUtility.js.map +1 -1
- package/dist/functions/StepLabelUtility.mjs.map +1 -1
- package/dist/functions/index.d.mts +7 -7
- package/dist/functions/index.d.ts +7 -7
- package/dist/functions/index.js +1 -1
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -10
- 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/interface/ISaveData.d.mts +3 -3
- package/dist/interface/ISaveData.d.ts +3 -3
- package/dist/interface/export/ExportedStep.d.mts +3 -3
- package/dist/interface/export/ExportedStep.d.ts +3 -3
- package/dist/interface/export/index.d.mts +3 -3
- package/dist/interface/export/index.d.ts +3 -3
- package/dist/interface/index.d.mts +4 -4
- package/dist/interface/index.d.ts +4 -4
- package/dist/managers/StepManager.d.mts +5 -5
- package/dist/managers/StepManager.d.ts +5 -5
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/index.d.mts +4 -4
- package/dist/managers/index.d.ts +4 -4
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs.map +1 -1
- package/dist/override/StepLabelProps.d.mts +2 -1
- package/dist/override/StepLabelProps.d.ts +2 -1
- package/dist/override/StepLabelResult.d.mts +2 -1
- package/dist/override/StepLabelResult.d.ts +2 -1
- package/dist/types/ChoiceMenuOptionsType.d.mts +5 -4
- package/dist/types/ChoiceMenuOptionsType.d.ts +5 -4
- package/dist/types/LabelRunModeType.d.mts +3 -0
- package/dist/types/LabelRunModeType.d.ts +3 -0
- package/dist/types/LabelRunModeType.js +4 -0
- package/dist/types/LabelRunModeType.js.map +1 -0
- package/dist/types/LabelRunModeType.mjs +3 -0
- package/dist/types/LabelRunModeType.mjs.map +1 -0
- package/dist/types/StepLabelType.d.mts +3 -2
- package/dist/types/StepLabelType.d.ts +3 -2
- package/dist/types/StorageElementType.d.mts +6 -2
- package/dist/types/StorageElementType.d.ts +6 -2
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
- package/dist/enums/LabelRunModeEnum.d.mts +0 -9
- package/dist/enums/LabelRunModeEnum.d.ts +0 -9
- package/dist/enums/LabelRunModeEnum.js +0 -12
- package/dist/enums/LabelRunModeEnum.js.map +0 -1
- package/dist/enums/LabelRunModeEnum.mjs +0 -10
- package/dist/enums/LabelRunModeEnum.mjs.map +0 -1
- package/dist/enums/index.d.mts +0 -1
- package/dist/enums/index.d.ts +0 -1
- package/dist/enums/index.js +0 -12
- package/dist/enums/index.js.map +0 -1
- package/dist/enums/index.mjs +0 -10
- package/dist/enums/index.mjs.map +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { LabelRunModeEnum } from '../enums/LabelRunModeEnum.mjs';
|
|
2
|
-
import { LabelIdType } from '../types/LabelIdType.mjs';
|
|
3
1
|
import Label from './Label.mjs';
|
|
4
|
-
import '../types/
|
|
2
|
+
import { StorageObjectType, StorageElementType } from '../types/StorageElementType.mjs';
|
|
3
|
+
import LabelRunModeType from '../types/LabelRunModeType.mjs';
|
|
4
|
+
import { LabelIdType } from '../types/LabelIdType.mjs';
|
|
5
5
|
import '../types/StepLabelType.mjs';
|
|
6
6
|
import '@drincs/pixi-vn/dist/override';
|
|
7
|
+
import '../types/StepHistoryDataType.mjs';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* ChoiceMenuOptionLabel is a class that contains a Label and a text that will be displayed in the menu.
|
|
@@ -12,7 +13,7 @@ import '@drincs/pixi-vn/dist/override';
|
|
|
12
13
|
* new ChoiceMenuOptionLabel("Events Test", EventsTestLabel)
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
declare class ChoiceMenuOptionLabel {
|
|
16
|
+
declare class ChoiceMenuOptionLabel<T extends StorageObjectType = {}> {
|
|
16
17
|
/**
|
|
17
18
|
* Text to be displayed in the menu
|
|
18
19
|
*/
|
|
@@ -20,22 +21,28 @@ declare class ChoiceMenuOptionLabel {
|
|
|
20
21
|
/**
|
|
21
22
|
* Label to be opened when the option is selected
|
|
22
23
|
*/
|
|
23
|
-
label: typeof Label
|
|
24
|
+
label: typeof Label<T>;
|
|
24
25
|
/**
|
|
25
26
|
* Type of the label to be opened
|
|
26
27
|
*/
|
|
27
|
-
type:
|
|
28
|
+
type: LabelRunModeType;
|
|
29
|
+
/**
|
|
30
|
+
* Properties to be passed to the label
|
|
31
|
+
*/
|
|
32
|
+
props: StorageObjectType;
|
|
28
33
|
/**
|
|
29
34
|
* @param text Text to be displayed in the menu
|
|
30
35
|
* @param label Label to be opened when the option is selected
|
|
31
36
|
* @param type Type of the label to be opened
|
|
37
|
+
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes.
|
|
32
38
|
*/
|
|
33
|
-
constructor(text: string, label: typeof Label
|
|
39
|
+
constructor(text: string, label: typeof Label<T>, type?: LabelRunModeType, props?: T);
|
|
34
40
|
}
|
|
35
41
|
type IStoratedChoiceMenuOptionLabel = {
|
|
36
42
|
text: string;
|
|
37
43
|
label: LabelIdType;
|
|
38
|
-
type:
|
|
44
|
+
type: LabelRunModeType;
|
|
45
|
+
props: StorageElementType;
|
|
39
46
|
};
|
|
40
47
|
|
|
41
48
|
export { type IStoratedChoiceMenuOptionLabel, ChoiceMenuOptionLabel as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { LabelRunModeEnum } from '../enums/LabelRunModeEnum.js';
|
|
2
|
-
import { LabelIdType } from '../types/LabelIdType.js';
|
|
3
1
|
import Label from './Label.js';
|
|
4
|
-
import '../types/
|
|
2
|
+
import { StorageObjectType, StorageElementType } from '../types/StorageElementType.js';
|
|
3
|
+
import LabelRunModeType from '../types/LabelRunModeType.js';
|
|
4
|
+
import { LabelIdType } from '../types/LabelIdType.js';
|
|
5
5
|
import '../types/StepLabelType.js';
|
|
6
6
|
import '@drincs/pixi-vn/dist/override';
|
|
7
|
+
import '../types/StepHistoryDataType.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* ChoiceMenuOptionLabel is a class that contains a Label and a text that will be displayed in the menu.
|
|
@@ -12,7 +13,7 @@ import '@drincs/pixi-vn/dist/override';
|
|
|
12
13
|
* new ChoiceMenuOptionLabel("Events Test", EventsTestLabel)
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
declare class ChoiceMenuOptionLabel {
|
|
16
|
+
declare class ChoiceMenuOptionLabel<T extends StorageObjectType = {}> {
|
|
16
17
|
/**
|
|
17
18
|
* Text to be displayed in the menu
|
|
18
19
|
*/
|
|
@@ -20,22 +21,28 @@ declare class ChoiceMenuOptionLabel {
|
|
|
20
21
|
/**
|
|
21
22
|
* Label to be opened when the option is selected
|
|
22
23
|
*/
|
|
23
|
-
label: typeof Label
|
|
24
|
+
label: typeof Label<T>;
|
|
24
25
|
/**
|
|
25
26
|
* Type of the label to be opened
|
|
26
27
|
*/
|
|
27
|
-
type:
|
|
28
|
+
type: LabelRunModeType;
|
|
29
|
+
/**
|
|
30
|
+
* Properties to be passed to the label
|
|
31
|
+
*/
|
|
32
|
+
props: StorageObjectType;
|
|
28
33
|
/**
|
|
29
34
|
* @param text Text to be displayed in the menu
|
|
30
35
|
* @param label Label to be opened when the option is selected
|
|
31
36
|
* @param type Type of the label to be opened
|
|
37
|
+
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes.
|
|
32
38
|
*/
|
|
33
|
-
constructor(text: string, label: typeof Label
|
|
39
|
+
constructor(text: string, label: typeof Label<T>, type?: LabelRunModeType, props?: T);
|
|
34
40
|
}
|
|
35
41
|
type IStoratedChoiceMenuOptionLabel = {
|
|
36
42
|
text: string;
|
|
37
43
|
label: LabelIdType;
|
|
38
|
-
type:
|
|
44
|
+
type: LabelRunModeType;
|
|
45
|
+
props: StorageElementType;
|
|
39
46
|
};
|
|
40
47
|
|
|
41
48
|
export { type IStoratedChoiceMenuOptionLabel, ChoiceMenuOptionLabel as default };
|
|
@@ -6,11 +6,19 @@ var ChoiceMenuOptionLabel = class {
|
|
|
6
6
|
* @param text Text to be displayed in the menu
|
|
7
7
|
* @param label Label to be opened when the option is selected
|
|
8
8
|
* @param type Type of the label to be opened
|
|
9
|
+
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes.
|
|
9
10
|
*/
|
|
10
|
-
constructor(text, label, type = "
|
|
11
|
+
constructor(text, label, type = "call", props) {
|
|
12
|
+
/**
|
|
13
|
+
* Properties to be passed to the label
|
|
14
|
+
*/
|
|
15
|
+
this.props = {};
|
|
11
16
|
this.text = text;
|
|
12
17
|
this.label = label;
|
|
13
18
|
this.type = type;
|
|
19
|
+
if (props) {
|
|
20
|
+
this.props = props;
|
|
21
|
+
}
|
|
14
22
|
}
|
|
15
23
|
};
|
|
16
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/classes/ChoiceMenuOptionLabel.ts"],"names":[],"mappings":";AAWA,IAAqB,wBAArB,
|
|
1
|
+
{"version":3,"sources":["../../src/classes/ChoiceMenuOptionLabel.ts"],"names":[],"mappings":";AAWA,IAAqB,wBAArB,MAA6E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBzE,YAAY,MAAc,OAAwB,OAAyB,QAAQ,OAAW;AAP9F;AAAA;AAAA;AAAA,iBAA2B,CAAC;AAQxB,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,QAAI,OAAO;AACP,WAAK,QAAQ;AAAA,IACjB;AAAA,EACJ;AACJ","sourcesContent":["import { LabelRunModeType, StorageElementType, StorageObjectType } from \"../types\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport Label from \"./Label\"\n\n/**\n * ChoiceMenuOptionLabel is a class that contains a Label and a text that will be displayed in the menu.\n * @example\n * ```typescript\n * new ChoiceMenuOptionLabel(\"Events Test\", EventsTestLabel)\n * ```\n */\nexport default class ChoiceMenuOptionLabel<T extends StorageObjectType = {}> {\n /**\n * Text to be displayed in the menu\n */\n text: string\n /**\n * Label to be opened when the option is selected\n */\n label: typeof Label<T>\n /**\n * Type of the label to be opened\n */\n type: LabelRunModeType\n /**\n * Properties to be passed to the label\n */\n props: StorageObjectType = {}\n /**\n * @param text Text to be displayed in the menu\n * @param label Label to be opened when the option is selected\n * @param type Type of the label to be opened\n * @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes.\n */\n constructor(text: string, label: typeof Label<T>, type: LabelRunModeType = \"call\", props?: T) {\n this.text = text\n this.label = label\n this.type = type\n if (props) {\n this.props = props\n }\n }\n}\n\nexport type IStoratedChoiceMenuOptionLabel = {\n text: string\n label: LabelIdType\n type: LabelRunModeType\n props: StorageElementType\n}\n"]}
|
|
@@ -4,11 +4,19 @@ var ChoiceMenuOptionLabel = class {
|
|
|
4
4
|
* @param text Text to be displayed in the menu
|
|
5
5
|
* @param label Label to be opened when the option is selected
|
|
6
6
|
* @param type Type of the label to be opened
|
|
7
|
+
* @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes.
|
|
7
8
|
*/
|
|
8
|
-
constructor(text, label, type = "
|
|
9
|
+
constructor(text, label, type = "call", props) {
|
|
10
|
+
/**
|
|
11
|
+
* Properties to be passed to the label
|
|
12
|
+
*/
|
|
13
|
+
this.props = {};
|
|
9
14
|
this.text = text;
|
|
10
15
|
this.label = label;
|
|
11
16
|
this.type = type;
|
|
17
|
+
if (props) {
|
|
18
|
+
this.props = props;
|
|
19
|
+
}
|
|
12
20
|
}
|
|
13
21
|
};
|
|
14
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/classes/ChoiceMenuOptionLabel.ts"],"names":[],"mappings":";AAWA,IAAqB,wBAArB,
|
|
1
|
+
{"version":3,"sources":["../../src/classes/ChoiceMenuOptionLabel.ts"],"names":[],"mappings":";AAWA,IAAqB,wBAArB,MAA6E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBzE,YAAY,MAAc,OAAwB,OAAyB,QAAQ,OAAW;AAP9F;AAAA;AAAA;AAAA,iBAA2B,CAAC;AAQxB,SAAK,OAAO;AACZ,SAAK,QAAQ;AACb,SAAK,OAAO;AACZ,QAAI,OAAO;AACP,WAAK,QAAQ;AAAA,IACjB;AAAA,EACJ;AACJ","sourcesContent":["import { LabelRunModeType, StorageElementType, StorageObjectType } from \"../types\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport Label from \"./Label\"\n\n/**\n * ChoiceMenuOptionLabel is a class that contains a Label and a text that will be displayed in the menu.\n * @example\n * ```typescript\n * new ChoiceMenuOptionLabel(\"Events Test\", EventsTestLabel)\n * ```\n */\nexport default class ChoiceMenuOptionLabel<T extends StorageObjectType = {}> {\n /**\n * Text to be displayed in the menu\n */\n text: string\n /**\n * Label to be opened when the option is selected\n */\n label: typeof Label<T>\n /**\n * Type of the label to be opened\n */\n type: LabelRunModeType\n /**\n * Properties to be passed to the label\n */\n props: StorageObjectType = {}\n /**\n * @param text Text to be displayed in the menu\n * @param label Label to be opened when the option is selected\n * @param type Type of the label to be opened\n * @param props Properties to be passed to the label, when the label is called. it cannot contain functions or classes.\n */\n constructor(text: string, label: typeof Label<T>, type: LabelRunModeType = \"call\", props?: T) {\n this.text = text\n this.label = label\n this.type = type\n if (props) {\n this.props = props\n }\n }\n}\n\nexport type IStoratedChoiceMenuOptionLabel = {\n text: string\n label: LabelIdType\n type: LabelRunModeType\n props: StorageElementType\n}\n"]}
|
package/dist/classes/Label.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StorageObjectType } from '../types/StorageElementType.mjs';
|
|
2
2
|
import { StepLabelType } from '../types/StepLabelType.mjs';
|
|
3
|
+
import { StepHistoryDataType } from '../types/StepHistoryDataType.mjs';
|
|
3
4
|
import '@drincs/pixi-vn/dist/override';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -27,13 +28,13 @@ import '@drincs/pixi-vn/dist/override';
|
|
|
27
28
|
* GameStepManager.callLabel(StartLabel)
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
30
|
-
declare class Label {
|
|
31
|
+
declare class Label<T extends StorageObjectType = {}> {
|
|
31
32
|
/**
|
|
32
33
|
* Get the steps of the label.
|
|
33
34
|
* This class should be extended and the steps method should be overridden.
|
|
34
35
|
* Every time you update this list will also be updated when the other game versions load.
|
|
35
36
|
*/
|
|
36
|
-
get steps(): StepLabelType[];
|
|
37
|
+
get steps(): StepLabelType<T>[];
|
|
37
38
|
/**
|
|
38
39
|
* Get the corresponding steps number
|
|
39
40
|
* @param externalSteps
|
package/dist/classes/Label.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StorageObjectType } from '../types/StorageElementType.js';
|
|
2
2
|
import { StepLabelType } from '../types/StepLabelType.js';
|
|
3
|
+
import { StepHistoryDataType } from '../types/StepHistoryDataType.js';
|
|
3
4
|
import '@drincs/pixi-vn/dist/override';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -27,13 +28,13 @@ import '@drincs/pixi-vn/dist/override';
|
|
|
27
28
|
* GameStepManager.callLabel(StartLabel)
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
30
|
-
declare class Label {
|
|
31
|
+
declare class Label<T extends StorageObjectType = {}> {
|
|
31
32
|
/**
|
|
32
33
|
* Get the steps of the label.
|
|
33
34
|
* This class should be extended and the steps method should be overridden.
|
|
34
35
|
* Every time you update this list will also be updated when the other game versions load.
|
|
35
36
|
*/
|
|
36
|
-
get steps(): StepLabelType[];
|
|
37
|
+
get steps(): StepLabelType<T>[];
|
|
37
38
|
/**
|
|
38
39
|
* Get the corresponding steps number
|
|
39
40
|
* @param externalSteps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,
|
|
1
|
+
{"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACSA,IAAqB,QAArB,MAA6D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzD,IAAW,QAA4B;AAAE,UAAM,IAAI,MAAM,qDAAqD;AAAA,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzG,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AACJ","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { StorageObjectType } from \"../types\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * You must use the labelDecorator to register the label in the game.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * \\@labelDecorator() // this is equivalent to labelDecorator(\"StartLabel\")\n * export class StartLabel extends Label {\n * override get steps(): StepLabelType[] {\n * return [\n * () => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOptionLabel(\"Events Test\", EventsTestLabel),\n * new ChoiceMenuOptionLabel(\"Show Image Test\", ShowImageTest),\n * ])\n * },\n * () => GameStepManager.jumpLabel(StartLabel),\n * ]\n * }\n * }\n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends StorageObjectType = {}> {\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] { throw new Error(\"[Pixi'VN] The method Label.steps must be overridden\") }\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,
|
|
1
|
+
{"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACSA,IAAqB,QAArB,MAA6D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzD,IAAW,QAA4B;AAAE,UAAM,IAAI,MAAM,qDAAqD;AAAA,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzG,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AACJ","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { StorageObjectType } from \"../types\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * You must use the labelDecorator to register the label in the game.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * \\@labelDecorator() // this is equivalent to labelDecorator(\"StartLabel\")\n * export class StartLabel extends Label {\n * override get steps(): StepLabelType[] {\n * return [\n * () => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOptionLabel(\"Events Test\", EventsTestLabel),\n * new ChoiceMenuOptionLabel(\"Show Image Test\", ShowImageTest),\n * ])\n * },\n * () => GameStepManager.jumpLabel(StartLabel),\n * ]\n * }\n * }\n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends StorageObjectType = {}> {\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] { throw new Error(\"[Pixi'VN] The method Label.steps must be overridden\") }\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n}\n"]}
|