narrat 2.7.2 → 2.8.0-rc2
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/components/SkillsWindow.vue.d.ts +8 -2
- package/dist/components/hud.vue.d.ts +8 -2
- package/dist/components/inventory/item-details.vue.d.ts +4 -4
- package/dist/components/inventory-ui.vue.d.ts +13 -3
- package/dist/config/audio-config.d.ts +58 -0
- package/dist/config/buttons-config.d.ts +64 -0
- package/dist/config/common-config.d.ts +80 -0
- package/dist/config/config-input.d.ts +195 -0
- package/dist/config/config-output.d.ts +185 -0
- package/dist/config/items-config.d.ts +37 -0
- package/dist/config/layout-config.d.ts +26 -0
- package/dist/config/quests-config.d.ts +36 -0
- package/dist/config/screens-config.d.ts +128 -0
- package/dist/config/skills-config.d.ts +70 -0
- package/dist/config.d.ts +135 -225
- package/dist/constants.d.ts +2 -0
- package/dist/main.d.ts +1 -2
- package/dist/narrat.es.js +23329 -18307
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +123 -116
- package/dist/narrat.umd.js.map +1 -1
- package/dist/stores/config-store.d.ts +6 -0
- package/dist/stores/hud-stats-store.d.ts +2 -4
- package/dist/stores/inventory-store.d.ts +12 -2
- package/dist/stores/main-store.d.ts +46 -9
- package/dist/stores/quest-log.d.ts +2 -4
- package/dist/stores/screens-store.d.ts +1 -1
- package/dist/stores/skills.d.ts +2 -4
- package/dist/utils/audio-loader.d.ts +3 -3
- package/dist/utils/data-helpers.d.ts +1 -1
- package/dist/utils/images-loader.d.ts +1 -1
- package/package.json +4 -1
- package/dist/defaultConfig.d.ts +0 -2
package/dist/config.d.ts
CHANGED
|
@@ -1,244 +1,154 @@
|
|
|
1
1
|
import { AppOptions } from './types/app-types';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { Config } from './config/config-output';
|
|
3
|
+
import { ConfigInput } from './config/config-input';
|
|
4
|
+
export declare function setupConfig(configInput: ConfigInput): Promise<Config>;
|
|
5
|
+
export declare function loadConfig(options: AppOptions): Promise<Config>;
|
|
4
6
|
export declare function getConfig(): Config;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export interface AppOptionsDeprecated {
|
|
15
|
-
logging: boolean;
|
|
16
|
-
debug: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface SplitConfig {
|
|
19
|
-
screens: Config['screens'];
|
|
20
|
-
buttons: Config['buttons'];
|
|
21
|
-
skills: {
|
|
22
|
-
skills: Config['skills'];
|
|
23
|
-
options: Config['skillOptions'];
|
|
24
|
-
skillChecks: Config['skillChecks'];
|
|
25
|
-
};
|
|
26
|
-
scripts: Config['scripts'];
|
|
27
|
-
audio: {
|
|
28
|
-
files: Config['audio'];
|
|
29
|
-
options: Config['audioOptions'];
|
|
30
|
-
};
|
|
31
|
-
items: Config['items'];
|
|
32
|
-
quests: Config['quests'];
|
|
33
|
-
}
|
|
34
|
-
export interface Config {
|
|
35
|
-
baseAssetsPath?: string;
|
|
36
|
-
baseDataPath?: string;
|
|
37
|
-
gameTitle: string;
|
|
38
|
-
images: {
|
|
39
|
-
[key: string]: string;
|
|
40
|
-
};
|
|
41
|
-
layout: {
|
|
42
|
-
dialogPanel?: {
|
|
43
|
-
overlayMode?: boolean;
|
|
44
|
-
rightOffset?: number;
|
|
45
|
-
bottomOffset?: number;
|
|
46
|
-
width?: number;
|
|
47
|
-
height?: number;
|
|
48
|
-
};
|
|
49
|
-
backgrounds: {
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
};
|
|
53
|
-
dialogBottomPadding: number;
|
|
54
|
-
minTextWidth?: number;
|
|
55
|
-
mobileDialogHeightPercentage: number;
|
|
56
|
-
verticalLayoutThreshold: number;
|
|
57
|
-
portraits: {
|
|
58
|
-
width: number;
|
|
59
|
-
height: number;
|
|
60
|
-
offset?: {
|
|
61
|
-
landscape?: {
|
|
62
|
-
right: number;
|
|
63
|
-
bottom: number;
|
|
64
|
-
};
|
|
65
|
-
portrait?: {
|
|
66
|
-
right: number;
|
|
67
|
-
bottom: number;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
gameFlow: {
|
|
73
|
-
labelToJumpOnScriptEnd?: string;
|
|
74
|
-
};
|
|
75
|
-
dialoguePanel: {
|
|
76
|
-
animateText?: boolean;
|
|
77
|
-
textSpeed?: number;
|
|
78
|
-
timeBetweenLines?: number;
|
|
79
|
-
};
|
|
80
|
-
splashScreens: {
|
|
81
|
-
engineSplashScreen?: {
|
|
82
|
-
skip?: boolean;
|
|
83
|
-
fadeDuration?: number;
|
|
84
|
-
timeBeforeFadeout?: number;
|
|
85
|
-
overrideText?: string;
|
|
86
|
-
overrideLogo?: string;
|
|
87
|
-
};
|
|
88
|
-
gameSplashScreen?: {
|
|
89
|
-
startButtonText?: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
screens: {
|
|
93
|
-
[key: string]: ScreenConfig;
|
|
94
|
-
};
|
|
95
|
-
buttons: {
|
|
96
|
-
[key: string]: ButtonConfig;
|
|
97
|
-
};
|
|
98
|
-
skills: {
|
|
99
|
-
[key: string]: SkillData;
|
|
100
|
-
};
|
|
101
|
-
skillOptions: {
|
|
102
|
-
xpPerLevel: number;
|
|
103
|
-
notifyLevelUp: boolean;
|
|
104
|
-
};
|
|
7
|
+
export declare function audioConfig(): import("./config/audio-config").AudioConfig;
|
|
8
|
+
export declare function skillsConfig(): {
|
|
9
|
+
skills: Record<string, {
|
|
10
|
+
hidden?: boolean | undefined;
|
|
11
|
+
description: string;
|
|
12
|
+
name: string;
|
|
13
|
+
startingLevel: number;
|
|
14
|
+
icon: string;
|
|
15
|
+
}>;
|
|
105
16
|
skillChecks: {
|
|
106
17
|
rollRange: number;
|
|
107
18
|
skillMultiplier: number;
|
|
108
19
|
failureChance: number;
|
|
109
|
-
difficultyText:
|
|
110
|
-
};
|
|
111
|
-
scripts: string[];
|
|
112
|
-
audio: {
|
|
113
|
-
[key: string]: AudioConfig;
|
|
114
|
-
};
|
|
115
|
-
audioOptions: {
|
|
116
|
-
volume: number;
|
|
117
|
-
defaultMusic?: string;
|
|
118
|
-
musicFadeInTime: number;
|
|
119
|
-
musicFadeInDelay: number;
|
|
120
|
-
musicFadeOutTime: number;
|
|
121
|
-
};
|
|
122
|
-
sound?: {
|
|
123
|
-
[key: string]: AudioConfig;
|
|
124
|
-
};
|
|
125
|
-
music?: {
|
|
126
|
-
[key: string]: AudioConfig;
|
|
20
|
+
difficultyText: [number, string][];
|
|
127
21
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
};
|
|
132
|
-
hudStats: {
|
|
133
|
-
[key: string]: HudStatConfig;
|
|
134
|
-
};
|
|
135
|
-
items: {
|
|
136
|
-
categories: ItemCategory[];
|
|
137
|
-
items: {
|
|
138
|
-
[key: string]: ItemData;
|
|
139
|
-
};
|
|
22
|
+
skillOptions: {
|
|
23
|
+
xpPerLevel: number;
|
|
24
|
+
notifyLevelUp: boolean;
|
|
140
25
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
26
|
+
};
|
|
27
|
+
export declare function itemsConfig(): {
|
|
28
|
+
items: Record<string, {
|
|
29
|
+
onUse?: {
|
|
30
|
+
label: string;
|
|
31
|
+
action: string;
|
|
32
|
+
} | undefined;
|
|
33
|
+
tag?: string | undefined;
|
|
34
|
+
category?: string | undefined;
|
|
35
|
+
description: string;
|
|
36
|
+
name: string;
|
|
37
|
+
icon: string;
|
|
38
|
+
}>;
|
|
39
|
+
categories: {
|
|
40
|
+
title: string;
|
|
41
|
+
id: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
export declare function questsConfig(): {
|
|
45
|
+
quests: Record<string, {
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
objectives: Record<string, {
|
|
49
|
+
hidden?: boolean | undefined;
|
|
50
|
+
description: string;
|
|
51
|
+
}>;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
export declare function screensConfig(): {
|
|
55
|
+
screens: Record<string, {
|
|
56
|
+
buttons?: (string | ({
|
|
57
|
+
anchor?: {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
} | undefined;
|
|
61
|
+
text?: string | undefined;
|
|
62
|
+
tag?: string | undefined;
|
|
63
|
+
cssClass?: string | undefined;
|
|
64
|
+
background?: string | undefined;
|
|
65
|
+
actionType?: string | undefined;
|
|
66
|
+
action: string;
|
|
67
|
+
enabled: boolean;
|
|
68
|
+
position: {
|
|
69
|
+
width?: number | undefined;
|
|
70
|
+
height?: number | undefined;
|
|
71
|
+
left: number;
|
|
72
|
+
top: number;
|
|
73
|
+
};
|
|
74
|
+
} & {
|
|
75
|
+
id: string;
|
|
76
|
+
}))[] | undefined;
|
|
77
|
+
background: string;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
80
|
+
export declare function buttonsConfig(): {
|
|
81
|
+
buttons: Record<string, {
|
|
82
|
+
anchor?: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
} | undefined;
|
|
86
|
+
text?: string | undefined;
|
|
87
|
+
tag?: string | undefined;
|
|
88
|
+
cssClass?: string | undefined;
|
|
89
|
+
background?: string | undefined;
|
|
90
|
+
actionType?: string | undefined;
|
|
91
|
+
action: string;
|
|
92
|
+
enabled: boolean;
|
|
93
|
+
position: {
|
|
94
|
+
width?: number | undefined;
|
|
95
|
+
height?: number | undefined;
|
|
96
|
+
left: number;
|
|
97
|
+
top: number;
|
|
144
98
|
};
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
transitions: {
|
|
150
|
-
[key: string]: TransitionSettings;
|
|
151
|
-
};
|
|
152
|
-
audioTriggers: {
|
|
153
|
-
[key: string]: string;
|
|
154
|
-
};
|
|
155
|
-
menuButtons: {
|
|
156
|
-
[key: string]: MenuButtonData;
|
|
157
|
-
};
|
|
158
|
-
debugging: {
|
|
159
|
-
showScriptFinishedMessage?: boolean;
|
|
160
|
-
};
|
|
161
|
-
saves: {
|
|
162
|
-
mode: 'game-slots' | 'manual';
|
|
163
|
-
slots: number;
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
export interface ScreenConfig {
|
|
167
|
-
background: string;
|
|
168
|
-
buttons: Array<string | InlineButtonConfig>;
|
|
169
|
-
}
|
|
170
|
-
export interface MenuButtonData {
|
|
171
|
-
text: string;
|
|
172
|
-
}
|
|
173
|
-
export interface QuestData {
|
|
174
|
-
title: string;
|
|
175
|
-
description: string;
|
|
176
|
-
objectives: {
|
|
177
|
-
[key: string]: ObjectiveData;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
export interface ObjectiveData {
|
|
99
|
+
}>;
|
|
100
|
+
};
|
|
101
|
+
export declare function getSkillConfig(id: string): {
|
|
102
|
+
hidden?: boolean | undefined;
|
|
181
103
|
description: string;
|
|
182
|
-
hidden?: boolean;
|
|
183
|
-
}
|
|
184
|
-
export interface ItemData {
|
|
185
|
-
name: string;
|
|
186
|
-
description: string;
|
|
187
|
-
icon: string;
|
|
188
|
-
onUse?: {
|
|
189
|
-
action: 'jump' | 'run';
|
|
190
|
-
label: string;
|
|
191
|
-
};
|
|
192
|
-
tag?: string;
|
|
193
|
-
category?: string;
|
|
194
|
-
}
|
|
195
|
-
export interface ItemCategory {
|
|
196
|
-
id: string;
|
|
197
|
-
title: string;
|
|
198
|
-
}
|
|
199
|
-
export interface HudStatConfig {
|
|
200
104
|
name: string;
|
|
105
|
+
startingLevel: number;
|
|
201
106
|
icon: string;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
export
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
107
|
+
};
|
|
108
|
+
export declare function getImageUrl(imageKeyOrUrl: string): string;
|
|
109
|
+
export declare function getAssetUrl(assetPath: string): string;
|
|
110
|
+
export declare function getSplitConfigUrl(basePath: string, url: string): string;
|
|
111
|
+
export declare function getDataUrl(dataPath: string): string;
|
|
112
|
+
export declare function getButtonConfig(button: string): {
|
|
113
|
+
anchor?: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
} | undefined;
|
|
117
|
+
text?: string | undefined;
|
|
118
|
+
tag?: string | undefined;
|
|
119
|
+
cssClass?: string | undefined;
|
|
120
|
+
background?: string | undefined;
|
|
121
|
+
actionType?: string | undefined;
|
|
122
|
+
action: string;
|
|
217
123
|
enabled: boolean;
|
|
218
|
-
background?: string;
|
|
219
|
-
text?: string;
|
|
220
|
-
cssClass?: string;
|
|
221
124
|
position: {
|
|
125
|
+
width?: number | undefined;
|
|
126
|
+
height?: number | undefined;
|
|
222
127
|
left: number;
|
|
223
128
|
top: number;
|
|
224
|
-
width?: number;
|
|
225
|
-
height?: number;
|
|
226
129
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
tag?: string;
|
|
234
|
-
|
|
235
|
-
export interface InlineButtonConfig extends ButtonConfig {
|
|
236
|
-
id: string;
|
|
237
|
-
}
|
|
238
|
-
export interface SkillData {
|
|
239
|
-
name: string;
|
|
130
|
+
};
|
|
131
|
+
export declare function getItemConfig(id: string): {
|
|
132
|
+
onUse?: {
|
|
133
|
+
label: string;
|
|
134
|
+
action: string;
|
|
135
|
+
} | undefined;
|
|
136
|
+
tag?: string | undefined;
|
|
137
|
+
category?: string | undefined;
|
|
240
138
|
description: string;
|
|
241
|
-
|
|
242
|
-
hidden?: boolean;
|
|
139
|
+
name: string;
|
|
243
140
|
icon: string;
|
|
244
|
-
}
|
|
141
|
+
};
|
|
142
|
+
export declare function getQuestConfig(questId: string): {
|
|
143
|
+
title: string;
|
|
144
|
+
description: string;
|
|
145
|
+
objectives: Record<string, {
|
|
146
|
+
hidden?: boolean | undefined;
|
|
147
|
+
description: string;
|
|
148
|
+
}>;
|
|
149
|
+
};
|
|
150
|
+
export declare function getObjectiveConfig(quest: string, objectiveId: string): {
|
|
151
|
+
hidden?: boolean | undefined;
|
|
152
|
+
description: string;
|
|
153
|
+
};
|
|
154
|
+
export declare function getDialogPanelWidth(): number;
|
package/dist/constants.d.ts
CHANGED
|
@@ -8,3 +8,5 @@ export declare type ReturnSignal = typeof JUMP_SIGNAL | typeof RETURN_SIGNAL | t
|
|
|
8
8
|
export declare function isReturnSignal(s: string): s is ReturnSignal;
|
|
9
9
|
export declare const VERSION: string;
|
|
10
10
|
export declare const BUILD_DATE: Date;
|
|
11
|
+
export declare const DEFAULT_DIALOG_WIDTH = 400;
|
|
12
|
+
export declare const DEFAULT_TEXT_SPEED = 20;
|
package/dist/main.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ import 'es6-promise/auto';
|
|
|
2
2
|
import 'virtual:windi.css';
|
|
3
3
|
import './css/main.css';
|
|
4
4
|
import { AppOptionsInput } from './types/app-types';
|
|
5
|
-
|
|
6
|
-
export declare function startApp(optionsInput: AppOptionsInput, optionsOld?: AppOptionsDeprecated): Promise<any>;
|
|
5
|
+
export declare function startApp(optionsInput: AppOptionsInput): Promise<any>;
|
|
7
6
|
export declare function registerComponent(name: string, component: any): void;
|