@drincs/pixi-vn 0.5.7 → 0.5.9
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/ChoiceMenuOption.js.map +1 -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.map +1 -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.js.map +1 -1
- package/dist/decorators/LabelDecorator.mjs.map +1 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/DialogueUtility.d.mts +4 -2
- package/dist/functions/DialogueUtility.d.ts +4 -2
- package/dist/functions/DialogueUtility.js +21 -12
- package/dist/functions/DialogueUtility.js.map +1 -1
- package/dist/functions/DialogueUtility.mjs +21 -12
- 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 +92 -13
- package/dist/functions/SavesUtility.js.map +1 -1
- package/dist/functions/SavesUtility.mjs +92 -13
- package/dist/functions/SavesUtility.mjs.map +1 -1
- package/dist/functions/index.js +22 -13
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +22 -13
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.js +22 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -13
- package/dist/index.mjs.map +1 -1
- package/dist/managers/StepManager.d.mts +1 -1
- package/dist/managers/StepManager.d.ts +1 -1
- package/dist/managers/StepManager.js +91 -12
- package/dist/managers/StepManager.js.map +1 -1
- package/dist/managers/StepManager.mjs +91 -12
- package/dist/managers/StepManager.mjs.map +1 -1
- package/dist/managers/index.js +91 -12
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/index.mjs +91 -12
- package/dist/managers/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/functions/index.mjs
CHANGED
|
@@ -1607,8 +1607,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1607
1607
|
static runCurrentStep(props, choiseMade) {
|
|
1608
1608
|
return __async(this, null, function* () {
|
|
1609
1609
|
if (_GameStepManager.currentLabelId) {
|
|
1610
|
-
let
|
|
1611
|
-
if (
|
|
1610
|
+
let lastStepsLength = _GameStepManager.currentLabelStepIndex;
|
|
1611
|
+
if (lastStepsLength === null) {
|
|
1612
1612
|
console.error("[Pixi'VN] currentLabelStepIndex is null");
|
|
1613
1613
|
return;
|
|
1614
1614
|
}
|
|
@@ -1618,12 +1618,12 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1618
1618
|
return;
|
|
1619
1619
|
}
|
|
1620
1620
|
let n = currentLabel.steps.length;
|
|
1621
|
-
if (n >
|
|
1622
|
-
let
|
|
1623
|
-
let result = yield
|
|
1624
|
-
_GameStepManager.addStepHistory(
|
|
1621
|
+
if (n > lastStepsLength) {
|
|
1622
|
+
let step = currentLabel.steps[lastStepsLength];
|
|
1623
|
+
let result = yield step(props);
|
|
1624
|
+
_GameStepManager.addStepHistory(step, choiseMade);
|
|
1625
1625
|
return result;
|
|
1626
|
-
} else if (n ===
|
|
1626
|
+
} else if (n === lastStepsLength) {
|
|
1627
1627
|
_GameStepManager.closeCurrentLabel();
|
|
1628
1628
|
return yield _GameStepManager.runNextStep(props);
|
|
1629
1629
|
} else {
|
|
@@ -1668,7 +1668,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
try {
|
|
1670
1670
|
if (labelId === CLOSE_LABEL_ID) {
|
|
1671
|
-
|
|
1671
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
1672
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
1672
1673
|
}
|
|
1673
1674
|
let tempLabel = getLabelById(labelId);
|
|
1674
1675
|
if (!tempLabel) {
|
|
@@ -1707,18 +1708,20 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1707
1708
|
static jumpLabel(label, props) {
|
|
1708
1709
|
return __async(this, null, function* () {
|
|
1709
1710
|
_GameStepManager.closeAllLabels();
|
|
1711
|
+
let choiseMade = void 0;
|
|
1710
1712
|
let labelId;
|
|
1711
1713
|
if (typeof label === "string") {
|
|
1712
1714
|
labelId = label;
|
|
1713
1715
|
} else {
|
|
1714
1716
|
labelId = label.id;
|
|
1715
1717
|
if (typeof label.choiseIndex === "number") {
|
|
1716
|
-
label.choiseIndex;
|
|
1718
|
+
choiseMade = label.choiseIndex;
|
|
1717
1719
|
}
|
|
1718
1720
|
}
|
|
1719
1721
|
try {
|
|
1720
1722
|
if (labelId === CLOSE_LABEL_ID) {
|
|
1721
|
-
|
|
1723
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
1724
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
1722
1725
|
}
|
|
1723
1726
|
let tempLabel = getLabelById(labelId);
|
|
1724
1727
|
if (!tempLabel) {
|
|
@@ -1729,7 +1732,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1729
1732
|
console.error("[Pixi'VN] Error jumping label", e);
|
|
1730
1733
|
return;
|
|
1731
1734
|
}
|
|
1732
|
-
return yield _GameStepManager.runCurrentStep(props);
|
|
1735
|
+
return yield _GameStepManager.runCurrentStep(props, choiseMade);
|
|
1733
1736
|
});
|
|
1734
1737
|
}
|
|
1735
1738
|
/**
|
|
@@ -1745,8 +1748,14 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1745
1748
|
* })
|
|
1746
1749
|
* ```
|
|
1747
1750
|
*/
|
|
1748
|
-
static closeChoiceMenu(props) {
|
|
1751
|
+
static closeChoiceMenu(label, props) {
|
|
1749
1752
|
return __async(this, null, function* () {
|
|
1753
|
+
let choiseMade = void 0;
|
|
1754
|
+
if (typeof label.choiseIndex === "number") {
|
|
1755
|
+
choiseMade = label.choiseIndex;
|
|
1756
|
+
}
|
|
1757
|
+
_GameStepManager.addStepHistory(() => {
|
|
1758
|
+
}, choiseMade);
|
|
1750
1759
|
return _GameStepManager.runNextStep(props);
|
|
1751
1760
|
});
|
|
1752
1761
|
}
|
|
@@ -2372,7 +2381,7 @@ function showWithDissolveTransition(tag, image, speed, priority) {
|
|
|
2372
2381
|
}
|
|
2373
2382
|
|
|
2374
2383
|
// src/constants.ts
|
|
2375
|
-
var PIXIVN_VERSION = "0.5.
|
|
2384
|
+
var PIXIVN_VERSION = "0.5.9";
|
|
2376
2385
|
|
|
2377
2386
|
// src/functions/SavesUtility.ts
|
|
2378
2387
|
function getSaveData() {
|