narrat 2.10.5 → 2.10.7
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/narrat.es.js +1122 -1085
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +33 -33
- package/dist/narrat.umd.js.map +1 -1
- package/dist/stores/screen-objects-store.d.ts +13 -1
- package/dist/utils/data-helpers.d.ts +3 -0
- package/dist/vm/commands/skill-commands.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare type ScreenObjectType = 'screenObject' | 'sprite';
|
|
2
|
+
export interface ObjectOnClick {
|
|
3
|
+
label: string;
|
|
4
|
+
method?: 'jump' | 'run';
|
|
5
|
+
args?: any[];
|
|
6
|
+
}
|
|
2
7
|
export interface ScreenObjectState {
|
|
3
8
|
_entityType: ScreenObjectType;
|
|
4
9
|
id: string;
|
|
@@ -16,7 +21,7 @@ export interface ScreenObjectState {
|
|
|
16
21
|
scale: number;
|
|
17
22
|
layer: number;
|
|
18
23
|
cssClass?: string;
|
|
19
|
-
onClick?: string;
|
|
24
|
+
onClick?: ObjectOnClick | string;
|
|
20
25
|
text?: string;
|
|
21
26
|
clickMethod?: 'jump' | 'run';
|
|
22
27
|
children: ScreenObjectState[];
|
|
@@ -45,6 +50,13 @@ export declare type ScreenObjectsStoreSave = {
|
|
|
45
50
|
};
|
|
46
51
|
export declare function isScreenObject(entity: any): entity is ScreenObjectState;
|
|
47
52
|
export declare function isSprite(entity: any): entity is SpriteState;
|
|
53
|
+
export declare function parseArgumentsFromOnClick(args: string): {
|
|
54
|
+
label: string;
|
|
55
|
+
args: string[];
|
|
56
|
+
} | {
|
|
57
|
+
label: string;
|
|
58
|
+
args?: undefined;
|
|
59
|
+
};
|
|
48
60
|
export interface CreateSpriteOptions extends CreateObjectOptions {
|
|
49
61
|
image: string;
|
|
50
62
|
}
|
|
@@ -8,6 +8,9 @@ export declare function addDataHelper<T>(sourceObj: any, path: string, value: T)
|
|
|
8
8
|
export declare function getModifiableDataPinia(): {
|
|
9
9
|
data: import("../stores/vm-store").DataState;
|
|
10
10
|
skills: import("../stores/skills").SkillsState;
|
|
11
|
+
skillChecks: {
|
|
12
|
+
[key: string]: import("../stores/skills").SkillCheckState;
|
|
13
|
+
};
|
|
11
14
|
buttons: import("../stores/screens-store").ButtonsState;
|
|
12
15
|
items: {
|
|
13
16
|
[key: string]: import("../stores/inventory-store").ItemState;
|
|
@@ -28,6 +28,12 @@ export interface RollArgs {
|
|
|
28
28
|
mode?: string;
|
|
29
29
|
}
|
|
30
30
|
export declare const rollPlugin: CommandPlugin<RollArgs, {}>;
|
|
31
|
+
export declare const getSkillCheckPlugin: CommandPlugin<{
|
|
32
|
+
skillCheckId: string;
|
|
33
|
+
}, {}>;
|
|
34
|
+
export declare const getSkillCheckResultPlugin: CommandPlugin<{
|
|
35
|
+
skillCheckId: string;
|
|
36
|
+
}, {}>;
|
|
31
37
|
export declare const resetSkillCheck: CommandPlugin<{
|
|
32
38
|
id: string;
|
|
33
39
|
}, {}>;
|