@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/index.js
CHANGED
|
@@ -1164,7 +1164,7 @@ function showWithDissolveTransition(tag, image, speed, priority) {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
1166
|
// src/constants.ts
|
|
1167
|
-
var PIXIVN_VERSION = "0.5.
|
|
1167
|
+
var PIXIVN_VERSION = "0.5.9";
|
|
1168
1168
|
|
|
1169
1169
|
// src/functions/SavesUtility.ts
|
|
1170
1170
|
function getSaveData() {
|
|
@@ -2142,8 +2142,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2142
2142
|
static runCurrentStep(props, choiseMade) {
|
|
2143
2143
|
return __async(this, null, function* () {
|
|
2144
2144
|
if (_GameStepManager.currentLabelId) {
|
|
2145
|
-
let
|
|
2146
|
-
if (
|
|
2145
|
+
let lastStepsLength = _GameStepManager.currentLabelStepIndex;
|
|
2146
|
+
if (lastStepsLength === null) {
|
|
2147
2147
|
console.error("[Pixi'VN] currentLabelStepIndex is null");
|
|
2148
2148
|
return;
|
|
2149
2149
|
}
|
|
@@ -2153,12 +2153,12 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2153
2153
|
return;
|
|
2154
2154
|
}
|
|
2155
2155
|
let n = currentLabel.steps.length;
|
|
2156
|
-
if (n >
|
|
2157
|
-
let
|
|
2158
|
-
let result = yield
|
|
2159
|
-
_GameStepManager.addStepHistory(
|
|
2156
|
+
if (n > lastStepsLength) {
|
|
2157
|
+
let step = currentLabel.steps[lastStepsLength];
|
|
2158
|
+
let result = yield step(props);
|
|
2159
|
+
_GameStepManager.addStepHistory(step, choiseMade);
|
|
2160
2160
|
return result;
|
|
2161
|
-
} else if (n ===
|
|
2161
|
+
} else if (n === lastStepsLength) {
|
|
2162
2162
|
_GameStepManager.closeCurrentLabel();
|
|
2163
2163
|
return yield _GameStepManager.runNextStep(props);
|
|
2164
2164
|
} else {
|
|
@@ -2203,7 +2203,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2203
2203
|
}
|
|
2204
2204
|
try {
|
|
2205
2205
|
if (labelId === CLOSE_LABEL_ID) {
|
|
2206
|
-
|
|
2206
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
2207
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
2207
2208
|
}
|
|
2208
2209
|
let tempLabel = getLabelById(labelId);
|
|
2209
2210
|
if (!tempLabel) {
|
|
@@ -2242,18 +2243,20 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2242
2243
|
static jumpLabel(label, props) {
|
|
2243
2244
|
return __async(this, null, function* () {
|
|
2244
2245
|
_GameStepManager.closeAllLabels();
|
|
2246
|
+
let choiseMade = void 0;
|
|
2245
2247
|
let labelId;
|
|
2246
2248
|
if (typeof label === "string") {
|
|
2247
2249
|
labelId = label;
|
|
2248
2250
|
} else {
|
|
2249
2251
|
labelId = label.id;
|
|
2250
2252
|
if (typeof label.choiseIndex === "number") {
|
|
2251
|
-
label.choiseIndex;
|
|
2253
|
+
choiseMade = label.choiseIndex;
|
|
2252
2254
|
}
|
|
2253
2255
|
}
|
|
2254
2256
|
try {
|
|
2255
2257
|
if (labelId === CLOSE_LABEL_ID) {
|
|
2256
|
-
|
|
2258
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
2259
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
2257
2260
|
}
|
|
2258
2261
|
let tempLabel = getLabelById(labelId);
|
|
2259
2262
|
if (!tempLabel) {
|
|
@@ -2264,7 +2267,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2264
2267
|
console.error("[Pixi'VN] Error jumping label", e);
|
|
2265
2268
|
return;
|
|
2266
2269
|
}
|
|
2267
|
-
return yield _GameStepManager.runCurrentStep(props);
|
|
2270
|
+
return yield _GameStepManager.runCurrentStep(props, choiseMade);
|
|
2268
2271
|
});
|
|
2269
2272
|
}
|
|
2270
2273
|
/**
|
|
@@ -2280,8 +2283,14 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2280
2283
|
* })
|
|
2281
2284
|
* ```
|
|
2282
2285
|
*/
|
|
2283
|
-
static closeChoiceMenu(props) {
|
|
2286
|
+
static closeChoiceMenu(label, props) {
|
|
2284
2287
|
return __async(this, null, function* () {
|
|
2288
|
+
let choiseMade = void 0;
|
|
2289
|
+
if (typeof label.choiseIndex === "number") {
|
|
2290
|
+
choiseMade = label.choiseIndex;
|
|
2291
|
+
}
|
|
2292
|
+
_GameStepManager.addStepHistory(() => {
|
|
2293
|
+
}, choiseMade);
|
|
2285
2294
|
return _GameStepManager.runNextStep(props);
|
|
2286
2295
|
});
|
|
2287
2296
|
}
|