narrat 1.3.1 → 2.0.0-rc-6

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 (166) hide show
  1. package/README.md +20 -12
  2. package/{lib → dist}/app.vue.d.ts +29 -55
  3. package/dist/audio/click.ogg +0 -0
  4. package/dist/audio/failure.ogg +0 -0
  5. package/dist/audio/game_start.ogg +0 -0
  6. package/dist/audio/success.wav +0 -0
  7. package/dist/components/MainMenu.vue.d.ts +12 -0
  8. package/{lib → dist}/components/Skills.vue.d.ts +4 -8
  9. package/{lib → dist}/components/debug/debug-menu.vue.d.ts +6 -6
  10. package/{lib → dist}/components/dialog-picture.vue.d.ts +0 -0
  11. package/dist/components/game-dialog.vue.d.ts +65 -0
  12. package/{lib → dist}/components/hud.vue.d.ts +3 -3
  13. package/{lib/components/inventory.vue.d.ts → dist/components/inventory-ui.vue.d.ts} +6 -9
  14. package/{lib → dist}/components/loading-bar.vue.d.ts +0 -0
  15. package/dist/components/menu-buttons.vue.d.ts +15 -0
  16. package/{lib → dist}/components/notification-toast.vue.d.ts +1 -1
  17. package/dist/components/quests-ui.vue.d.ts +20 -0
  18. package/{lib → dist}/components/utils/modal.vue.d.ts +0 -0
  19. package/{lib → dist}/components/volume-controls.vue.d.ts +0 -0
  20. package/{lib → dist}/config.d.ts +7 -0
  21. package/{lib → dist}/constants.d.ts +0 -0
  22. package/dist/data/characters.json +62 -0
  23. package/dist/data/config.json +176 -0
  24. package/dist/data/example.rpy +356 -0
  25. package/dist/data/refactor.rpy +31 -0
  26. package/{lib → dist}/defaultConfig.d.ts +0 -0
  27. package/{lib → dist}/demo/demo.d.ts +0 -0
  28. package/{lib → dist}/dialog-box.vue.d.ts +2 -2
  29. package/{lib → dist}/exports/config.d.ts +0 -0
  30. package/{lib → dist}/exports/display.d.ts +0 -0
  31. package/{lib → dist}/exports/plugins.d.ts +6 -5
  32. package/dist/favicon.ico +0 -0
  33. package/dist/fonts/OpenDyslexic.ttf.eot +0 -0
  34. package/dist/fonts/OpenDyslexic.ttf.svg +2326 -0
  35. package/dist/fonts/OpenDyslexic.ttf.woff +0 -0
  36. package/{lib → dist}/gameloop.d.ts +0 -0
  37. package/dist/img/backgrounds/map.png +0 -0
  38. package/dist/img/backgrounds/narrat.png +0 -0
  39. package/dist/img/characters/cat_idle.jpg +0 -0
  40. package/dist/img/characters/helper_cat.png +0 -0
  41. package/dist/img/characters/inner_voice.png +0 -0
  42. package/dist/img/characters/music_cat.jpeg +0 -0
  43. package/dist/img/h01.gif +0 -0
  44. package/dist/img/items/book.png +0 -0
  45. package/dist/img/items/bread.png +0 -0
  46. package/dist/img/skills/agility.jpg +0 -0
  47. package/dist/img/skills/logic.jpg +0 -0
  48. package/dist/img/splash-texture.png +0 -0
  49. package/dist/img/ui/energy.png +0 -0
  50. package/dist/img/ui/money.png +0 -0
  51. package/dist/img/ui/park-button.png +0 -0
  52. package/dist/img/ui/shop-button.png +0 -0
  53. package/dist/lib/lib.d.ts +15 -0
  54. package/dist/lib.css +1 -0
  55. package/dist/main.d.ts +5 -0
  56. package/dist/music/calm.mp3 +0 -0
  57. package/dist/narrat.es.js +44137 -0
  58. package/dist/narrat.umd.js +194 -0
  59. package/{lib → dist}/plugins/NarratPlugin.d.ts +1 -1
  60. package/{lib → dist}/stores/audio-store.d.ts +0 -0
  61. package/{lib → dist}/stores/dialog-store.d.ts +0 -0
  62. package/{lib → dist}/stores/hud-stats-store.d.ts +2 -0
  63. package/{lib → dist}/stores/inventory-store.d.ts +2 -1
  64. package/{lib → dist}/stores/main-store.d.ts +99 -117
  65. package/{lib → dist}/stores/notification-store.d.ts +0 -0
  66. package/{lib → dist}/stores/quest-log.d.ts +5 -2
  67. package/{lib → dist}/stores/rendering-store.d.ts +0 -0
  68. package/{lib → dist}/stores/screens-store.d.ts +1 -1
  69. package/{lib → dist}/stores/skills.d.ts +9 -5
  70. package/dist/stores/vm-store.d.ts +147 -0
  71. package/{lib → dist}/types/app-types.d.ts +0 -0
  72. package/{lib → dist}/types/character-types.d.ts +0 -0
  73. package/{lib → dist}/types/dialog-box-types.d.ts +1 -1
  74. package/dist/types/game-save.d.ts +21 -0
  75. package/{lib → dist}/types/parser.d.ts +34 -18
  76. package/{lib → dist}/types/state.d.ts +0 -0
  77. package/{lib → dist}/utils/ajax.d.ts +0 -0
  78. package/{lib → dist}/utils/audio-loader.d.ts +2 -1
  79. package/{lib → dist}/utils/characters.d.ts +1 -1
  80. package/dist/utils/data-helpers.d.ts +19 -0
  81. package/{lib → dist}/utils/debounce.d.ts +0 -0
  82. package/{lib → dist}/utils/error-handling.d.ts +1 -1
  83. package/{lib → dist}/utils/helpers.d.ts +0 -0
  84. package/{lib → dist}/utils/images-loader.d.ts +0 -0
  85. package/{lib → dist}/utils/logger.d.ts +1 -2
  86. package/{lib → dist}/utils/object-iterators.d.ts +1 -1
  87. package/{lib → dist}/utils/promises.d.ts +0 -0
  88. package/{lib → dist}/utils/randomId.d.ts +0 -0
  89. package/{lib → dist}/utils/skillchecks.d.ts +1 -4
  90. package/dist/utils/string-helpers.d.ts +3 -0
  91. package/{lib → dist}/utils/time-helpers.d.ts +0 -0
  92. package/dist/vm/commands/arithmetic-commands.d.ts +17 -0
  93. package/dist/vm/commands/audio-commands.d.ts +8 -0
  94. package/dist/vm/commands/choice.d.ts +37 -0
  95. package/dist/vm/commands/clear_dialog.d.ts +2 -0
  96. package/dist/vm/commands/command-helpers.d.ts +2 -0
  97. package/dist/vm/commands/command-plugin.d.ts +30 -0
  98. package/dist/vm/commands/flow-commands.d.ts +14 -0
  99. package/dist/vm/commands/if.d.ts +10 -0
  100. package/{lib → dist}/vm/commands/index.d.ts +0 -0
  101. package/dist/vm/commands/inventory-commands.d.ts +15 -0
  102. package/dist/vm/commands/logic-command.d.ts +42 -0
  103. package/dist/vm/commands/notify.d.ts +4 -0
  104. package/dist/vm/commands/quest-commands.d.ts +30 -0
  105. package/dist/vm/commands/screen-commands.d.ts +8 -0
  106. package/dist/vm/commands/set.d.ts +6 -0
  107. package/dist/vm/commands/skill-commands.d.ts +33 -0
  108. package/dist/vm/commands/stats-commands.d.ts +12 -0
  109. package/dist/vm/commands/string-commands.d.ts +9 -0
  110. package/dist/vm/commands/text.d.ts +13 -0
  111. package/dist/vm/commands/wait.d.ts +4 -0
  112. package/dist/vm/vm-helpers.d.ts +16 -0
  113. package/dist/vm/vm-parser.d.ts +19 -0
  114. package/dist/vm/vm-parser.test.d.ts +1 -0
  115. package/dist/vm/vm.d.ts +19 -0
  116. package/package.json +55 -61
  117. package/lib/components/MainMenu.vue.d.ts +0 -15
  118. package/lib/components/menu.vue.d.ts +0 -21
  119. package/lib/components/quests.vue.d.ts +0 -23
  120. package/lib/demo/bitsy/bitsy.d.ts +0 -27
  121. package/lib/display.d.ts +0 -2
  122. package/lib/index.d.ts +0 -20
  123. package/lib/index.esm.js +0 -9676
  124. package/lib/index.esm.js.map +0 -1
  125. package/lib/index.js +0 -9692
  126. package/lib/index.js.map +0 -1
  127. package/lib/lib.d.ts +0 -6
  128. package/lib/plugins.d.ts +0 -22
  129. package/lib/renpy/command-parser-functions.d.ts +0 -14
  130. package/lib/renpy/renpy-helpers.d.ts +0 -14
  131. package/lib/renpy/renpy-parser.d.ts +0 -9
  132. package/lib/store.d.ts +0 -12
  133. package/lib/stores/vm-store.d.ts +0 -152
  134. package/lib/types/game-save.d.ts +0 -21
  135. package/lib/types/vue3-mq/index.d.ts +0 -1
  136. package/lib/utils/data-helpers.d.ts +0 -14
  137. package/lib/utils/string-helpers.d.ts +0 -1
  138. package/lib/vm/commands/add.d.ts +0 -3
  139. package/lib/vm/commands/add_item.d.ts +0 -2
  140. package/lib/vm/commands/add_level.d.ts +0 -2
  141. package/lib/vm/commands/add_stat.d.ts +0 -3
  142. package/lib/vm/commands/add_xp.d.ts +0 -2
  143. package/lib/vm/commands/choice.d.ts +0 -5
  144. package/lib/vm/commands/clear_dialog.d.ts +0 -3
  145. package/lib/vm/commands/command-plugin.d.ts +0 -21
  146. package/lib/vm/commands/if.d.ts +0 -2
  147. package/lib/vm/commands/inventory-commands.d.ts +0 -5
  148. package/lib/vm/commands/jump.d.ts +0 -2
  149. package/lib/vm/commands/notify.d.ts +0 -2
  150. package/lib/vm/commands/pause.d.ts +0 -2
  151. package/lib/vm/commands/play.d.ts +0 -3
  152. package/lib/vm/commands/quest-commands.d.ts +0 -5
  153. package/lib/vm/commands/remove_item.d.ts +0 -2
  154. package/lib/vm/commands/run.d.ts +0 -2
  155. package/lib/vm/commands/set.d.ts +0 -2
  156. package/lib/vm/commands/set_button.d.ts +0 -2
  157. package/lib/vm/commands/set_screen.d.ts +0 -3
  158. package/lib/vm/commands/set_stat.d.ts +0 -3
  159. package/lib/vm/commands/stop.d.ts +0 -2
  160. package/lib/vm/commands/talk.d.ts +0 -2
  161. package/lib/vm/commands/text.d.ts +0 -2
  162. package/lib/vm/commands/wait.d.ts +0 -2
  163. package/lib/vm/renpy-vm.d.ts +0 -11
  164. package/lib/vm/vm-helpers.d.ts +0 -16
  165. package/lib/vm/vm-parser.d.ts +0 -10
  166. package/lib/vm/vm.d.ts +0 -17
