Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Griefed/ltt-mapmaker
1 result
Show changes
Commits on Source (2)
Showing
with 8 additions and 7 deletions
.page{background:radial-gradient(circle,#fbfbf9 30%,#594a37 100%,#3e4e69 0)}.page-dark{background:radial-gradient(circle,#fbfbf9 5%,#594a37 20%,#3e4e69 100%)}
\ No newline at end of file
This diff is collapsed.
.page{background:radial-gradient(circle,#56638a 0,#483a58 100%)}
\ No newline at end of file
This diff is collapsed.
No preview for this file type
File deleted
File added
File added
File deleted
img/salt_tile.0db77e55.webp

9.79 KiB

<!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.7cd7069e.js></script><script defer src=js/app.c460e3c0.js></script><link href=css/vendor.77097542.css rel=stylesheet><link href=css/app.31d6cfe0.css rel=stylesheet></head><body><div id=q-app></div></body></html> <!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 by Spaceflower."><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.f126fbf1.js></script><script defer src=js/app.8955f3e6.js></script><link href=css/vendor.cfa1cfc5.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 \ No newline at end of file
This diff is collapsed.
"use strict";(self["webpackChunkltt_mapmaker"]=self["webpackChunkltt_mapmaker"]||[]).push([[549],{6549:(e,t,a)=>{a.r(t),a.d(t,{default:()=>P});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"),Z=(0,l.up)("q-icon"),Y=(0,l.up)("q-item-section"),C=(0,l.up)("q-slider"),U=(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)(Y,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{size:"30px",color:"secondary",name:"mdi-arrow-expand-horizontal"})])),_:1}),(0,l.Wm)(Y,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{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)(U,{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)(Y,{avatar:""},{default:(0,l.w5)((()=>[(0,l.Wm)(Z,{size:"30px",color:"secondary",name:"mdi-arrow-expand-vertical"})])),_:1}),(0,l.Wm)(Y,null,{default:(0,l.w5)((()=>[(0,l.Wm)(C,{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)(U,{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)(U,{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)(Z,{name:"cancel",onClick:t[3]||(t[3]=(0,o.iM)((t=>e.store.state.seed=null),["stop"])),class:"cursor-pointer"}),(0,l.Wm)(Z,{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)(U,{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)(U,{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)(U,{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)(U,{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)(U,{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)(U,{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 Z={name:"LttTile",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 Y=a(4260),C=a(4858),U=a(7011),Q=a(3414),X=a(2035),z=a(5096),F=a(2350),I=a(8870),D=a(677),R=a(7518),T=a.n(R);const $=(0,Y.Z)(Z,[["render",M]]),B=$;T()(Z,"components",{QBtnDropdown:C.Z,QList:U.Z,QItem:Q.Z,QItemSection:X.Z,QAvatar:z.Z,QItemLabel:F.Z,QTooltip:I.Z}),T()(Z,"directives",{ClosePopup:D.Z});var L=a(8825);const j=(0,l.aZ)({name:"LttIndex",setup(){const e=(0,l.f3)("store"),t=(0,L.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:B}});var H=a(151),J=a(5589),G=a(4554),N=a(8396),O=a(2165),A=a(5855),K=a(4816);const E=(0,Y.Z)(j,[["render",q]]),P=E;T()(j,"components",{QCard:H.Z,QCardSection:J.Z,QItem:Q.Z,QItemSection:X.Z,QIcon:G.Z,QSlider:N.Z,QTooltip:I.Z,QBtn:O.Z,QInput:A.Z,QFile:K.Z})}}]);
\ No newline at end of file
"use strict";(globalThis["webpackChunkltt_mapmaker"]=globalThis["webpackChunkltt_mapmaker"]||[]).push([[551],{3551:(t,e,l)=>{l.r(e),l.d(e,{default:()=>b});var n=l(3673);const o={class:"fullscreen bg-blue text-white text-center q-pa-md flex flex-center"},s=(0,n._)("div",{style:{"font-size":"30vh"}}," 404 ",-1),a=(0,n._)("div",{class:"text-h2",style:{opacity:".4"}}," Oops. Nothing here... ",-1);function c(t,e,l,c,r,i){const u=(0,n.up)("q-btn");return(0,n.wg)(),(0,n.iD)("div",o,[(0,n._)("div",null,[s,a,(0,n.Wm)(u,{class:"q-mt-xl",color:"white","text-color":"blue",unelevated:"",to:"/",label:"Go Home","no-caps":""})])])}const r=(0,n.aZ)({name:"LttError404"});var i=l(4260),u=l(2165),h=l(7518),p=l.n(h);const m=(0,i.Z)(r,[["render",c]]),b=m;p()(r,"components",{QBtn:u.Z})}}]);
\ No newline at end of file