narrat 2.0.0-test-2 → 2.0.1

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.
Files changed (92) hide show
  1. package/README.md +38 -38
  2. package/dist/app.vue.d.ts +106 -0
  3. package/dist/components/MainMenu.vue.d.ts +12 -0
  4. package/dist/components/Skills.vue.d.ts +22 -0
  5. package/dist/components/debug/debug-menu.vue.d.ts +48 -0
  6. package/dist/components/dialog-picture.vue.d.ts +9 -0
  7. package/dist/components/game-dialog.vue.d.ts +65 -0
  8. package/dist/components/hud.vue.d.ts +12 -0
  9. package/dist/components/inventory-ui.vue.d.ts +30 -0
  10. package/dist/components/loading-bar.vue.d.ts +10 -0
  11. package/dist/components/menu-buttons.vue.d.ts +26 -0
  12. package/dist/components/notification-toast.vue.d.ts +6 -0
  13. package/dist/components/quests-ui.vue.d.ts +20 -0
  14. package/dist/components/utils/modal.vue.d.ts +6 -0
  15. package/dist/components/volume-controls.vue.d.ts +7 -0
  16. package/dist/config.d.ts +151 -0
  17. package/dist/constants.d.ts +1 -0
  18. package/dist/data/config.json +7 -1
  19. package/dist/data/example.rpy +8 -4
  20. package/dist/data/refactor.rpy +1 -1
  21. package/dist/defaultConfig.d.ts +2 -0
  22. package/dist/demo/demo.d.ts +1 -0
  23. package/dist/dialog-box.vue.d.ts +37 -0
  24. package/dist/exports/config.d.ts +1 -0
  25. package/dist/exports/display.d.ts +2 -0
  26. package/dist/exports/plugins.d.ts +20 -0
  27. package/dist/gameloop.d.ts +3 -0
  28. package/dist/lib/lib.d.ts +15 -0
  29. package/dist/lib.css +1 -0
  30. package/dist/main.d.ts +5 -0
  31. package/dist/narrat.es.js +18898 -21563
  32. package/dist/narrat.umd.js +112 -111
  33. package/dist/plugins/NarratPlugin.d.ts +11 -0
  34. package/dist/stores/audio-store.d.ts +12 -0
  35. package/dist/stores/dialog-store.d.ts +31 -0
  36. package/dist/stores/hud-stats-store.d.ts +22 -0
  37. package/dist/stores/inventory-store.d.ts +37 -0
  38. package/dist/stores/main-store.d.ts +276 -0
  39. package/dist/stores/notification-store.d.ts +12 -0
  40. package/dist/stores/quest-log.d.ts +39 -0
  41. package/dist/stores/rendering-store.d.ts +13 -0
  42. package/dist/stores/screens-store.d.ts +23 -0
  43. package/dist/stores/skills.d.ts +36 -0
  44. package/dist/stores/vm-store.d.ts +148 -0
  45. package/dist/types/app-types.d.ts +4 -0
  46. package/dist/types/character-types.d.ts +27 -0
  47. package/dist/types/dialog-box-types.d.ts +10 -0
  48. package/dist/types/game-save.d.ts +21 -0
  49. package/dist/types/parser.d.ts +92 -0
  50. package/dist/types/state.d.ts +3 -0
  51. package/dist/utils/ajax.d.ts +1 -0
  52. package/dist/utils/audio-loader.d.ts +13 -0
  53. package/dist/utils/characters.d.ts +5 -0
  54. package/dist/utils/data-helpers.d.ts +19 -0
  55. package/dist/utils/debounce.d.ts +14 -0
  56. package/dist/utils/error-handling.d.ts +3 -0
  57. package/dist/utils/helpers.d.ts +6 -0
  58. package/dist/utils/images-loader.d.ts +6 -0
  59. package/dist/utils/logger.d.ts +11 -0
  60. package/dist/utils/object-iterators.d.ts +8 -0
  61. package/dist/utils/promises.d.ts +1 -0
  62. package/dist/utils/randomId.d.ts +1 -0
  63. package/dist/utils/skillchecks.d.ts +17 -0
  64. package/dist/utils/string-helpers.d.ts +3 -0
  65. package/dist/utils/time-helpers.d.ts +2 -0
  66. package/dist/vm/commands/arithmetic-commands.d.ts +17 -0
  67. package/dist/vm/commands/audio-commands.d.ts +8 -0
  68. package/dist/vm/commands/choice.d.ts +37 -0
  69. package/dist/vm/commands/clear_dialog.d.ts +2 -0
  70. package/dist/vm/commands/command-helpers.d.ts +2 -0
  71. package/dist/vm/commands/command-plugin.d.ts +30 -0
  72. package/dist/vm/commands/flow-commands.d.ts +14 -0
  73. package/dist/vm/commands/if.d.ts +10 -0
  74. package/dist/vm/commands/index.d.ts +2 -0
  75. package/dist/vm/commands/inventory-commands.d.ts +15 -0
  76. package/dist/vm/commands/logic-command.d.ts +42 -0
  77. package/dist/vm/commands/notify.d.ts +4 -0
  78. package/dist/vm/commands/quest-commands.d.ts +30 -0
  79. package/dist/vm/commands/screen-commands.d.ts +8 -0
  80. package/dist/vm/commands/set.d.ts +6 -0
  81. package/dist/vm/commands/skill-commands.d.ts +33 -0
  82. package/dist/vm/commands/stats-commands.d.ts +12 -0
  83. package/dist/vm/commands/string-commands.d.ts +9 -0
  84. package/dist/vm/commands/text-field.d.ts +7 -0
  85. package/dist/vm/commands/text.d.ts +13 -0
  86. package/dist/vm/commands/wait.d.ts +4 -0
  87. package/dist/vm/vm-helpers.d.ts +16 -0
  88. package/dist/vm/vm-parser.d.ts +19 -0
  89. package/dist/vm/vm-parser.test.d.ts +1 -0
  90. package/dist/vm/vm.d.ts +19 -0
  91. package/package.json +79 -65
  92. package/dist/style.css +0 -1
