@novely/core 0.30.1 → 0.30.3
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 +3 -9
- package/dist/index.global.js +7 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/package.json +63 -63
package/dist/index.js
CHANGED
|
@@ -117,7 +117,7 @@ var throttle = (fn, ms) => {
|
|
|
117
117
|
}
|
|
118
118
|
fn.apply(this, args);
|
|
119
119
|
throttled = true;
|
|
120
|
-
setTimeout(
|
|
120
|
+
setTimeout(() => {
|
|
121
121
|
throttled = false;
|
|
122
122
|
if (savedArgs) {
|
|
123
123
|
wrapper.apply(savedThis, savedArgs);
|
|
@@ -699,8 +699,8 @@ var novely = ({
|
|
|
699
699
|
renderer: createRenderer,
|
|
700
700
|
initialScreen = "mainmenu",
|
|
701
701
|
translation,
|
|
702
|
-
state: defaultState,
|
|
703
|
-
data: defaultData,
|
|
702
|
+
state: defaultState = {},
|
|
703
|
+
data: defaultData = {},
|
|
704
704
|
autosaves = true,
|
|
705
705
|
migrations = [],
|
|
706
706
|
throttleTimeout = 799,
|
|
@@ -721,8 +721,6 @@ var novely = ({
|
|
|
721
721
|
const ASSETS_TO_PRELOAD = /* @__PURE__ */ new Set();
|
|
722
722
|
const dataLoaded = createControlledPromise();
|
|
723
723
|
let initialScreenWasShown = false;
|
|
724
|
-
defaultData ||= {};
|
|
725
|
-
defaultState ||= {};
|
|
726
724
|
const intime = (value) => {
|
|
727
725
|
return times.add(value), value;
|
|
728
726
|
};
|
|
@@ -1019,13 +1017,13 @@ var novely = ({
|
|
|
1019
1017
|
}
|
|
1020
1018
|
return current;
|
|
1021
1019
|
};
|
|
1022
|
-
const exit = (force = false) => {
|
|
1020
|
+
const exit = (force = false, saving = true) => {
|
|
1023
1021
|
if (interacted > 1 && !force && askBeforeExit) {
|
|
1024
1022
|
renderer.ui.showExitPrompt();
|
|
1025
1023
|
return;
|
|
1026
1024
|
}
|
|
1027
1025
|
const ctx = renderer.getContext(MAIN_CONTEXT_KEY);
|
|
1028
|
-
if (interacted > 0) {
|
|
1026
|
+
if (interacted > 0 && saving) {
|
|
1029
1027
|
save("auto");
|
|
1030
1028
|
}
|
|
1031
1029
|
const stack = useStack(ctx);
|
|
@@ -1354,7 +1352,7 @@ var novely = ({
|
|
|
1354
1352
|
end({ ctx }) {
|
|
1355
1353
|
if (ctx.meta.preview)
|
|
1356
1354
|
return;
|
|
1357
|
-
exit(true);
|
|
1355
|
+
exit(true, false);
|
|
1358
1356
|
},
|
|
1359
1357
|
input({ ctx, data: data2, forward }, [question, onInput, setup]) {
|
|
1360
1358
|
ctx.input(
|
|
@@ -1623,7 +1621,7 @@ var RU = {
|
|
|
1623
1621
|
Remove: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
|
|
1624
1622
|
LoadASaveFrom: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u043E\u0442",
|
|
1625
1623
|
DeleteASaveFrom: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u043E\u0442",
|
|
1626
|
-
TextSpeed: "\u0421\u043A\u043E\u0440\u043E\u0441\u0442\u044C \
|
|
1624
|
+
TextSpeed: "\u0421\u043A\u043E\u0440\u043E\u0441\u0442\u044C \u0442\u0435\u043A\u0441\u0442\u0430",
|
|
1627
1625
|
TextSpeedSlow: "\u041C\u0435\u0434\u043B\u0435\u043D\u043D\u0430\u044F",
|
|
1628
1626
|
TextSpeedMedium: "\u0421\u0440\u0435\u0434\u043D\u044F\u044F",
|
|
1629
1627
|
TextSpeedFast: "\u0411\u044B\u0441\u0442\u0440\u0430\u044F",
|