@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.js
CHANGED
|
@@ -1613,8 +1613,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1613
1613
|
static runCurrentStep(props, choiseMade) {
|
|
1614
1614
|
return __async(this, null, function* () {
|
|
1615
1615
|
if (_GameStepManager.currentLabelId) {
|
|
1616
|
-
let
|
|
1617
|
-
if (
|
|
1616
|
+
let lastStepsLength = _GameStepManager.currentLabelStepIndex;
|
|
1617
|
+
if (lastStepsLength === null) {
|
|
1618
1618
|
console.error("[Pixi'VN] currentLabelStepIndex is null");
|
|
1619
1619
|
return;
|
|
1620
1620
|
}
|
|
@@ -1624,12 +1624,12 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1624
1624
|
return;
|
|
1625
1625
|
}
|
|
1626
1626
|
let n = currentLabel.steps.length;
|
|
1627
|
-
if (n >
|
|
1628
|
-
let
|
|
1629
|
-
let result = yield
|
|
1630
|
-
_GameStepManager.addStepHistory(
|
|
1627
|
+
if (n > lastStepsLength) {
|
|
1628
|
+
let step = currentLabel.steps[lastStepsLength];
|
|
1629
|
+
let result = yield step(props);
|
|
1630
|
+
_GameStepManager.addStepHistory(step, choiseMade);
|
|
1631
1631
|
return result;
|
|
1632
|
-
} else if (n ===
|
|
1632
|
+
} else if (n === lastStepsLength) {
|
|
1633
1633
|
_GameStepManager.closeCurrentLabel();
|
|
1634
1634
|
return yield _GameStepManager.runNextStep(props);
|
|
1635
1635
|
} else {
|
|
@@ -1674,7 +1674,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
try {
|
|
1676
1676
|
if (labelId === CLOSE_LABEL_ID) {
|
|
1677
|
-
|
|
1677
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
1678
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
1678
1679
|
}
|
|
1679
1680
|
let tempLabel = getLabelById(labelId);
|
|
1680
1681
|
if (!tempLabel) {
|
|
@@ -1713,18 +1714,20 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1713
1714
|
static jumpLabel(label, props) {
|
|
1714
1715
|
return __async(this, null, function* () {
|
|
1715
1716
|
_GameStepManager.closeAllLabels();
|
|
1717
|
+
let choiseMade = void 0;
|
|
1716
1718
|
let labelId;
|
|
1717
1719
|
if (typeof label === "string") {
|
|
1718
1720
|
labelId = label;
|
|
1719
1721
|
} else {
|
|
1720
1722
|
labelId = label.id;
|
|
1721
1723
|
if (typeof label.choiseIndex === "number") {
|
|
1722
|
-
label.choiseIndex;
|
|
1724
|
+
choiseMade = label.choiseIndex;
|
|
1723
1725
|
}
|
|
1724
1726
|
}
|
|
1725
1727
|
try {
|
|
1726
1728
|
if (labelId === CLOSE_LABEL_ID) {
|
|
1727
|
-
|
|
1729
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
1730
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
1728
1731
|
}
|
|
1729
1732
|
let tempLabel = getLabelById(labelId);
|
|
1730
1733
|
if (!tempLabel) {
|
|
@@ -1735,7 +1738,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1735
1738
|
console.error("[Pixi'VN] Error jumping label", e);
|
|
1736
1739
|
return;
|
|
1737
1740
|
}
|
|
1738
|
-
return yield _GameStepManager.runCurrentStep(props);
|
|
1741
|
+
return yield _GameStepManager.runCurrentStep(props, choiseMade);
|
|
1739
1742
|
});
|
|
1740
1743
|
}
|
|
1741
1744
|
/**
|
|
@@ -1751,8 +1754,14 @@ var _GameStepManager = class _GameStepManager {
|
|
|
1751
1754
|
* })
|
|
1752
1755
|
* ```
|
|
1753
1756
|
*/
|
|
1754
|
-
static closeChoiceMenu(props) {
|
|
1757
|
+
static closeChoiceMenu(label, props) {
|
|
1755
1758
|
return __async(this, null, function* () {
|
|
1759
|
+
let choiseMade = void 0;
|
|
1760
|
+
if (typeof label.choiseIndex === "number") {
|
|
1761
|
+
choiseMade = label.choiseIndex;
|
|
1762
|
+
}
|
|
1763
|
+
_GameStepManager.addStepHistory(() => {
|
|
1764
|
+
}, choiseMade);
|
|
1756
1765
|
return _GameStepManager.runNextStep(props);
|
|
1757
1766
|
});
|
|
1758
1767
|
}
|
|
@@ -2378,7 +2387,7 @@ function showWithDissolveTransition(tag, image, speed, priority) {
|
|
|
2378
2387
|
}
|
|
2379
2388
|
|
|
2380
2389
|
// src/constants.ts
|
|
2381
|
-
var PIXIVN_VERSION = "0.5.
|
|
2390
|
+
var PIXIVN_VERSION = "0.5.9";
|
|
2382
2391
|
|
|
2383
2392
|
// src/functions/SavesUtility.ts
|
|
2384
2393
|
function getSaveData() {
|