@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.mjs
CHANGED
|
@@ -1159,7 +1159,7 @@ function showWithDissolveTransition(tag, image, speed, priority) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
1161
|
// src/constants.ts
|
|
1162
|
-
var PIXIVN_VERSION = "0.5.
|
|
1162
|
+
var PIXIVN_VERSION = "0.5.9";
|
|
1163
1163
|
|
|
1164
1164
|
// src/functions/SavesUtility.ts
|
|
1165
1165
|
function getSaveData() {
|
|
@@ -2137,8 +2137,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2137
2137
|
static runCurrentStep(props, choiseMade) {
|
|
2138
2138
|
return __async(this, null, function* () {
|
|
2139
2139
|
if (_GameStepManager.currentLabelId) {
|
|
2140
|
-
let
|
|
2141
|
-
if (
|
|
2140
|
+
let lastStepsLength = _GameStepManager.currentLabelStepIndex;
|
|
2141
|
+
if (lastStepsLength === null) {
|
|
2142
2142
|
console.error("[Pixi'VN] currentLabelStepIndex is null");
|
|
2143
2143
|
return;
|
|
2144
2144
|
}
|
|
@@ -2148,12 +2148,12 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2148
2148
|
return;
|
|
2149
2149
|
}
|
|
2150
2150
|
let n = currentLabel.steps.length;
|
|
2151
|
-
if (n >
|
|
2152
|
-
let
|
|
2153
|
-
let result = yield
|
|
2154
|
-
_GameStepManager.addStepHistory(
|
|
2151
|
+
if (n > lastStepsLength) {
|
|
2152
|
+
let step = currentLabel.steps[lastStepsLength];
|
|
2153
|
+
let result = yield step(props);
|
|
2154
|
+
_GameStepManager.addStepHistory(step, choiseMade);
|
|
2155
2155
|
return result;
|
|
2156
|
-
} else if (n ===
|
|
2156
|
+
} else if (n === lastStepsLength) {
|
|
2157
2157
|
_GameStepManager.closeCurrentLabel();
|
|
2158
2158
|
return yield _GameStepManager.runNextStep(props);
|
|
2159
2159
|
} else {
|
|
@@ -2198,7 +2198,8 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
try {
|
|
2200
2200
|
if (labelId === CLOSE_LABEL_ID) {
|
|
2201
|
-
|
|
2201
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
2202
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
2202
2203
|
}
|
|
2203
2204
|
let tempLabel = getLabelById(labelId);
|
|
2204
2205
|
if (!tempLabel) {
|
|
@@ -2237,18 +2238,20 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2237
2238
|
static jumpLabel(label, props) {
|
|
2238
2239
|
return __async(this, null, function* () {
|
|
2239
2240
|
_GameStepManager.closeAllLabels();
|
|
2241
|
+
let choiseMade = void 0;
|
|
2240
2242
|
let labelId;
|
|
2241
2243
|
if (typeof label === "string") {
|
|
2242
2244
|
labelId = label;
|
|
2243
2245
|
} else {
|
|
2244
2246
|
labelId = label.id;
|
|
2245
2247
|
if (typeof label.choiseIndex === "number") {
|
|
2246
|
-
label.choiseIndex;
|
|
2248
|
+
choiseMade = label.choiseIndex;
|
|
2247
2249
|
}
|
|
2248
2250
|
}
|
|
2249
2251
|
try {
|
|
2250
2252
|
if (labelId === CLOSE_LABEL_ID) {
|
|
2251
|
-
|
|
2253
|
+
let closeLabel = newCloseLabel(choiseMade);
|
|
2254
|
+
return _GameStepManager.closeChoiceMenu(closeLabel, props);
|
|
2252
2255
|
}
|
|
2253
2256
|
let tempLabel = getLabelById(labelId);
|
|
2254
2257
|
if (!tempLabel) {
|
|
@@ -2259,7 +2262,7 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2259
2262
|
console.error("[Pixi'VN] Error jumping label", e);
|
|
2260
2263
|
return;
|
|
2261
2264
|
}
|
|
2262
|
-
return yield _GameStepManager.runCurrentStep(props);
|
|
2265
|
+
return yield _GameStepManager.runCurrentStep(props, choiseMade);
|
|
2263
2266
|
});
|
|
2264
2267
|
}
|
|
2265
2268
|
/**
|
|
@@ -2275,8 +2278,14 @@ var _GameStepManager = class _GameStepManager {
|
|
|
2275
2278
|
* })
|
|
2276
2279
|
* ```
|
|
2277
2280
|
*/
|
|
2278
|
-
static closeChoiceMenu(props) {
|
|
2281
|
+
static closeChoiceMenu(label, props) {
|
|
2279
2282
|
return __async(this, null, function* () {
|
|
2283
|
+
let choiseMade = void 0;
|
|
2284
|
+
if (typeof label.choiseIndex === "number") {
|
|
2285
|
+
choiseMade = label.choiseIndex;
|
|
2286
|
+
}
|
|
2287
|
+
_GameStepManager.addStepHistory(() => {
|
|
2288
|
+
}, choiseMade);
|
|
2280
2289
|
return _GameStepManager.runNextStep(props);
|
|
2281
2290
|
});
|
|
2282
2291
|
}
|