narrat 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.vue.d.ts +1 -0
- package/dist/components/menu-buttons.vue.d.ts +11 -0
- package/dist/config.d.ts +7 -1
- package/dist/data/config.json +7 -1
- package/dist/data/example.rpy +8 -4
- package/dist/data/refactor.rpy +1 -1
- package/dist/dialog-box.vue.d.ts +2 -0
- package/dist/lib.css +1 -1
- package/dist/narrat.es.js +164 -67
- package/dist/narrat.umd.js +73 -73
- package/dist/stores/dialog-store.d.ts +1 -0
- package/dist/stores/main-store.d.ts +2 -1
- package/dist/stores/vm-store.d.ts +1 -0
- package/dist/types/dialog-box-types.d.ts +1 -0
- package/dist/vm/commands/command-plugin.d.ts +1 -1
- package/dist/vm/commands/text-field.d.ts +7 -0
- package/dist/vm/vm.d.ts +1 -1
- package/package.json +1 -1
package/dist/narrat.es.js
CHANGED
|
@@ -537,7 +537,7 @@ var es6Promise = { exports: {} };
|
|
|
537
537
|
});
|
|
538
538
|
})(es6Promise);
|
|
539
539
|
es6Promise.exports.polyfill();
|
|
540
|
-
var main = /* @__PURE__ */ (() => '/*! @import *//*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com */*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;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"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.w-full{width:100%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.table-auto{table-layout:auto}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.gap-4{gap:1rem}.border{border-width:1px}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.italic{font-style:italic}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.line-through{-webkit-text-decoration-line:line-through;text-decoration-line:line-through}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--font-family: "Helvetica", sans-serif, "Arial", "sans-serif";--bg-color: #131720;--text-color: #d9e1f2;--primary: hsl(255, 30%, 55%);--focus: hsl(210, 90%, 50%);--secondary: #42b983;--border-color: hsla(0, 0%, 100%, .2);--light-1: hsl(210, 30%, 40%);--light-2: hsl(255, 30%, 50%);--light-background: linear-gradient(to right, var(--light-1), var(--light-2));--shadow-1: hsla(236, 50%, 50%, .3);--shadow-2: hsla(236, 50%, 50%, .4);--hud-background: rgba(0, 0, 0, .4);--hud-text-color: var(--text-color);--notifications-bg: darkslateblue;--skills-text-background: rgba(0, 0, 0, .5);--skills-text-color: var(--text-color);--skills-level-background: rgba(0, 0, 0, .5);--skills-level-color: orange;--skills-xp-bar-height: 40px;--skill-check-name-color: orange;--skill-check-difficulty: orange;--skill-check-success: green;--skill-check-failed: red;--skill-check-color: orange;--dialog-choice-color: orange;--dialog-choice-hover-color: var(--text-color);--inventory-text-background: rgba(0, 0, 0, .5);--inventory-text-color: var(--text-color);--inventory-amount-background: rgba(0, 0, 0, .5);--inventory-amount-color: orange;--quest-title-color: yellow;--completed-quest-title-color: grey;--objective-in-progress-color: white;--objective-completed-color: grey}body{font-family:var(--font-family)}*{font-family:var(--font-family);text-shadow:1px 1px #000a}.list-item{display:inline-block;margin-right:10px}.list-enter-active,.list-leave-active{transition:all .3s ease}#app{background-size:cover}.list-enter-from,.list-leave-to{opacity:0;transform:translate(300px)}.notification-item{display:inline-block;margin-right:10px}.notification-enter-active,.notification-leave-active{transition:all .3s ease}.notification-enter-from,.notification-leave-to{opacity:0;transform:translateY(-300px)}.fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-in-enter-active{transition:opacity .1s ease}.fade-in-enter-from{opacity:0}body{padding:0;margin:0;font-family:Arial,sans-serif;background-color:#000}.select{background:var(--light-background);padding:10px}.option{background-color:var(--light-2);padding:5px;color:var(--text-color)}.button{background:var(--light-background);color:var(--text-color);box-shadow:.4rem .5rem 2.4rem .2rem var(--shadow-1),inset -2px -4px #0006,inset 2px 2px #fff7;border-radius:10px;padding:10px;font-weight:800;font-size:16px;margin:10px;transition:.2s;box-shadow:inset -2px -4px #0006,inset 2px 2px #fff7}.button.large{border-radius:20px}.menu-button{border-radius:5px}.button.main-menu-button{border-radius:20px}.button:focus,.button:hover{transform:translateY(-.2rem);box-shadow:0 0 1rem .2rem var(--shadow-2),inset -2px -4px #0006,inset 2px 2px #fff7}.disabled{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.button.disabled{box-shadow:unset;color:gray;background:var(--border-color)}.input{background:var(--light-background);color:var(--text-color);box-shadow:.4rem .4rem 2.4rem .2rem var(--shadow-1);border-radius:100px;padding:10px;font-weight:800;font-size:16px;margin:10px;transition:.2s}.input:focus,.input:hover{transform:translateY(-.2rem);box-shadow:0 0 2.4rem .2rem var(--shadow-2)}a{color:pink;text-decoration:underline}th,td{padding:4px;border:1px solid var(--text-color);text-align:center}#game-holder{width:100vw;height:100vh;padding:0;margin:0;top:0;left:0;background-color:#000;display:flex;align-items:center;justify-content:center;min-height:-webkit-fill-available}.title{font-size:30px;font-weight:700;text-align:center}.container{padding:20px}h1,h2,h3,h4{font-weight:700}h1{font-size:30px}h2{font-size:26px}h3{font-size:24px}hr.solid{border:1px solid var(--text-color);margin-top:30px;margin-bottom:30px}.card-1{box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d;transition:all .3s cubic-bezier(.25,.8,.25,1)}.card-1:hover{box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.card-2{box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b}.card-3{box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b}.card-4{box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.card-5{box-shadow:0 19px 38px #0000004d,0 15px 12px #00000038}.dialog-choice{transition:.2s}.dialog-choice:hover{transform:scale(1.05);transform-origin:center}.dialog-choice:not(:hover)>.skill-check-name,.passive-skill-check>.skill-check-name{color:var(--skill-check-name-color)}.dialog-choice:not(:hover)>.skill-check-difficulty,.passive-skill-check>.skill-check-difficulty{color:var(--skill-check-difficulty)}.skill-check-difficulty{font-weight:700}.dialog-choice:not(:hover)>.skill-check-success,.passive-skill-check>.skill-check-success{color:var(--skill-check-success)}.dialog-choice:not(:hover)>.skill-check-failed,.passive-skill-check>.skill-check-failed{color:var(--skill-check-failed)}.dialog-choice:not(:hover)>.skill-check,.passive-skill-check.skill-check{color:var(--skill-check-color)}.narrat-canvas{position:absolute;height:100%;top:0;left:0}#touchTrigger{pointer-events:none}\n')();
|
|
540
|
+
var main = /* @__PURE__ */ (() => '/*! @import *//*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com */*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;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"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.w-full{width:100%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.table-auto{table-layout:auto}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.list-disc{list-style-type:disc}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.gap-4{gap:1rem}.border{border-width:1px}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.italic{font-style:italic}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.line-through{-webkit-text-decoration-line:line-through;text-decoration-line:line-through}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--font-family: "Helvetica", sans-serif, "Arial", "sans-serif";--bg-color: #131720;--text-color: #d9e1f2;--primary: hsl(255, 30%, 55%);--focus: hsl(210, 90%, 50%);--secondary: #42b983;--border-color: hsla(0, 0%, 100%, .2);--light-1: hsl(210, 30%, 40%);--light-2: hsl(255, 30%, 50%);--light-background: linear-gradient(to right, var(--light-1), var(--light-2));--shadow-1: hsla(236, 50%, 50%, .3);--shadow-2: hsla(236, 50%, 50%, .4);--hud-background: rgba(0, 0, 0, .4);--hud-text-color: var(--text-color);--notifications-bg: darkslateblue;--skills-text-background: rgba(0, 0, 0, .5);--skills-text-color: var(--text-color);--skills-level-background: rgba(0, 0, 0, .5);--skills-level-color: orange;--skills-xp-bar-height: 40px;--skill-check-name-color: orange;--skill-check-difficulty: orange;--skill-check-success: green;--skill-check-failed: red;--skill-check-color: orange;--dialog-choice-color: orange;--dialog-choice-hover-color: var(--text-color);--inventory-text-background: rgba(0, 0, 0, .5);--inventory-text-color: var(--text-color);--inventory-amount-background: rgba(0, 0, 0, .5);--inventory-amount-color: orange;--quest-title-color: yellow;--completed-quest-title-color: grey;--objective-in-progress-color: white;--objective-completed-color: grey}body,*{font-family:var(--font-family)}.list-item{display:inline-block;margin-right:10px}.list-enter-active,.list-leave-active{transition:all .3s ease}#app{background-size:cover}.list-enter-from,.list-leave-to{opacity:0;transform:translate(300px)}.notification-item{display:inline-block;margin-right:10px}.notification-enter-active,.notification-leave-active{transition:all .3s ease}.notification-enter-from,.notification-leave-to{opacity:0;transform:translateY(-300px)}.fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-in-enter-active{transition:opacity .1s ease}.fade-in-enter-from{opacity:0}body{padding:0;margin:0;font-family:Arial,sans-serif;background-color:#000}.select{background:var(--light-background);padding:10px}.option{background-color:var(--light-2);padding:5px;color:var(--text-color)}.button{background:var(--light-background);color:var(--text-color);box-shadow:.4rem .5rem 2.4rem .2rem var(--shadow-1),inset -2px -4px #0006,inset 2px 2px #fff7;border-radius:10px;padding:10px;font-weight:800;font-size:16px;margin:10px;transition:.2s;box-shadow:inset -2px -4px #0006,inset 2px 2px #fff7}.button.large{border-radius:20px}.menu-button{border-radius:5px}.button.main-menu-button{border-radius:20px}.button:focus,.button:hover{transform:translateY(-.2rem);box-shadow:0 0 1rem .2rem var(--shadow-2),inset -2px -4px #0006,inset 2px 2px #fff7}.disabled{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.button.disabled{box-shadow:unset;color:gray;background:var(--border-color)}.input{background:var(--light-background);color:var(--text-color);box-shadow:.4rem .4rem 2.4rem .2rem var(--shadow-1);border-radius:100px;padding:10px;font-weight:800;font-size:16px;margin:10px;transition:.2s}.input:focus,.input:hover{transform:translateY(-.2rem);box-shadow:0 0 2.4rem .2rem var(--shadow-2)}a{color:pink;text-decoration:underline}th,td{padding:4px;border:1px solid var(--text-color);text-align:center}#game-holder{width:100vw;height:100vh;padding:0;margin:0;top:0;left:0;background-color:#000;display:flex;align-items:center;justify-content:center;min-height:-webkit-fill-available}.title{font-size:30px;font-weight:700;text-align:center}.container{padding:20px}h1,h2,h3,h4{font-weight:700}h1{font-size:30px}h2{font-size:26px}h3{font-size:24px}hr.solid{border:1px solid var(--text-color);margin-top:30px;margin-bottom:30px}.card-1{box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d;transition:all .3s cubic-bezier(.25,.8,.25,1)}.card-1:hover{box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.card-2{box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b}.card-3{box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b}.card-4{box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.card-5{box-shadow:0 19px 38px #0000004d,0 15px 12px #00000038}.dialog-choice{transition:.2s}.dialog-choice:hover{transform:scale(1.05);transform-origin:center}.dialog-choice:not(:hover)>.skill-check-name,.passive-skill-check>.skill-check-name{color:var(--skill-check-name-color)}.dialog-choice:not(:hover)>.skill-check-difficulty,.passive-skill-check>.skill-check-difficulty{color:var(--skill-check-difficulty)}.skill-check-difficulty{font-weight:700}.dialog-choice:not(:hover)>.skill-check-success,.passive-skill-check>.skill-check-success{color:var(--skill-check-success)}.dialog-choice:not(:hover)>.skill-check-failed,.passive-skill-check>.skill-check-failed{color:var(--skill-check-failed)}.dialog-choice:not(:hover)>.skill-check,.passive-skill-check.skill-check{color:var(--skill-check-color)}.narrat-canvas{position:absolute;height:100%;top:0;left:0}#touchTrigger{pointer-events:none}\n')();
|
|
541
541
|
const f$1 = ref([]), v$1 = ref(null), m$1 = ref(null), g$1 = ref(null), h$1 = reactive({ current: "" }), y$1 = [], b$1 = ref(false), k$1 = readonly(f$1), w$1 = readonly(v$1), M$1 = readonly(m$1), q$1 = readonly(g$1), x$1 = readonly(h$1), $$1 = (e20 = w$1.value) => {
|
|
542
542
|
h$1.current = e20;
|
|
543
543
|
const t2 = k$1.value.findIndex((t3) => t3.name === e20), n2 = k$1.value.map((e21) => e21.name);
|
|
@@ -687,7 +687,7 @@ const _sfc_main$e = defineComponent({
|
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
689
|
const _hoisted_1$d = { class: "modal-header" };
|
|
690
|
-
const _hoisted_2$
|
|
690
|
+
const _hoisted_2$b = /* @__PURE__ */ createTextVNode(" default header ");
|
|
691
691
|
const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("hr", { class: "solid" }, null, -1);
|
|
692
692
|
const _hoisted_4$6 = { class: "modal-body" };
|
|
693
693
|
const _hoisted_5$6 = /* @__PURE__ */ createTextVNode(" default body ");
|
|
@@ -709,7 +709,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
709
709
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
710
710
|
}, "X"),
|
|
711
711
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
712
|
-
_hoisted_2$
|
|
712
|
+
_hoisted_2$b
|
|
713
713
|
]),
|
|
714
714
|
_hoisted_3$7
|
|
715
715
|
]),
|
|
@@ -34359,7 +34359,8 @@ const defaultConfig = {
|
|
|
34359
34359
|
}
|
|
34360
34360
|
},
|
|
34361
34361
|
quests: {},
|
|
34362
|
-
audioTriggers: {}
|
|
34362
|
+
audioTriggers: {},
|
|
34363
|
+
menuButtons: {}
|
|
34363
34364
|
};
|
|
34364
34365
|
let config$1;
|
|
34365
34366
|
function setConfig(conf) {
|
|
@@ -37819,6 +37820,9 @@ const useVM = defineStore("vm", {
|
|
|
37819
37820
|
this.addStack(stack);
|
|
37820
37821
|
});
|
|
37821
37822
|
},
|
|
37823
|
+
runCustomStack(stack) {
|
|
37824
|
+
this.addStack(stack);
|
|
37825
|
+
},
|
|
37822
37826
|
runLabel(label, ...args) {
|
|
37823
37827
|
const branchData = this.script[label];
|
|
37824
37828
|
if (!branchData) {
|
|
@@ -38130,7 +38134,7 @@ async function runExpression(expr, choices) {
|
|
|
38130
38134
|
throw new Error(`${command.commandType} is not a valid command`);
|
|
38131
38135
|
}
|
|
38132
38136
|
}
|
|
38133
|
-
async function playerAnswered(
|
|
38137
|
+
async function playerAnswered(choice) {
|
|
38134
38138
|
audioEvent("onPlayerAnswered");
|
|
38135
38139
|
const vmStore = useVM();
|
|
38136
38140
|
const command = vmStore.lastChoiceCommand;
|
|
@@ -38140,7 +38144,7 @@ async function playerAnswered(choiceIndex) {
|
|
|
38140
38144
|
if (command) {
|
|
38141
38145
|
const commandPlugin = vm.commands[command.commandType];
|
|
38142
38146
|
if (commandPlugin && commandPlugin.onPlayerAnswered) {
|
|
38143
|
-
return await commandPlugin.onPlayerAnswered(command,
|
|
38147
|
+
return await commandPlugin.onPlayerAnswered(command, choice);
|
|
38144
38148
|
}
|
|
38145
38149
|
}
|
|
38146
38150
|
return await vmStore.nextLine();
|
|
@@ -38198,8 +38202,6 @@ const useMain = defineStore("main", {
|
|
|
38198
38202
|
changeMusic(config2.audioOptions.defaultMusic);
|
|
38199
38203
|
}
|
|
38200
38204
|
await useVM().loadScripts(scriptPaths);
|
|
38201
|
-
const audioStore = useAudio();
|
|
38202
|
-
audioStore.stopMusic();
|
|
38203
38205
|
const screens = useScreens();
|
|
38204
38206
|
screens.setButtons(config2.buttons);
|
|
38205
38207
|
const skillsStore = useSkills();
|
|
@@ -38212,6 +38214,8 @@ const useMain = defineStore("main", {
|
|
|
38212
38214
|
questsStore.setupQuests(config2.quests);
|
|
38213
38215
|
},
|
|
38214
38216
|
startMachine() {
|
|
38217
|
+
const audioStore = useAudio();
|
|
38218
|
+
audioStore.stopMusic();
|
|
38215
38219
|
const vmStore = useVM();
|
|
38216
38220
|
vmStore.start();
|
|
38217
38221
|
this.ready = true;
|
|
@@ -38236,8 +38240,8 @@ const useMain = defineStore("main", {
|
|
|
38236
38240
|
vm2.runLabel(save.vm.lastLabel);
|
|
38237
38241
|
}
|
|
38238
38242
|
},
|
|
38239
|
-
playerAnswered(
|
|
38240
|
-
playerAnswered(
|
|
38243
|
+
playerAnswered(choice) {
|
|
38244
|
+
playerAnswered(choice);
|
|
38241
38245
|
},
|
|
38242
38246
|
menuReturn() {
|
|
38243
38247
|
this.reset();
|
|
@@ -38691,7 +38695,7 @@ const _sfc_main$d = defineComponent({
|
|
|
38691
38695
|
}
|
|
38692
38696
|
});
|
|
38693
38697
|
const _hoisted_1$c = { class: "debug-menu" };
|
|
38694
|
-
const _hoisted_2$
|
|
38698
|
+
const _hoisted_2$a = {
|
|
38695
38699
|
key: 0,
|
|
38696
38700
|
class: "debug-info"
|
|
38697
38701
|
};
|
|
@@ -38719,7 +38723,7 @@ const _hoisted_7$5 = {
|
|
|
38719
38723
|
key: 0,
|
|
38720
38724
|
class: "search-results"
|
|
38721
38725
|
};
|
|
38722
|
-
const _hoisted_8$
|
|
38726
|
+
const _hoisted_8$4 = { key: 1 };
|
|
38723
38727
|
const _hoisted_9$2 = /* @__PURE__ */ createElementVNode("h3", null, "No matches found", -1);
|
|
38724
38728
|
const _hoisted_10$2 = [
|
|
38725
38729
|
_hoisted_9$2
|
|
@@ -38758,7 +38762,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38758
38762
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.open && _ctx.open(...args)),
|
|
38759
38763
|
class: "button debug-button"
|
|
38760
38764
|
}, "Debug Menu"),
|
|
38761
|
-
!_ctx.playing && _ctx.flowState === "menu" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
38765
|
+
!_ctx.playing && _ctx.flowState === "menu" ? (openBlock(), createElementBlock("div", _hoisted_2$a, _hoisted_5$5)) : createCommentVNode("", true),
|
|
38762
38766
|
_ctx.jumping ? (openBlock(), createBlock(_component_modal, {
|
|
38763
38767
|
key: 1,
|
|
38764
38768
|
onClose: _ctx.finishJumping,
|
|
@@ -38785,7 +38789,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38785
38789
|
key: index
|
|
38786
38790
|
}, toDisplayString(match), 5);
|
|
38787
38791
|
}), 128))
|
|
38788
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_8$
|
|
38792
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_8$4, _hoisted_10$2))
|
|
38789
38793
|
]),
|
|
38790
38794
|
_: 1
|
|
38791
38795
|
}, 8, ["onClose"])) : createCommentVNode("", true),
|
|
@@ -38900,13 +38904,13 @@ const _sfc_main$c = defineComponent({
|
|
|
38900
38904
|
}
|
|
38901
38905
|
});
|
|
38902
38906
|
const _hoisted_1$b = { class: "volume-controls" };
|
|
38903
|
-
const _hoisted_2$
|
|
38907
|
+
const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("label", {
|
|
38904
38908
|
for: "volume",
|
|
38905
38909
|
class: "volume-label"
|
|
38906
38910
|
}, "Volume", -1);
|
|
38907
38911
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
38908
38912
|
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
38909
|
-
_hoisted_2$
|
|
38913
|
+
_hoisted_2$9,
|
|
38910
38914
|
createElementVNode("input", {
|
|
38911
38915
|
ref: "slider",
|
|
38912
38916
|
class: "volume-slider",
|
|
@@ -38952,7 +38956,7 @@ const _sfc_main$b = defineComponent({
|
|
|
38952
38956
|
}
|
|
38953
38957
|
});
|
|
38954
38958
|
const _hoisted_1$a = ["src"];
|
|
38955
|
-
const _hoisted_2$
|
|
38959
|
+
const _hoisted_2$8 = { class: "bold hud-text" };
|
|
38956
38960
|
const _hoisted_3$5 = /* @__PURE__ */ createTextVNode(": ");
|
|
38957
38961
|
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
38958
38962
|
return openBlock(), createElementBlock("div", {
|
|
@@ -38968,7 +38972,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38968
38972
|
class: "hud-icon",
|
|
38969
38973
|
src: _ctx.statsConfig[key].icon
|
|
38970
38974
|
}, null, 8, _hoisted_1$a),
|
|
38971
|
-
createElementVNode("span", _hoisted_2$
|
|
38975
|
+
createElementVNode("span", _hoisted_2$8, toDisplayString(_ctx.statsConfig[key].name), 1),
|
|
38972
38976
|
_hoisted_3$5,
|
|
38973
38977
|
createElementVNode("span", null, toDisplayString(Math.floor(stat.value * 100) / 100), 1)
|
|
38974
38978
|
]);
|
|
@@ -38994,14 +38998,14 @@ const _sfc_main$a = defineComponent({
|
|
|
38994
38998
|
computed: {}
|
|
38995
38999
|
});
|
|
38996
39000
|
const _hoisted_1$9 = { id: "loading-bar" };
|
|
38997
|
-
const _hoisted_2$
|
|
39001
|
+
const _hoisted_2$7 = { id: "loading-text" };
|
|
38998
39002
|
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
38999
39003
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
39000
39004
|
createElementVNode("div", {
|
|
39001
39005
|
id: "inner-loading-bar",
|
|
39002
39006
|
style: normalizeStyle(_ctx.loadingStyle())
|
|
39003
39007
|
}, null, 4),
|
|
39004
|
-
createElementVNode("div", _hoisted_2$
|
|
39008
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
39005
39009
|
createElementVNode("h3", null, "Loading " + toDisplayString(Math.floor(_ctx.percentage * 100)) + "% - " + toDisplayString(_ctx.step), 1)
|
|
39006
39010
|
])
|
|
39007
39011
|
]);
|
|
@@ -39194,7 +39198,7 @@ const _sfc_main$8 = defineComponent({
|
|
|
39194
39198
|
}
|
|
39195
39199
|
});
|
|
39196
39200
|
const _hoisted_1$8 = /* @__PURE__ */ createElementVNode("h3", { class: "title" }, "Menu", -1);
|
|
39197
|
-
const _hoisted_2$
|
|
39201
|
+
const _hoisted_2$6 = { class: "menu-content" };
|
|
39198
39202
|
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
39199
39203
|
const _component_VolumeControls = resolveComponent("VolumeControls");
|
|
39200
39204
|
const _component_modal = resolveComponent("modal");
|
|
@@ -39207,7 +39211,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39207
39211
|
_hoisted_1$8
|
|
39208
39212
|
]),
|
|
39209
39213
|
body: withCtx(() => [
|
|
39210
|
-
createElementVNode("div", _hoisted_2$
|
|
39214
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
39211
39215
|
createElementVNode("h3", null, "Play time: " + toDisplayString(_ctx.getPlayTimeString()), 1),
|
|
39212
39216
|
createVNode(_component_VolumeControls),
|
|
39213
39217
|
createElementVNode("button", {
|
|
@@ -39283,7 +39287,7 @@ const _sfc_main$7 = defineComponent({
|
|
|
39283
39287
|
}
|
|
39284
39288
|
});
|
|
39285
39289
|
const _hoisted_1$7 = /* @__PURE__ */ createElementVNode("h3", { class: "title" }, "Skills", -1);
|
|
39286
|
-
const _hoisted_2$
|
|
39290
|
+
const _hoisted_2$5 = {
|
|
39287
39291
|
key: 0,
|
|
39288
39292
|
class: "skills-container"
|
|
39289
39293
|
};
|
|
@@ -39292,7 +39296,7 @@ const _hoisted_4$4 = { class: "skill-title" };
|
|
|
39292
39296
|
const _hoisted_5$4 = { class: "skill-xp-container" };
|
|
39293
39297
|
const _hoisted_6$4 = { class: "skill-xp-text" };
|
|
39294
39298
|
const _hoisted_7$4 = { class: "skill-level" };
|
|
39295
|
-
const _hoisted_8$
|
|
39299
|
+
const _hoisted_8$3 = { key: 1 };
|
|
39296
39300
|
const _hoisted_9$1 = { class: "flex flex-row skill-description-container" };
|
|
39297
39301
|
const _hoisted_10$1 = { class: "flex skill-left" };
|
|
39298
39302
|
const _hoisted_11$1 = { class: "flex skill-right" };
|
|
@@ -39308,7 +39312,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39308
39312
|
_hoisted_1$7
|
|
39309
39313
|
]),
|
|
39310
39314
|
body: withCtx(() => [
|
|
39311
|
-
!_ctx.chosenSkill ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
39315
|
+
!_ctx.chosenSkill ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
39312
39316
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.skillsToDisplay, (skill) => {
|
|
39313
39317
|
return openBlock(), createElementBlock("button", {
|
|
39314
39318
|
onClick: () => _ctx.clickSkill(skill.id),
|
|
@@ -39327,7 +39331,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39327
39331
|
createElementVNode("h3", _hoisted_7$4, toDisplayString(skill.level), 1)
|
|
39328
39332
|
], 12, _hoisted_3$4);
|
|
39329
39333
|
}), 128))
|
|
39330
|
-
])) : typeof _ctx.chosenSkill === "string" ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
39334
|
+
])) : typeof _ctx.chosenSkill === "string" ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
|
|
39331
39335
|
createElementVNode("div", _hoisted_9$1, [
|
|
39332
39336
|
createElementVNode("div", _hoisted_10$1, [
|
|
39333
39337
|
createElementVNode("div", {
|
|
@@ -39398,7 +39402,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
39398
39402
|
this.close();
|
|
39399
39403
|
if (onUse.action === "jump") {
|
|
39400
39404
|
useVM().runLabel(onUse.label);
|
|
39401
|
-
} else if (onUse.action === "
|
|
39405
|
+
} else if (onUse.action === "run") {
|
|
39402
39406
|
useVM().runLabelFunction(onUse.label, true);
|
|
39403
39407
|
} else {
|
|
39404
39408
|
error(`Unknown action ${onUse.action}`);
|
|
@@ -39444,7 +39448,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
39444
39448
|
}
|
|
39445
39449
|
});
|
|
39446
39450
|
const _hoisted_1$6 = /* @__PURE__ */ createElementVNode("h3", { class: "title" }, "Inventory", -1);
|
|
39447
|
-
const _hoisted_2$
|
|
39451
|
+
const _hoisted_2$4 = {
|
|
39448
39452
|
key: 0,
|
|
39449
39453
|
class: "inventory-container"
|
|
39450
39454
|
};
|
|
@@ -39453,7 +39457,7 @@ const _hoisted_4$3 = { class: "item-title" };
|
|
|
39453
39457
|
const _hoisted_5$3 = { class: "item-amount" };
|
|
39454
39458
|
const _hoisted_6$3 = { key: 1 };
|
|
39455
39459
|
const _hoisted_7$3 = { class: "flex flex-row item-description-container" };
|
|
39456
|
-
const _hoisted_8$
|
|
39460
|
+
const _hoisted_8$2 = { class: "flex item-left" };
|
|
39457
39461
|
const _hoisted_9 = { class: "flex item-right" };
|
|
39458
39462
|
const _hoisted_10 = /* @__PURE__ */ createElementVNode("hr", { class: "hr-solid" }, null, -1);
|
|
39459
39463
|
const _hoisted_11 = { key: 2 };
|
|
@@ -39472,7 +39476,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39472
39476
|
_hoisted_1$6
|
|
39473
39477
|
]),
|
|
39474
39478
|
body: withCtx(() => [
|
|
39475
|
-
!_ctx.chosenItem && Object.keys(_ctx.itemsToDisplay).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
39479
|
+
!_ctx.chosenItem && Object.keys(_ctx.itemsToDisplay).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
|
|
39476
39480
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.itemsToDisplay, (item) => {
|
|
39477
39481
|
return openBlock(), createElementBlock("button", {
|
|
39478
39482
|
onClick: () => _ctx.clickItem(item.id),
|
|
@@ -39486,7 +39490,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39486
39490
|
}), 128))
|
|
39487
39491
|
])) : typeof _ctx.chosenId === "string" ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
|
|
39488
39492
|
createElementVNode("div", _hoisted_7$3, [
|
|
39489
|
-
createElementVNode("div", _hoisted_8$
|
|
39493
|
+
createElementVNode("div", _hoisted_8$2, [
|
|
39490
39494
|
createElementVNode("div", {
|
|
39491
39495
|
class: "item-display",
|
|
39492
39496
|
style: normalizeStyle(_ctx.getItemStyle(_ctx.chosenId))
|
|
@@ -39557,6 +39561,7 @@ var dialogBox_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".dialog-
|
|
|
39557
39561
|
const _sfc_main$4 = defineComponent({
|
|
39558
39562
|
data() {
|
|
39559
39563
|
return {
|
|
39564
|
+
playerText: "",
|
|
39560
39565
|
passed: false
|
|
39561
39566
|
};
|
|
39562
39567
|
},
|
|
@@ -39569,7 +39574,12 @@ const _sfc_main$4 = defineComponent({
|
|
|
39569
39574
|
},
|
|
39570
39575
|
mounted() {
|
|
39571
39576
|
document.addEventListener("keydown", (e20) => {
|
|
39572
|
-
if (this.canInteract) {
|
|
39577
|
+
if (this.canInteract && this.options.textField) {
|
|
39578
|
+
if (e20.key === "Enter") {
|
|
39579
|
+
this.submitText();
|
|
39580
|
+
}
|
|
39581
|
+
}
|
|
39582
|
+
if (this.canInteract && !this.options.textField) {
|
|
39573
39583
|
let choice = -1;
|
|
39574
39584
|
if (e20.key === " ") {
|
|
39575
39585
|
if (this.choices) {
|
|
@@ -39613,6 +39623,11 @@ const _sfc_main$4 = defineComponent({
|
|
|
39613
39623
|
}
|
|
39614
39624
|
}
|
|
39615
39625
|
});
|
|
39626
|
+
setTimeout(() => {
|
|
39627
|
+
if (this.options.textField) {
|
|
39628
|
+
this.$refs.playerInput.focus();
|
|
39629
|
+
}
|
|
39630
|
+
}, 10);
|
|
39616
39631
|
},
|
|
39617
39632
|
computed: {
|
|
39618
39633
|
...mapState(useMain, ["paused"]),
|
|
@@ -39678,11 +39693,15 @@ const _sfc_main$4 = defineComponent({
|
|
|
39678
39693
|
if (!choice.allowed) {
|
|
39679
39694
|
return "strike-anim";
|
|
39680
39695
|
}
|
|
39696
|
+
},
|
|
39697
|
+
submitText() {
|
|
39698
|
+
const text = this.playerText;
|
|
39699
|
+
useMain().playerAnswered(text);
|
|
39681
39700
|
}
|
|
39682
39701
|
}
|
|
39683
39702
|
});
|
|
39684
39703
|
const _hoisted_1$4 = { class: "dialog-content" };
|
|
39685
|
-
const _hoisted_2$
|
|
39704
|
+
const _hoisted_2$3 = ["innerHTML"];
|
|
39686
39705
|
const _hoisted_3$2 = ["innerHTML"];
|
|
39687
39706
|
const _hoisted_4$2 = ["innerHTML"];
|
|
39688
39707
|
const _hoisted_5$2 = {
|
|
@@ -39690,8 +39709,9 @@ const _hoisted_5$2 = {
|
|
|
39690
39709
|
class: "dialog-choices"
|
|
39691
39710
|
};
|
|
39692
39711
|
const _hoisted_6$2 = ["onClick", "innerHTML"];
|
|
39693
|
-
const _hoisted_7$2 = {
|
|
39694
|
-
|
|
39712
|
+
const _hoisted_7$2 = { key: 2 };
|
|
39713
|
+
const _hoisted_8$1 = {
|
|
39714
|
+
key: 3,
|
|
39695
39715
|
class: "buttons-container"
|
|
39696
39716
|
};
|
|
39697
39717
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -39705,7 +39725,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39705
39725
|
class: "dialog-title override",
|
|
39706
39726
|
style: normalizeStyle(_ctx.titleStyle),
|
|
39707
39727
|
innerHTML: _ctx.options.title
|
|
39708
|
-
}, null, 12, _hoisted_2$
|
|
39728
|
+
}, null, 12, _hoisted_2$3)) : createCommentVNode("", true),
|
|
39709
39729
|
createElementVNode("span", {
|
|
39710
39730
|
class: "dialog-text dialog-separator override",
|
|
39711
39731
|
style: normalizeStyle(_ctx.textStyle),
|
|
@@ -39726,9 +39746,24 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39726
39746
|
innerHTML: `${index + 1}. \u2013\xA0 ${choice.choice}`
|
|
39727
39747
|
}, null, 14, _hoisted_6$2);
|
|
39728
39748
|
}), 128))
|
|
39729
|
-
])) : _ctx.canInteract ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
39749
|
+
])) : _ctx.canInteract && _ctx.options.textField ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
39750
|
+
withDirectives(createElementVNode("input", {
|
|
39751
|
+
type: "text",
|
|
39752
|
+
class: "label-input input",
|
|
39753
|
+
ref: "playerInput",
|
|
39754
|
+
id: "player-input-field",
|
|
39755
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.playerText = $event)
|
|
39756
|
+
}, null, 512), [
|
|
39757
|
+
[vModelText, _ctx.playerText]
|
|
39758
|
+
]),
|
|
39759
|
+
createElementVNode("button", {
|
|
39760
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.submitText && _ctx.submitText(...args)),
|
|
39761
|
+
class: "button",
|
|
39762
|
+
id: "player-input-submit"
|
|
39763
|
+
}, " Submit ")
|
|
39764
|
+
])) : _ctx.canInteract ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
|
|
39730
39765
|
createElementVNode("div", {
|
|
39731
|
-
onClick: _cache[
|
|
39766
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.chooseOption(0)),
|
|
39732
39767
|
class: "interact-button button override"
|
|
39733
39768
|
}, " Continue ")
|
|
39734
39769
|
])) : createCommentVNode("", true)
|
|
@@ -39807,7 +39842,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
39807
39842
|
styleId: dialogKey.speaker,
|
|
39808
39843
|
choices: dialogKey.choices,
|
|
39809
39844
|
old: index < dialog.value.length - 1,
|
|
39810
|
-
interactive: dialogKey.interactive
|
|
39845
|
+
interactive: dialogKey.interactive,
|
|
39846
|
+
textField: dialogKey.textField
|
|
39811
39847
|
};
|
|
39812
39848
|
}
|
|
39813
39849
|
function isDialogActive(i2) {
|
|
@@ -39906,7 +39942,7 @@ const _sfc_main$2 = defineComponent({
|
|
|
39906
39942
|
}
|
|
39907
39943
|
});
|
|
39908
39944
|
const _hoisted_1$2 = /* @__PURE__ */ createElementVNode("h3", { class: "title" }, "Quests", -1);
|
|
39909
|
-
const _hoisted_2$
|
|
39945
|
+
const _hoisted_2$2 = {
|
|
39910
39946
|
key: 0,
|
|
39911
39947
|
class: "quests-container"
|
|
39912
39948
|
};
|
|
@@ -39935,7 +39971,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39935
39971
|
_hoisted_1$2
|
|
39936
39972
|
]),
|
|
39937
39973
|
body: withCtx(() => [
|
|
39938
|
-
Object.keys(_ctx.questsToDisplay).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
39974
|
+
Object.keys(_ctx.questsToDisplay).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
39939
39975
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.questsToDisplay, (quest) => {
|
|
39940
39976
|
return openBlock(), createElementBlock("div", {
|
|
39941
39977
|
class: "quest-display",
|
|
@@ -39977,6 +40013,28 @@ var menuButtons_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".menu-
|
|
|
39977
40013
|
const _sfc_main$1 = defineComponent({
|
|
39978
40014
|
data() {
|
|
39979
40015
|
return {
|
|
40016
|
+
buttons: [
|
|
40017
|
+
{
|
|
40018
|
+
id: "menu",
|
|
40019
|
+
cssId: "menu-button",
|
|
40020
|
+
text: "Menu"
|
|
40021
|
+
},
|
|
40022
|
+
{
|
|
40023
|
+
id: "skills",
|
|
40024
|
+
cssId: "skills-menu-button",
|
|
40025
|
+
text: "Skills"
|
|
40026
|
+
},
|
|
40027
|
+
{
|
|
40028
|
+
id: "inventory",
|
|
40029
|
+
cssId: "inventory-menu-button",
|
|
40030
|
+
text: "Items"
|
|
40031
|
+
},
|
|
40032
|
+
{
|
|
40033
|
+
id: "quests",
|
|
40034
|
+
cssId: "quests-menu-button",
|
|
40035
|
+
text: "Quests"
|
|
40036
|
+
}
|
|
40037
|
+
],
|
|
39980
40038
|
activeMenu: false
|
|
39981
40039
|
};
|
|
39982
40040
|
},
|
|
@@ -39993,6 +40051,13 @@ const _sfc_main$1 = defineComponent({
|
|
|
39993
40051
|
vm.callHook("onGameUnmounted");
|
|
39994
40052
|
},
|
|
39995
40053
|
methods: {
|
|
40054
|
+
buttonClick(button) {
|
|
40055
|
+
if (!button.onClick) {
|
|
40056
|
+
useMain().openModal(button.id);
|
|
40057
|
+
} else {
|
|
40058
|
+
button.onClick();
|
|
40059
|
+
}
|
|
40060
|
+
},
|
|
39996
40061
|
openMenu() {
|
|
39997
40062
|
useMain().openModal("menu");
|
|
39998
40063
|
},
|
|
@@ -40013,6 +40078,21 @@ const _sfc_main$1 = defineComponent({
|
|
|
40013
40078
|
}
|
|
40014
40079
|
},
|
|
40015
40080
|
computed: {
|
|
40081
|
+
buttonsToShow() {
|
|
40082
|
+
return this.buttons.filter((button) => {
|
|
40083
|
+
if (button.condition) {
|
|
40084
|
+
return button.condition();
|
|
40085
|
+
} else {
|
|
40086
|
+
return true;
|
|
40087
|
+
}
|
|
40088
|
+
}).map((button) => {
|
|
40089
|
+
const buttonData = getConfig().menuButtons[button.id] || {};
|
|
40090
|
+
return {
|
|
40091
|
+
...button,
|
|
40092
|
+
...buttonData
|
|
40093
|
+
};
|
|
40094
|
+
});
|
|
40095
|
+
},
|
|
40016
40096
|
showSkills() {
|
|
40017
40097
|
if (Object.entries(getConfig().skills).length > 0) {
|
|
40018
40098
|
return true;
|
|
@@ -40034,31 +40114,17 @@ const _sfc_main$1 = defineComponent({
|
|
|
40034
40114
|
}
|
|
40035
40115
|
});
|
|
40036
40116
|
const _hoisted_1$1 = { class: "menu-container" };
|
|
40117
|
+
const _hoisted_2$1 = ["onClick", "id"];
|
|
40037
40118
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
40038
40119
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
40039
|
-
|
|
40040
|
-
|
|
40041
|
-
|
|
40042
|
-
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
id: "skills-menu-button",
|
|
40048
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.openSkills && _ctx.openSkills(...args))
|
|
40049
|
-
}, " Skills ")) : createCommentVNode("", true),
|
|
40050
|
-
_ctx.showInventory ? (openBlock(), createElementBlock("button", {
|
|
40051
|
-
key: 1,
|
|
40052
|
-
class: "button menu-toggle-button",
|
|
40053
|
-
id: "inventory-menu-button",
|
|
40054
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.openInventory && _ctx.openInventory(...args))
|
|
40055
|
-
}, " Items ")) : createCommentVNode("", true),
|
|
40056
|
-
_ctx.showQuests ? (openBlock(), createElementBlock("button", {
|
|
40057
|
-
key: 2,
|
|
40058
|
-
class: "button menu-toggle-button",
|
|
40059
|
-
id: "quests-menu-button",
|
|
40060
|
-
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.openQuests && _ctx.openQuests(...args))
|
|
40061
|
-
}, " Quests ")) : createCommentVNode("", true)
|
|
40120
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.buttonsToShow, (buttonConf) => {
|
|
40121
|
+
return openBlock(), createElementBlock("button", {
|
|
40122
|
+
key: buttonConf.id,
|
|
40123
|
+
onClick: ($event) => _ctx.buttonClick(buttonConf),
|
|
40124
|
+
id: buttonConf.cssId,
|
|
40125
|
+
class: "button menu-toggle-button"
|
|
40126
|
+
}, toDisplayString(buttonConf.text), 9, _hoisted_2$1);
|
|
40127
|
+
}), 128))
|
|
40062
40128
|
]);
|
|
40063
40129
|
}
|
|
40064
40130
|
var MenuButtons = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
@@ -40668,9 +40734,9 @@ const jumpCommand = new CommandPlugin("jump", "any", async (cmd) => {
|
|
|
40668
40734
|
await useMain().saveGame();
|
|
40669
40735
|
await vm2.runLine();
|
|
40670
40736
|
});
|
|
40671
|
-
const runLabelPlugin = new CommandPlugin("
|
|
40737
|
+
const runLabelPlugin = new CommandPlugin("run", "any", async (cmd) => {
|
|
40672
40738
|
if (cmd.args.length < 1 || typeof cmd.args[0] !== "string") {
|
|
40673
|
-
commandRuntimeError(cmd, `
|
|
40739
|
+
commandRuntimeError(cmd, `run command needs a label to argument run`);
|
|
40674
40740
|
}
|
|
40675
40741
|
const label = cmd.args[0];
|
|
40676
40742
|
const res = await useVM().runLabelFunction(label, ...cmd.args.slice(1));
|
|
@@ -41162,7 +41228,8 @@ const choiceParser = (ctx2, parsed) => {
|
|
|
41162
41228
|
};
|
|
41163
41229
|
};
|
|
41164
41230
|
const choicePlugin = new CommandPlugin("choice", [], runChoice, choiceParser);
|
|
41165
|
-
choicePlugin.onPlayerAnswered = async (command,
|
|
41231
|
+
choicePlugin.onPlayerAnswered = async (command, playerChoice) => {
|
|
41232
|
+
const choiceIndex = playerChoice;
|
|
41166
41233
|
const vmStore = useVM();
|
|
41167
41234
|
const { choices } = command.staticOptions;
|
|
41168
41235
|
const choice = choices[choiceIndex];
|
|
@@ -41258,6 +41325,34 @@ const choicePromptCommandPlugin = new CommandPlugin("choicePrompt", "any", async
|
|
|
41258
41325
|
};
|
|
41259
41326
|
}
|
|
41260
41327
|
});
|
|
41328
|
+
const textFieldPlugin = new CommandPlugin("text_field", [{ name: "prompt", type: "string" }], async (cmd) => {
|
|
41329
|
+
return new Promise((resolve) => {
|
|
41330
|
+
useVM().lastChoiceCommand = cmd;
|
|
41331
|
+
cmd.options.resolve = resolve;
|
|
41332
|
+
const dialog = {
|
|
41333
|
+
speaker: "game",
|
|
41334
|
+
text: cmd.options.prompt,
|
|
41335
|
+
textField: true,
|
|
41336
|
+
interactive: true
|
|
41337
|
+
};
|
|
41338
|
+
useDialogStore().addDialog(dialog);
|
|
41339
|
+
});
|
|
41340
|
+
});
|
|
41341
|
+
textFieldPlugin.onPlayerAnswered = async (cmd, choice) => {
|
|
41342
|
+
if (typeof choice !== "string") {
|
|
41343
|
+
commandRuntimeError(cmd, `The player's answer should be a string`);
|
|
41344
|
+
}
|
|
41345
|
+
cmd.options.resolve(choice);
|
|
41346
|
+
};
|
|
41347
|
+
const textFieldPromptPlugin = new CommandPlugin("text_field_prompt", [{ name: "prompt", type: "string" }], async (cmd) => {
|
|
41348
|
+
const dialog = {
|
|
41349
|
+
speaker: "game",
|
|
41350
|
+
text: cmd.options.prompt,
|
|
41351
|
+
textField: true,
|
|
41352
|
+
interactive: true
|
|
41353
|
+
};
|
|
41354
|
+
useDialogStore().addDialog(dialog);
|
|
41355
|
+
});
|
|
41261
41356
|
function registerBaseCommands(vm2) {
|
|
41262
41357
|
vm2.addCommand(choicePlugin);
|
|
41263
41358
|
vm2.addCommand(choicePromptCommandPlugin);
|
|
@@ -41312,6 +41407,8 @@ function registerBaseCommands(vm2) {
|
|
|
41312
41407
|
vm2.addCommand(addLevelPlugin);
|
|
41313
41408
|
vm2.addCommand(addXpPlugin);
|
|
41314
41409
|
vm2.addCommand(rollPlugin);
|
|
41410
|
+
vm2.addCommand(textFieldPlugin);
|
|
41411
|
+
vm2.addCommand(textFieldPromptPlugin);
|
|
41315
41412
|
}
|
|
41316
41413
|
let app;
|
|
41317
41414
|
vm.callHook("onPageLoaded");
|