package/README.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # 🚀 Narrat
2
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
+
3
13
  ![example workflow](https://github.com/nialna/narrat/actions/workflows/main.yml/badge.svg)
4
14
 
5
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,15 +26,13 @@ See the [Documentation](https://docs.get-narrat.com/) for more info, or jump dir
16
26
 
17
27
  ## Features
18
28
 
19
- * Flexible dialog writing with branching and conditions
20
- * Multiple script files support with labels and jumps to organise script writing
21
- * Multiple speaking characters support with icons and poses
22
- * Custom variables in scripts to create flags or other data the game needs to track
23
- * Seamless saving and reloading
24
- * UI with buttons that can be used for example to create world maps with clickable locations (the buttons can be controlled in scripts)
25
- * Sound and music support
26
- * Delays between script lines
27
- * Electron build to turn the game into a pc/mac/linux app (template to be updated with example soon)
28
- * Skill checks (Feature still early, needs a UI for viewing skills and creating characters)
29
-
30
-
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,8 +1,7 @@
1
1
  import { PropType } from 'vue';
2
2
  import { DialogBoxParameters } from './types/dialog-box-types';
3
3
  import { GameConfig } from './types/app-types';
4
- import { AppOptions } from '.';
5
- import { Parser } from './types/parser';
4
+ import { AppOptions } from './config';
6
5
  import { DialogKey } from './stores/dialog-store';
7
6
  declare const _default: import("vue").DefineComponent<{
8
7
  config: PropType<GameConfig>;
@@ -11,67 +10,43 @@ declare const _default: import("vue").DefineComponent<{
11
10
  dialog: import("vue").ComputedRef<{
12
11
  speaker: string;
13
12
  text: string;
14
- pose?: string;
13
+ pose?: string | undefined;
15
14
  choices?: {
16
15
  choice: string;
17
16
  originalIndex: number;
18
17
  allowed: boolean;
19
- }[];
18
+ }[] | undefined;
20
19
  interactive: boolean;
21
20
  id: string;
22
21
  }[]>;
23
22
  stack: import("vue").ComputedRef<{
24
23
  currentIndex: number;
25
- branch: {
26
- code: string;
27
- args: string[];
28
- operator: string;
29
- commandType: string;
30
- options: Parser.EmptyOptions | {
31
- condition: string;
32
- success: any[];
33
- failure?: any[];
34
- } | {
35
- label: string;
36
- } | {
37
- text: string;
38
- } | {
39
- prompt: any;
40
- choices: {
41
- choice: string;
42
- branch: any[];
43
- condition?: string;
44
- skillCheck?: {
45
- id: string;
46
- skill: string;
47
- value: number;
48
- hideAfterRoll: boolean;
49
- success: {
50
- text: string;
51
- branch: any[];
52
- };
53
- failure: {
54
- text: string;
55
- branch?: any[];
56
- };
57
- };
58
- index: number;
59
- }[];
60
- } | {
61
- screen: string;
62
- } | {
63
- mode: "sound" | "music";
64
- audio: string;
65
- } | {
66
- mode: "sound" | "music";
67
- audio?: string;
68
- } | {
69
- duration: number;
70
- };
71
- fileName: string;
72
- line: number;
73
- }[];
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
+ };
74
44
  label: string;
45
+ scope: {
46
+ [key: string]: any;
47
+ };
48
+ onComplete?: ((result: any) => void) | undefined;
49
+ returnValue: any;
75
50
  }[]>;
76
51
  modal: import("vue").ComputedRef<string | false>;
77
52
  flowState: import("vue").ComputedRef<"menu" | "playing">;
@@ -85,7 +60,6 @@ declare const _default: import("vue").DefineComponent<{
85
60
  }, {
86
61
  dialogLength(): number;
87
62
  lastDialog(): DialogKey | undefined;
88
- command(): Parser.Command;
89
63
  picture(): string | undefined;
90
64
  backgroundStyle(): any;
91
65
  layoutWidth(): number;
@@ -106,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
106
80
  gameStyle(): any;
107
81
  screenRatio(): number;
108
82
  dialogContainerStyle(): any;
109
- currentLine: () => Parser.Command;
83
+ currentLine: () => import("./types/parser").Parser.ParsedExpression<import("./types/parser").Parser.DefaultArg, {}> | undefined;
110
84
  screenWidth: () => number;
111
85
  screenHeight: () => number;
112
86
  canvasWidth: () => number;
Binary file
Binary file
Binary file
Binary file
@@ -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;
@@ -1,8 +1,6 @@
1
- import { SkillData } from '@/config';
2
- import { SkillsState } from '@/stores/skills';
3
- declare const _default: import("vue").DefineComponent<{
4
- close: FunctionConstructor;
5
- }, {
1
+ import { SkillData } from '../config';
2
+ import { SkillsState } from '../stores/skills';
3
+ declare const _default: import("vue").DefineComponent<{}, {
6
4
  skills: import("vue").ComputedRef<SkillsState>;
7
5
  }, {
8
6
  chosenSkill: boolean | String;
@@ -20,7 +18,5 @@ declare const _default: import("vue").DefineComponent<{
20
18
  xpBarWidth(xp: number): {
21
19
  width: string;
22
20
  };
23
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
- close: FunctionConstructor;
25
- }>>, {}>;
21
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
26
22
  export default _default;
@@ -1,8 +1,8 @@
1
- import { Parser } from '@/types/parser';
1
+ import { Parser } from '../../types/parser';
2
2
  declare const _default: import("vue").DefineComponent<{}, {
3
- skills: import("vue").ComputedRef<import("@/stores/skills").SkillsState>;
3
+ skills: import("vue").ComputedRef<import("../../stores/skills").SkillsState>;
4
4
  skillChecks: import("vue").ComputedRef<{
5
- [key: string]: import("@/stores/skills").SkillCheckState;
5
+ [key: string]: import("../../stores/skills").SkillCheckState;
6
6
  }>;
7
7
  }, {
8
8
  showDebug: boolean;
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{}, {
24
24
  previousPlaytime: number;
25
25
  };
26
26
  flowState: () => "menu" | "playing";
27
- data: () => import("@/stores/vm-store").DataState;
27
+ data: () => import("../../stores/vm-store").DataState;
28
28
  script: () => Parser.ParsedScript;
29
29
  }, {
30
30
  finishJumping(): void;
@@ -36,11 +36,11 @@ declare const _default: import("vue").DefineComponent<{}, {
36
36
  jump(): void;
37
37
  getMatchResultStyle(index: number): {
38
38
  background: string;
39
- };
39
+ } | undefined;
40
40
  onSearchInput(): void;
41
41
  save(): void;
42
42
  wordCount(): void;
43
- countWordsInScriptLine(scriptLine: Parser.Command): number;
43
+ countWordsInScriptLine(scriptLine: Parser.ParsedExpression): number;
44
44
  countWordsInString(string: string): number;
45
45
  countWordsInScriptBranch(branch: Parser.Branch): number;
46
46
  getPlayTimeString(): string;
File without changes
@@ -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;
@@ -1,6 +1,6 @@
1
- import { HudStatConfig } from '@/config';
2
- import { HudStatsState } from '@/stores/hud-stats-store';
3
- declare const _default: import("vue").DefineComponent<{}, {}, void, {
1
+ import { HudStatConfig } from '../config';
2
+ import { HudStatsState } from '../stores/hud-stats-store';
3
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {
4
4
  statsConfig(): {
5
5
  [key: string]: HudStatConfig;
6
6
  };
@@ -1,12 +1,10 @@
1
- import { ItemData } from '@/config';
2
- import { ItemState } from '@/stores/inventory-store';
3
- declare const _default: import("vue").DefineComponent<{
4
- close: FunctionConstructor;
5
- }, {
1
+ import { ItemData } from '../config';
2
+ import { ItemState } from '../stores/inventory-store';
3
+ declare const _default: import("vue").DefineComponent<{}, {
6
4
  items: import("vue").ComputedRef<{
7
5
  [key: string]: ItemState;
8
6
  }>;
9
- currentlyChoosing: import("vue").ComputedRef<import("@/stores/dialog-store").DialogChoice[]>;
7
+ currentlyChoosing: import("vue").ComputedRef<import("../stores/dialog-store").DialogChoice[] | undefined>;
10
8
  }, {
11
9
  chosenId: string | false;
12
10
  }, {
@@ -20,6 +18,7 @@ declare const _default: import("vue").DefineComponent<{
20
18
  [key: string]: ItemData;
21
19
  };
22
20
  }, {
21
+ close(): void;
23
22
  getItemStyle(item: string): any;
24
23
  getItemName(item: string): string;
25
24
  getItemConf(item: string): ItemData;
@@ -27,7 +26,5 @@ declare const _default: import("vue").DefineComponent<{
27
26
  closeItem(): void;
28
27
  useItem(): void;
29
28
  canUseItem(item: ItemState): boolean;
30
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
31
- close: FunctionConstructor;
32
- }>>, {}>;
29
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
33
30
  export default _default;
File without changes
@@ -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;
@@ -1,6 +1,6 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, void, {
2
2
  notifications: () => {
3
- [key: string]: import("@/stores/notification-store").NotificationState;
3
+ [key: string]: import("../stores/notification-store").NotificationState;
4
4
  };
5
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
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;
File without changes
@@ -4,6 +4,10 @@ export declare function getSkillConfig(id: string): SkillData;
4
4
  export declare function getItemConfig(id: string): ItemData;
5
5
  export declare function getQuestConfig(questId: string): QuestData;
6
6
  export declare function getObjectiveConfig(quest: string, objectiveId: string): ObjectiveData;
7
+ export interface AppOptions {
8
+ logging: boolean;
9
+ debug: boolean;
10
+ }
7
11
  export interface Config {
8
12
  gameTitle: string;
9
13
  images: {
@@ -79,6 +83,9 @@ export interface Config {
79
83
  quests: {
80
84
  [key: string]: QuestData;
81
85
  };
86
+ audioTriggers: {
87
+ [key: string]: string;
88
+ };
82
89
  }
83
90
  export interface QuestData {
84
91
  title: string;
File without changes
@@ -0,0 +1,62 @@
1
+ {
2
+ "config": {
3
+ "imagesPath": "./img/characters/"
4
+ },
5
+ "characters": {
6
+ "game": {
7
+ "name": "",
8
+ "color": "white"
9
+ },
10
+ "player": {
11
+ "style": {
12
+ "color": "orange"
13
+ },
14
+ "name": "You"
15
+ },
16
+ "cat": {
17
+ "sprites": {
18
+ "idle": "cat_idle.jpg"
19
+ },
20
+ "style": {
21
+ "color": "white"
22
+ },
23
+ "name": "Generic Cat"
24
+ },
25
+ "shopkeeper": {
26
+ "sprites": {
27
+ "idle": "music_cat.jpeg"
28
+ },
29
+ "style": {
30
+ "color": "white"
31
+ },
32
+ "name": "Shopkeeper"
33
+ },
34
+ "helper": {
35
+ "sprites": {
36
+ "idle": "helper_cat.png"
37
+ },
38
+ "style": {
39
+ "color": "green"
40
+ },
41
+ "name": "Helper Cat"
42
+ },
43
+ "music_cat": {
44
+ "sprites": {
45
+ "idle": "music_cat.jpeg"
46
+ },
47
+ "style": {
48
+ "color": "green"
49
+ },
50
+ "name": "Music Cat"
51
+ },
52
+ "inner": {
53
+ "sprites": {
54
+ "idle": "inner_voice.png"
55
+ },
56
+ "style": {
57
+ "color": "red"
58
+ },
59
+ "name": "Inner Voice"
60
+ }
61
+ }
62
+ }