narrat 2.0.0-test-1 → 2.0.0

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 (88) hide show
  1. package/README.md +38 -38
  2. package/dist/app.vue.d.ts +105 -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 +15 -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 +145 -0
  17. package/dist/constants.d.ts +1 -0
  18. package/dist/defaultConfig.d.ts +2 -0
  19. package/dist/demo/demo.d.ts +1 -0
  20. package/dist/dialog-box.vue.d.ts +35 -0
  21. package/dist/exports/config.d.ts +1 -0
  22. package/dist/exports/display.d.ts +2 -0
  23. package/dist/exports/plugins.d.ts +20 -0
  24. package/dist/gameloop.d.ts +3 -0
  25. package/dist/lib/lib.d.ts +15 -0
  26. package/dist/lib.css +1 -0
  27. package/dist/main.d.ts +5 -0
  28. package/dist/narrat.es.js +19023 -21785
  29. package/dist/narrat.umd.js +112 -111
  30. package/dist/plugins/NarratPlugin.d.ts +11 -0
  31. package/dist/stores/audio-store.d.ts +12 -0
  32. package/dist/stores/dialog-store.d.ts +30 -0
  33. package/dist/stores/hud-stats-store.d.ts +22 -0
  34. package/dist/stores/inventory-store.d.ts +37 -0
  35. package/dist/stores/main-store.d.ts +275 -0
  36. package/dist/stores/notification-store.d.ts +12 -0
  37. package/dist/stores/quest-log.d.ts +39 -0
  38. package/dist/stores/rendering-store.d.ts +13 -0
  39. package/dist/stores/screens-store.d.ts +23 -0
  40. package/dist/stores/skills.d.ts +36 -0
  41. package/dist/stores/vm-store.d.ts +147 -0
  42. package/dist/types/app-types.d.ts +4 -0
  43. package/dist/types/character-types.d.ts +27 -0
  44. package/dist/types/dialog-box-types.d.ts +9 -0
  45. package/dist/types/game-save.d.ts +21 -0
  46. package/dist/types/parser.d.ts +92 -0
  47. package/dist/types/state.d.ts +3 -0
  48. package/dist/utils/ajax.d.ts +1 -0
  49. package/dist/utils/audio-loader.d.ts +13 -0
  50. package/dist/utils/characters.d.ts +5 -0
  51. package/dist/utils/data-helpers.d.ts +19 -0
  52. package/dist/utils/debounce.d.ts +14 -0
  53. package/dist/utils/error-handling.d.ts +3 -0
  54. package/dist/utils/helpers.d.ts +6 -0
  55. package/dist/utils/images-loader.d.ts +6 -0
  56. package/dist/utils/logger.d.ts +11 -0
  57. package/dist/utils/object-iterators.d.ts +8 -0
  58. package/dist/utils/promises.d.ts +1 -0
  59. package/dist/utils/randomId.d.ts +1 -0
  60. package/dist/utils/skillchecks.d.ts +17 -0
  61. package/dist/utils/string-helpers.d.ts +3 -0
  62. package/dist/utils/time-helpers.d.ts +2 -0
  63. package/dist/vm/commands/arithmetic-commands.d.ts +17 -0
  64. package/dist/vm/commands/audio-commands.d.ts +8 -0
  65. package/dist/vm/commands/choice.d.ts +37 -0
  66. package/dist/vm/commands/clear_dialog.d.ts +2 -0
  67. package/dist/vm/commands/command-helpers.d.ts +2 -0
  68. package/dist/vm/commands/command-plugin.d.ts +30 -0
  69. package/dist/vm/commands/flow-commands.d.ts +14 -0
  70. package/dist/vm/commands/if.d.ts +10 -0
  71. package/dist/vm/commands/index.d.ts +2 -0
  72. package/dist/vm/commands/inventory-commands.d.ts +15 -0
  73. package/dist/vm/commands/logic-command.d.ts +42 -0
  74. package/dist/vm/commands/notify.d.ts +4 -0
  75. package/dist/vm/commands/quest-commands.d.ts +30 -0
  76. package/dist/vm/commands/screen-commands.d.ts +8 -0
  77. package/dist/vm/commands/set.d.ts +6 -0
  78. package/dist/vm/commands/skill-commands.d.ts +33 -0
  79. package/dist/vm/commands/stats-commands.d.ts +12 -0
  80. package/dist/vm/commands/string-commands.d.ts +9 -0
  81. package/dist/vm/commands/text.d.ts +13 -0
  82. package/dist/vm/commands/wait.d.ts +4 -0
  83. package/dist/vm/vm-helpers.d.ts +16 -0
  84. package/dist/vm/vm-parser.d.ts +19 -0
  85. package/dist/vm/vm-parser.test.d.ts +1 -0
  86. package/dist/vm/vm.d.ts +19 -0
  87. package/package.json +79 -65
  88. 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,105 @@
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
+ interactive: boolean;
20
+ id: string;
21
+ }[]>;
22
+ stack: import("vue").ComputedRef<{
23
+ currentIndex: number;
24
+ branchData: {
25
+ branch: {
26
+ code: string;
27
+ command: {
28
+ commandType: string;
29
+ operator: string;
30
+ args: (import("./types/parser").Parser.Primitive | {
31
+ code: string;
32
+ command: any;
33
+ fileName: string;
34
+ line: number;
35
+ })[];
36
+ options: import("./types/parser").Parser.DefaultArg;
37
+ staticOptions: {};
38
+ };
39
+ fileName: string;
40
+ line: number;
41
+ }[];
42
+ args?: string[] | undefined;
43
+ };
44
+ label: string;
45
+ scope: {
46
+ [key: string]: any;
47
+ };
48
+ onComplete?: ((result: any) => void) | undefined;
49
+ returnValue: any;
50
+ }[]>;
51
+ modal: import("vue").ComputedRef<string | false>;
52
+ flowState: import("vue").ComputedRef<"menu" | "playing">;
53
+ }, {
54
+ lineTitle: string;
55
+ lineText: string;
56
+ gameLoaded: boolean;
57
+ loadingStep: string;
58
+ loadingPercentage: number;
59
+ hasSave: boolean;
60
+ }, {
61
+ dialogLength(): number;
62
+ lastDialog(): DialogKey | undefined;
63
+ picture(): string | undefined;
64
+ backgroundStyle(): any;
65
+ layoutWidth(): number;
66
+ gameTitle(): string;
67
+ inGame(): boolean;
68
+ layoutHeight(): number;
69
+ backgroundSize(): {
70
+ width: number;
71
+ height: number;
72
+ left: number;
73
+ top: number;
74
+ };
75
+ dialogWidth(): number;
76
+ dialogStyle(): any;
77
+ gameWidth(): number;
78
+ gameHeight(): number;
79
+ appStyle(): any;
80
+ gameStyle(): any;
81
+ screenRatio(): number;
82
+ dialogContainerStyle(): any;
83
+ currentLine: () => import("./types/parser").Parser.ParsedExpression<import("./types/parser").Parser.DefaultArg, {}> | undefined;
84
+ screenWidth: () => number;
85
+ screenHeight: () => number;
86
+ canvasWidth: () => number;
87
+ canvasHeight: () => number;
88
+ topOffset: () => number;
89
+ leftOffset: () => number;
90
+ layoutMode: () => "horizontal" | "vertical";
91
+ }, {
92
+ setupMachine(): Promise<void>;
93
+ getSaveFile(): string | null;
94
+ startGame(): Promise<void>;
95
+ loadGame(): Promise<void>;
96
+ isDialogActive(i: number): boolean;
97
+ nextLine(): void;
98
+ updateScreenSize(): void;
99
+ closeModal(): void;
100
+ getDialogBoxOptions(dialogKey: DialogKey, index: number): DialogBoxParameters;
101
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
102
+ config: PropType<GameConfig>;
103
+ options: PropType<AppOptions>;
104
+ }>>, {}>;
105
+ 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,15 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {
2
+ activeMenu: string | false;
3
+ }, {
4
+ showSkills(): boolean;
5
+ showInventory(): boolean;
6
+ showQuests(): boolean;
7
+ }, {
8
+ openMenu(): void;
9
+ openSkills(): void;
10
+ openInventory(): void;
11
+ openQuests(): void;
12
+ closeMenu(): void;
13
+ toggleMenu(): void;
14
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
15
+ 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,145 @@
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
+ }
90
+ export interface QuestData {
91
+ title: string;
92
+ description: string;
93
+ objectives: {
94
+ [key: string]: ObjectiveData;
95
+ };
96
+ }
97
+ export interface ObjectiveData {
98
+ description: string;
99
+ hidden?: boolean;
100
+ }
101
+ export interface ItemData {
102
+ name: string;
103
+ description: string;
104
+ icon: string;
105
+ onUse?: {
106
+ action: 'jump' | 'run_label';
107
+ label: string;
108
+ };
109
+ tag?: string;
110
+ }
111
+ export interface HudStatConfig {
112
+ name: string;
113
+ icon: string;
114
+ startingValue: number;
115
+ minValue?: number;
116
+ maxValue?: number;
117
+ }
118
+ export interface AudioConfig {
119
+ src: string;
120
+ path?: string;
121
+ volume?: number;
122
+ rate?: number;
123
+ html5?: boolean;
124
+ }
125
+ export interface MusicConfig extends AudioConfig {
126
+ loop?: boolean;
127
+ }
128
+ export interface ButtonConfig {
129
+ enabled: boolean;
130
+ background: string;
131
+ position: {
132
+ left: number;
133
+ top: number;
134
+ width: number;
135
+ height: number;
136
+ };
137
+ action: string;
138
+ }
139
+ export interface SkillData {
140
+ name: string;
141
+ description: string;
142
+ startingLevel: number;
143
+ hidden?: boolean;
144
+ icon: string;
145
+ }
@@ -0,0 +1 @@
1
+ export declare const SAVE_FILE = "gameSave";
@@ -0,0 +1,2 @@
1
+ import { Config } from './config';
2
+ export declare const defaultConfig: Config;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import { PropType } from 'vue';
2
+ import { DialogChoice } from './stores/dialog-store';
3
+ import { DialogStyle } from './types/character-types';
4
+ import { DialogBoxParameters } from './types/dialog-box-types';
5
+ declare const _default: import("vue").DefineComponent<{
6
+ options: {
7
+ type: PropType<DialogBoxParameters>;
8
+ required: true;
9
+ };
10
+ active: BooleanConstructor;
11
+ }, unknown, {
12
+ passed: boolean;
13
+ }, {
14
+ preText(): string;
15
+ style(): DialogStyle;
16
+ dialogBoxStyle(): any;
17
+ titleStyle(): any;
18
+ textStyle(): any;
19
+ choices(): DialogChoice[] | undefined;
20
+ canInteract(): boolean;
21
+ paused: () => boolean;
22
+ }, {
23
+ chooseOption(choice: DialogChoice | number): void;
24
+ dialogStyle(choice: DialogChoice): any;
25
+ dialogClass(choice: DialogChoice): "strike-anim" | undefined;
26
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
+ options: {
28
+ type: PropType<DialogBoxParameters>;
29
+ required: true;
30
+ };
31
+ active: BooleanConstructor;
32
+ }>>, {
33
+ active: boolean;
34
+ }>;
35
+ export default _default;
@@ -0,0 +1 @@
1
+ export { getConfig } from '../config';