@novely/core 0.42.0 → 0.43.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 +1 -1
- package/dist/index.global.js +17 -20
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +17 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var SKIPPED_DURING_RESTORE = /* @__PURE__ */ new Set(["dialog", "choice", "input", "vibrate", "text"]);
|
|
3
3
|
var BLOCK_EXIT_STATEMENTS = /* @__PURE__ */ new Set(["choice:exit", "condition:exit", "block:exit"]);
|
|
4
4
|
var BLOCK_STATEMENTS = /* @__PURE__ */ new Set(["choice", "condition", "block"]);
|
|
5
|
-
var VIRTUAL_ACTIONS = /* @__PURE__ */ new Set(["say", "choiceExtended"]);
|
|
6
5
|
var AUDIO_ACTIONS = /* @__PURE__ */ new Set([
|
|
7
6
|
"playMusic",
|
|
8
7
|
"stopMusic",
|
|
@@ -1186,25 +1185,23 @@ var novely = ({
|
|
|
1186
1185
|
return renderer.actions[action2];
|
|
1187
1186
|
}
|
|
1188
1187
|
return (...props) => {
|
|
1189
|
-
if (
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
for (let i = 0; i < mappedChoices.length; i++) {
|
|
1207
|
-
props[i + 1] = mappedChoices[i];
|
|
1188
|
+
if (action2 === "say") {
|
|
1189
|
+
action2 = "dialog";
|
|
1190
|
+
const [character] = props;
|
|
1191
|
+
if (DEV3 && !characters[character]) {
|
|
1192
|
+
throw new Error(`Attempt to call Say action with unknown character "${character}"`);
|
|
1193
|
+
}
|
|
1194
|
+
} else if (action2 === "choice") {
|
|
1195
|
+
if (props.slice(1).every((choice) => !Array.isArray(choice))) {
|
|
1196
|
+
for (let i = 1; i < props.length; i++) {
|
|
1197
|
+
const choice = props[i];
|
|
1198
|
+
props[i] = [
|
|
1199
|
+
choice.title,
|
|
1200
|
+
choice.children,
|
|
1201
|
+
choice.active,
|
|
1202
|
+
choice.visible,
|
|
1203
|
+
choice.image
|
|
1204
|
+
];
|
|
1208
1205
|
}
|
|
1209
1206
|
}
|
|
1210
1207
|
}
|