@novely/core 0.33.3 → 0.34.0
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.d.ts +37 -3
- package/dist/index.global.js +25 -12
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +25 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -333,18 +333,31 @@ var createQueueProcessor = (queue, options) => {
|
|
|
333
333
|
}
|
|
334
334
|
keep.add(action);
|
|
335
335
|
if (action === "function" || action === "custom") {
|
|
336
|
-
if (action === "custom"
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
336
|
+
if (action === "custom") {
|
|
337
|
+
const fn = params[0];
|
|
338
|
+
if ("callOnlyLatest" in fn && fn.callOnlyLatest) {
|
|
339
|
+
const notLatest = next(i).some(([, func]) => {
|
|
340
|
+
if (!isFunction(func))
|
|
341
|
+
return false;
|
|
342
|
+
const c0 = func;
|
|
343
|
+
const c1 = fn;
|
|
344
|
+
const isIdenticalID = Boolean(c0.id && c1.id && c0.id === c1.id);
|
|
345
|
+
const isIdenticalByReference = c0 === c1;
|
|
346
|
+
return isIdenticalID || isIdenticalByReference || str(c0) === str(c1);
|
|
347
|
+
});
|
|
348
|
+
if (notLatest)
|
|
349
|
+
continue;
|
|
350
|
+
} else if ("skipOnRestore" in fn && fn.skipOnRestore) {
|
|
351
|
+
let getNext = () => {
|
|
352
|
+
const nextActions = next(i);
|
|
353
|
+
getNext = () => {
|
|
354
|
+
return nextActions;
|
|
355
|
+
};
|
|
356
|
+
return nextActions;
|
|
357
|
+
};
|
|
358
|
+
if (fn.skipOnRestore(getNext))
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
348
361
|
}
|
|
349
362
|
processedQueue.push(item);
|
|
350
363
|
} else if (action === "showCharacter" || action === "playSound" || action === "playMusic" || action === "voice") {
|