narrat 1.2.0 → 1.3.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.
- package/lib/components/MainMenu.vue.d.ts +6 -9
- package/lib/components/Skills.vue.d.ts +3 -5
- package/lib/components/inventory.vue.d.ts +8 -5
- package/lib/components/quests.vue.d.ts +3 -5
- package/lib/config.d.ts +10 -0
- package/lib/index.esm.js +564 -416
- package/lib/index.js +564 -416
- package/lib/stores/audio-store.d.ts +1 -0
- package/lib/stores/dialog-store.d.ts +4 -1
- package/lib/stores/inventory-store.d.ts +10 -0
- package/lib/stores/main-store.d.ts +12 -2
- package/lib/stores/vm-store.d.ts +2 -1
- package/lib/vm/commands/inventory-commands.d.ts +5 -0
- package/lib/vm/commands/run.d.ts +2 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version: 1.
|
|
1
|
+
// Version: 1.3.1 - June 25, 2022 22:52:46
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -34,7 +34,7 @@ function styleInject(css, ref) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n --inventory-text-background: rgba(0, 0, 0, 0.5);\n --inventory-text-color: var(--text-color);\n --inventory-amount-background: rgba(0, 0, 0, 0.5);\n --inventory-amount-color: orange;\n --quest-title-color: yellow;\n --completed-quest-title-color: grey;\n --objective-in-progress-color: white;\n --objective-completed-color: grey;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\r\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.list-enter-from,\r\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\r\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.notification-enter-from,\r\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\r\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\r\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\r\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\r\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\r\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\r\nh2,\r\nh3,\r\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\r\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\r\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\r\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\r\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\r\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\r\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n.narrat-canvas {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\r\n 0% {\r\n width: 0;\r\n }\r\n 100% {\r\n width: 100%;\r\n }\r\n}\r\n.strike-anim {\r\n position: relative;\r\n}\r\n.strike-anim::after {\r\n content: ' ';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background: var(--text-color);\r\n animation-name: strike-anim;\r\n animation-duration: 0.5s;\r\n animation-timing-function: linear;\r\n animation-iteration-count: 1;\r\n animation-fill-mode: forwards;\r\n} */\n\n#touchTrigger {\n pointer-events: none;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\r\n";
|
|
37
|
+
var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n --inventory-text-background: rgba(0, 0, 0, 0.5);\n --inventory-text-color: var(--text-color);\n --inventory-amount-background: rgba(0, 0, 0, 0.5);\n --inventory-amount-color: orange;\n --quest-title-color: yellow;\n --completed-quest-title-color: grey;\n --objective-in-progress-color: white;\n --objective-completed-color: grey;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\r\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.list-enter-from,\r\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\r\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.notification-enter-from,\r\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\r\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\r\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\r\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.disabled {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n\n.button.disabled {\n box-shadow: unset;\n color: grey;\n background: var(--border-color);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\r\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\r\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\r\nh2,\r\nh3,\r\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\r\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\r\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\r\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\r\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\r\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\r\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n.narrat-canvas {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\r\n 0% {\r\n width: 0;\r\n }\r\n 100% {\r\n width: 100%;\r\n }\r\n}\r\n.strike-anim {\r\n position: relative;\r\n}\r\n.strike-anim::after {\r\n content: ' ';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background: var(--text-color);\r\n animation-name: strike-anim;\r\n animation-duration: 0.5s;\r\n animation-timing-function: linear;\r\n animation-iteration-count: 1;\r\n animation-fill-mode: forwards;\r\n} */\n\n#touchTrigger {\n pointer-events: none;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\r\n";
|
|
38
38
|
styleInject(css_248z);
|
|
39
39
|
|
|
40
40
|
const f=vue.ref([]),v=vue.ref(null),m=vue.ref(null),g=vue.ref(null),h=vue.reactive({current:""}),y=[],b=vue.ref(!1),k=vue.readonly(f),w=vue.readonly(v),M=vue.readonly(m),q=vue.readonly(g),x=vue.readonly(h),$=(e=w.value)=>{h.current=e;const t=k.value.findIndex((t=>t.name===e)),n=k.value.map((e=>e.name));for(let a=0;a<n.length;a++){if(a>0&&a<n.length-1){const e=n[a]+"Minus",r=n[a]+"Plus";h[e]=t<=a,h[r]=t>=a;}h[n[a]]=n[a]===e;}},V=(e=M.value)=>{h.orientation=e,h.isLandscape="landscape"===e,h.isPortrait="portrait"===e;},O=(e=q.value||"light")=>{h.theme=e,h.isDark="dark"===e,h.isLight="light"===e;};function j(e,t){if("undefined"==typeof window||!window.matchMedia)return !1;if("undefined"!=typeof window&&!window.matchMedia)return console.error("Vue3 Mq: No MatchMedia support detected in this browser. Responsive breakpoints not available."),!1;{b.value=!0;const n=window.matchMedia(e),a=({matches:e})=>{e&&t();};y.push({mql:n,cb:a});n.addEventListener&&"function"==typeof n.addEventListener?n.addEventListener("change",a):n.addListener(a),a(n);}}var L=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bootstrap5:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},bootstrap4:{xs:0,sm:576,md:768,lg:992,xl:1200},bootstrap3:{xs:0,sm:768,md:992,lg:1200},vuetify:{xs:0,sm:600,md:960,lg:1264,xl:1904},tailwind:{xs:0,sm:640,md:768,lg:1024,xl:1280,xxl:1536},devices:{phone:0,tablet:768,laptop:1370,desktop:1906}});const T=e=>{if(!e||"object"!=typeof e)return !1;const t=[];for(let n in e){const a=parseFloat(e[n]);n&&"string"==typeof n?/^[^a-z]/i.test(n)||/[^a-zA-Z0-9_]/.test(n)?console.warn(`Vue3 Mq: "${n}" is an invalid breakpoint key. Breakpoint keys must start with a letter and contain only alphanumeric characters and underscores. Skipping.`):!a&&0!==a||isNaN(a)||a<0?console.warn(`Vue3 Mq: "${n}: ${e[n]}" is not a valid breakpoint. Breakpoints should be a number of zero or above. Skipping.`):t.push({name:n,min:a}):console.warn(`Vue3 Mq: Invalid or missing breakpoint key (${JSON.stringify(n)}). Skipping.`);}t.some((e=>0===e.min))||console.warn("Vue3 Mq: You have not declared a breakpoint with a minimum value of 0. There may be screen sizes to which Vue3Mq does not respond.");return new Set(t.map((e=>e.min))).size<t.length&&console.warn("Vue3 Mq: Your breakpoint configuration contains duplicate values. Behaviour may be unpredictable."),0!==t.length&&t.sort(((e,t)=>e.min-t.min))};function R({breakpoints:e,preset:t}){const n=(e=>{if("string"==typeof e&&L[e])return L[e];{const t=Object.keys(L);return console.error(`Vue3 Mq: "${e}" is not a valid preset. Available options are: ${t.join(", ")}`),!1}})(t),a=T(e);if(!1===n&&!a)throw new TypeError("Vue3 Mq: You must provide a valid preset, or valid breakpoint settings.");var r;r=a||T(n),f.value=r,function(){for(;y.length>0;){const e=y.shift();if(e&&"object"==typeof e){const{mql:t,cb:n}=e;t.addEventListener&&"function"==typeof t.addEventListener?t.removeEventListener("change",n):t.removeListener(n);}}}(),(()=>{const e=Object.keys(h);for(let t of e)delete h[t];$(),V(),O();})();const o=k.value.reduce(((e,t,n,a)=>{const r=`(min-width: ${t.min}px)`,o=n<a.length-1?`(max-width: ${a[n+1].min-1}px)`:null,i=r+(o?" and "+o:"");return Object.assign(e,{[t.name]:i})}),{});for(const i in o){j(o[i],(()=>{$(i);}));}["portrait","landscape"].forEach((e=>{j(`(orientation: ${e})`,(()=>{V(e);}));})),["light","dark"].forEach((e=>{j(`(prefers-color-scheme: ${e})`,(()=>{O(e);}));}));}var N={install:(e,{preset:t="bootstrap5",breakpoints:n,defaultBreakpoint:a,defaultOrientation:r="landscape",defaultTheme:o}={})=>{try{const l=!1===["landscape","portrait"].includes(s=r)?(console.error(`Vue3 Mq: "${s}" is not a valid default orientation. Reverting to unset value.`),null):s,u=((e=null)=>!1===["dark","light"].includes(e)&&null!==e?(console.error(`Vue3 Mq: "${e}" is not a valid default theme. Reverting to unset value.`),null):e)(o);i=a,v.value=i,(e=>{m.value=e;})(l),(e=>{g.value=e;})(u),e.provide("mq",x),e.provide("updateBreakpoints",R),R({breakpoints:n,preset:t});}catch(l){console.error(l);}var i,s;}};
|
|
@@ -102,6 +102,11 @@ const defaultConfig = {
|
|
|
102
102
|
},
|
|
103
103
|
hudStats: {},
|
|
104
104
|
items: {},
|
|
105
|
+
interactionTags: {
|
|
106
|
+
default: {
|
|
107
|
+
onlyInteractOutsideOfScripts: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
105
110
|
quests: {},
|
|
106
111
|
};
|
|
107
112
|
|
|
@@ -3436,6 +3441,9 @@ const useAudio = pinia.defineStore('audio', {
|
|
|
3436
3441
|
loadSaveData(data) {
|
|
3437
3442
|
this.currentMusic = data.currentMusic;
|
|
3438
3443
|
},
|
|
3444
|
+
reset() {
|
|
3445
|
+
this.stopMusic();
|
|
3446
|
+
},
|
|
3439
3447
|
},
|
|
3440
3448
|
});
|
|
3441
3449
|
|
|
@@ -3561,200 +3569,6 @@ function randomId() {
|
|
|
3561
3569
|
return `${Date.now() - Math.floor(Math.random() * 99999999)}`;
|
|
3562
3570
|
}
|
|
3563
3571
|
|
|
3564
|
-
// Create a pinia store named dialog with a state using the type DialogState, with actions addDialog and clearDialog
|
|
3565
|
-
const useDialogStore = pinia.defineStore('dialog', {
|
|
3566
|
-
state: () => ({
|
|
3567
|
-
dialog: [],
|
|
3568
|
-
}),
|
|
3569
|
-
actions: {
|
|
3570
|
-
generateSaveData() {
|
|
3571
|
-
return {
|
|
3572
|
-
dialog: this.dialog,
|
|
3573
|
-
};
|
|
3574
|
-
},
|
|
3575
|
-
loadSaveData(data) {
|
|
3576
|
-
this.dialog = data.dialog;
|
|
3577
|
-
},
|
|
3578
|
-
addDialog(dialog) {
|
|
3579
|
-
this.dialog.push({
|
|
3580
|
-
...dialog,
|
|
3581
|
-
interactive: dialog.interactive ?? false,
|
|
3582
|
-
id: randomId(),
|
|
3583
|
-
});
|
|
3584
|
-
},
|
|
3585
|
-
clearDialog() {
|
|
3586
|
-
this.dialog.splice(0, this.dialog.length);
|
|
3587
|
-
},
|
|
3588
|
-
},
|
|
3589
|
-
});
|
|
3590
|
-
|
|
3591
|
-
var isMergeableObject = function isMergeableObject(value) {
|
|
3592
|
-
return isNonNullObject(value)
|
|
3593
|
-
&& !isSpecial(value)
|
|
3594
|
-
};
|
|
3595
|
-
|
|
3596
|
-
function isNonNullObject(value) {
|
|
3597
|
-
return !!value && typeof value === 'object'
|
|
3598
|
-
}
|
|
3599
|
-
|
|
3600
|
-
function isSpecial(value) {
|
|
3601
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
3602
|
-
|
|
3603
|
-
return stringValue === '[object RegExp]'
|
|
3604
|
-
|| stringValue === '[object Date]'
|
|
3605
|
-
|| isReactElement(value)
|
|
3606
|
-
}
|
|
3607
|
-
|
|
3608
|
-
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
3609
|
-
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
3610
|
-
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
3611
|
-
|
|
3612
|
-
function isReactElement(value) {
|
|
3613
|
-
return value.$$typeof === REACT_ELEMENT_TYPE
|
|
3614
|
-
}
|
|
3615
|
-
|
|
3616
|
-
function emptyTarget(val) {
|
|
3617
|
-
return Array.isArray(val) ? [] : {}
|
|
3618
|
-
}
|
|
3619
|
-
|
|
3620
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
3621
|
-
return (options.clone !== false && options.isMergeableObject(value))
|
|
3622
|
-
? deepmerge(emptyTarget(value), value, options)
|
|
3623
|
-
: value
|
|
3624
|
-
}
|
|
3625
|
-
|
|
3626
|
-
function defaultArrayMerge(target, source, options) {
|
|
3627
|
-
return target.concat(source).map(function(element) {
|
|
3628
|
-
return cloneUnlessOtherwiseSpecified(element, options)
|
|
3629
|
-
})
|
|
3630
|
-
}
|
|
3631
|
-
|
|
3632
|
-
function getMergeFunction(key, options) {
|
|
3633
|
-
if (!options.customMerge) {
|
|
3634
|
-
return deepmerge
|
|
3635
|
-
}
|
|
3636
|
-
var customMerge = options.customMerge(key);
|
|
3637
|
-
return typeof customMerge === 'function' ? customMerge : deepmerge
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
3641
|
-
return Object.getOwnPropertySymbols
|
|
3642
|
-
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
3643
|
-
return target.propertyIsEnumerable(symbol)
|
|
3644
|
-
})
|
|
3645
|
-
: []
|
|
3646
|
-
}
|
|
3647
|
-
|
|
3648
|
-
function getKeys(target) {
|
|
3649
|
-
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
function propertyIsOnObject(object, property) {
|
|
3653
|
-
try {
|
|
3654
|
-
return property in object
|
|
3655
|
-
} catch(_) {
|
|
3656
|
-
return false
|
|
3657
|
-
}
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
3661
|
-
function propertyIsUnsafe(target, key) {
|
|
3662
|
-
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
|
3663
|
-
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
|
3664
|
-
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
|
3665
|
-
}
|
|
3666
|
-
|
|
3667
|
-
function mergeObject(target, source, options) {
|
|
3668
|
-
var destination = {};
|
|
3669
|
-
if (options.isMergeableObject(target)) {
|
|
3670
|
-
getKeys(target).forEach(function(key) {
|
|
3671
|
-
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
3672
|
-
});
|
|
3673
|
-
}
|
|
3674
|
-
getKeys(source).forEach(function(key) {
|
|
3675
|
-
if (propertyIsUnsafe(target, key)) {
|
|
3676
|
-
return
|
|
3677
|
-
}
|
|
3678
|
-
|
|
3679
|
-
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
3680
|
-
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
3681
|
-
} else {
|
|
3682
|
-
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
3683
|
-
}
|
|
3684
|
-
});
|
|
3685
|
-
return destination
|
|
3686
|
-
}
|
|
3687
|
-
|
|
3688
|
-
function deepmerge(target, source, options) {
|
|
3689
|
-
options = options || {};
|
|
3690
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
3691
|
-
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
3692
|
-
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
3693
|
-
// implementations can use it. The caller may not replace it.
|
|
3694
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
3695
|
-
|
|
3696
|
-
var sourceIsArray = Array.isArray(source);
|
|
3697
|
-
var targetIsArray = Array.isArray(target);
|
|
3698
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
3699
|
-
|
|
3700
|
-
if (!sourceAndTargetTypesMatch) {
|
|
3701
|
-
return cloneUnlessOtherwiseSpecified(source, options)
|
|
3702
|
-
} else if (sourceIsArray) {
|
|
3703
|
-
return options.arrayMerge(target, source, options)
|
|
3704
|
-
} else {
|
|
3705
|
-
return mergeObject(target, source, options)
|
|
3706
|
-
}
|
|
3707
|
-
}
|
|
3708
|
-
|
|
3709
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
3710
|
-
if (!Array.isArray(array)) {
|
|
3711
|
-
throw new Error('first argument should be an array')
|
|
3712
|
-
}
|
|
3713
|
-
|
|
3714
|
-
return array.reduce(function(prev, next) {
|
|
3715
|
-
return deepmerge(prev, next, options)
|
|
3716
|
-
}, {})
|
|
3717
|
-
};
|
|
3718
|
-
|
|
3719
|
-
var deepmerge_1 = deepmerge;
|
|
3720
|
-
|
|
3721
|
-
var cjs = deepmerge_1;
|
|
3722
|
-
|
|
3723
|
-
// Create a pinia store named hud with a state using the type HudState, and save type HudSave, with actions:
|
|
3724
|
-
// setupHudStats(stats: { [key: string]: HudStatConfig }): Iterates the stats argument to add new stats to the state
|
|
3725
|
-
// setStat(stat: string, value: number): Sets the value of a stat
|
|
3726
|
-
// addStat(stat: string, value: number): Adds a value to a stat
|
|
3727
|
-
// generateSaveData(): Function that generates a HudSave object from the data in the state
|
|
3728
|
-
// loadSaveData(data: HudSave): Function that loads the data into the state
|
|
3729
|
-
const useHud = pinia.defineStore('hud', {
|
|
3730
|
-
state: () => ({
|
|
3731
|
-
hudStats: {},
|
|
3732
|
-
}),
|
|
3733
|
-
actions: {
|
|
3734
|
-
setupHudStats(stats) {
|
|
3735
|
-
for (const stat in stats) {
|
|
3736
|
-
this.hudStats[stat] = {
|
|
3737
|
-
value: stats[stat].startingValue,
|
|
3738
|
-
};
|
|
3739
|
-
}
|
|
3740
|
-
},
|
|
3741
|
-
setStat(stat, value) {
|
|
3742
|
-
this.hudStats[stat].value = value;
|
|
3743
|
-
},
|
|
3744
|
-
addStat(stat, value) {
|
|
3745
|
-
this.hudStats[stat].value += value;
|
|
3746
|
-
},
|
|
3747
|
-
generateSaveData() {
|
|
3748
|
-
return {
|
|
3749
|
-
hudStats: this.hudStats,
|
|
3750
|
-
};
|
|
3751
|
-
},
|
|
3752
|
-
loadSaveData(data) {
|
|
3753
|
-
this.hudStats = cjs(this.hudStats, data.hudStats);
|
|
3754
|
-
},
|
|
3755
|
-
},
|
|
3756
|
-
});
|
|
3757
|
-
|
|
3758
3572
|
// Generate a pinia store named notifications with a state using the type NotificationsState, and save type NotificationsSave, with actions:
|
|
3759
3573
|
// addNotification(text: string): Adds a new notification to the state, and deletes it after a timeout
|
|
3760
3574
|
// deleteNotification(id: string): Deletes a notification from the state
|
|
@@ -3783,15 +3597,18 @@ const useNotifications = pinia.defineStore('notifications', {
|
|
|
3783
3597
|
const useInventory = pinia.defineStore('inventory', {
|
|
3784
3598
|
state: () => ({
|
|
3785
3599
|
items: {},
|
|
3600
|
+
interactionTags: {},
|
|
3786
3601
|
}),
|
|
3787
3602
|
actions: {
|
|
3788
3603
|
generateSaveData() {
|
|
3789
3604
|
return {
|
|
3790
3605
|
items: this.items,
|
|
3606
|
+
interactionTags: this.interactionTags,
|
|
3791
3607
|
};
|
|
3792
3608
|
},
|
|
3793
3609
|
loadSaveData(save) {
|
|
3794
3610
|
this.items = { ...this.items, ...save.items };
|
|
3611
|
+
this.interactionTags = { ...save.interactionTags };
|
|
3795
3612
|
},
|
|
3796
3613
|
setupItems(items) {
|
|
3797
3614
|
Object.keys(items).forEach((key) => {
|
|
@@ -3817,6 +3634,49 @@ const useInventory = pinia.defineStore('inventory', {
|
|
|
3817
3634
|
}
|
|
3818
3635
|
useNotifications().addNotification(`Received item: ${getItemConfig(item.id).name} x ${item.amount}`);
|
|
3819
3636
|
},
|
|
3637
|
+
enableInteraction(tag) {
|
|
3638
|
+
if (!tag) {
|
|
3639
|
+
tag = 'default';
|
|
3640
|
+
}
|
|
3641
|
+
this.interactionTags[tag] = {
|
|
3642
|
+
blockedInteraction: false,
|
|
3643
|
+
};
|
|
3644
|
+
},
|
|
3645
|
+
disableInteraction(tag) {
|
|
3646
|
+
if (!tag) {
|
|
3647
|
+
tag = 'default';
|
|
3648
|
+
}
|
|
3649
|
+
this.interactionTags[tag] = {
|
|
3650
|
+
blockedInteraction: true,
|
|
3651
|
+
};
|
|
3652
|
+
},
|
|
3653
|
+
onScriptStart() {
|
|
3654
|
+
const tags = getConfig().interactionTags;
|
|
3655
|
+
Object.keys(tags).forEach((tag) => {
|
|
3656
|
+
const conf = tags[tag];
|
|
3657
|
+
if (conf.onlyInteractOutsideOfScripts) {
|
|
3658
|
+
this.disableInteraction(tag);
|
|
3659
|
+
}
|
|
3660
|
+
});
|
|
3661
|
+
},
|
|
3662
|
+
onScriptEnd() {
|
|
3663
|
+
const tags = getConfig().interactionTags;
|
|
3664
|
+
Object.keys(tags).forEach((tag) => {
|
|
3665
|
+
const conf = tags[tag];
|
|
3666
|
+
if (conf.onlyInteractOutsideOfScripts) {
|
|
3667
|
+
this.enableInteraction(tag);
|
|
3668
|
+
}
|
|
3669
|
+
});
|
|
3670
|
+
},
|
|
3671
|
+
isInteractionTagBlocked(tag) {
|
|
3672
|
+
if (!tag) {
|
|
3673
|
+
tag = 'default';
|
|
3674
|
+
}
|
|
3675
|
+
if (this.interactionTags[tag]) {
|
|
3676
|
+
return this.interactionTags[tag].blockedInteraction;
|
|
3677
|
+
}
|
|
3678
|
+
return false;
|
|
3679
|
+
},
|
|
3820
3680
|
remove(item) {
|
|
3821
3681
|
const existingItem = this.getExistingItem(item.id);
|
|
3822
3682
|
if (existingItem) {
|
|
@@ -3836,93 +3696,6 @@ const useInventory = pinia.defineStore('inventory', {
|
|
|
3836
3696
|
},
|
|
3837
3697
|
});
|
|
3838
3698
|
|
|
3839
|
-
// Create a pinia store named skills with a state using the type Skills, with actions:
|
|
3840
|
-
// setupSkillCheck(skillCheck: SkillCheckState, id: string)
|
|
3841
|
-
// passSkillCheck(skillCheckId: string)
|
|
3842
|
-
// failSkillCheck(skillCheckId: string)
|
|
3843
|
-
// generateSaveData(): Function that generates a Skills object from the data in the state
|
|
3844
|
-
// loadSaveData(data: Skills): Function that loads the data into the state
|
|
3845
|
-
// setupSkills(skills: { [key: string]: SkillData})
|
|
3846
|
-
// addXp(skill: string, xp: number): Adds xp to a skill, increases skill level if it reaches the max xp defined in the skillOptions.xpPerLevel key of the config
|
|
3847
|
-
// incrementSkill(skill: string, amount: number): Increments the level of a skill by amount
|
|
3848
|
-
const useSkills = pinia.defineStore('skills', {
|
|
3849
|
-
state: () => ({
|
|
3850
|
-
skillChecks: {},
|
|
3851
|
-
skills: {},
|
|
3852
|
-
}),
|
|
3853
|
-
actions: {
|
|
3854
|
-
setupSkillCheck(skillCheck, id) {
|
|
3855
|
-
this.skillChecks[id] = skillCheck;
|
|
3856
|
-
},
|
|
3857
|
-
passSkillCheck(skillCheckId) {
|
|
3858
|
-
this.skillChecks[skillCheckId].passed = true;
|
|
3859
|
-
this.skillChecks[skillCheckId].available = false;
|
|
3860
|
-
},
|
|
3861
|
-
failSkillCheck(skillCheckId) {
|
|
3862
|
-
this.skillChecks[skillCheckId].passed = false;
|
|
3863
|
-
this.skillChecks[skillCheckId].available = false;
|
|
3864
|
-
},
|
|
3865
|
-
generateSaveData() {
|
|
3866
|
-
return {
|
|
3867
|
-
skillChecks: this.skillChecks,
|
|
3868
|
-
skills: this.skills,
|
|
3869
|
-
};
|
|
3870
|
-
},
|
|
3871
|
-
loadSaveData(data) {
|
|
3872
|
-
this.skillChecks = cjs(this.skillChecks, data.skillChecks);
|
|
3873
|
-
this.skills = cjs(this.skills, data.skills);
|
|
3874
|
-
},
|
|
3875
|
-
setupSkills(skills) {
|
|
3876
|
-
// Adds each skill in the skills object to the skills state. Add default values for startingLevel and xp of 0 if those keys are missing.
|
|
3877
|
-
for (const skill in skills) {
|
|
3878
|
-
this.skills[skill] = {
|
|
3879
|
-
level: skills[skill].startingLevel || 0,
|
|
3880
|
-
xp: 0,
|
|
3881
|
-
};
|
|
3882
|
-
}
|
|
3883
|
-
},
|
|
3884
|
-
addXp(skill, xp) {
|
|
3885
|
-
const skillData = this.skills[skill];
|
|
3886
|
-
skillData.xp += xp;
|
|
3887
|
-
if (skillData.xp >= getConfig().skillOptions.xpPerLevel) {
|
|
3888
|
-
skillData.xp = 0;
|
|
3889
|
-
skillData.level++;
|
|
3890
|
-
this.levelledUp(skill);
|
|
3891
|
-
}
|
|
3892
|
-
},
|
|
3893
|
-
incrementSkill(skill, amount) {
|
|
3894
|
-
this.skills[skill].level += amount;
|
|
3895
|
-
this.levelledUp(skill);
|
|
3896
|
-
},
|
|
3897
|
-
levelledUp(skill) {
|
|
3898
|
-
const skillName = getConfig().skills[skill].name;
|
|
3899
|
-
const skillLevel = this.skills[skill].level;
|
|
3900
|
-
useNotifications().addNotification(`Your skill in ${skillName} is now level ${skillLevel}`);
|
|
3901
|
-
},
|
|
3902
|
-
},
|
|
3903
|
-
});
|
|
3904
|
-
|
|
3905
|
-
function getFile(url) {
|
|
3906
|
-
return new Promise((resolve, reject) => {
|
|
3907
|
-
// Set up our HTTP request
|
|
3908
|
-
const xhr = new XMLHttpRequest();
|
|
3909
|
-
// Setup our listener to process completed requests
|
|
3910
|
-
xhr.onload = function () {
|
|
3911
|
-
// Process our return data
|
|
3912
|
-
if (xhr.status >= 200 && xhr.status < 300) {
|
|
3913
|
-
// This will run when the request is successful
|
|
3914
|
-
resolve(xhr.responseText);
|
|
3915
|
-
}
|
|
3916
|
-
else {
|
|
3917
|
-
reject(xhr.status);
|
|
3918
|
-
// This will run when it's not
|
|
3919
|
-
}
|
|
3920
|
-
};
|
|
3921
|
-
xhr.open('GET', url);
|
|
3922
|
-
xhr.send();
|
|
3923
|
-
});
|
|
3924
|
-
}
|
|
3925
|
-
|
|
3926
3699
|
const everyObject = (object, predicate) => {
|
|
3927
3700
|
for (const key in object) {
|
|
3928
3701
|
if (!predicate(object[key])) {
|
|
@@ -3998,26 +3771,248 @@ const useQuests = pinia.defineStore('quests', {
|
|
|
3998
3771
|
}
|
|
3999
3772
|
useNotifications().addNotification(`Quest completed: ${getQuestConfig(questId).title}`);
|
|
4000
3773
|
},
|
|
4001
|
-
isQuestCompleted(questId) {
|
|
4002
|
-
const quest = this.getQuest(questId);
|
|
4003
|
-
return everyObject(quest.objectives, (objective) => objective.state === 'completed');
|
|
3774
|
+
isQuestCompleted(questId) {
|
|
3775
|
+
const quest = this.getQuest(questId);
|
|
3776
|
+
return everyObject(quest.objectives, (objective) => objective.state === 'completed');
|
|
3777
|
+
},
|
|
3778
|
+
removeQuest(id) {
|
|
3779
|
+
delete this.quests[id];
|
|
3780
|
+
},
|
|
3781
|
+
generateSaveData() {
|
|
3782
|
+
return {
|
|
3783
|
+
quests: {
|
|
3784
|
+
...this.quests,
|
|
3785
|
+
},
|
|
3786
|
+
};
|
|
3787
|
+
},
|
|
3788
|
+
loadSaveData(data) {
|
|
3789
|
+
this.quests = data.quests;
|
|
3790
|
+
},
|
|
3791
|
+
},
|
|
3792
|
+
});
|
|
3793
|
+
|
|
3794
|
+
var isMergeableObject = function isMergeableObject(value) {
|
|
3795
|
+
return isNonNullObject(value)
|
|
3796
|
+
&& !isSpecial(value)
|
|
3797
|
+
};
|
|
3798
|
+
|
|
3799
|
+
function isNonNullObject(value) {
|
|
3800
|
+
return !!value && typeof value === 'object'
|
|
3801
|
+
}
|
|
3802
|
+
|
|
3803
|
+
function isSpecial(value) {
|
|
3804
|
+
var stringValue = Object.prototype.toString.call(value);
|
|
3805
|
+
|
|
3806
|
+
return stringValue === '[object RegExp]'
|
|
3807
|
+
|| stringValue === '[object Date]'
|
|
3808
|
+
|| isReactElement(value)
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3811
|
+
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
3812
|
+
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
3813
|
+
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
3814
|
+
|
|
3815
|
+
function isReactElement(value) {
|
|
3816
|
+
return value.$$typeof === REACT_ELEMENT_TYPE
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
function emptyTarget(val) {
|
|
3820
|
+
return Array.isArray(val) ? [] : {}
|
|
3821
|
+
}
|
|
3822
|
+
|
|
3823
|
+
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
3824
|
+
return (options.clone !== false && options.isMergeableObject(value))
|
|
3825
|
+
? deepmerge(emptyTarget(value), value, options)
|
|
3826
|
+
: value
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3829
|
+
function defaultArrayMerge(target, source, options) {
|
|
3830
|
+
return target.concat(source).map(function(element) {
|
|
3831
|
+
return cloneUnlessOtherwiseSpecified(element, options)
|
|
3832
|
+
})
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
function getMergeFunction(key, options) {
|
|
3836
|
+
if (!options.customMerge) {
|
|
3837
|
+
return deepmerge
|
|
3838
|
+
}
|
|
3839
|
+
var customMerge = options.customMerge(key);
|
|
3840
|
+
return typeof customMerge === 'function' ? customMerge : deepmerge
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
function getEnumerableOwnPropertySymbols(target) {
|
|
3844
|
+
return Object.getOwnPropertySymbols
|
|
3845
|
+
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
3846
|
+
return target.propertyIsEnumerable(symbol)
|
|
3847
|
+
})
|
|
3848
|
+
: []
|
|
3849
|
+
}
|
|
3850
|
+
|
|
3851
|
+
function getKeys(target) {
|
|
3852
|
+
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
function propertyIsOnObject(object, property) {
|
|
3856
|
+
try {
|
|
3857
|
+
return property in object
|
|
3858
|
+
} catch(_) {
|
|
3859
|
+
return false
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
3864
|
+
function propertyIsUnsafe(target, key) {
|
|
3865
|
+
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
|
3866
|
+
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
|
3867
|
+
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
function mergeObject(target, source, options) {
|
|
3871
|
+
var destination = {};
|
|
3872
|
+
if (options.isMergeableObject(target)) {
|
|
3873
|
+
getKeys(target).forEach(function(key) {
|
|
3874
|
+
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
3875
|
+
});
|
|
3876
|
+
}
|
|
3877
|
+
getKeys(source).forEach(function(key) {
|
|
3878
|
+
if (propertyIsUnsafe(target, key)) {
|
|
3879
|
+
return
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
3883
|
+
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
3884
|
+
} else {
|
|
3885
|
+
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
3886
|
+
}
|
|
3887
|
+
});
|
|
3888
|
+
return destination
|
|
3889
|
+
}
|
|
3890
|
+
|
|
3891
|
+
function deepmerge(target, source, options) {
|
|
3892
|
+
options = options || {};
|
|
3893
|
+
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
3894
|
+
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
3895
|
+
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
3896
|
+
// implementations can use it. The caller may not replace it.
|
|
3897
|
+
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
3898
|
+
|
|
3899
|
+
var sourceIsArray = Array.isArray(source);
|
|
3900
|
+
var targetIsArray = Array.isArray(target);
|
|
3901
|
+
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
3902
|
+
|
|
3903
|
+
if (!sourceAndTargetTypesMatch) {
|
|
3904
|
+
return cloneUnlessOtherwiseSpecified(source, options)
|
|
3905
|
+
} else if (sourceIsArray) {
|
|
3906
|
+
return options.arrayMerge(target, source, options)
|
|
3907
|
+
} else {
|
|
3908
|
+
return mergeObject(target, source, options)
|
|
3909
|
+
}
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
deepmerge.all = function deepmergeAll(array, options) {
|
|
3913
|
+
if (!Array.isArray(array)) {
|
|
3914
|
+
throw new Error('first argument should be an array')
|
|
3915
|
+
}
|
|
3916
|
+
|
|
3917
|
+
return array.reduce(function(prev, next) {
|
|
3918
|
+
return deepmerge(prev, next, options)
|
|
3919
|
+
}, {})
|
|
3920
|
+
};
|
|
3921
|
+
|
|
3922
|
+
var deepmerge_1 = deepmerge;
|
|
3923
|
+
|
|
3924
|
+
var cjs = deepmerge_1;
|
|
3925
|
+
|
|
3926
|
+
// Create a pinia store named skills with a state using the type Skills, with actions:
|
|
3927
|
+
// setupSkillCheck(skillCheck: SkillCheckState, id: string)
|
|
3928
|
+
// passSkillCheck(skillCheckId: string)
|
|
3929
|
+
// failSkillCheck(skillCheckId: string)
|
|
3930
|
+
// generateSaveData(): Function that generates a Skills object from the data in the state
|
|
3931
|
+
// loadSaveData(data: Skills): Function that loads the data into the state
|
|
3932
|
+
// setupSkills(skills: { [key: string]: SkillData})
|
|
3933
|
+
// addXp(skill: string, xp: number): Adds xp to a skill, increases skill level if it reaches the max xp defined in the skillOptions.xpPerLevel key of the config
|
|
3934
|
+
// incrementSkill(skill: string, amount: number): Increments the level of a skill by amount
|
|
3935
|
+
const useSkills = pinia.defineStore('skills', {
|
|
3936
|
+
state: () => ({
|
|
3937
|
+
skillChecks: {},
|
|
3938
|
+
skills: {},
|
|
3939
|
+
}),
|
|
3940
|
+
actions: {
|
|
3941
|
+
setupSkillCheck(skillCheck, id) {
|
|
3942
|
+
this.skillChecks[id] = skillCheck;
|
|
3943
|
+
},
|
|
3944
|
+
passSkillCheck(skillCheckId) {
|
|
3945
|
+
this.skillChecks[skillCheckId].passed = true;
|
|
3946
|
+
this.skillChecks[skillCheckId].available = false;
|
|
4004
3947
|
},
|
|
4005
|
-
|
|
4006
|
-
|
|
3948
|
+
failSkillCheck(skillCheckId) {
|
|
3949
|
+
this.skillChecks[skillCheckId].passed = false;
|
|
3950
|
+
this.skillChecks[skillCheckId].available = false;
|
|
4007
3951
|
},
|
|
4008
3952
|
generateSaveData() {
|
|
4009
3953
|
return {
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
},
|
|
3954
|
+
skillChecks: this.skillChecks,
|
|
3955
|
+
skills: this.skills,
|
|
4013
3956
|
};
|
|
4014
3957
|
},
|
|
4015
3958
|
loadSaveData(data) {
|
|
4016
|
-
this.
|
|
3959
|
+
this.skillChecks = cjs(this.skillChecks, data.skillChecks);
|
|
3960
|
+
this.skills = cjs(this.skills, data.skills);
|
|
3961
|
+
},
|
|
3962
|
+
setupSkills(skills) {
|
|
3963
|
+
// Adds each skill in the skills object to the skills state. Add default values for startingLevel and xp of 0 if those keys are missing.
|
|
3964
|
+
for (const skill in skills) {
|
|
3965
|
+
this.skills[skill] = {
|
|
3966
|
+
level: skills[skill].startingLevel || 0,
|
|
3967
|
+
xp: 0,
|
|
3968
|
+
};
|
|
3969
|
+
}
|
|
3970
|
+
},
|
|
3971
|
+
addXp(skill, xp) {
|
|
3972
|
+
const skillData = this.skills[skill];
|
|
3973
|
+
if (!skillData) {
|
|
3974
|
+
error(`Skill ${skill} doesn't exist`);
|
|
3975
|
+
}
|
|
3976
|
+
skillData.xp += xp;
|
|
3977
|
+
if (skillData.xp >= getConfig().skillOptions.xpPerLevel) {
|
|
3978
|
+
skillData.xp = 0;
|
|
3979
|
+
skillData.level++;
|
|
3980
|
+
this.levelledUp(skill);
|
|
3981
|
+
}
|
|
3982
|
+
},
|
|
3983
|
+
incrementSkill(skill, amount) {
|
|
3984
|
+
this.skills[skill].level += amount;
|
|
3985
|
+
this.levelledUp(skill);
|
|
3986
|
+
},
|
|
3987
|
+
levelledUp(skill) {
|
|
3988
|
+
const skillName = getConfig().skills[skill].name;
|
|
3989
|
+
const skillLevel = this.skills[skill].level;
|
|
3990
|
+
useNotifications().addNotification(`Your skill in ${skillName} is now level ${skillLevel}`);
|
|
4017
3991
|
},
|
|
4018
3992
|
},
|
|
4019
3993
|
});
|
|
4020
3994
|
|
|
3995
|
+
function getFile(url) {
|
|
3996
|
+
return new Promise((resolve, reject) => {
|
|
3997
|
+
// Set up our HTTP request
|
|
3998
|
+
const xhr = new XMLHttpRequest();
|
|
3999
|
+
// Setup our listener to process completed requests
|
|
4000
|
+
xhr.onload = function () {
|
|
4001
|
+
// Process our return data
|
|
4002
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
4003
|
+
// This will run when the request is successful
|
|
4004
|
+
resolve(xhr.responseText);
|
|
4005
|
+
}
|
|
4006
|
+
else {
|
|
4007
|
+
reject(xhr.status);
|
|
4008
|
+
// This will run when it's not
|
|
4009
|
+
}
|
|
4010
|
+
};
|
|
4011
|
+
xhr.open('GET', url);
|
|
4012
|
+
xhr.send();
|
|
4013
|
+
});
|
|
4014
|
+
}
|
|
4015
|
+
|
|
4021
4016
|
// Create a pinia store named screens with a state using the type ScreenState, with actions:
|
|
4022
4017
|
// setScreen(screen: string): Sets the current screen to the given screen
|
|
4023
4018
|
// setButtons(buttons: { [key: string]: ButtonConfig }): Adds buttons to the buttons state by using the values in the buttons config object
|
|
@@ -4309,6 +4304,7 @@ const useVM = pinia.defineStore('vm', {
|
|
|
4309
4304
|
data: {},
|
|
4310
4305
|
lastLabel: 'main',
|
|
4311
4306
|
script: {},
|
|
4307
|
+
labelStack: ['main'],
|
|
4312
4308
|
}),
|
|
4313
4309
|
actions: {
|
|
4314
4310
|
generateSaveData() {
|
|
@@ -4385,6 +4381,7 @@ const useVM = pinia.defineStore('vm', {
|
|
|
4385
4381
|
newStack.label = this.currentStack.label;
|
|
4386
4382
|
}
|
|
4387
4383
|
this.stack.push(newStack);
|
|
4384
|
+
return this.runLine();
|
|
4388
4385
|
},
|
|
4389
4386
|
async nextLine() {
|
|
4390
4387
|
if (this.stack.length === 0) {
|
|
@@ -4412,6 +4409,7 @@ const useVM = pinia.defineStore('vm', {
|
|
|
4412
4409
|
this.stack.splice(this.stack.length - 1, 1);
|
|
4413
4410
|
},
|
|
4414
4411
|
finishGame() {
|
|
4412
|
+
useInventory().onScriptEnd();
|
|
4415
4413
|
const mainStore = useMain();
|
|
4416
4414
|
if (mainStore.options.debug) {
|
|
4417
4415
|
const dialogStore = useDialogStore();
|
|
@@ -4423,8 +4421,24 @@ const useVM = pinia.defineStore('vm', {
|
|
|
4423
4421
|
},
|
|
4424
4422
|
async runLine() {
|
|
4425
4423
|
const cmd = this.currentLine;
|
|
4424
|
+
useInventory().onScriptStart();
|
|
4426
4425
|
await runCommand(cmd);
|
|
4427
4426
|
},
|
|
4427
|
+
async runLabelFunction(label, comeBackToSameLine) {
|
|
4428
|
+
if (comeBackToSameLine) {
|
|
4429
|
+
this.currentStack.currentIndex--;
|
|
4430
|
+
}
|
|
4431
|
+
const branch = this.script[label];
|
|
4432
|
+
if (!branch) {
|
|
4433
|
+
console.error(`Label ${branch} doesn't exist`);
|
|
4434
|
+
}
|
|
4435
|
+
const stack = {
|
|
4436
|
+
currentIndex: 0,
|
|
4437
|
+
branch: branch,
|
|
4438
|
+
label,
|
|
4439
|
+
};
|
|
4440
|
+
await this.addStack(stack);
|
|
4441
|
+
},
|
|
4428
4442
|
runLabel(label) {
|
|
4429
4443
|
const branch = this.script[label];
|
|
4430
4444
|
if (!branch) {
|
|
@@ -4453,6 +4467,93 @@ const useVM = pinia.defineStore('vm', {
|
|
|
4453
4467
|
},
|
|
4454
4468
|
});
|
|
4455
4469
|
|
|
4470
|
+
function processText(text) {
|
|
4471
|
+
const vmStore = useVM();
|
|
4472
|
+
const skillStore = useSkills();
|
|
4473
|
+
return text.replace(/%{[^}]*}/g, (match) => {
|
|
4474
|
+
const key = match.substr(2, match.length - 3);
|
|
4475
|
+
const searchableState = {
|
|
4476
|
+
data: vmStore.data,
|
|
4477
|
+
skills: skillStore.skills,
|
|
4478
|
+
items: useInventory().items,
|
|
4479
|
+
quests: useQuests().quests,
|
|
4480
|
+
};
|
|
4481
|
+
const [obj, newKey] = findDataHelper(searchableState, key);
|
|
4482
|
+
return obj[newKey];
|
|
4483
|
+
});
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
// Create a pinia store named dialog with a state using the type DialogState, with actions addDialog and clearDialog
|
|
4487
|
+
const useDialogStore = pinia.defineStore('dialog', {
|
|
4488
|
+
state: () => ({
|
|
4489
|
+
dialog: [],
|
|
4490
|
+
}),
|
|
4491
|
+
actions: {
|
|
4492
|
+
generateSaveData() {
|
|
4493
|
+
return {
|
|
4494
|
+
dialog: this.dialog,
|
|
4495
|
+
};
|
|
4496
|
+
},
|
|
4497
|
+
loadSaveData(data) {
|
|
4498
|
+
this.dialog = data.dialog;
|
|
4499
|
+
},
|
|
4500
|
+
addDialog(dialog) {
|
|
4501
|
+
this.dialog.push({
|
|
4502
|
+
...dialog,
|
|
4503
|
+
interactive: dialog.interactive ?? false,
|
|
4504
|
+
id: randomId(),
|
|
4505
|
+
text: processText(dialog.text),
|
|
4506
|
+
});
|
|
4507
|
+
},
|
|
4508
|
+
clearDialog() {
|
|
4509
|
+
this.dialog.splice(0, this.dialog.length);
|
|
4510
|
+
},
|
|
4511
|
+
reset() {
|
|
4512
|
+
this.dialog = [];
|
|
4513
|
+
},
|
|
4514
|
+
},
|
|
4515
|
+
getters: {
|
|
4516
|
+
currentDialog() {
|
|
4517
|
+
return this.dialog[this.dialog.length - 1];
|
|
4518
|
+
},
|
|
4519
|
+
},
|
|
4520
|
+
});
|
|
4521
|
+
|
|
4522
|
+
// Create a pinia store named hud with a state using the type HudState, and save type HudSave, with actions:
|
|
4523
|
+
// setupHudStats(stats: { [key: string]: HudStatConfig }): Iterates the stats argument to add new stats to the state
|
|
4524
|
+
// setStat(stat: string, value: number): Sets the value of a stat
|
|
4525
|
+
// addStat(stat: string, value: number): Adds a value to a stat
|
|
4526
|
+
// generateSaveData(): Function that generates a HudSave object from the data in the state
|
|
4527
|
+
// loadSaveData(data: HudSave): Function that loads the data into the state
|
|
4528
|
+
const useHud = pinia.defineStore('hud', {
|
|
4529
|
+
state: () => ({
|
|
4530
|
+
hudStats: {},
|
|
4531
|
+
}),
|
|
4532
|
+
actions: {
|
|
4533
|
+
setupHudStats(stats) {
|
|
4534
|
+
for (const stat in stats) {
|
|
4535
|
+
this.hudStats[stat] = {
|
|
4536
|
+
value: stats[stat].startingValue,
|
|
4537
|
+
};
|
|
4538
|
+
}
|
|
4539
|
+
},
|
|
4540
|
+
setStat(stat, value) {
|
|
4541
|
+
this.hudStats[stat].value = value;
|
|
4542
|
+
},
|
|
4543
|
+
addStat(stat, value) {
|
|
4544
|
+
this.hudStats[stat].value += value;
|
|
4545
|
+
},
|
|
4546
|
+
generateSaveData() {
|
|
4547
|
+
return {
|
|
4548
|
+
hudStats: this.hudStats,
|
|
4549
|
+
};
|
|
4550
|
+
},
|
|
4551
|
+
loadSaveData(data) {
|
|
4552
|
+
this.hudStats = cjs(this.hudStats, data.hudStats);
|
|
4553
|
+
},
|
|
4554
|
+
},
|
|
4555
|
+
});
|
|
4556
|
+
|
|
4456
4557
|
function createSkillCheckState() {
|
|
4457
4558
|
const skillCheck = {
|
|
4458
4559
|
passed: false,
|
|
@@ -4726,8 +4827,7 @@ async function playerAnswered(choiceIndex) {
|
|
|
4726
4827
|
branch: newBranch,
|
|
4727
4828
|
};
|
|
4728
4829
|
const vmStore = useVM();
|
|
4729
|
-
vmStore.addStack(newStack);
|
|
4730
|
-
vmStore.runLine();
|
|
4830
|
+
return vmStore.addStack(newStack);
|
|
4731
4831
|
}
|
|
4732
4832
|
else {
|
|
4733
4833
|
vmStore.nextLine();
|
|
@@ -4872,7 +4972,12 @@ const useMain = pinia.defineStore('main', {
|
|
|
4872
4972
|
this.modal = false;
|
|
4873
4973
|
},
|
|
4874
4974
|
toggleMenu() {
|
|
4875
|
-
|
|
4975
|
+
if (this.modal) {
|
|
4976
|
+
this.modal = false;
|
|
4977
|
+
}
|
|
4978
|
+
else {
|
|
4979
|
+
this.modal = 'menu';
|
|
4980
|
+
}
|
|
4876
4981
|
},
|
|
4877
4982
|
pause() {
|
|
4878
4983
|
this.paused = true;
|
|
@@ -4889,11 +4994,13 @@ const useMain = pinia.defineStore('main', {
|
|
|
4889
4994
|
},
|
|
4890
4995
|
reset() {
|
|
4891
4996
|
this.ready = false;
|
|
4892
|
-
this.playing = false;
|
|
4893
4997
|
this.errors = [];
|
|
4894
|
-
this.flowState = 'menu';
|
|
4895
4998
|
this.modal = false;
|
|
4896
4999
|
this.paused = false;
|
|
5000
|
+
useVM().reset();
|
|
5001
|
+
useAudio().reset();
|
|
5002
|
+
this.playing = false;
|
|
5003
|
+
this.ready = true;
|
|
4897
5004
|
},
|
|
4898
5005
|
generateSaveData() {
|
|
4899
5006
|
return {
|
|
@@ -7718,22 +7825,6 @@ styleInject(css_248z$8);
|
|
|
7718
7825
|
|
|
7719
7826
|
script$7.render = render$7;
|
|
7720
7827
|
|
|
7721
|
-
function processText(text) {
|
|
7722
|
-
const vmStore = useVM();
|
|
7723
|
-
const skillStore = useSkills();
|
|
7724
|
-
return text.replace(/%{[^}]*}/g, (match) => {
|
|
7725
|
-
const key = match.substr(2, match.length - 3);
|
|
7726
|
-
const searchableState = {
|
|
7727
|
-
data: vmStore.data,
|
|
7728
|
-
skills: skillStore.skills,
|
|
7729
|
-
items: useInventory().items,
|
|
7730
|
-
quests: useQuests().quests,
|
|
7731
|
-
};
|
|
7732
|
-
const [obj, newKey] = findDataHelper(searchableState, key);
|
|
7733
|
-
return obj[newKey];
|
|
7734
|
-
});
|
|
7735
|
-
}
|
|
7736
|
-
|
|
7737
7828
|
function aspectRatioFit(screenWidth, screenHeight, gameWidth, gameHeight) {
|
|
7738
7829
|
const widthRatio = screenWidth / gameWidth;
|
|
7739
7830
|
const heightRatio = screenHeight / gameHeight;
|
|
@@ -7948,7 +8039,9 @@ var script$9 = vue.defineComponent({
|
|
|
7948
8039
|
Modal: script$2,
|
|
7949
8040
|
VolumeControls: script$4,
|
|
7950
8041
|
},
|
|
7951
|
-
props: {
|
|
8042
|
+
props: {
|
|
8043
|
+
close: Function,
|
|
8044
|
+
},
|
|
7952
8045
|
data() { },
|
|
7953
8046
|
mounted() { },
|
|
7954
8047
|
methods: {
|
|
@@ -7956,9 +8049,6 @@ var script$9 = vue.defineComponent({
|
|
|
7956
8049
|
window.close();
|
|
7957
8050
|
// quit
|
|
7958
8051
|
},
|
|
7959
|
-
close() {
|
|
7960
|
-
this.$emit('close');
|
|
7961
|
-
},
|
|
7962
8052
|
mainMenu() {
|
|
7963
8053
|
useMain().menuReturn();
|
|
7964
8054
|
this.close();
|
|
@@ -8022,7 +8112,7 @@ var script$a = vue.defineComponent({
|
|
|
8022
8112
|
VolumeControls: script$4,
|
|
8023
8113
|
},
|
|
8024
8114
|
props: {
|
|
8025
|
-
close:
|
|
8115
|
+
close: Function,
|
|
8026
8116
|
},
|
|
8027
8117
|
data() {
|
|
8028
8118
|
return {
|
|
@@ -8073,20 +8163,17 @@ var script$a = vue.defineComponent({
|
|
|
8073
8163
|
});
|
|
8074
8164
|
|
|
8075
8165
|
const _hoisted_1$9 = /*#__PURE__*/vue.createElementVNode("h3", { class: "title" }, "Skills", -1);
|
|
8076
|
-
const _hoisted_2$7 = {
|
|
8077
|
-
const _hoisted_3$4 = {
|
|
8166
|
+
const _hoisted_2$7 = {
|
|
8078
8167
|
key: 0,
|
|
8079
8168
|
class: "skills-container"
|
|
8080
8169
|
};
|
|
8081
|
-
const
|
|
8082
|
-
const
|
|
8083
|
-
const
|
|
8084
|
-
const
|
|
8085
|
-
const
|
|
8086
|
-
const
|
|
8087
|
-
|
|
8088
|
-
class: "flex flex-row skill-description-container"
|
|
8089
|
-
};
|
|
8170
|
+
const _hoisted_3$4 = ["onClick"];
|
|
8171
|
+
const _hoisted_4$3 = { class: "skill-title" };
|
|
8172
|
+
const _hoisted_5$3 = { class: "skill-xp-container" };
|
|
8173
|
+
const _hoisted_6$3 = { class: "skill-xp-text" };
|
|
8174
|
+
const _hoisted_7$2 = { class: "skill-level" };
|
|
8175
|
+
const _hoisted_8$1 = { key: 1 };
|
|
8176
|
+
const _hoisted_9$1 = { class: "flex flex-row skill-description-container" };
|
|
8090
8177
|
const _hoisted_10$1 = { class: "flex skill-left" };
|
|
8091
8178
|
const _hoisted_11$1 = { class: "flex skill-right" };
|
|
8092
8179
|
const _hoisted_12$1 = /*#__PURE__*/vue.createElementVNode("hr", { class: "hr-solid" }, null, -1);
|
|
@@ -8103,35 +8190,31 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8103
8190
|
_hoisted_1$9
|
|
8104
8191
|
]),
|
|
8105
8192
|
body: vue.withCtx(() => [
|
|
8106
|
-
|
|
8107
|
-
(
|
|
8108
|
-
|
|
8109
|
-
(vue.openBlock(
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
vue.createElementVNode("div",
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8193
|
+
(!_ctx.chosenSkill)
|
|
8194
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
|
|
8195
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.skillsToDisplay, (skill, key) => {
|
|
8196
|
+
return (vue.openBlock(), vue.createElementBlock("button", {
|
|
8197
|
+
onClick: () => _ctx.clickSkill(key),
|
|
8198
|
+
class: "skill-display",
|
|
8199
|
+
style: vue.normalizeStyle(_ctx.getSkillStyle(key)),
|
|
8200
|
+
key: key
|
|
8201
|
+
}, [
|
|
8202
|
+
vue.createElementVNode("h3", _hoisted_4$3, vue.toDisplayString(_ctx.getSkillName(key)), 1),
|
|
8203
|
+
vue.createElementVNode("div", _hoisted_5$3, [
|
|
8204
|
+
vue.createElementVNode("div", {
|
|
8205
|
+
class: "skill-xp-bar",
|
|
8206
|
+
style: vue.normalizeStyle(_ctx.xpBarWidth(skill.xp))
|
|
8207
|
+
}, null, 4),
|
|
8208
|
+
vue.createElementVNode("h3", _hoisted_6$3, vue.toDisplayString(skill.xp) + " / " + vue.toDisplayString(_ctx.xpPerLevel) + " XP", 1)
|
|
8209
|
+
]),
|
|
8210
|
+
vue.createElementVNode("h3", _hoisted_7$2, vue.toDisplayString(skill.level), 1)
|
|
8211
|
+
], 12, _hoisted_3$4))
|
|
8212
|
+
}), 128))
|
|
8213
|
+
]))
|
|
8214
|
+
: (typeof _ctx.chosenSkill === 'string')
|
|
8215
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, [
|
|
8216
|
+
vue.createElementVNode("div", _hoisted_9$1, [
|
|
8130
8217
|
vue.createElementVNode("div", _hoisted_10$1, [
|
|
8131
|
-
vue.createElementVNode("button", {
|
|
8132
|
-
class: "button",
|
|
8133
|
-
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeSkill && _ctx.closeSkill(...args)))
|
|
8134
|
-
}, "Back"),
|
|
8135
8218
|
vue.createElementVNode("div", {
|
|
8136
8219
|
class: "skill-display",
|
|
8137
8220
|
style: vue.normalizeStyle(_ctx.getSkillStyle(_ctx.chosenSkill))
|
|
@@ -8143,15 +8226,19 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8143
8226
|
vue.createElementVNode("h3", null, "Level: " + vue.toDisplayString(_ctx.skills[_ctx.chosenSkill].level), 1),
|
|
8144
8227
|
vue.createElementVNode("p", null, vue.toDisplayString(_ctx.skillConf[_ctx.chosenSkill].description), 1)
|
|
8145
8228
|
])
|
|
8146
|
-
])
|
|
8147
|
-
|
|
8148
|
-
|
|
8229
|
+
]),
|
|
8230
|
+
vue.createElementVNode("button", {
|
|
8231
|
+
class: "button",
|
|
8232
|
+
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeSkill && _ctx.closeSkill(...args)))
|
|
8233
|
+
}, vue.toDisplayString('<--'))
|
|
8234
|
+
]))
|
|
8235
|
+
: vue.createCommentVNode("", true)
|
|
8149
8236
|
]),
|
|
8150
8237
|
_: 1
|
|
8151
8238
|
}, 8, ["onClose"]))
|
|
8152
8239
|
}
|
|
8153
8240
|
|
|
8154
|
-
var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items:
|
|
8241
|
+
var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: stretch;\n}\n\n.skill-left {\n flex-direction: column;\n border: 1px dashed white;\n padding: 10px;\n justify-content: center;\n}\n\n.skill-right {\n border: 1px dashed white;\n flex-direction: column;\n align-items: baseline;\n flex-grow: 2;\n align-items: baseline;\n}\n\n.skill-xp-container {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--skills-xp-bar-height);\n width: calc(100% - var(--skills-xp-bar-height));\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.skill-xp-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n background-color: rgba(0, 0, 250, 0.5);\n}\n\n.skill-xp-text {\n z-index: 2;\n}\r\n";
|
|
8155
8242
|
styleInject(css_248z$b);
|
|
8156
8243
|
|
|
8157
8244
|
script$a.render = render$a;
|
|
@@ -8159,14 +8246,16 @@ script$a.render = render$a;
|
|
|
8159
8246
|
var script$b = vue.defineComponent({
|
|
8160
8247
|
setup() {
|
|
8161
8248
|
const store = useInventory();
|
|
8249
|
+
const dialogStore = useDialogStore();
|
|
8162
8250
|
const items = vue.computed(() => store.items);
|
|
8163
|
-
|
|
8251
|
+
const currentlyChoosing = vue.computed(() => dialogStore.currentDialog.choices);
|
|
8252
|
+
return { items, currentlyChoosing };
|
|
8164
8253
|
},
|
|
8165
8254
|
components: {
|
|
8166
8255
|
Modal: script$2,
|
|
8167
8256
|
},
|
|
8168
8257
|
props: {
|
|
8169
|
-
close:
|
|
8258
|
+
close: Function,
|
|
8170
8259
|
},
|
|
8171
8260
|
data() {
|
|
8172
8261
|
return {
|
|
@@ -8183,12 +8272,40 @@ var script$b = vue.defineComponent({
|
|
|
8183
8272
|
getItemName(item) {
|
|
8184
8273
|
return this.itemConf[item].name;
|
|
8185
8274
|
},
|
|
8275
|
+
getItemConf(item) {
|
|
8276
|
+
return this.itemConf[item];
|
|
8277
|
+
},
|
|
8186
8278
|
clickItem(item) {
|
|
8187
8279
|
this.chosenId = item;
|
|
8188
8280
|
},
|
|
8189
8281
|
closeItem() {
|
|
8190
8282
|
this.chosenId = false;
|
|
8191
8283
|
},
|
|
8284
|
+
useItem() {
|
|
8285
|
+
if (this.canUseChosenItem) {
|
|
8286
|
+
const onUse = this.chosenItemConf.onUse;
|
|
8287
|
+
this.close();
|
|
8288
|
+
if (onUse.action === 'jump') {
|
|
8289
|
+
useVM().runLabel(onUse.label);
|
|
8290
|
+
}
|
|
8291
|
+
else if (onUse.action === 'run_label') {
|
|
8292
|
+
useVM().runLabelFunction(onUse.label, true);
|
|
8293
|
+
}
|
|
8294
|
+
else {
|
|
8295
|
+
error(`Unknown action ${onUse.action}`);
|
|
8296
|
+
}
|
|
8297
|
+
}
|
|
8298
|
+
},
|
|
8299
|
+
canUseItem(item) {
|
|
8300
|
+
const conf = this.itemConf[item.id];
|
|
8301
|
+
if (conf &&
|
|
8302
|
+
conf.onUse &&
|
|
8303
|
+
!useInventory().isInteractionTagBlocked(conf.tag) &&
|
|
8304
|
+
!this.currentlyChoosing) {
|
|
8305
|
+
return true;
|
|
8306
|
+
}
|
|
8307
|
+
return false;
|
|
8308
|
+
},
|
|
8192
8309
|
},
|
|
8193
8310
|
computed: {
|
|
8194
8311
|
itemsToDisplay() {
|
|
@@ -8206,6 +8323,9 @@ var script$b = vue.defineComponent({
|
|
|
8206
8323
|
}
|
|
8207
8324
|
return null;
|
|
8208
8325
|
},
|
|
8326
|
+
canUseChosenItem() {
|
|
8327
|
+
return this.canUseItem(this.chosenItem);
|
|
8328
|
+
},
|
|
8209
8329
|
chosenItemConf() {
|
|
8210
8330
|
if (this.chosenId) {
|
|
8211
8331
|
return this.itemConf[this.chosenId];
|
|
@@ -8219,18 +8339,15 @@ var script$b = vue.defineComponent({
|
|
|
8219
8339
|
});
|
|
8220
8340
|
|
|
8221
8341
|
const _hoisted_1$a = /*#__PURE__*/vue.createElementVNode("h3", { class: "title" }, "Inventory", -1);
|
|
8222
|
-
const _hoisted_2$8 = {
|
|
8223
|
-
const _hoisted_3$5 = {
|
|
8342
|
+
const _hoisted_2$8 = {
|
|
8224
8343
|
key: 0,
|
|
8225
8344
|
class: "inventory-container"
|
|
8226
8345
|
};
|
|
8227
|
-
const
|
|
8228
|
-
const
|
|
8229
|
-
const
|
|
8230
|
-
const
|
|
8231
|
-
|
|
8232
|
-
class: "flex flex-row item-description-container"
|
|
8233
|
-
};
|
|
8346
|
+
const _hoisted_3$5 = ["onClick"];
|
|
8347
|
+
const _hoisted_4$4 = { class: "item-title" };
|
|
8348
|
+
const _hoisted_5$4 = { class: "item-amount" };
|
|
8349
|
+
const _hoisted_6$4 = { key: 1 };
|
|
8350
|
+
const _hoisted_7$3 = { class: "flex flex-row item-description-container" };
|
|
8234
8351
|
const _hoisted_8$2 = { class: "flex item-left" };
|
|
8235
8352
|
const _hoisted_9$2 = { class: "flex item-right" };
|
|
8236
8353
|
const _hoisted_10$2 = /*#__PURE__*/vue.createElementVNode("hr", { class: "hr-solid" }, null, -1);
|
|
@@ -8252,28 +8369,24 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8252
8369
|
_hoisted_1$a
|
|
8253
8370
|
]),
|
|
8254
8371
|
body: vue.withCtx(() => [
|
|
8255
|
-
|
|
8256
|
-
(
|
|
8257
|
-
|
|
8258
|
-
(vue.openBlock(
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8372
|
+
(!_ctx.chosenItem && Object.keys(_ctx.itemsToDisplay).length > 0)
|
|
8373
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [
|
|
8374
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.itemsToDisplay, (item) => {
|
|
8375
|
+
return (vue.openBlock(), vue.createElementBlock("button", {
|
|
8376
|
+
onClick: () => _ctx.clickItem(item.id),
|
|
8377
|
+
class: "item-display",
|
|
8378
|
+
style: vue.normalizeStyle(_ctx.getItemStyle(item.id)),
|
|
8379
|
+
key: item.id
|
|
8380
|
+
}, [
|
|
8381
|
+
vue.createElementVNode("h3", _hoisted_4$4, vue.toDisplayString(_ctx.getItemName(item.id)), 1),
|
|
8382
|
+
vue.createElementVNode("h3", _hoisted_5$4, vue.toDisplayString(item.amount), 1)
|
|
8383
|
+
], 12, _hoisted_3$5))
|
|
8384
|
+
}), 128))
|
|
8385
|
+
]))
|
|
8386
|
+
: (typeof _ctx.chosenId === 'string')
|
|
8387
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$4, [
|
|
8388
|
+
vue.createElementVNode("div", _hoisted_7$3, [
|
|
8272
8389
|
vue.createElementVNode("div", _hoisted_8$2, [
|
|
8273
|
-
vue.createElementVNode("button", {
|
|
8274
|
-
class: "button",
|
|
8275
|
-
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.closeItem && _ctx.closeItem(...args)))
|
|
8276
|
-
}, "Back"),
|
|
8277
8390
|
vue.createElementVNode("div", {
|
|
8278
8391
|
class: "item-display",
|
|
8279
8392
|
style: vue.normalizeStyle(_ctx.getItemStyle(_ctx.chosenId))
|
|
@@ -8283,17 +8396,25 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8283
8396
|
vue.createElementVNode("h2", null, vue.toDisplayString(_ctx.getItemName(_ctx.chosenId)), 1),
|
|
8284
8397
|
_hoisted_10$2,
|
|
8285
8398
|
vue.createElementVNode("h3", null, "Amount: " + vue.toDisplayString(_ctx.chosenItem.amount), 1),
|
|
8286
|
-
vue.createElementVNode("p", null, vue.toDisplayString(_ctx.chosenItemConf.description), 1)
|
|
8399
|
+
vue.createElementVNode("p", null, vue.toDisplayString(_ctx.chosenItemConf.description), 1),
|
|
8400
|
+
vue.createElementVNode("button", {
|
|
8401
|
+
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.useItem && _ctx.useItem(...args))),
|
|
8402
|
+
class: vue.normalizeClass(["button", _ctx.canUseChosenItem ? '' : 'disabled'])
|
|
8403
|
+
}, " Use ", 2)
|
|
8287
8404
|
])
|
|
8288
|
-
])
|
|
8289
|
-
|
|
8290
|
-
|
|
8405
|
+
]),
|
|
8406
|
+
vue.createElementVNode("button", {
|
|
8407
|
+
class: "button",
|
|
8408
|
+
onClick: _cache[1] || (_cache[1] = (...args) => (_ctx.closeItem && _ctx.closeItem(...args)))
|
|
8409
|
+
}, vue.toDisplayString('<--'))
|
|
8410
|
+
]))
|
|
8411
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$2, _hoisted_13$1))
|
|
8291
8412
|
]),
|
|
8292
8413
|
_: 1
|
|
8293
8414
|
}, 8, ["onClose"]))
|
|
8294
8415
|
}
|
|
8295
8416
|
|
|
8296
|
-
var css_248z$c = ".inventory-modal {\n width: 800px;\n min-height: 50%;\n}\n\n.inventory-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.item-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.item-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--inventory-text-color);\n background: var(--inventory-text-background);\n}\n\n.item-amount {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--inventory-amount-color);\n width: 40px;\n height: 40px;\n background-color: var(--inventory-amount-background);\n}\n\n.item-description-container {\n justify-content: space-between;\n align-items:
|
|
8417
|
+
var css_248z$c = ".inventory-modal {\n width: 800px;\n min-height: 50%;\n}\n\n.inventory-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.item-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.item-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--inventory-text-color);\n background: var(--inventory-text-background);\n}\n\n.item-amount {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--inventory-amount-color);\n width: 40px;\n height: 40px;\n background-color: var(--inventory-amount-background);\n}\n\n.item-description-container {\n justify-content: space-between;\n align-items: stretch;\n}\n\n.item-left {\n border: 1px dashed white;\n flex-direction: column;\n padding: 10px;\n justify-content: center;\n}\n\n.item-right {\n border: 1px dashed white;\n flex-direction: column;\n flex-grow: 2;\n align-items: baseline;\n padding: 10px;\n}\r\n";
|
|
8297
8418
|
styleInject(css_248z$c);
|
|
8298
8419
|
|
|
8299
8420
|
script$b.render = render$b;
|
|
@@ -8310,7 +8431,7 @@ var script$c = vue.defineComponent({
|
|
|
8310
8431
|
},
|
|
8311
8432
|
},
|
|
8312
8433
|
props: {
|
|
8313
|
-
close:
|
|
8434
|
+
close: Function,
|
|
8314
8435
|
},
|
|
8315
8436
|
methods: {
|
|
8316
8437
|
getQuestData(questId) {
|
|
@@ -8715,7 +8836,7 @@ var script$d = vue.defineComponent({
|
|
|
8715
8836
|
}
|
|
8716
8837
|
return {
|
|
8717
8838
|
title,
|
|
8718
|
-
text:
|
|
8839
|
+
text: dialogKey.text,
|
|
8719
8840
|
styleId: dialogKey.speaker,
|
|
8720
8841
|
choices: dialogKey.choices,
|
|
8721
8842
|
old: index < this.dialog.length - 1,
|
|
@@ -8767,26 +8888,26 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8767
8888
|
(_ctx.modal === 'skills')
|
|
8768
8889
|
? (vue.openBlock(), vue.createBlock(_component_Skills, {
|
|
8769
8890
|
key: 0,
|
|
8770
|
-
|
|
8771
|
-
}, null, 8, ["
|
|
8891
|
+
close: _ctx.closeModal
|
|
8892
|
+
}, null, 8, ["close"]))
|
|
8772
8893
|
: vue.createCommentVNode("", true),
|
|
8773
8894
|
(_ctx.modal === 'inventory')
|
|
8774
8895
|
? (vue.openBlock(), vue.createBlock(_component_Inventory, {
|
|
8775
8896
|
key: 1,
|
|
8776
|
-
|
|
8777
|
-
}, null, 8, ["
|
|
8897
|
+
close: _ctx.closeModal
|
|
8898
|
+
}, null, 8, ["close"]))
|
|
8778
8899
|
: vue.createCommentVNode("", true),
|
|
8779
8900
|
(_ctx.modal === 'quests')
|
|
8780
8901
|
? (vue.openBlock(), vue.createBlock(_component_Quests, {
|
|
8781
8902
|
key: 2,
|
|
8782
|
-
|
|
8783
|
-
}, null, 8, ["
|
|
8903
|
+
close: _ctx.closeModal
|
|
8904
|
+
}, null, 8, ["close"]))
|
|
8784
8905
|
: vue.createCommentVNode("", true),
|
|
8785
8906
|
(_ctx.modal === 'menu')
|
|
8786
8907
|
? (vue.openBlock(), vue.createBlock(_component_MainMenu, {
|
|
8787
8908
|
key: 3,
|
|
8788
|
-
|
|
8789
|
-
}, null, 8, ["
|
|
8909
|
+
close: _ctx.closeModal
|
|
8910
|
+
}, null, 8, ["close"]))
|
|
8790
8911
|
: vue.createCommentVNode("", true),
|
|
8791
8912
|
vue.createVNode(vue.Transition, { name: "fade" }, {
|
|
8792
8913
|
default: vue.withCtx(() => [
|
|
@@ -9160,8 +9281,7 @@ const ifFunction = async (cmd) => {
|
|
|
9160
9281
|
branch: newBranch,
|
|
9161
9282
|
currentIndex: 0,
|
|
9162
9283
|
};
|
|
9163
|
-
vmStore.addStack(newStack);
|
|
9164
|
-
return vmStore.runLine();
|
|
9284
|
+
return vmStore.addStack(newStack);
|
|
9165
9285
|
}
|
|
9166
9286
|
return vmStore.nextLine();
|
|
9167
9287
|
};
|
|
@@ -9386,8 +9506,7 @@ const addItemPlugin = new CommandPlugin('add_item', async (cmd) => {
|
|
|
9386
9506
|
amount,
|
|
9387
9507
|
});
|
|
9388
9508
|
return useVM().nextLine();
|
|
9389
|
-
}, generateParser('add_item'));
|
|
9390
|
-
|
|
9509
|
+
}, generateParser('add_item'));
|
|
9391
9510
|
// Write a CommandPlugin for removeing items to the inventory store
|
|
9392
9511
|
const removeItemPlugin = new CommandPlugin('remove_item', async (cmd) => {
|
|
9393
9512
|
const id = cmd.args[0];
|
|
@@ -9398,7 +9517,21 @@ const removeItemPlugin = new CommandPlugin('remove_item', async (cmd) => {
|
|
|
9398
9517
|
amount,
|
|
9399
9518
|
});
|
|
9400
9519
|
return useVM().nextLine();
|
|
9401
|
-
}, generateParser('remove_item'));
|
|
9520
|
+
}, generateParser('remove_item'));
|
|
9521
|
+
// Write a CommandPlugin for enabling an interactiongTag in the inventory store
|
|
9522
|
+
const enableInteractionPlugin = new CommandPlugin('enable_interaction', async (cmd) => {
|
|
9523
|
+
const tag = cmd.args[0];
|
|
9524
|
+
const inventory = useInventory();
|
|
9525
|
+
inventory.enableInteraction(tag);
|
|
9526
|
+
return useVM().nextLine();
|
|
9527
|
+
}, generateParser('enable_interaction'));
|
|
9528
|
+
// Write a CommandPlugin for disabling an interactiongTag in the inventory store
|
|
9529
|
+
const disableInteractionPlugin = new CommandPlugin('disable_interaction', async (cmd) => {
|
|
9530
|
+
const tag = cmd.args[0];
|
|
9531
|
+
const inventory = useInventory();
|
|
9532
|
+
inventory.disableInteraction(tag);
|
|
9533
|
+
return useVM().nextLine();
|
|
9534
|
+
}, generateParser('disable_interaction'));
|
|
9402
9535
|
|
|
9403
9536
|
// Write a CommandPlugin for starting a quest with the useQuests quests store
|
|
9404
9537
|
const startQuestPlugin = new CommandPlugin('start_quest', async (cmd) => {
|
|
@@ -9435,8 +9568,16 @@ const completeQuestPlugin = new CommandPlugin('complete_quest', async (cmd) => {
|
|
|
9435
9568
|
return useVM().nextLine();
|
|
9436
9569
|
}, generateParser('complete_quest'));
|
|
9437
9570
|
|
|
9571
|
+
// Write a CommandPlugin for running a label using the runLabelFunction of the useVM store
|
|
9572
|
+
const runLabelPlugin = new CommandPlugin('run_label', async (cmd) => {
|
|
9573
|
+
const label = cmd.args[0];
|
|
9574
|
+
if (!label) {
|
|
9575
|
+
error(`run_label command needs a label to argument run`);
|
|
9576
|
+
}
|
|
9577
|
+
await useVM().runLabelFunction(label);
|
|
9578
|
+
}, generateParser('run_label'));
|
|
9579
|
+
|
|
9438
9580
|
function registerBaseCommands(vm) {
|
|
9439
|
-
vm.addCommand(addItemPlugin);
|
|
9440
9581
|
vm.addCommand(addLevelPlugin);
|
|
9441
9582
|
vm.addCommand(addStatPlugin);
|
|
9442
9583
|
vm.addCommand(addXpPlugin);
|
|
@@ -9448,7 +9589,6 @@ function registerBaseCommands(vm) {
|
|
|
9448
9589
|
vm.addCommand(notifyPlugin);
|
|
9449
9590
|
vm.addCommand(pauseCommand);
|
|
9450
9591
|
vm.addCommand(playCommand);
|
|
9451
|
-
vm.addCommand(removeItemPlugin);
|
|
9452
9592
|
vm.addCommand(setButtonCommand);
|
|
9453
9593
|
vm.addCommand(setScreenCommand);
|
|
9454
9594
|
vm.addCommand(setStatCommand);
|
|
@@ -9457,11 +9597,19 @@ function registerBaseCommands(vm) {
|
|
|
9457
9597
|
vm.addCommand(talkCommand);
|
|
9458
9598
|
vm.addCommand(textCommandPlugin);
|
|
9459
9599
|
vm.addCommand(waitCommand);
|
|
9600
|
+
// functions and labels
|
|
9601
|
+
vm.addCommand(jumpCommand);
|
|
9602
|
+
vm.addCommand(runLabelPlugin);
|
|
9460
9603
|
// Quests
|
|
9461
9604
|
vm.addCommand(startQuestPlugin);
|
|
9462
9605
|
vm.addCommand(startObjectivePlugin);
|
|
9463
9606
|
vm.addCommand(completeObjectivePlugin);
|
|
9464
9607
|
vm.addCommand(completeQuestPlugin);
|
|
9608
|
+
// Inventory
|
|
9609
|
+
vm.addCommand(addItemPlugin);
|
|
9610
|
+
vm.addCommand(removeItemPlugin);
|
|
9611
|
+
vm.addCommand(enableInteractionPlugin);
|
|
9612
|
+
vm.addCommand(disableInteractionPlugin);
|
|
9465
9613
|
}
|
|
9466
9614
|
|
|
9467
9615
|
class NarratPlugin {
|
|
@@ -9504,7 +9652,7 @@ async function startApp(config, options) {
|
|
|
9504
9652
|
});
|
|
9505
9653
|
registerBaseCommands(vm);
|
|
9506
9654
|
logManager.setupDebugger(options.debug);
|
|
9507
|
-
console.log('%c Narrat game engine – 1.
|
|
9655
|
+
console.log('%c Narrat game engine – 1.3.1 - June 25, 2022 22:52:46', 'background: #222; color: #bada55');
|
|
9508
9656
|
vm.callHook('onNarratSetup');
|
|
9509
9657
|
app.mount('#game-holder');
|
|
9510
9658
|
if (options.debug) {
|