@novely/core 0.47.1 → 0.47.2
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/index.global.js +19 -7
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -490,7 +490,7 @@ var createQueueProcessor = (queue, options) => {
|
|
|
490
490
|
const characters = /* @__PURE__ */ new Set();
|
|
491
491
|
const audio2 = {
|
|
492
492
|
music: /* @__PURE__ */ new Set(),
|
|
493
|
-
|
|
493
|
+
sounds: /* @__PURE__ */ new Set()
|
|
494
494
|
};
|
|
495
495
|
const next = (i) => queue.slice(i + 1);
|
|
496
496
|
for (const [i, item] of queue.entries()) {
|
|
@@ -519,23 +519,35 @@ var createQueueProcessor = (queue, options) => {
|
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
processedQueue.push(item);
|
|
522
|
-
} else if (action === "
|
|
522
|
+
} else if (action === "playSound") {
|
|
523
|
+
const closing = getOppositeAction(action);
|
|
524
|
+
const skip = next(i).some((item2) => {
|
|
525
|
+
if (isUserRequiredAction(item2) || isSkippedDuringRestore(item2[0])) {
|
|
526
|
+
return true;
|
|
527
|
+
}
|
|
528
|
+
const [_action, target] = item2;
|
|
529
|
+
if (target !== params[0]) {
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
532
|
+
return _action === closing || _action === action;
|
|
533
|
+
});
|
|
534
|
+
if (skip) continue;
|
|
535
|
+
audio2.sounds.add(unwrapAsset(params[0]));
|
|
536
|
+
processedQueue.push(item);
|
|
537
|
+
} else if (action === "showCharacter" || action === "playMusic" || action === "voice") {
|
|
523
538
|
const closing = getOppositeAction(action);
|
|
524
539
|
const skip = next(i).some(([_action, target]) => {
|
|
525
540
|
if (target !== params[0] && action !== "voice") {
|
|
526
541
|
return false;
|
|
527
542
|
}
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
return musicGonnaBePaused || soundGonnaBePaused || _action === closing || _action === action;
|
|
543
|
+
const musicWillBePaused = action === "playMusic" && _action === "pauseMusic";
|
|
544
|
+
return musicWillBePaused || _action === closing || _action === action;
|
|
531
545
|
});
|
|
532
546
|
if (skip) continue;
|
|
533
547
|
if (action === "showCharacter") {
|
|
534
548
|
characters.add(params[0]);
|
|
535
549
|
} else if (action === "playMusic") {
|
|
536
550
|
audio2.music.add(unwrapAsset(params[0]));
|
|
537
|
-
} else if (action === "playSound") {
|
|
538
|
-
audio2.sound.add(unwrapAsset(params[0]));
|
|
539
551
|
}
|
|
540
552
|
processedQueue.push(item);
|
|
541
553
|
} else if (action === "showBackground" || action === "preload") {
|