@routevn/creator-model 1.1.12 → 1.2.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/README.md +17 -0
- package/package.json +1 -1
- package/src/index.js +1 -6
- package/src/model.js +1397 -116
- package/src/runtimeFields.js +22 -0
- package/src/systemVariables.js +0 -69
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const RUNTIME_FIELD_IDS = Object.freeze([
|
|
2
|
+
"dialogueTextSpeed",
|
|
3
|
+
"autoForwardDelay",
|
|
4
|
+
"skipUnseenText",
|
|
5
|
+
"skipTransitionsAndAnimations",
|
|
6
|
+
"soundVolume",
|
|
7
|
+
"musicVolume",
|
|
8
|
+
"muteAll",
|
|
9
|
+
"saveLoadPagination",
|
|
10
|
+
"menuPage",
|
|
11
|
+
"menuEntryPoint",
|
|
12
|
+
"autoMode",
|
|
13
|
+
"skipMode",
|
|
14
|
+
"dialogueUIHidden",
|
|
15
|
+
"isLineCompleted",
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
const RUNTIME_FIELD_ID_SET = new Set(RUNTIME_FIELD_IDS);
|
|
19
|
+
|
|
20
|
+
export const isRuntimeFieldId = (value) => {
|
|
21
|
+
return typeof value === "string" && RUNTIME_FIELD_ID_SET.has(value);
|
|
22
|
+
};
|
package/src/systemVariables.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export const SYSTEM_VARIABLE_GROUPS = Object.freeze([
|
|
2
|
-
{
|
|
3
|
-
id: "routeEngine",
|
|
4
|
-
name: "Route Engine",
|
|
5
|
-
variables: Object.freeze([
|
|
6
|
-
{
|
|
7
|
-
id: "_skipUnseenText",
|
|
8
|
-
name: "Skip Unseen Text",
|
|
9
|
-
scope: "global-device",
|
|
10
|
-
type: "boolean",
|
|
11
|
-
default: false,
|
|
12
|
-
description:
|
|
13
|
-
"When enabled, skip mode can continue through lines the player has not viewed yet.",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: "_dialogueTextSpeed",
|
|
17
|
-
name: "Dialogue Text Speed",
|
|
18
|
-
scope: "global-device",
|
|
19
|
-
type: "number",
|
|
20
|
-
default: 50,
|
|
21
|
-
description:
|
|
22
|
-
"Controls the default dialogue text speed stored for this device.",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "_currentSaveLoadPagination",
|
|
26
|
-
name: "Current Save/Load Pagination",
|
|
27
|
-
scope: "context",
|
|
28
|
-
type: "number",
|
|
29
|
-
default: 0,
|
|
30
|
-
description:
|
|
31
|
-
"The current save/load pagination index. Resolves to 0, 1, 2, 3, and so on for the active save/load page.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: "_currentMenuPage",
|
|
35
|
-
name: "Current Menu Page",
|
|
36
|
-
scope: "context",
|
|
37
|
-
type: "string",
|
|
38
|
-
default: "",
|
|
39
|
-
description:
|
|
40
|
-
"The current menu page id for the active UI flow. Typical values include options, save, load, and history.",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: "_menuEntryPoint",
|
|
44
|
-
name: "Menu Entry Point",
|
|
45
|
-
scope: "context",
|
|
46
|
-
type: "string",
|
|
47
|
-
default: "",
|
|
48
|
-
description:
|
|
49
|
-
"Indicates how the current menu flow was opened. Typical values include title and read.",
|
|
50
|
-
},
|
|
51
|
-
]),
|
|
52
|
-
},
|
|
53
|
-
]);
|
|
54
|
-
|
|
55
|
-
export const SYSTEM_VARIABLE_IDS = Object.freeze(
|
|
56
|
-
SYSTEM_VARIABLE_GROUPS.flatMap((group) =>
|
|
57
|
-
(group.variables || []).map((variable) => variable.id),
|
|
58
|
-
),
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
const SYSTEM_VARIABLE_ID_SET = new Set(SYSTEM_VARIABLE_IDS);
|
|
62
|
-
|
|
63
|
-
export const isSystemVariableId = (value) => {
|
|
64
|
-
return typeof value === "string" && SYSTEM_VARIABLE_ID_SET.has(value);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const getSystemVariableDefinitions = () => {
|
|
68
|
-
return SYSTEM_VARIABLE_GROUPS.flatMap((group) => group.variables || []);
|
|
69
|
-
};
|