Skip to content
Snippets Groups Projects
Commit ba63bc2d authored by Griefed's avatar Griefed :joystick:
Browse files

Deploying to gh-pages from @ 04821939 :rocket:

parent c47a3592
No related branches found
No related tags found
No related merge requests found
File moved
File moved
<!DOCTYPE html><html><head><title>Let Them Trade Map-Maker</title><meta charset=utf-8><meta name=description content="Visual Map Maker for Let Them Trade"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/png sizes=128x128 href=icons/favicon-128x128.png><link rel=icon type=image/png sizes=96x96 href=icons/favicon-96x96.png><link rel=icon type=image/png sizes=32x32 href=icons/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=icons/favicon-16x16.png><link rel=icon type=image/ico href=favicon.ico><script defer src=js/vendor.501ef6c0.js></script><script defer src=js/app.c7425758.js></script><link href=css/vendor.e1411231.css rel=stylesheet><link href=css/app.31d6cfe0.css rel=stylesheet></head><body><div id=q-app></div></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><title>Let Them Trade Map-Maker</title><meta charset=utf-8><meta name=description content="Visual Map Maker for Let Them Trade"><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/png sizes=128x128 href=icons/favicon-128x128.png><link rel=icon type=image/png sizes=96x96 href=icons/favicon-96x96.png><link rel=icon type=image/png sizes=32x32 href=icons/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=icons/favicon-16x16.png><link rel=icon type=image/ico href=favicon.ico><script defer src=js/vendor.501ef6c0.js></script><script defer src=js/app.1dde3991.js></script><link href=css/vendor.e1411231.css rel=stylesheet><link href=css/app.31d6cfe0.css rel=stylesheet></head><body><div id=q-app></div></body></html>
\ No newline at end of file
"use strict";(self["webpackChunkltt_mapmaker"]=self["webpackChunkltt_mapmaker"]||[]).push([[302],{6302:(e,t,a)=>{a.r(t),a.d(t,{default:()=>A});var l=a(3673),s=a(2323),o=a(8880);const i={key:0},r={key:1},n={class:"row no-wrap q-pa-md absolute-center"},d={class:"column",style:{width:"600px"}},m=(0,l._)("div",{class:"text-h6 q-mb-md text-black"},"New Map Dimensions",-1),u=(0,l.Uk)(" Size along the X-axis. "),p=(0,l.Uk)(" Size along the Y-axis. "),c=(0,l.Uk)(" Generate empty map with size set above "),f={class:"column",style:{width:"600px"}},w=(0,l.Uk)(" Numbers only. "),b=(0,l.Uk)(" Generate random map with size set above "),h={class:"column"},y=(0,l._)("div",{class:"text-h6 q-mb-md text-black"},"Load Existing Map",-1),_=(0,l.Uk)(" Valid map-json only. "),g=(0,l.Uk)(" Load Map From Data "),x={class:"column"},v=(0,l._)("div",{class:"text-h6 q-mb-md text-black"},"Load Map from File",-1),W=(0,l.Uk)(" Only one file of max 800Kb in size. "),k=(0,l.Uk)(" Load Map From File ");function q(e,t,a,q,V,S){const M=(0,l.up)("Tile"),Y=(0,l.up)("q-icon"),C=(0,l.up)("q-item-section"),U=(0,l.up)("q-slider"),Z=(0,l.up)("q-tooltip"),Q=(0,l.up)("q-item"),X=(0,l.up)("q-btn"),z=(0,l.up)("q-card-section"),F=(0,l.up)("q-input"),I=(0,l.up)("q-file"),D=(0,l.up)("q-card");return e.store.state.lttMap?((0,l.wg)(),(0,l.iD)("span",i,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.store.state.lttMap,((e,t)=>((0,l.wg)(),(0,l.iD)("span",{key:t},[(0,l._)("div",{class:(0,s.C_)(["row no-wrap",[{firstRow:0==t,moveup:0!=t},0==t||t%2?"notShifted":"shifted"]])},[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,((e,t)=>((0,l.wg)(),(0,l.j4)(M,{tile:e,typeValue:e.typeId,"onUpdate:typeValue":t=>e.typeId=t,id:e.x+"_"+e.y,class:(0,s.C_)({tileMl:0!=t?1:0}),key:t},null,8,["tile","typeValue","onUpdate:typeValue","id","class"])))),128))],2)])))),128))])):((0,l.wg)(),(0,l.iD)("span",r,[(0,l._)("div",n,[(0,l.Wm)(D,null,{default:(0,l.w5)((()=>[(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",d,[m,(0,l.Wm)(Q,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(Y,{size:"30px",color:"secondary",name:"mdi-arrow-expand-horizontal"})])),_:1}),(0,l.Wm)(C,null,{default:(0,l.w5)((()=>[(0,l.Wm)(U,{modelValue:e.store.state.mapSizeX,"onUpdate:modelValue":t[0]||(t[0]=t=>e.store.state.mapSizeX=t),min:1,max:101,label:"",color:"secondary",step:1,"label-always":""},null,8,["modelValue"]),(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[u])),_:1},8,["disable"])])),_:1})])),_:1}),(0,l.Wm)(Q,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(Y,{size:"30px",color:"secondary",name:"mdi-arrow-expand-vertical"})])),_:1}),(0,l.Wm)(C,null,{default:(0,l.w5)((()=>[(0,l.Wm)(U,{modelValue:e.store.state.mapSizeY,"onUpdate:modelValue":t[1]||(t[1]=t=>e.store.state.mapSizeY=t),min:1,max:101,label:"",color:"secondary",step:1,"label-always":""},null,8,["modelValue"]),(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[p])),_:1},8,["disable"])])),_:1})])),_:1}),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Generate Empty Map",onClick:t[2]||(t[2]=t=>e.createMap())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[c])),_:1},8,["disable"])])),_:1})])])),_:1}),(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",f,[(0,l.Wm)(F,{color:"black",filled:"",modelValue:e.store.state.seed,"onUpdate:modelValue":t[5]||(t[5]=t=>e.store.state.seed=t),label:"Seed",type:"number",maxlength:"15"},{append:(0,l.w5)((()=>[(0,l.Wm)(Y,{name:"cancel",onClick:t[3]||(t[3]=(0,o.iM)((t=>e.store.state.seed=null),["stop"])),class:"cursor-pointer"}),(0,l.Wm)(Y,{name:"refresh",onClick:t[4]||(t[4]=(0,o.iM)((t=>e.store.state.seed=e.store.seedGenerator.random_int31()),["stop"])),class:"cursor-pointer"})])),default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[w])),_:1},8,["disable"])])),_:1},8,["modelValue"]),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Generate Random Map",onClick:t[6]||(t[6]=t=>e.createRandomMap())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[b])),_:1},8,["disable"])])),_:1})])])),_:1}),(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",h,[y,(0,l.Wm)(F,{modelValue:e.mapString,"onUpdate:modelValue":t[7]||(t[7]=t=>e.mapString=t),filled:"",placeholder:"Paste Map Data",type:"textarea","input-class":"pastCodeArea"},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[_])),_:1},8,["disable"])])),_:1},8,["modelValue"]),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Load Map From Filedata",onClick:t[8]||(t[8]=t=>e.loadMapData())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[g])),_:1},8,["disable"])])),_:1})])])),_:1}),(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",x,[v,(0,l.Wm)(I,{modelValue:e.file,"onUpdate:modelValue":t[9]||(t[9]=t=>e.file=t),label:"Pick one file",filled:"",clearable:"",accept:".json, application/*","max-file-size":"800000",style:{"max-width":"100%"},onRejected:e.onRejected},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[W])),_:1},8,["disable"])])),_:1},8,["modelValue","onRejected"]),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Load Map From Filedata",onClick:t[10]||(t[10]=t=>e.loadMapFile())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[k])),_:1},8,["disable"])])),_:1})])])),_:1})])),_:1})])]))}var V=a(1959);const S=["src"];function M(e,t,a,o,i,r){const n=(0,l.up)("q-avatar"),d=(0,l.up)("q-item-section"),m=(0,l.up)("q-item-label"),u=(0,l.up)("q-item"),p=(0,l.up)("q-list"),c=(0,l.up)("q-btn-dropdown"),f=(0,l.up)("q-tooltip"),w=(0,l.Q2)("close-popup");return(0,l.wg)(),(0,l.iD)("div",{id:"parent",class:(0,s.C_)(["hexagon",[a.tile.typeId,o.isViewRadiusBorder(),a.tile.x==o.store.state.centerX&&a.tile.y==o.store.state.centerY?"centerTile":""]])},[(0,l._)("div",{class:(0,s.C_)(["hexTop",a.tile.x==o.store.state.centerX&&a.tile.y==o.store.state.centerY?"centerTop":""])},null,2),(0,l._)("div",{class:(0,s.C_)(["hexBottom",a.tile.x==o.store.state.centerX&&a.tile.y==o.store.state.centerY?"centerBottom":""])},null,2),(0,l.Wm)(c,{class:"buttonshift without-icon custom-width",label:a.tile.typeId,align:"center",size:"11px","dropdown-icon":" ",modelValue:o.menuState,"onUpdate:modelValue":t[0]||(t[0]=e=>o.menuState=e)},{default:(0,l.w5)((()=>[(0,l.Wm)(p,null,{default:(0,l.w5)((()=>[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(o.types,(e=>(0,l.wy)(((0,l.wg)(),(0,l.j4)(u,{key:e,clickable:"",onClick:t=>r.setType(e)},{default:(0,l.w5)((()=>[(0,l.Wm)(d,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(n,null,{default:(0,l.w5)((()=>[(0,l._)("img",{src:"./tiles/"+e+".webp"},null,8,S)])),_:2},1024)])),_:2},1024),(0,l.Wm)(d,null,{default:(0,l.w5)((()=>[(0,l.Wm)(m,null,{default:(0,l.w5)((()=>[(0,l.Uk)((0,s.zw)(e.toUpperCase()),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])),[[w]]))),128))])),_:1})])),_:1},8,["label","modelValue"]),(0,l.Wm)(f,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[(0,l.Uk)((0,s.zw)(a.tile.x+"/"+a.tile.y+": "+a.tile.typeId),1)])),_:1},8,["disable"])],2)}const Y={props:{tile:Object,typeValue:String},setup(e){var t=["barren","clay","desert","fish","forest","grass","ice","iron","mountain","salt","stone","water","wheat","wool"];const a=(0,l.f3)("store"),s=function(){var t=[];return e.tile.x==this.store.state.centerX-this.store.state.radiusX+1&&this.store.state.centerY-this.store.state.radiusY+1<=e.tile.y&&e.tile.y<=this.store.state.centerY+this.store.state.radiusY-1&&t.push("viewBorderLeft"),e.tile.x==this.store.state.centerX+this.store.state.radiusX-1&&this.store.state.centerY-this.store.state.radiusY+1<=e.tile.y&&e.tile.y<=this.store.state.centerY+this.store.state.radiusY-1&&t.push("viewBorderRight"),e.tile.y==this.store.state.centerY+this.store.state.radiusY-1&&this.store.state.centerX-this.store.state.radiusX+1<=e.tile.x&&e.tile.x<=this.store.state.centerX+this.store.state.radiusX-1&&t.push("viewBorderTop"),e.tile.y==this.store.state.centerY-this.store.state.radiusY+1&&this.store.state.centerX-this.store.state.radiusX+1<=e.tile.x&&e.tile.x<=this.store.state.centerX+this.store.state.radiusX-1&&t.push("viewBorderBottom"),t};return{isViewRadiusBorder:s,store:a,types:t,menuState:(0,V.iH)(!1),label:"grass",color:"green-8",textcolor:"white",backgroundImage:"background-image: url(./tiles/grass_tile.webp);"}},emits:["update:typeValue"],updated(){},methods:{setType(e){this.$emit("update:typeValue",e)}}};var C=a(4858),U=a(7011),Z=a(3414),Q=a(2035),X=a(5096),z=a(2350),F=a(8870),I=a(677),D=a(7518),R=a.n(D);Y.render=M;const T=Y;R()(Y,"components",{QBtnDropdown:C.Z,QList:U.Z,QItem:Z.Z,QItemSection:Q.Z,QAvatar:X.Z,QItemLabel:z.Z,QTooltip:F.Z}),R()(Y,"directives",{ClosePopup:I.Z});var $=a(8825);const B=(0,l.aZ)({setup(){const e=(0,l.f3)("store"),t=(0,$.Z)();var a=(0,V.iH)("");const s=function(a){let l;try{l=JSON.parse(a)}catch(s){return void(s instanceof SyntaxError?t.notify({type:"negative",message:"Input is not a valid JSON"}):(t.notify({type:"negative",message:"An unknown error occured"}),console.log(s)))}this.file=null,this.mapString=null,e.methods.loadMap(l)},o=function(){this.parseJsonFromString(a.value)},i=function(){const e=new FileReader;e.onload=e=>this.parseJsonFromString(e.target.result),e.readAsText(this.file)},r=function(){e.methods.generateMap()},n=function(){e.methods.generateRandomMap()},d=function(e){t.notify({type:"negative",message:`${e[0].file.name}-file did not pass validation constraints. The file is either too big or not a valid JSON.`})};return{parseJsonFromString:s,file:(0,V.iH)(null),mapString:a,store:e,createMap:r,createRandomMap:n,loadMapData:o,loadMapFile:i,onRejected:d}},methods:{},components:{Tile:T}});var j=a(151),L=a(5589),H=a(4554),J=a(2064),G=a(2165),N=a(5855),O=a(4816);B.render=q;const A=B;R()(B,"components",{QCard:j.Z,QCardSection:L.Z,QItem:Z.Z,QItemSection:Q.Z,QIcon:H.Z,QSlider:J.Z,QTooltip:F.Z,QBtn:G.Z,QInput:N.Z,QFile:O.Z})}}]);
\ No newline at end of file
"use strict";(self["webpackChunkltt_mapmaker"]=self["webpackChunkltt_mapmaker"]||[]).push([[694],{6694:(e,t,a)=>{a.r(t),a.d(t,{default:()=>A});var l=a(3673),s=a(2323),o=a(8880);const i={key:0},r={key:1},n={class:"row no-wrap q-pa-md absolute-center"},d={class:"column",style:{width:"600px"}},m=(0,l._)("div",{class:"text-h6 q-mb-md"},"New Map Dimensions",-1),u=(0,l.Uk)(" Size along the X-axis. "),p=(0,l.Uk)(" Size along the Y-axis. "),c=(0,l.Uk)(" Generate empty map with size set above "),f={class:"column",style:{width:"600px"}},w=(0,l.Uk)(" Numbers only. "),h=(0,l.Uk)(" Generate random map with size set above "),b={class:"column"},y=(0,l._)("div",{class:"text-h6 q-mb-md"},"Load Existing Map",-1),_=(0,l.Uk)(" Valid map-json only. "),g=(0,l.Uk)(" Load Map From Data "),v={class:"column"},x=(0,l._)("div",{class:"text-h6 q-mb-md"},"Load Map from File",-1),W=(0,l.Uk)(" Only one file of max 800Kb in size. "),k=(0,l.Uk)(" Load Map From File ");function q(e,t,a,q,V,S){const M=(0,l.up)("Tile"),Y=(0,l.up)("q-icon"),C=(0,l.up)("q-item-section"),U=(0,l.up)("q-slider"),Z=(0,l.up)("q-tooltip"),Q=(0,l.up)("q-item"),X=(0,l.up)("q-btn"),z=(0,l.up)("q-card-section"),F=(0,l.up)("q-input"),I=(0,l.up)("q-file"),D=(0,l.up)("q-card");return e.store.state.lttMap?((0,l.wg)(),(0,l.iD)("span",i,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.store.state.lttMap,((e,t)=>((0,l.wg)(),(0,l.iD)("span",{key:t},[(0,l._)("div",{class:(0,s.C_)(["row no-wrap",[{firstRow:0==t,moveup:0!=t},0==t||t%2?"notShifted":"shifted"]])},[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,((e,t)=>((0,l.wg)(),(0,l.j4)(M,{tile:e,typeValue:e.typeId,"onUpdate:typeValue":t=>e.typeId=t,id:e.x+"_"+e.y,class:(0,s.C_)({tileMl:0!=t?1:0}),key:t},null,8,["tile","typeValue","onUpdate:typeValue","id","class"])))),128))],2)])))),128))])):((0,l.wg)(),(0,l.iD)("span",r,[(0,l._)("div",n,[(0,l.Wm)(D,null,{default:(0,l.w5)((()=>[(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",d,[m,(0,l.Wm)(Q,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(Y,{size:"30px",color:"secondary",name:"mdi-arrow-expand-horizontal"})])),_:1}),(0,l.Wm)(C,null,{default:(0,l.w5)((()=>[(0,l.Wm)(U,{modelValue:e.store.state.mapSizeX,"onUpdate:modelValue":t[0]||(t[0]=t=>e.store.state.mapSizeX=t),min:1,max:101,label:"",color:"secondary",step:1,"label-always":""},null,8,["modelValue"]),(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[u])),_:1},8,["disable"])])),_:1})])),_:1}),(0,l.Wm)(Q,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(Y,{size:"30px",color:"secondary",name:"mdi-arrow-expand-vertical"})])),_:1}),(0,l.Wm)(C,null,{default:(0,l.w5)((()=>[(0,l.Wm)(U,{modelValue:e.store.state.mapSizeY,"onUpdate:modelValue":t[1]||(t[1]=t=>e.store.state.mapSizeY=t),min:1,max:101,label:"",color:"secondary",step:1,"label-always":""},null,8,["modelValue"]),(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[p])),_:1},8,["disable"])])),_:1})])),_:1}),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Generate Empty Map",onClick:t[2]||(t[2]=t=>e.createMap())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[c])),_:1},8,["disable"])])),_:1})])])),_:1}),(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",f,[(0,l.Wm)(F,{color:"black",filled:"",modelValue:e.store.state.seed,"onUpdate:modelValue":t[5]||(t[5]=t=>e.store.state.seed=t),label:"Seed",type:"number",maxlength:"15"},{append:(0,l.w5)((()=>[(0,l.Wm)(Y,{name:"cancel",onClick:t[3]||(t[3]=(0,o.iM)((t=>e.store.state.seed=null),["stop"])),class:"cursor-pointer"}),(0,l.Wm)(Y,{name:"refresh",onClick:t[4]||(t[4]=(0,o.iM)((t=>e.store.state.seed=e.store.seedGenerator.random_int31()),["stop"])),class:"cursor-pointer"})])),default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[w])),_:1},8,["disable"])])),_:1},8,["modelValue"]),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Generate Random Map",onClick:t[6]||(t[6]=t=>e.createRandomMap())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[h])),_:1},8,["disable"])])),_:1})])])),_:1}),(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",b,[y,(0,l.Wm)(F,{modelValue:e.mapString,"onUpdate:modelValue":t[7]||(t[7]=t=>e.mapString=t),filled:"",placeholder:"Paste Map Data",type:"textarea","input-class":"pastCodeArea"},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[_])),_:1},8,["disable"])])),_:1},8,["modelValue"]),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Load Map From Filedata",onClick:t[8]||(t[8]=t=>e.loadMapData())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[g])),_:1},8,["disable"])])),_:1})])])),_:1}),(0,l.Wm)(z,null,{default:(0,l.w5)((()=>[(0,l._)("div",v,[x,(0,l.Wm)(I,{modelValue:e.file,"onUpdate:modelValue":t[9]||(t[9]=t=>e.file=t),label:"Pick one file",filled:"",clearable:"",accept:".json, application/*","max-file-size":"800000",style:{"max-width":"100%"},onRejected:e.onRejected},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[W])),_:1},8,["disable"])])),_:1},8,["modelValue","onRejected"]),(0,l.Wm)(X,{class:"q-mr-xs",color:"secondary",label:"Load Map From Filedata",onClick:t[10]||(t[10]=t=>e.loadMapFile())},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[k])),_:1},8,["disable"])])),_:1})])])),_:1})])),_:1})])]))}var V=a(1959);const S=["src"];function M(e,t,a,o,i,r){const n=(0,l.up)("q-avatar"),d=(0,l.up)("q-item-section"),m=(0,l.up)("q-item-label"),u=(0,l.up)("q-item"),p=(0,l.up)("q-list"),c=(0,l.up)("q-btn-dropdown"),f=(0,l.up)("q-tooltip"),w=(0,l.Q2)("close-popup");return(0,l.wg)(),(0,l.iD)("div",{id:"parent",class:(0,s.C_)(["hexagon",[a.tile.typeId,o.isViewRadiusBorder(),a.tile.x==o.store.state.centerX&&a.tile.y==o.store.state.centerY?"centerTile":""]])},[(0,l._)("div",{class:(0,s.C_)(["hexTop",a.tile.x==o.store.state.centerX&&a.tile.y==o.store.state.centerY?"centerTop":""])},null,2),(0,l._)("div",{class:(0,s.C_)(["hexBottom",a.tile.x==o.store.state.centerX&&a.tile.y==o.store.state.centerY?"centerBottom":""])},null,2),(0,l.Wm)(c,{class:"buttonshift without-icon custom-width",label:a.tile.typeId,align:"center",size:"11px","dropdown-icon":" ",modelValue:o.menuState,"onUpdate:modelValue":t[0]||(t[0]=e=>o.menuState=e)},{default:(0,l.w5)((()=>[(0,l.Wm)(p,null,{default:(0,l.w5)((()=>[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(o.types,(e=>(0,l.wy)(((0,l.wg)(),(0,l.j4)(u,{key:e,clickable:"",onClick:t=>r.setType(e)},{default:(0,l.w5)((()=>[(0,l.Wm)(d,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(n,null,{default:(0,l.w5)((()=>[(0,l._)("img",{src:"./tiles/"+e+".webp"},null,8,S)])),_:2},1024)])),_:2},1024),(0,l.Wm)(d,null,{default:(0,l.w5)((()=>[(0,l.Wm)(m,null,{default:(0,l.w5)((()=>[(0,l.Uk)((0,s.zw)(e.toUpperCase()),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])),[[w]]))),128))])),_:1})])),_:1},8,["label","modelValue"]),(0,l.Wm)(f,{disable:e.$q.platform.is.mobile},{default:(0,l.w5)((()=>[(0,l.Uk)((0,s.zw)(a.tile.x+"/"+a.tile.y+": "+a.tile.typeId),1)])),_:1},8,["disable"])],2)}const Y={props:{tile:Object,typeValue:String},setup(e){var t=["barren","clay","desert","fish","forest","grass","ice","iron","mountain","salt","stone","water","wheat","wool"];const a=(0,l.f3)("store"),s=function(){var t=[];return e.tile.x==this.store.state.centerX-this.store.state.radiusX+1&&this.store.state.centerY-this.store.state.radiusY+1<=e.tile.y&&e.tile.y<=this.store.state.centerY+this.store.state.radiusY-1&&t.push("viewBorderLeft"),e.tile.x==this.store.state.centerX+this.store.state.radiusX-1&&this.store.state.centerY-this.store.state.radiusY+1<=e.tile.y&&e.tile.y<=this.store.state.centerY+this.store.state.radiusY-1&&t.push("viewBorderRight"),e.tile.y==this.store.state.centerY+this.store.state.radiusY-1&&this.store.state.centerX-this.store.state.radiusX+1<=e.tile.x&&e.tile.x<=this.store.state.centerX+this.store.state.radiusX-1&&t.push("viewBorderTop"),e.tile.y==this.store.state.centerY-this.store.state.radiusY+1&&this.store.state.centerX-this.store.state.radiusX+1<=e.tile.x&&e.tile.x<=this.store.state.centerX+this.store.state.radiusX-1&&t.push("viewBorderBottom"),t};return{isViewRadiusBorder:s,store:a,types:t,menuState:(0,V.iH)(!1),label:"grass",color:"green-8",textcolor:"white",backgroundImage:"background-image: url(./tiles/grass_tile.webp);"}},emits:["update:typeValue"],updated(){},methods:{setType(e){this.$emit("update:typeValue",e)}}};var C=a(4858),U=a(7011),Z=a(3414),Q=a(2035),X=a(5096),z=a(2350),F=a(8870),I=a(677),D=a(7518),R=a.n(D);Y.render=M;const T=Y;R()(Y,"components",{QBtnDropdown:C.Z,QList:U.Z,QItem:Z.Z,QItemSection:Q.Z,QAvatar:X.Z,QItemLabel:z.Z,QTooltip:F.Z}),R()(Y,"directives",{ClosePopup:I.Z});var $=a(8825);const B=(0,l.aZ)({setup(){const e=(0,l.f3)("store"),t=(0,$.Z)();var a=(0,V.iH)("");const s=function(a){let l;try{l=JSON.parse(a)}catch(s){return void(s instanceof SyntaxError?t.notify({type:"negative",message:"Input is not a valid JSON"}):(t.notify({type:"negative",message:"An unknown error occured"}),console.log(s)))}this.file=null,this.mapString=null,e.methods.loadMap(l)},o=function(){this.parseJsonFromString(a.value)},i=function(){const e=new FileReader;e.onload=e=>this.parseJsonFromString(e.target.result),e.readAsText(this.file)},r=function(){e.methods.generateMap()},n=function(){e.methods.generateRandomMap()},d=function(e){t.notify({type:"negative",message:`${e[0].file.name}-file did not pass validation constraints. The file is either too big or not a valid JSON.`})};return{parseJsonFromString:s,file:(0,V.iH)(null),mapString:a,store:e,createMap:r,createRandomMap:n,loadMapData:o,loadMapFile:i,onRejected:d}},methods:{},components:{Tile:T}});var j=a(151),L=a(5589),H=a(4554),J=a(2064),G=a(2165),N=a(5855),O=a(4816);B.render=q;const A=B;R()(B,"components",{QCard:j.Z,QCardSection:L.Z,QItem:Z.Z,QItemSection:Q.Z,QIcon:H.Z,QSlider:J.Z,QTooltip:F.Z,QBtn:G.Z,QInput:N.Z,QFile:O.Z})}}]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment