narrat 2.0.9 → 2.0.12
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/screen-layer.vue.d.ts +54 -0
- package/dist/components/screens.vue.d.ts +46 -0
- package/dist/config.d.ts +14 -7
- package/dist/data/config.json +31 -26
- package/dist/data/example.rpy +2 -0
- package/dist/img/backgrounds/test-layers.gif +0 -0
- package/dist/lib.css +1 -1
- package/dist/main.d.ts +4 -4
- package/dist/narrat.es.js +412 -333
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +92 -90
- package/dist/narrat.umd.js.map +1 -1
- package/dist/stores/main-store.d.ts +64 -8
- package/dist/stores/screens-store.d.ts +9 -9
- package/dist/vm/commands/screen-commands.d.ts +5 -1
- package/package.json +1 -1
- package/dist/gameloop.d.ts +0 -3
|
@@ -19,7 +19,26 @@ interface MainState {
|
|
|
19
19
|
export interface MainSaveData {
|
|
20
20
|
playTime: number;
|
|
21
21
|
}
|
|
22
|
-
export declare const useMain: import("pinia").StoreDefinition<"main", MainState, {
|
|
22
|
+
export declare const useMain: import("pinia").StoreDefinition<"main", MainState, {
|
|
23
|
+
isInGame(state: {
|
|
24
|
+
ready: boolean;
|
|
25
|
+
playing: boolean;
|
|
26
|
+
errors: {
|
|
27
|
+
text: string;
|
|
28
|
+
}[];
|
|
29
|
+
playTime: {
|
|
30
|
+
start: number;
|
|
31
|
+
previousPlaytime: number;
|
|
32
|
+
};
|
|
33
|
+
options: {
|
|
34
|
+
logging: boolean;
|
|
35
|
+
debug: boolean;
|
|
36
|
+
};
|
|
37
|
+
flowState: 'menu' | 'playing';
|
|
38
|
+
modal: string | false;
|
|
39
|
+
paused: boolean;
|
|
40
|
+
} & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
|
|
41
|
+
}, {
|
|
23
42
|
setup(scriptPaths: string[], config: Config): Promise<void>;
|
|
24
43
|
startMachine(): void;
|
|
25
44
|
startGame(): Promise<void>;
|
|
@@ -59,16 +78,53 @@ export declare const useMain: import("pinia").StoreDefinition<"main", MainState,
|
|
|
59
78
|
flowState: 'menu' | 'playing';
|
|
60
79
|
modal: string | false;
|
|
61
80
|
paused: boolean;
|
|
62
|
-
} & import("pinia")._StoreWithState<"main", MainState, {
|
|
81
|
+
} & import("pinia")._StoreWithState<"main", MainState, {
|
|
82
|
+
isInGame(state: {
|
|
83
|
+
ready: boolean;
|
|
84
|
+
playing: boolean;
|
|
85
|
+
errors: {
|
|
86
|
+
text: string;
|
|
87
|
+
}[];
|
|
88
|
+
playTime: {
|
|
89
|
+
start: number;
|
|
90
|
+
previousPlaytime: number;
|
|
91
|
+
};
|
|
92
|
+
options: {
|
|
93
|
+
logging: boolean;
|
|
94
|
+
debug: boolean;
|
|
95
|
+
};
|
|
96
|
+
flowState: 'menu' | 'playing';
|
|
97
|
+
modal: string | false;
|
|
98
|
+
paused: boolean;
|
|
99
|
+
} & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
|
|
100
|
+
}, any> & import("pinia")._StoreWithGetters<{
|
|
101
|
+
isInGame(state: {
|
|
102
|
+
ready: boolean;
|
|
103
|
+
playing: boolean;
|
|
104
|
+
errors: {
|
|
105
|
+
text: string;
|
|
106
|
+
}[];
|
|
107
|
+
playTime: {
|
|
108
|
+
start: number;
|
|
109
|
+
previousPlaytime: number;
|
|
110
|
+
};
|
|
111
|
+
options: {
|
|
112
|
+
logging: boolean;
|
|
113
|
+
debug: boolean;
|
|
114
|
+
};
|
|
115
|
+
flowState: 'menu' | 'playing';
|
|
116
|
+
modal: string | false;
|
|
117
|
+
paused: boolean;
|
|
118
|
+
} & import("pinia").PiniaCustomStateProperties<MainState>): boolean;
|
|
119
|
+
}> & import("pinia").PiniaCustomProperties<string, import("pinia").StateTree, import("pinia")._GettersTree<import("pinia").StateTree>, import("pinia")._ActionsTree>;
|
|
63
120
|
screens: import("pinia").Store<"screens", {
|
|
64
|
-
|
|
121
|
+
layers: string[];
|
|
65
122
|
buttons: import("./screens-store").ButtonsState;
|
|
66
123
|
}, {}, {
|
|
67
|
-
setScreen(screen: string): void;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
changeButton(button: string, newValue: boolean): void;
|
|
124
|
+
setScreen(screen: string, layer?: number | undefined): void;
|
|
125
|
+
emptyLayer(layer: number): void;
|
|
126
|
+
setButtons(config: Config): void;
|
|
127
|
+
changeButton(button: string, newValue: import("./screens-store").ButtonStateValue): void;
|
|
72
128
|
generateSaveData(): import("./screens-store").ScreenState;
|
|
73
129
|
loadSaveData(data: import("./screens-store").ScreenState): void;
|
|
74
130
|
}>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from '../config';
|
|
2
|
+
export declare type ButtonStateValue = boolean | 'hidden';
|
|
2
3
|
export interface ButtonsState {
|
|
3
4
|
[key: string]: {
|
|
4
|
-
|
|
5
|
+
state: ButtonStateValue;
|
|
5
6
|
};
|
|
6
7
|
}
|
|
7
8
|
export interface ScreenState {
|
|
8
|
-
|
|
9
|
+
layers: string[];
|
|
9
10
|
buttons: ButtonsState;
|
|
10
11
|
}
|
|
11
12
|
export declare type ScreenSave = ScreenState;
|
|
12
13
|
export declare const useScreens: import("pinia").StoreDefinition<"screens", {
|
|
13
|
-
|
|
14
|
+
layers: string[];
|
|
14
15
|
buttons: ButtonsState;
|
|
15
16
|
}, {}, {
|
|
16
|
-
setScreen(screen: string): void;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
changeButton(button: string, newValue: boolean): void;
|
|
17
|
+
setScreen(screen: string, layer?: number): void;
|
|
18
|
+
emptyLayer(layer: number): void;
|
|
19
|
+
setButtons(config: Config): void;
|
|
20
|
+
changeButton(button: string, newValue: ButtonStateValue): void;
|
|
21
21
|
generateSaveData(): ScreenSave;
|
|
22
22
|
loadSaveData(data: ScreenSave): void;
|
|
23
23
|
}>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { CommandPlugin } from './command-plugin';
|
|
2
2
|
export declare const setScreenCommand: CommandPlugin<{
|
|
3
3
|
screen: string;
|
|
4
|
+
layer: number;
|
|
5
|
+
}, {}>;
|
|
6
|
+
export declare const emptyLayerCommand: CommandPlugin<{
|
|
7
|
+
layer: number;
|
|
4
8
|
}, {}>;
|
|
5
9
|
export declare const setButtonCommand: CommandPlugin<{
|
|
6
10
|
buttonId: string;
|
|
7
|
-
|
|
11
|
+
state: any;
|
|
8
12
|
}, {}>;
|
package/package.json
CHANGED
package/dist/gameloop.d.ts
DELETED