package/README.md CHANGED
@@ -1,38 +1,38 @@
1
- # 🚀 Narrat
2
-
3
- ## Narrat 2.0
4
-
5
- This is the narrat 2.0 branch. See the [Narrat 2.0 update docs](https://docs.get-narrat.com/readme/narrat-2.0) for more info, or look at the changelog.
6
-
7
- 2.0 version can be installed with `npm install narrat@next`, as it's not pushed as the main release yet (main release is still 1.x).
8
-
9
- There are syntax changes in usage of $if functions and also an auto script converter available in the [2.0 update docs](https://docs.get-narrat.com/readme/narrat-2.0).
10
-
11
- ## Original Docs
12
-
13
- ![example workflow](https://github.com/nialna/narrat/actions/workflows/main.yml/badge.svg)
14
-
15
- A narrative game engine for text-based games. Inspired by renpy syntax, but built to be customisable, extendable and web-focused. See the [website](https://get-narrat.com)
16
-
17
- ![Narrat banner image](https://gblobscdn.gitbook.com/assets%2F-Mh95QNKFZeeRV90-ZSq%2F-MiI7tyjjriQTQI80bhM%2F-MiI83Ys6ED75AlZ_dVT%2Fnarrat-banner.jpg?alt=media&token=9d72e03f-c2ba-4fcb-8579-491b0f8940d8)
18
-
19
- You can [try a little demo](https://get-narrat.com/demo/). It contains a built version of the [narrat demo repo](https://github.com/nialna/narrat-demo).
20
-
21
- Game dialogue info is written in files with a similar syntax to Renpy (.rpy files). Those files get loaded by the game engine which plays through them. This allows us to use [renpy syntax highlighting](https://marketplace.visualstudio.com/items?itemName=LuqueDaniel.languague-renpy) in vs code easily. It is **not renpy** though, just inspired from it. Eventually narrat might have its own language and file extension support.
22
-
23
- ## Usage
24
-
25
- See the [Documentation](https://docs.get-narrat.com/) for more info, or jump directly in the [Getting Started Guide](https://docs.get-narrat.com/getting-started)
26
-
27
- ## Features
28
-
29
- - Flexible dialog writing with branching and conditions
30
- - Multiple script files support with labels and jumps to organise script writing
31
- - Multiple speaking characters support with icons and poses
32
- - Custom variables in scripts to create flags or other data the game needs to track
33
- - Seamless saving and reloading
34
- - UI with buttons that can be used for example to create world maps with clickable locations (the buttons can be controlled in scripts)
35
- - Sound and music support
36
- - Delays between script lines
37
- - Electron build to turn the game into a pc/mac/linux app (template to be updated with example soon)
38
- - Skill checks (Feature still early, needs a UI for viewing skills and creating characters)
1
+ # 🚀 Narrat
2
+
3
+ ## Narrat 2.0
4
+
5
+ This is the narrat 2.0 branch. See the [Narrat 2.0 update docs](https://docs.get-narrat.com/readme/narrat-2.0) for more info, or look at the changelog.
6
+
7
+ 2.0 version can be installed with `npm install narrat@next`, as it's not pushed as the main release yet (main release is still 1.x).
8
+
9
+ There are syntax changes in usage of $if functions and also an auto script converter available in the [2.0 update docs](https://docs.get-narrat.com/readme/narrat-2.0).
10
+
11
+ ## Original Docs
12
+
13
+ ![example workflow](https://github.com/nialna/narrat/actions/workflows/main.yml/badge.svg)
14
+
15
+ A narrative game engine for text-based games. Inspired by renpy syntax, but built to be customisable, extendable and web-focused. See the [website](https://get-narrat.com)
16
+
17
+ ![Narrat banner image](https://gblobscdn.gitbook.com/assets%2F-Mh95QNKFZeeRV90-ZSq%2F-MiI7tyjjriQTQI80bhM%2F-MiI83Ys6ED75AlZ_dVT%2Fnarrat-banner.jpg?alt=media&token=9d72e03f-c2ba-4fcb-8579-491b0f8940d8)
18
+
19
+ You can [try a little demo](https://get-narrat.com/demo/). It contains a built version of the [narrat demo repo](https://github.com/nialna/narrat-demo).
20
+
21
+ Game dialogue info is written in files with a similar syntax to Renpy (.rpy files). Those files get loaded by the game engine which plays through them. This allows us to use [renpy syntax highlighting](https://marketplace.visualstudio.com/items?itemName=LuqueDaniel.languague-renpy) in vs code easily. It is **not renpy** though, just inspired from it. Eventually narrat might have its own language and file extension support.
22
+
23
+ ## Usage
24
+
25
+ See the [Documentation](https://docs.get-narrat.com/) for more info, or jump directly in the [Getting Started Guide](https://docs.get-narrat.com/getting-started)
26
+
27
+ ## Features
28
+
29
+ - Flexible dialog writing with branching and conditions
30
+ - Multiple script files support with labels and jumps to organise script writing
31
+ - Multiple speaking characters support with icons and poses
32
+ - Custom variables in scripts to create flags or other data the game needs to track
33
+ - Seamless saving and reloading
34
+ - UI with buttons that can be used for example to create world maps with clickable locations (the buttons can be controlled in scripts)
35
+ - Sound and music support
36
+ - Delays between script lines
37
+ - Electron build to turn the game into a pc/mac/linux app (template to be updated with example soon)
38
+ - Skill checks (Feature still early, needs a UI for viewing skills and creating characters)
@@ -0,0 +1,106 @@
1
+ import { PropType } from 'vue';
2
+ import { DialogBoxParameters } from './types/dialog-box-types';
3
+ import { GameConfig } from './types/app-types';
4
+ import { AppOptions } from './config';
5
+ import { DialogKey } from './stores/dialog-store';
6
+ declare const _default: import("vue").DefineComponent<{
7
+ config: PropType<GameConfig>;
8
+ options: PropType<AppOptions>;
9
+ }, {
10
+ dialog: import("vue").ComputedRef<{
11
+ speaker: string;
12
+ text: string;
13
+ pose?: string | undefined;
14
+ choices?: {
15
+ choice: string;
16
+ originalIndex: number;
17
+ allowed: boolean;
18
+ }[] | undefined;
19
+ textField?: boolean | undefined;
20
+ interactive: boolean;
21
+ id: string;
22
+ }[]>;
23
+ stack: import("vue").ComputedRef<{
24
+ currentIndex: number;
25
+ branchData: {
26
+ branch: {
27
+ code: string;
28
+ command: {
29
+ commandType: string;
30
+ operator: string;
31
+ args: (import("./types/parser").Parser.Primitive | {
32
+ code: string;
33
+ command: any;
34
+ fileName: string;
35
+ line: number;
36
+ })[];
37
+ options: import("./types/parser").Parser.DefaultArg;
38
+ staticOptions: {};
39
+ };
40
+ fileName: string;
41
+ line: number;
42
+ }[];
43
+ args?: string[] | undefined;
44
+ };
45
+ label: string;
46
+ scope: {
47
+ [key: string]: any;
48
+ };
49
+ onComplete?: ((result: any) => void) | undefined;
50
+ returnValue: any;
51
+ }[]>;
52
+ modal: import("vue").ComputedRef<string | false>;
53
+ flowState: import("vue").ComputedRef<"menu" | "playing">;
54
+ }, {
55
+ lineTitle: string;
56
+ lineText: string;
57
+ gameLoaded: boolean;
58
+ loadingStep: string;
59
+ loadingPercentage: number;
60
+ hasSave: boolean;
61
+ }, {
62
+ dialogLength(): number;
63
+ lastDialog(): DialogKey | undefined;
64
+ picture(): string | undefined;
65
+ backgroundStyle(): any;
66
+ layoutWidth(): number;
67
+ gameTitle(): string;
68
+ inGame(): boolean;
69
+ layoutHeight(): number;
70
+ backgroundSize(): {
71
+ width: number;
72
+ height: number;
73
+ left: number;
74
+ top: number;
75
+ };
76
+ dialogWidth(): number;
77
+ dialogStyle(): any;
78
+ gameWidth(): number;
79
+ gameHeight(): number;
80
+ appStyle(): any;
81
+ gameStyle(): any;
82
+ screenRatio(): number;
83
+ dialogContainerStyle(): any;
84
+ currentLine: () => import("./types/parser").Parser.ParsedExpression<import("./types/parser").Parser.DefaultArg, {}> | undefined;
85
+ screenWidth: () => number;
86
+ screenHeight: () => number;
87
+ canvasWidth: () => number;
88
+ canvasHeight: () => number;
89
+ topOffset: () => number;
90
+ leftOffset: () => number;
91
+ layoutMode: () => "horizontal" | "vertical";
92
+ }, {
93
+ setupMachine(): Promise<void>;
94
+ getSaveFile(): string | null;
95
+ startGame(): Promise<void>;
96
+ loadGame(): Promise<void>;
97
+ isDialogActive(i: number): boolean;
98
+ nextLine(): void;
99
+ updateScreenSize(): void;
100
+ closeModal(): void;
101
+ getDialogBoxOptions(dialogKey: DialogKey, index: number): DialogBoxParameters;
102
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
103
+ config: PropType<GameConfig>;
104
+ options: PropType<AppOptions>;
105
+ }>>, {}>;
106
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {
2
+ playTime: () => {
3
+ start: number;
4
+ previousPlaytime: number;
5
+ };
6
+ }, {
7
+ quit(): void;
8
+ mainMenu(): void;
9
+ closeMenu(): void;
10
+ getPlayTimeString(): string;
11
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
12
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { SkillData } from '../config';
2
+ import { SkillsState } from '../stores/skills';
3
+ declare const _default: import("vue").DefineComponent<{}, {
4
+ skills: import("vue").ComputedRef<SkillsState>;
5
+ }, {
6
+ chosenSkill: boolean | String;
7
+ }, {
8
+ skillsToDisplay(): SkillsState;
9
+ skillConf(): {
10
+ [key: string]: SkillData;
11
+ };
12
+ xpPerLevel(): number;
13
+ }, {
14
+ getSkillStyle(skill: string): any;
15
+ getSkillName(skill: string): string;
16
+ clickSkill(skill: string): void;
17
+ closeSkill(): void;
18
+ xpBarWidth(xp: number): {
19
+ width: string;
20
+ };
21
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
22
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import { Parser } from '../../types/parser';
2
+ declare const _default: import("vue").DefineComponent<{}, {
3
+ skills: import("vue").ComputedRef<import("../../stores/skills").SkillsState>;
4
+ skillChecks: import("vue").ComputedRef<{
5
+ [key: string]: import("../../stores/skills").SkillCheckState;
6
+ }>;
7
+ }, {
8
+ showDebug: boolean;
9
+ jumping: boolean;
10
+ searchString: string;
11
+ matches: string[];
12
+ matchCursor: number;
13
+ }, {
14
+ labels(): string[];
15
+ variables(): {
16
+ [key: string]: any;
17
+ };
18
+ playing: () => boolean;
19
+ errors: () => {
20
+ text: string;
21
+ }[];
22
+ playTime: () => {
23
+ start: number;
24
+ previousPlaytime: number;
25
+ };
26
+ flowState: () => "menu" | "playing";
27
+ data: () => import("../../stores/vm-store").DataState;
28
+ script: () => Parser.ParsedScript;
29
+ }, {
30
+ finishJumping(): void;
31
+ labelSelected(event: any): void;
32
+ close(): void;
33
+ closeErrors(): void;
34
+ open(): void;
35
+ toggle(): void;
36
+ jump(): void;
37
+ getMatchResultStyle(index: number): {
38
+ background: string;
39
+ } | undefined;
40
+ onSearchInput(): void;
41
+ save(): void;
42
+ wordCount(): void;
43
+ countWordsInScriptLine(scriptLine: Parser.ParsedExpression): number;
44
+ countWordsInString(string: string): number;
45
+ countWordsInScriptBranch(branch: Parser.Branch): number;
46
+ getPlayTimeString(): string;
47
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
48
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ pictureUrl: StringConstructor;
3
+ }, unknown, unknown, {
4
+ boxStyle(): any;
5
+ layoutMode: () => "horizontal" | "vertical";
6
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ pictureUrl: StringConstructor;
8
+ }>>, {}>;
9
+ export default _default;
@@ -0,0 +1,65 @@
1
+ import { PropType } from 'vue';
2
+ declare const _default: {
3
+ new (...args: any[]): {
4
+ $: import("vue").ComponentInternalInstance;
5
+ $data: {};
6
+ $props: Partial<{
7
+ inGame: boolean;
8
+ }> & Omit<Readonly<import("vue").ExtractPropTypes<{
9
+ layoutMode: PropType<"horizontal" | "vertical">;
10
+ inGame: BooleanConstructor;
11
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "inGame">;
12
+ $attrs: {
13
+ [x: string]: unknown;
14
+ };
15
+ $refs: {
16
+ [x: string]: unknown;
17
+ };
18
+ $slots: Readonly<{
19
+ [name: string]: import("vue").Slot | undefined;
20
+ }>;
21
+ $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
22
+ $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
23
+ $emit: (event: string, ...args: any[]) => void;
24
+ $el: any;
25
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
26
+ layoutMode: PropType<"horizontal" | "vertical">;
27
+ inGame: BooleanConstructor;
28
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
29
+ inGame: boolean;
30
+ }> & {
31
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
32
+ created?: ((() => void) | (() => void)[]) | undefined;
33
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
34
+ mounted?: ((() => void) | (() => void)[]) | undefined;
35
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
36
+ updated?: ((() => void) | (() => void)[]) | undefined;
37
+ activated?: ((() => void) | (() => void)[]) | undefined;
38
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
39
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
40
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
41
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
42
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
43
+ renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
44
+ renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
45
+ errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
46
+ };
47
+ $forceUpdate: () => void;
48
+ $nextTick: typeof import("vue").nextTick;
49
+ $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
50
+ } & Readonly<import("vue").ExtractPropTypes<{
51
+ layoutMode: PropType<"horizontal" | "vertical">;
52
+ inGame: BooleanConstructor;
53
+ }>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
54
+ __isFragment?: undefined;
55
+ __isTeleport?: undefined;
56
+ __isSuspense?: undefined;
57
+ } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
58
+ layoutMode: PropType<"horizontal" | "vertical">;
59
+ inGame: BooleanConstructor;
60
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
61
+ inGame: boolean;
62
+ }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
63
+ $slots: {};
64
+ });
65
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { HudStatConfig } from '../config';
2
+ import { HudStatsState } from '../stores/hud-stats-store';
3
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {
4
+ statsConfig(): {
5
+ [key: string]: HudStatConfig;
6
+ };
7
+ stats(): HudStatsState;
8
+ hudStyle(): any;
9
+ layoutMode: () => "horizontal" | "vertical";
10
+ hudStats: () => HudStatsState;
11
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
12
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { ItemData } from '../config';
2
+ import { ItemState } from '../stores/inventory-store';
3
+ declare const _default: import("vue").DefineComponent<{}, {
4
+ items: import("vue").ComputedRef<{
5
+ [key: string]: ItemState;
6
+ }>;
7
+ currentlyChoosing: import("vue").ComputedRef<import("../stores/dialog-store").DialogChoice[] | undefined>;
8
+ }, {
9
+ chosenId: string | false;
10
+ }, {
11
+ itemsToDisplay(): {
12
+ [key: string]: ItemState;
13
+ };
14
+ chosenItem(): null | ItemState;
15
+ canUseChosenItem(): boolean;
16
+ chosenItemConf(): null | ItemData;
17
+ itemConf(): {
18
+ [key: string]: ItemData;
19
+ };
20
+ }, {
21
+ close(): void;
22
+ getItemStyle(item: string): any;
23
+ getItemName(item: string): string;
24
+ getItemConf(item: string): ItemData;
25
+ clickItem(item: string): void;
26
+ closeItem(): void;
27
+ useItem(): void;
28
+ canUseItem(item: ItemState): boolean;
29
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
30
+ export default _default;
@@ -0,0 +1,10 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ percentage: NumberConstructor;
3
+ step: StringConstructor;
4
+ }, unknown, unknown, {}, {
5
+ loadingStyle(): any;
6
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ percentage: NumberConstructor;
8
+ step: StringConstructor;
9
+ }>>, {}>;
10
+ export default _default;
@@ -0,0 +1,26 @@
1
+ export interface ButtonConf {
2
+ id: string;
3
+ onClick?: () => void;
4
+ condition?: () => boolean;
5
+ cssId?: string;
6
+ cssClass?: string;
7
+ text: string;
8
+ }
9
+ declare const _default: import("vue").DefineComponent<{}, {}, {
10
+ buttons: ButtonConf[];
11
+ activeMenu: string | false;
12
+ }, {
13
+ buttonsToShow(): ButtonConf[];
14
+ showSkills(): boolean;
15
+ showInventory(): boolean;
16
+ showQuests(): boolean;
17
+ }, {
18
+ buttonClick(button: ButtonConf): void;
19
+ openMenu(): void;
20
+ openSkills(): void;
21
+ openInventory(): void;
22
+ openQuests(): void;
23
+ closeMenu(): void;
24
+ toggleMenu(): void;
25
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
26
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, void, {
2
+ notifications: () => {
3
+ [key: string]: import("../stores/notification-store").NotificationState;
4
+ };
5
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
6
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { QuestState } from '../stores/quest-log';
2
+ declare const _default: import("vue").DefineComponent<{}, {
3
+ quests: import("vue").ComputedRef<{
4
+ [key: string]: QuestState;
5
+ }>;
6
+ }, {}, {
7
+ questsToDisplay(): {
8
+ [key: string]: QuestState;
9
+ };
10
+ }, {
11
+ close(): void;
12
+ getQuestData(questId: string): import("../config").QuestData;
13
+ getObjectiveData(questId: string, objectiveId: string): import("../config").ObjectiveData;
14
+ getDisplayTextForQuestState(quest: QuestState): "" | " Hidden" | " (Completed)" | " Unknown";
15
+ getQuestDescription(quest: QuestState): string;
16
+ getAvailableObjectives(quest: QuestState): {
17
+ [key: string]: import("../stores/quest-log").ObjectiveState;
18
+ };
19
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
20
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ containerCssClass: StringConstructor;
3
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4
+ containerCssClass: StringConstructor;
5
+ }>>, {}>;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {
2
+ muted: boolean;
3
+ }, {}, {
4
+ changeVolume(event: Event): void;
5
+ toggleMute(): void;
6
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
7
+ export default _default;
@@ -0,0 +1,151 @@
1
+ export declare function setConfig(conf: Config): void;
2
+ export declare function getConfig(): Config;
3
+ export declare function getSkillConfig(id: string): SkillData;
4
+ export declare function getItemConfig(id: string): ItemData;
5
+ export declare function getQuestConfig(questId: string): QuestData;
6
+ export declare function getObjectiveConfig(quest: string, objectiveId: string): ObjectiveData;
7
+ export interface AppOptions {
8
+ logging: boolean;
9
+ debug: boolean;
10
+ }
11
+ export interface Config {
12
+ gameTitle: string;
13
+ images: {
14
+ [key: string]: string;
15
+ };
16
+ layout: {
17
+ backgrounds: {
18
+ width: number;
19
+ height: number;
20
+ };
21
+ dialogBottomPadding: number;
22
+ minTextWidth: number;
23
+ mobileDialogHeightPercentage: number;
24
+ verticalLayoutThreshold: number;
25
+ portraits: {
26
+ width: number;
27
+ height: number;
28
+ };
29
+ };
30
+ screens: {
31
+ [key: string]: {
32
+ background: string;
33
+ buttons: string[];
34
+ };
35
+ };
36
+ buttons: {
37
+ [key: string]: ButtonConfig;
38
+ };
39
+ skills: {
40
+ [key: string]: SkillData;
41
+ };
42
+ skillOptions: {
43
+ xpPerLevel: number;
44
+ };
45
+ skillChecks: {
46
+ rollRange: number;
47
+ skillMultiplier: number;
48
+ failureChance: number;
49
+ difficultyText: Array<[number, string]>;
50
+ };
51
+ scripts: string[];
52
+ audio: {
53
+ [key: string]: AudioConfig;
54
+ };
55
+ audioOptions: {
56
+ volume: number;
57
+ defaultMusic?: string;
58
+ musicFadeInTime: number;
59
+ musicFadeInDelay: number;
60
+ musicFadeOutTime: number;
61
+ };
62
+ sound?: {
63
+ [key: string]: AudioConfig;
64
+ };
65
+ music?: {
66
+ [key: string]: AudioConfig;
67
+ };
68
+ notifications: {
69
+ timeOnScreen: number;
70
+ alsoPrintInDialogue?: boolean;
71
+ };
72
+ hudStats: {
73
+ [key: string]: HudStatConfig;
74
+ };
75
+ items: {
76
+ [key: string]: ItemData;
77
+ };
78
+ interactionTags: {
79
+ [key: string]: {
80
+ onlyInteractOutsideOfScripts: boolean;
81
+ };
82
+ };
83
+ quests: {
84
+ [key: string]: QuestData;
85
+ };
86
+ audioTriggers: {
87
+ [key: string]: string;
88
+ };
89
+ menuButtons: {
90
+ [key: string]: MenuButtonData;
91
+ };
92
+ }
93
+ export interface MenuButtonData {
94
+ text: string;
95
+ }
96
+ export interface QuestData {
97
+ title: string;
98
+ description: string;
99
+ objectives: {
100
+ [key: string]: ObjectiveData;
101
+ };
102
+ }
103
+ export interface ObjectiveData {
104
+ description: string;
105
+ hidden?: boolean;
106
+ }
107
+ export interface ItemData {
108
+ name: string;
109
+ description: string;
110
+ icon: string;
111
+ onUse?: {
112
+ action: 'jump' | 'run';
113
+ label: string;
114
+ };
115
+ tag?: string;
116
+ }
117
+ export interface HudStatConfig {
118
+ name: string;
119
+ icon: string;
120
+ startingValue: number;
121
+ minValue?: number;
122
+ maxValue?: number;
123
+ }
124
+ export interface AudioConfig {
125
+ src: string;
126
+ path?: string;
127
+ volume?: number;
128
+ rate?: number;
129
+ html5?: boolean;
130
+ }
131
+ export interface MusicConfig extends AudioConfig {
132
+ loop?: boolean;
133
+ }
134
+ export interface ButtonConfig {
135
+ enabled: boolean;
136
+ background: string;
137
+ position: {
138
+ left: number;
139
+ top: number;
140
+ width: number;
141
+ height: number;
142
+ };
143
+ action: string;
144
+ }
145
+ export interface SkillData {
146
+ name: string;
147
+ description: string;
148
+ startingLevel: number;
149
+ hidden?: boolean;
150
+ icon: string;
151
+ }
@@ -0,0 +1 @@
1
+ export declare const SAVE_FILE = "gameSave";
@@ -141,7 +141,7 @@
141
141
  "description": "An ominous book. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper turpis. Aliquam tincidunt dolor sed mollis aliquet. Duis in odio eros. Maecenas sapien arcu, fermentum id tincidunt non, accumsan vel metus. Nullam pretium molestie accumsan. In ut rutrum tellus. Integer vitae nisl eleifend lorem tristique auctor quis sed nulla. Cras gravida viverra tristique. Mauris imperdiet tortor purus, fringilla vehicula metus ullamcorper eget. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla porta imperdiet justo, sed blandit orci. Aenean accumsan hendrerit arcu, laoreet vestibulum turpis vulputate eu. Etiam dignissim nibh dictum pharetra congue. Nulla ultrices, augue a blandit laoreet, metus enim sodales arcu, eget pellentesque lorem justo et ipsum. ",
142
142
  "icon": "img/items/book.png",
143
143
  "onUse": {
144
- "action": "run_label",
144
+ "action": "run",
145
145
  "label": "read_book"
146
146
  },
147
147
  "tag": "always_interactable"
@@ -172,5 +172,11 @@
172
172
  "onPressStart": "game_start",
173
173
  "onSkillCheckFailure": "failure",
174
174
  "onSkillCheckSuccess": "success"
175
+ },
176
+ "menuButtons": {
177
+ "menu": {
178
+ "text": "Menu",
179
+ "cssId": "my-custom-id"
180
+ }
175
181
  }
176
182
  }