@drincs/pixi-vn 0.5.3 → 0.5.5
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 +110 -112
- package/dist/classes/CharacterBaseModel.js.map +1 -1
- package/dist/classes/CharacterBaseModel.mjs +110 -112
- package/dist/classes/CharacterBaseModel.mjs.map +1 -1
- package/dist/classes/ChoiceMenuOption.d.mts +19 -7
- package/dist/classes/ChoiceMenuOption.d.ts +19 -7
- package/dist/classes/ChoiceMenuOption.js +1386 -9
- package/dist/classes/ChoiceMenuOption.js.map +1 -1
- package/dist/classes/ChoiceMenuOption.mjs +1386 -9
- package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
- package/dist/classes/CloseLabel.d.mts +8 -5
- package/dist/classes/CloseLabel.d.ts +8 -5
- package/dist/classes/CloseLabel.js +44 -4
- package/dist/classes/CloseLabel.js.map +1 -1
- package/dist/classes/CloseLabel.mjs +41 -4
- package/dist/classes/CloseLabel.mjs.map +1 -1
- package/dist/classes/Label.d.mts +47 -21
- package/dist/classes/Label.d.ts +47 -21
- package/dist/classes/Label.js +36 -1
- package/dist/classes/Label.js.map +1 -1
- package/dist/classes/Label.mjs +36 -1
- package/dist/classes/Label.mjs.map +1 -1
- package/dist/classes/StoredClassModel.js +55 -57
- package/dist/classes/StoredClassModel.js.map +1 -1
- package/dist/classes/StoredClassModel.mjs +55 -57
- package/dist/classes/StoredClassModel.mjs.map +1 -1
- package/dist/classes/index.d.mts +2 -2
- package/dist/classes/index.d.ts +2 -2
- package/dist/classes/index.js +125 -73
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +125 -73
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/ticker/TickerFadeAlpha.js +27 -27
- package/dist/classes/ticker/TickerFadeAlpha.js.map +1 -1
- package/dist/classes/ticker/TickerFadeAlpha.mjs +27 -27
- package/dist/classes/ticker/TickerFadeAlpha.mjs.map +1 -1
- package/dist/classes/ticker/TickerMove.js +57 -55
- package/dist/classes/ticker/TickerMove.js.map +1 -1
- package/dist/classes/ticker/TickerMove.mjs +57 -55
- package/dist/classes/ticker/TickerMove.mjs.map +1 -1
- package/dist/classes/ticker/TickerRotate.js +57 -55
- package/dist/classes/ticker/TickerRotate.js.map +1 -1
- package/dist/classes/ticker/TickerRotate.mjs +57 -55
- package/dist/classes/ticker/TickerRotate.mjs.map +1 -1
- package/dist/classes/ticker/index.js +17 -17
- package/dist/classes/ticker/index.js.map +1 -1
- package/dist/classes/ticker/index.mjs +17 -17
- 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 +13 -20
- package/dist/decorators/LabelDecorator.d.ts +13 -20
- package/dist/decorators/LabelDecorator.js +1388 -28
- package/dist/decorators/LabelDecorator.js.map +1 -1
- package/dist/decorators/LabelDecorator.mjs +1388 -25
- package/dist/decorators/LabelDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +4 -4
- package/dist/decorators/index.d.ts +4 -4
- package/dist/decorators/index.js +1385 -13
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +1384 -13
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/DialogueUtility.d.mts +7 -7
- package/dist/functions/DialogueUtility.d.ts +7 -7
- package/dist/functions/DialogueUtility.js +96 -68
- package/dist/functions/DialogueUtility.js.map +1 -1
- package/dist/functions/DialogueUtility.mjs +96 -68
- package/dist/functions/DialogueUtility.mjs.map +1 -1
- package/dist/functions/FlagsUtility.js +55 -57
- package/dist/functions/FlagsUtility.js.map +1 -1
- package/dist/functions/FlagsUtility.mjs +55 -57
- package/dist/functions/FlagsUtility.mjs.map +1 -1
- package/dist/functions/GameUtility.js +55 -57
- package/dist/functions/GameUtility.js.map +1 -1
- package/dist/functions/GameUtility.mjs +55 -57
- package/dist/functions/GameUtility.mjs.map +1 -1
- package/dist/functions/ImageUtility.js +17 -17
- package/dist/functions/ImageUtility.js.map +1 -1
- package/dist/functions/ImageUtility.mjs +17 -17
- package/dist/functions/ImageUtility.mjs.map +1 -1
- package/dist/functions/SavesUtility.d.mts +2 -2
- package/dist/functions/SavesUtility.d.ts +2 -2
- package/dist/functions/SavesUtility.js +113 -141
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +113 -141
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/StepLabelUtility.d.mts +0 -1
- package/dist/functions/StepLabelUtility.d.ts +0 -1
- package/dist/functions/index.d.mts +4 -4
- package/dist/functions/index.d.ts +4 -4
- package/dist/functions/index.js +97 -69
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +97 -69
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +359 -327
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +358 -327
- package/dist/index.mjs.map +1 -1
- package/dist/interface/{IDialogueHistory.d.mts → DialogueHistory.d.mts} +5 -5
- package/dist/interface/{IDialogueHistory.d.ts → DialogueHistory.d.ts} +5 -5
- package/dist/interface/{IDialogueHistory.js → DialogueHistory.js} +1 -1
- package/dist/interface/DialogueHistory.mjs +3 -0
- package/dist/interface/IHistoryStep.d.mts +2 -2
- package/dist/interface/IHistoryStep.d.ts +2 -2
- package/dist/interface/ISaveData.d.mts +2 -2
- package/dist/interface/ISaveData.d.ts +2 -2
- package/dist/interface/export/ExportedStep.d.mts +2 -2
- package/dist/interface/export/ExportedStep.d.ts +2 -2
- package/dist/interface/export/index.d.mts +2 -2
- package/dist/interface/export/index.d.ts +2 -2
- package/dist/interface/index.d.mts +6 -6
- package/dist/interface/index.d.ts +6 -6
- package/dist/managers/StepManager.d.mts +12 -12
- package/dist/managers/StepManager.d.ts +12 -12
- package/dist/managers/StepManager.js +53 -79
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs +53 -79
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/WindowManager.d.mts +1 -1
- package/dist/managers/WindowManager.d.ts +1 -1
- package/dist/managers/index.d.mts +2 -2
- package/dist/managers/index.d.ts +2 -2
- package/dist/managers/index.js +112 -140
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +112 -140
- package/dist/managers/index.mjs.map +1 -1
- package/dist/types/ChoiceMenuOptionsType.d.mts +3 -3
- package/dist/types/ChoiceMenuOptionsType.d.ts +3 -3
- package/dist/types/StepLabelType.d.mts +2 -3
- package/dist/types/StepLabelType.d.ts +2 -3
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/interface/IDialogueHistory.mjs +0 -3
- /package/dist/interface/{IDialogueHistory.js.map → DialogueHistory.js.map} +0 -0
- /package/dist/interface/{IDialogueHistory.mjs.map → DialogueHistory.mjs.map} +0 -0
package/dist/functions/index.mjs
CHANGED
|
@@ -61,13 +61,31 @@ function checkIfStepsIsEqual(step1, step2) {
|
|
|
61
61
|
|
|
62
62
|
// src/classes/Label.ts
|
|
63
63
|
var Label = class {
|
|
64
|
+
/**
|
|
65
|
+
* @param id is the id of the label
|
|
66
|
+
* @param steps is the list of steps that the label will perform
|
|
67
|
+
* @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached
|
|
68
|
+
* @param choiseIndex is the index of the choice that the label will perform
|
|
69
|
+
*/
|
|
70
|
+
constructor(id, steps, onStepRun, choiseIndex) {
|
|
71
|
+
this._id = id;
|
|
72
|
+
this._steps = steps;
|
|
73
|
+
this._onStepRun = onStepRun;
|
|
74
|
+
this._choiseIndex = choiseIndex;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get the id of the label
|
|
78
|
+
*/
|
|
79
|
+
get id() {
|
|
80
|
+
return this._id;
|
|
81
|
+
}
|
|
64
82
|
/**
|
|
65
83
|
* Get the steps of the label.
|
|
66
84
|
* This class should be extended and the steps method should be overridden.
|
|
67
85
|
* Every time you update this list will also be updated when the other game versions load.
|
|
68
86
|
*/
|
|
69
87
|
get steps() {
|
|
70
|
-
|
|
88
|
+
return this._steps;
|
|
71
89
|
}
|
|
72
90
|
/**
|
|
73
91
|
* Get the corresponding steps number
|
|
@@ -86,45 +104,40 @@ var Label = class {
|
|
|
86
104
|
});
|
|
87
105
|
return res;
|
|
88
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached
|
|
109
|
+
* @returns Promise<void> or void
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* newLabel("id", [], () => {
|
|
113
|
+
* Assets.load('path/to/image1.png')
|
|
114
|
+
* Assets.load('path/to/image2.png')
|
|
115
|
+
* })
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
get onStepRun() {
|
|
119
|
+
return this._onStepRun;
|
|
120
|
+
}
|
|
121
|
+
get choiseIndex() {
|
|
122
|
+
return this._choiseIndex;
|
|
123
|
+
}
|
|
89
124
|
};
|
|
90
125
|
|
|
91
126
|
// src/classes/CloseLabel.ts
|
|
92
|
-
var
|
|
93
|
-
|
|
127
|
+
var CLOSE_LABEL_ID = "__close-label-id__";
|
|
128
|
+
function newCloseLabel(choiseIndex) {
|
|
129
|
+
return new Label(CLOSE_LABEL_ID, [], void 0, choiseIndex);
|
|
130
|
+
}
|
|
94
131
|
|
|
95
132
|
// src/decorators/LabelDecorator.ts
|
|
96
133
|
var registeredLabels = {};
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
console.error(`[Pixi'VN] Label ${labelName} not found`);
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
new labelType();
|
|
105
|
-
return labelType;
|
|
106
|
-
} catch (e) {
|
|
107
|
-
console.error(`[Pixi'VN] Error while getting Label ${labelName}`, e);
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function getLabelInstanceByClassName(labelName) {
|
|
112
|
-
try {
|
|
113
|
-
let labelType = registeredLabels[labelName];
|
|
114
|
-
if (!labelType) {
|
|
115
|
-
console.error(`[Pixi'VN] Label ${labelName} not found`);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
let label = new labelType();
|
|
119
|
-
let step = label.steps;
|
|
120
|
-
if (step.length = 0) {
|
|
121
|
-
console.warn(`[Pixi'VN] Label ${labelName} has no steps`);
|
|
122
|
-
}
|
|
123
|
-
return label;
|
|
124
|
-
} catch (e) {
|
|
125
|
-
console.error(`[Pixi'VN] Error while getting Label ${labelName}`, e);
|
|
134
|
+
function getLabelById(id) {
|
|
135
|
+
let label = registeredLabels[id];
|
|
136
|
+
if (!label) {
|
|
137
|
+
console.error(`[Pixi'VN] Label ${id} not found`);
|
|
126
138
|
return;
|
|
127
139
|
}
|
|
140
|
+
return label;
|
|
128
141
|
}
|
|
129
142
|
|
|
130
143
|
// src/functions/ExportUtility.ts
|
|
@@ -1396,7 +1409,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1396
1409
|
*/
|
|
1397
1410
|
static get currentLabel() {
|
|
1398
1411
|
if (_GameStepManager.currentLabelId) {
|
|
1399
|
-
return
|
|
1412
|
+
return getLabelById(_GameStepManager.currentLabelId);
|
|
1400
1413
|
}
|
|
1401
1414
|
}
|
|
1402
1415
|
static get currentLabelStepIndex() {
|
|
@@ -1417,7 +1430,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1417
1430
|
return true;
|
|
1418
1431
|
} else {
|
|
1419
1432
|
this.openedLabels.forEach((item) => {
|
|
1420
|
-
let label =
|
|
1433
|
+
let label = getLabelById(item.label);
|
|
1421
1434
|
if (label && label.steps.length > item.currentStepIndex) {
|
|
1422
1435
|
return false;
|
|
1423
1436
|
}
|
|
@@ -1510,9 +1523,9 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1510
1523
|
* @param label The label to add to the history.
|
|
1511
1524
|
*/
|
|
1512
1525
|
static pushNewLabel(label) {
|
|
1513
|
-
let currentLabel =
|
|
1526
|
+
let currentLabel = getLabelById(label);
|
|
1514
1527
|
if (!currentLabel) {
|
|
1515
|
-
throw new Error(
|
|
1528
|
+
throw new Error(`[Pixi'VN] Label ${label} not found`);
|
|
1516
1529
|
}
|
|
1517
1530
|
_GameStepManager._openedLabels.push({
|
|
1518
1531
|
label,
|
|
@@ -1529,7 +1542,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1529
1542
|
return;
|
|
1530
1543
|
}
|
|
1531
1544
|
if (!_GameStepManager.currentLabel) {
|
|
1532
|
-
console.error("[Pixi'VN]
|
|
1545
|
+
console.error("[Pixi'VN] currentLabel not found");
|
|
1533
1546
|
return;
|
|
1534
1547
|
}
|
|
1535
1548
|
_GameStepManager._openedLabels.pop();
|
|
@@ -1601,7 +1614,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1601
1614
|
}
|
|
1602
1615
|
let currentLabel = _GameStepManager.currentLabel;
|
|
1603
1616
|
if (!currentLabel) {
|
|
1604
|
-
console.error("[Pixi'VN]
|
|
1617
|
+
console.error("[Pixi'VN] currentLabel not found");
|
|
1605
1618
|
return;
|
|
1606
1619
|
}
|
|
1607
1620
|
let n = currentLabel.steps.length;
|
|
@@ -1622,12 +1635,12 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1622
1635
|
/**
|
|
1623
1636
|
* Execute the label and add it to the history.
|
|
1624
1637
|
* Is a call function in Ren'Py.
|
|
1625
|
-
* @param label The label to execute
|
|
1638
|
+
* @param label The label to execute or the id of the label
|
|
1626
1639
|
* @param props The props to pass to the label.
|
|
1627
1640
|
* @returns StepLabelResultType or undefined.
|
|
1628
1641
|
* @example
|
|
1629
1642
|
* ```typescript
|
|
1630
|
-
* GameStepManager.callLabel(
|
|
1643
|
+
* GameStepManager.callLabel(startLabel, yourParams).then((result) => {
|
|
1631
1644
|
* if (result) {
|
|
1632
1645
|
* // your code
|
|
1633
1646
|
* }
|
|
@@ -1636,7 +1649,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1636
1649
|
* @example
|
|
1637
1650
|
* ```typescript
|
|
1638
1651
|
* // if you use it in a step label you should return the result.
|
|
1639
|
-
* return GameStepManager.callLabel(
|
|
1652
|
+
* return GameStepManager.callLabel(startLabel).then((result) => {
|
|
1640
1653
|
* return result
|
|
1641
1654
|
* })
|
|
1642
1655
|
* ```
|
|
@@ -1644,16 +1657,24 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1644
1657
|
static callLabel(label, props) {
|
|
1645
1658
|
return __async(this, null, function* () {
|
|
1646
1659
|
let choiseMade = void 0;
|
|
1660
|
+
let labelId;
|
|
1661
|
+
if (typeof label === "string") {
|
|
1662
|
+
labelId = label;
|
|
1663
|
+
} else {
|
|
1664
|
+
labelId = label.id;
|
|
1665
|
+
if (typeof label.choiseIndex === "number") {
|
|
1666
|
+
choiseMade = label.choiseIndex;
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1647
1669
|
try {
|
|
1648
|
-
if (
|
|
1670
|
+
if (labelId === CLOSE_LABEL_ID) {
|
|
1649
1671
|
return _GameStepManager.runNextStep(props);
|
|
1650
1672
|
}
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1673
|
+
let tempLabel = getLabelById(labelId);
|
|
1674
|
+
if (!tempLabel) {
|
|
1675
|
+
throw new Error(`[Pixi'VN] Label ${labelId} not found`);
|
|
1654
1676
|
}
|
|
1655
|
-
|
|
1656
|
-
_GameStepManager.pushNewLabel(labelName);
|
|
1677
|
+
_GameStepManager.pushNewLabel(tempLabel.id);
|
|
1657
1678
|
} catch (e) {
|
|
1658
1679
|
console.error("[Pixi'VN] Error calling label", e);
|
|
1659
1680
|
return;
|
|
@@ -1665,11 +1686,11 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1665
1686
|
* Execute the label, close all labels and add them to the history.
|
|
1666
1687
|
* Is a jump function in Ren'Py.
|
|
1667
1688
|
* @param label The label to execute.
|
|
1668
|
-
* @param props The props to pass to the label
|
|
1689
|
+
* @param props The props to pass to the label or the id of the label
|
|
1669
1690
|
* @returns StepLabelResultType or undefined.
|
|
1670
1691
|
* @example
|
|
1671
1692
|
* ```typescript
|
|
1672
|
-
* GameStepManager.jumpLabel(
|
|
1693
|
+
* GameStepManager.jumpLabel(startLabel, yourParams).then((result) => {
|
|
1673
1694
|
* if (result) {
|
|
1674
1695
|
* // your code
|
|
1675
1696
|
* }
|
|
@@ -1678,7 +1699,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1678
1699
|
* @example
|
|
1679
1700
|
* ```typescript
|
|
1680
1701
|
* // if you use it in a step label you should return the result.
|
|
1681
|
-
* return GameStepManager.jumpLabel(
|
|
1702
|
+
* return GameStepManager.jumpLabel(startLabel).then((result) => {
|
|
1682
1703
|
* return result
|
|
1683
1704
|
* })
|
|
1684
1705
|
* ```
|
|
@@ -1686,15 +1707,24 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1686
1707
|
static jumpLabel(label, props) {
|
|
1687
1708
|
return __async(this, null, function* () {
|
|
1688
1709
|
_GameStepManager.closeAllLabels();
|
|
1710
|
+
let labelId;
|
|
1711
|
+
if (typeof label === "string") {
|
|
1712
|
+
labelId = label;
|
|
1713
|
+
} else {
|
|
1714
|
+
labelId = label.id;
|
|
1715
|
+
if (typeof label.choiseIndex === "number") {
|
|
1716
|
+
label.choiseIndex;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1689
1719
|
try {
|
|
1690
|
-
if (
|
|
1720
|
+
if (labelId === CLOSE_LABEL_ID) {
|
|
1691
1721
|
return _GameStepManager.runNextStep(props);
|
|
1692
1722
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1723
|
+
let tempLabel = getLabelById(labelId);
|
|
1724
|
+
if (!tempLabel) {
|
|
1725
|
+
throw new Error(`[Pixi'VN] Label ${labelId} not found`);
|
|
1695
1726
|
}
|
|
1696
|
-
|
|
1697
|
-
_GameStepManager.pushNewLabel(labelName);
|
|
1727
|
+
_GameStepManager.pushNewLabel(tempLabel.id);
|
|
1698
1728
|
} catch (e) {
|
|
1699
1729
|
console.error("[Pixi'VN] Error jumping label", e);
|
|
1700
1730
|
return;
|
|
@@ -1924,7 +1954,7 @@ var ChoiceMenuOptionClose = class {
|
|
|
1924
1954
|
/**
|
|
1925
1955
|
* Label to be opened when the option is selected
|
|
1926
1956
|
*/
|
|
1927
|
-
this.label =
|
|
1957
|
+
this.label = newCloseLabel();
|
|
1928
1958
|
/**
|
|
1929
1959
|
* Type of the label to be opened
|
|
1930
1960
|
*/
|
|
@@ -1938,7 +1968,7 @@ var ChoiceMenuOptionClose = class {
|
|
|
1938
1968
|
};
|
|
1939
1969
|
|
|
1940
1970
|
// src/classes/DialogueBaseModel.ts
|
|
1941
|
-
var
|
|
1971
|
+
var DialogueBaseModel = class {
|
|
1942
1972
|
/**
|
|
1943
1973
|
* @param text The text of the dialogue.
|
|
1944
1974
|
* @param character The id of the character that is speaking.
|
|
@@ -1990,8 +2020,8 @@ function setDialogue(props) {
|
|
|
1990
2020
|
let dialogue;
|
|
1991
2021
|
if (typeof props === "string") {
|
|
1992
2022
|
text = props;
|
|
1993
|
-
dialogue = new
|
|
1994
|
-
} else if (!(props instanceof
|
|
2023
|
+
dialogue = new DialogueBaseModel(text, characterId);
|
|
2024
|
+
} else if (!(props instanceof DialogueBaseModel)) {
|
|
1995
2025
|
text = props.text;
|
|
1996
2026
|
if (props.character) {
|
|
1997
2027
|
if (typeof props.character === "string") {
|
|
@@ -2000,7 +2030,7 @@ function setDialogue(props) {
|
|
|
2000
2030
|
characterId = props.character.id;
|
|
2001
2031
|
}
|
|
2002
2032
|
}
|
|
2003
|
-
dialogue = new
|
|
2033
|
+
dialogue = new DialogueBaseModel(text, characterId);
|
|
2004
2034
|
} else {
|
|
2005
2035
|
dialogue = props;
|
|
2006
2036
|
}
|
|
@@ -2022,7 +2052,7 @@ function setChoiceMenuOptions(options) {
|
|
|
2022
2052
|
};
|
|
2023
2053
|
}
|
|
2024
2054
|
return __spreadProps(__spreadValues({}, option), {
|
|
2025
|
-
label: option.label.
|
|
2055
|
+
label: option.label.id
|
|
2026
2056
|
});
|
|
2027
2057
|
});
|
|
2028
2058
|
GameStorageManager.setVariable(GameStorageManager.keysSystem.CURRENT_MENU_OPTIONS_MEMORY_KEY, value);
|
|
@@ -2034,8 +2064,7 @@ function getChoiceMenuOptions() {
|
|
|
2034
2064
|
let options = [];
|
|
2035
2065
|
d.forEach((option, index) => {
|
|
2036
2066
|
if (option.type === Close) {
|
|
2037
|
-
let itemLabel =
|
|
2038
|
-
itemLabel.choiseIndex = index;
|
|
2067
|
+
let itemLabel = newCloseLabel(index);
|
|
2039
2068
|
options.push({
|
|
2040
2069
|
text: option.text,
|
|
2041
2070
|
label: itemLabel,
|
|
@@ -2044,10 +2073,9 @@ function getChoiceMenuOptions() {
|
|
|
2044
2073
|
});
|
|
2045
2074
|
return;
|
|
2046
2075
|
}
|
|
2047
|
-
let label =
|
|
2076
|
+
let label = getLabelById(option.label);
|
|
2048
2077
|
if (label) {
|
|
2049
|
-
let itemLabel = new label
|
|
2050
|
-
itemLabel.choiseIndex = index;
|
|
2078
|
+
let itemLabel = new Label(label.id, label.steps, label.onStepRun, index);
|
|
2051
2079
|
options.push(__spreadProps(__spreadValues({}, option), {
|
|
2052
2080
|
label: itemLabel
|
|
2053
2081
|
}));
|
|
@@ -2070,7 +2098,7 @@ function getDialogueHistory() {
|
|
|
2070
2098
|
if (oldChoices) {
|
|
2071
2099
|
let choiceMade = false;
|
|
2072
2100
|
if (step.choiceIndexMade !== void 0 && oldChoices.length > step.choiceIndexMade) {
|
|
2073
|
-
oldChoices[step.choiceIndexMade].
|
|
2101
|
+
oldChoices[step.choiceIndexMade].isResponse = true;
|
|
2074
2102
|
choiceMade = true;
|
|
2075
2103
|
}
|
|
2076
2104
|
list[list.length - 1].playerMadeChoice = choiceMade;
|
|
@@ -2082,7 +2110,7 @@ function getDialogueHistory() {
|
|
|
2082
2110
|
return {
|
|
2083
2111
|
text: choice.text,
|
|
2084
2112
|
type: choice.type,
|
|
2085
|
-
|
|
2113
|
+
isResponse: false
|
|
2086
2114
|
};
|
|
2087
2115
|
});
|
|
2088
2116
|
list.push({
|
|
@@ -2344,7 +2372,7 @@ function showWithDissolveTransition(tag, image, speed, priority) {
|
|
|
2344
2372
|
}
|
|
2345
2373
|
|
|
2346
2374
|
// src/constants.ts
|
|
2347
|
-
var PIXIVN_VERSION = "0.5.
|
|
2375
|
+
var PIXIVN_VERSION = "0.5.5";
|
|
2348
2376
|
|
|
2349
2377
|
// src/functions/SavesUtility.ts
|
|
2350
2378
|
function getSaveData() {
|