@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.global.js
CHANGED
|
@@ -834,7 +834,7 @@ var Novely = (() => {
|
|
|
834
834
|
const characters = /* @__PURE__ */ new Set();
|
|
835
835
|
const audio2 = {
|
|
836
836
|
music: /* @__PURE__ */ new Set(),
|
|
837
|
-
|
|
837
|
+
sounds: /* @__PURE__ */ new Set()
|
|
838
838
|
};
|
|
839
839
|
const next = (i) => queue.slice(i + 1);
|
|
840
840
|
for (const [i, item] of queue.entries()) {
|
|
@@ -863,23 +863,35 @@ var Novely = (() => {
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
processedQueue.push(item);
|
|
866
|
-
} else if (action === "
|
|
866
|
+
} else if (action === "playSound") {
|
|
867
|
+
const closing = getOppositeAction(action);
|
|
868
|
+
const skip = next(i).some((item2) => {
|
|
869
|
+
if (isUserRequiredAction(item2) || isSkippedDuringRestore(item2[0])) {
|
|
870
|
+
return true;
|
|
871
|
+
}
|
|
872
|
+
const [_action, target] = item2;
|
|
873
|
+
if (target !== params[0]) {
|
|
874
|
+
return false;
|
|
875
|
+
}
|
|
876
|
+
return _action === closing || _action === action;
|
|
877
|
+
});
|
|
878
|
+
if (skip) continue;
|
|
879
|
+
audio2.sounds.add(unwrapAsset(params[0]));
|
|
880
|
+
processedQueue.push(item);
|
|
881
|
+
} else if (action === "showCharacter" || action === "playMusic" || action === "voice") {
|
|
867
882
|
const closing = getOppositeAction(action);
|
|
868
883
|
const skip = next(i).some(([_action, target]) => {
|
|
869
884
|
if (target !== params[0] && action !== "voice") {
|
|
870
885
|
return false;
|
|
871
886
|
}
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
return musicGonnaBePaused || soundGonnaBePaused || _action === closing || _action === action;
|
|
887
|
+
const musicWillBePaused = action === "playMusic" && _action === "pauseMusic";
|
|
888
|
+
return musicWillBePaused || _action === closing || _action === action;
|
|
875
889
|
});
|
|
876
890
|
if (skip) continue;
|
|
877
891
|
if (action === "showCharacter") {
|
|
878
892
|
characters.add(params[0]);
|
|
879
893
|
} else if (action === "playMusic") {
|
|
880
894
|
audio2.music.add(unwrapAsset(params[0]));
|
|
881
|
-
} else if (action === "playSound") {
|
|
882
|
-
audio2.sound.add(unwrapAsset(params[0]));
|
|
883
895
|
}
|
|
884
896
|
processedQueue.push(item);
|
|
885
897
|
} else if (action === "showBackground" || action === "preload") {
|