Fewer merge conflicts: actions by area, one city per line, sorted dictionaries
- ACT is split by area into game/90-actions/*.js (const ACT in the first file, Object.assign in the rest) - CITY_LL, CITY_NUDGE and LANDS_LL have one entry per line; the id-keyed ones are sorted - site/i18n/*.js are sorted, one entry per line; i18n-check enforces it and --fix (npm run i18n:fix) restores it; scripts/i18n-add.js adds, removes and renames entries in place - scripts/legacy/port-branch.js moves a branch's site/index.html edits into src/ during a merge with main - perf workflow and PR template build the base page with scripts/lib/page.js
This commit is contained in:
parent
67a40942b4
commit
c64b139a86
27 changed files with 9582 additions and 8971 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,204 @@
|
|||
const CITY_LL={"chc":[172.55,-43.53],"ivc":[168.35,-46.41],"adl":[138.6,-34.93],"cbr":[149.13,-35.28],"hba":[147.25,-42.85],"hfx":[-63.62,44.68],"bda":[-64.78,32.29],"pdl":[-25.67,37.74],"tci":[-16.3,28.44],"rai":[-23.55,14.98],"jam":[-5.72,-15.93],"man":[-2.24,53.48],"edi":[-3.19,55.95],"bde":[-4.54,50.83],"svg":[5.73,58.97],"bcn":[2.17,41.39],"mil":[9.19,45.46],"rom":[12.5,41.9],"pmo":[13.36,38.12],"lis":[-9.14,38.72],"ath":[23.73,37.98],"atn":[-84.39,33.75],"den":[-104.99,39.74],"phx":[-112.07,33.45],"bos":[-71.06,42.36],"hou":[-95.37,29.76],"slc":[-111.89,40.76],"jed":[39.25,21.55],"ruh":[46.72,24.71],"doh":[51.45,25.28],"kyv":[30.52,50.45],"mel":[144.96, -37.81],"bne":[153.03, -27.47],"drw":[131.05,-12.46],"osa":[135.5, 34.69],"kul":[101.69, 3.14],"bkk":[100.5, 13.76],"sgn":[106.66, 10.76],"khi":[67.14,25.0],"dac":[90.41, 23.81],"cbo":[80.0, 6.95],"waw":[21.01, 52.23],"prg":[14.42, 50.08],"vie":[16.37, 48.21],"bud":[19.04, 47.5],"buh":[26.1, 44.43],"tll":[24.45,58.9],"ist":[28.98, 41.01],"for":[-38.54, -3.73],"rio":[-43.11,-22.57],"bsb":[-47.88,-15.79],"bhz":[-43.94,-19.92],"cwb":[-49.27,-25.43],"poa":[-51.23,-30.03],"aju":[-37.07,-10.91],"bel":[-48.5,-1.46],"bvb":[-60.67,2.82],"cac":[-53.46,-24.96],"cpv":[-35.88,-7.23],"cpq":[-47.06,-22.91],"cgr":[-54.65,-20.47],"cau":[-35.98,-8.28],"cgb":[-56.1,-15.6],"cxj":[-51.18,-29.17],"fec":[-38.97,-12.27],"fln":[-48.55,-27.6],"igu":[-54.59,-25.55],"gyn":[-49.25,-16.69],"jpa":[-34.86,-7.12],"ljd":[-51.96,-29.47],"ldb":[-51.16,-23.31],"mcp":[-51.07,0.03],"mcz":[-35.74,-9.67],"mao":[-60.02,-3.12],"mgf":[-51.94,-23.42],"nat":[-35.21,-5.79],"pmw":[-48.33,-10.18],"pvh":[-63.9,-8.76],"rao":[-47.81,-21.18],"rec":[-34.88,-8.05],"rbr":[-67.81,-9.97],"ssa":[-38.5,-12.97],"ria":[-53.81,-29.68],"sjp":[-49.38,-20.81],"slz":[-44.3,-2.53],"the":[-42.8,-5.09],"vix":[-40.31,-20.32],"mvd":[-56.16,-34.9],"asu":[-57.58,-25.26],"cor":[-64.18,-31.42],"lpb":[-68.15,-16.5],"uio":[-78.47,-0.18],"mde":[-75.57,6.24],"ccs":[-66.9,10.49],"gua":[-90.51,14.63],"sjo":[-84.09,9.93],"qro":[-100.39,20.59],"mty":[-100.31,25.69],"gdl":[-103.35,20.67],"bue":[-58.38, -34.6],"scl":[-70.67, -33.45],"lim":[-76.85,-12.05],"bog":[-74.07, 4.71],"pan":[-79.52, 8.98],"del":[77.21, 28.61],"maa":[80.18,13.25],"blr":[77.59, 12.97],"hyd":[78.49, 17.39],"tpe":[121.56, 25.03],"auh":[54.37, 24.45],"fuj":[56.15,25.07],"cpt":[18.42, -33.92],"dkr":[-17.45,14.69],"abj":[-4.03,5.32],"acc":[-0.19,5.6],"dla":[9.7,4.05],"fih":[15.27,-4.33],"lad":[13.23,-8.84],"cas":[-7.59,33.57],"alg":[3.06,36.75],"tun":[10.18,36.81],"jib":[43.15,11.59],"add":[38.75,9.03],"mba":[39.67,-4.04],"dar":[39.28,-6.79],"kla":[32.58,0.35],"kgl":[30.06,-1.95],"mpm":[32.57,-25.97],"dur":[31.03,-29.86],"wdh":[17.08,-22.56],"lun":[28.32,-15.39],"hre":[31.05,-17.83],"gbe":[25.91,-24.65],"stg":[9.18,48.78],"ber":[13.4,52.52],"zrh":[8.54,47.37],"nbo":[36.82,-1.29],"cai":[31.24,30.04],"sea":[-122.33,47.61],"sjc":[-121.89,37.34],"lax":[-118.24,34.05],"dal":[-96.8,32.78],"chi":[-87.63,41.88],"ash":[-77.49,39.04],"nyc":[-74.0,40.71],"mia":[-80.19,25.76],"tor":[-79.38,43.65],"kcy":[-94.58,39.1],"cal":[-114.07,51.05],"van":[-123.12,49.28],"ott":[-75.7,45.42],"mtl":[-73.57,45.5],"mex":[-99.13,19.43],"sao":[-46.63,-23.55],"lon":[-0.13,51.51],"dub":[-6.26,53.35],"rek":[-21.94,64.15],"ams":[4.9,52.37],"bru":[4.35,50.85],"oos":[3.23,51.15],"bet":[6.1,49.52],"fra":[8.68,50.11],"ham":[9.99,53.55],"dus":[6.78,51.22],"muc":[11.58,48.14],"par":[2.35,48.86],"mrs":[5.37,43.3],"mad":[-3.7,40.42],"sto":[18.07,59.33],"osl":[10.75,59.91],"cph":[12.57,55.68],"hel":[24.94,60.17],"beg":[20.46,44.79],"sof":[23.32,42.7],"mos":[37.62,55.76],"lag":[3.38,6.52],"jnb":[28.05,-26.2],"dxb":[55.27,25.2],"bom":[72.88,19.08],"sin":[103.82,1.35],"jkt":[106.85,-6.2],"mnl":[120.98,14.6],"hkg":[114.17,22.32],"sha":[121.47,31.23],"pek":[116.4,39.9],"icn":[126.98,37.57],"tok":[139.69,35.69],"syd":[151.21,-33.87],"per":[115.86,-31.95],"akl":[174.76,-36.85],"hnl":[-157.86,21.31],"gum":[144.75,13.47],"ror":[134.48,7.34],"maj":[171.38,7.09],"pom":[147.18,-9.44],"hir":[159.95,-9.43],"nou":[166.46,-22.27],"suv":[178.44,-18.14],"tbu":[-175.2,-21.14],"apw":[-171.76,-13.83],"ppg":[-170.7,-14.28],"ppt":[-149.57,-17.53]};
|
||||
const CITY_LL={
|
||||
"abj":[-4.03,5.32],
|
||||
"acc":[-0.19,5.6],
|
||||
"add":[38.75,9.03],
|
||||
"adl":[138.6,-34.93],
|
||||
"aju":[-37.07,-10.91],
|
||||
"akl":[174.76,-36.85],
|
||||
"alg":[3.06,36.75],
|
||||
"ams":[4.9,52.37],
|
||||
"apw":[-171.76,-13.83],
|
||||
"ash":[-77.49,39.04],
|
||||
"asu":[-57.58,-25.26],
|
||||
"ath":[23.73,37.98],
|
||||
"atn":[-84.39,33.75],
|
||||
"auh":[54.37, 24.45],
|
||||
"bcn":[2.17,41.39],
|
||||
"bda":[-64.78,32.29],
|
||||
"bde":[-4.54,50.83],
|
||||
"beg":[20.46,44.79],
|
||||
"bel":[-48.5,-1.46],
|
||||
"ber":[13.4,52.52],
|
||||
"bet":[6.1,49.52],
|
||||
"bhz":[-43.94,-19.92],
|
||||
"bkk":[100.5, 13.76],
|
||||
"blr":[77.59, 12.97],
|
||||
"bne":[153.03, -27.47],
|
||||
"bog":[-74.07, 4.71],
|
||||
"bom":[72.88,19.08],
|
||||
"bos":[-71.06,42.36],
|
||||
"bru":[4.35,50.85],
|
||||
"bsb":[-47.88,-15.79],
|
||||
"bud":[19.04, 47.5],
|
||||
"bue":[-58.38, -34.6],
|
||||
"buh":[26.1, 44.43],
|
||||
"bvb":[-60.67,2.82],
|
||||
"cac":[-53.46,-24.96],
|
||||
"cai":[31.24,30.04],
|
||||
"cal":[-114.07,51.05],
|
||||
"cas":[-7.59,33.57],
|
||||
"cau":[-35.98,-8.28],
|
||||
"cbo":[80.0, 6.95],
|
||||
"cbr":[149.13,-35.28],
|
||||
"ccs":[-66.9,10.49],
|
||||
"cgb":[-56.1,-15.6],
|
||||
"cgr":[-54.65,-20.47],
|
||||
"chc":[172.55,-43.53],
|
||||
"chi":[-87.63,41.88],
|
||||
"cor":[-64.18,-31.42],
|
||||
"cph":[12.57,55.68],
|
||||
"cpq":[-47.06,-22.91],
|
||||
"cpt":[18.42, -33.92],
|
||||
"cpv":[-35.88,-7.23],
|
||||
"cwb":[-49.27,-25.43],
|
||||
"cxj":[-51.18,-29.17],
|
||||
"dac":[90.41, 23.81],
|
||||
"dal":[-96.8,32.78],
|
||||
"dar":[39.28,-6.79],
|
||||
"del":[77.21, 28.61],
|
||||
"den":[-104.99,39.74],
|
||||
"dkr":[-17.45,14.69],
|
||||
"dla":[9.7,4.05],
|
||||
"doh":[51.45,25.28],
|
||||
"drw":[131.05,-12.46],
|
||||
"dub":[-6.26,53.35],
|
||||
"dur":[31.03,-29.86],
|
||||
"dus":[6.78,51.22],
|
||||
"dxb":[55.27,25.2],
|
||||
"edi":[-3.19,55.95],
|
||||
"fec":[-38.97,-12.27],
|
||||
"fih":[15.27,-4.33],
|
||||
"fln":[-48.55,-27.6],
|
||||
"for":[-38.54, -3.73],
|
||||
"fra":[8.68,50.11],
|
||||
"fuj":[56.15,25.07],
|
||||
"gbe":[25.91,-24.65],
|
||||
"gdl":[-103.35,20.67],
|
||||
"gua":[-90.51,14.63],
|
||||
"gum":[144.75,13.47],
|
||||
"gyn":[-49.25,-16.69],
|
||||
"ham":[9.99,53.55],
|
||||
"hba":[147.25,-42.85],
|
||||
"hel":[24.94,60.17],
|
||||
"hfx":[-63.62,44.68],
|
||||
"hir":[159.95,-9.43],
|
||||
"hkg":[114.17,22.32],
|
||||
"hnl":[-157.86,21.31],
|
||||
"hou":[-95.37,29.76],
|
||||
"hre":[31.05,-17.83],
|
||||
"hyd":[78.49, 17.39],
|
||||
"icn":[126.98,37.57],
|
||||
"igu":[-54.59,-25.55],
|
||||
"ist":[28.98, 41.01],
|
||||
"ivc":[168.35,-46.41],
|
||||
"jam":[-5.72,-15.93],
|
||||
"jed":[39.25,21.55],
|
||||
"jib":[43.15,11.59],
|
||||
"jkt":[106.85,-6.2],
|
||||
"jnb":[28.05,-26.2],
|
||||
"jpa":[-34.86,-7.12],
|
||||
"kcy":[-94.58,39.1],
|
||||
"kgl":[30.06,-1.95],
|
||||
"khi":[67.14,25.0],
|
||||
"kla":[32.58,0.35],
|
||||
"kul":[101.69, 3.14],
|
||||
"kyv":[30.52,50.45],
|
||||
"lad":[13.23,-8.84],
|
||||
"lag":[3.38,6.52],
|
||||
"lax":[-118.24,34.05],
|
||||
"ldb":[-51.16,-23.31],
|
||||
"lim":[-76.85,-12.05],
|
||||
"lis":[-9.14,38.72],
|
||||
"ljd":[-51.96,-29.47],
|
||||
"lon":[-0.13,51.51],
|
||||
"lpb":[-68.15,-16.5],
|
||||
"lun":[28.32,-15.39],
|
||||
"maa":[80.18,13.25],
|
||||
"mad":[-3.7,40.42],
|
||||
"maj":[171.38,7.09],
|
||||
"man":[-2.24,53.48],
|
||||
"mao":[-60.02,-3.12],
|
||||
"mba":[39.67,-4.04],
|
||||
"mcp":[-51.07,0.03],
|
||||
"mcz":[-35.74,-9.67],
|
||||
"mde":[-75.57,6.24],
|
||||
"mel":[144.96, -37.81],
|
||||
"mex":[-99.13,19.43],
|
||||
"mgf":[-51.94,-23.42],
|
||||
"mia":[-80.19,25.76],
|
||||
"mil":[9.19,45.46],
|
||||
"mnl":[120.98,14.6],
|
||||
"mos":[37.62,55.76],
|
||||
"mpm":[32.57,-25.97],
|
||||
"mrs":[5.37,43.3],
|
||||
"mtl":[-73.57,45.5],
|
||||
"mty":[-100.31,25.69],
|
||||
"muc":[11.58,48.14],
|
||||
"mvd":[-56.16,-34.9],
|
||||
"nat":[-35.21,-5.79],
|
||||
"nbo":[36.82,-1.29],
|
||||
"nou":[166.46,-22.27],
|
||||
"nyc":[-74.0,40.71],
|
||||
"oos":[3.23,51.15],
|
||||
"osa":[135.5, 34.69],
|
||||
"osl":[10.75,59.91],
|
||||
"ott":[-75.7,45.42],
|
||||
"pan":[-79.52, 8.98],
|
||||
"par":[2.35,48.86],
|
||||
"pdl":[-25.67,37.74],
|
||||
"pek":[116.4,39.9],
|
||||
"per":[115.86,-31.95],
|
||||
"phx":[-112.07,33.45],
|
||||
"pmo":[13.36,38.12],
|
||||
"pmw":[-48.33,-10.18],
|
||||
"poa":[-51.23,-30.03],
|
||||
"pom":[147.18,-9.44],
|
||||
"ppg":[-170.7,-14.28],
|
||||
"ppt":[-149.57,-17.53],
|
||||
"prg":[14.42, 50.08],
|
||||
"pvh":[-63.9,-8.76],
|
||||
"qro":[-100.39,20.59],
|
||||
"rai":[-23.55,14.98],
|
||||
"rao":[-47.81,-21.18],
|
||||
"rbr":[-67.81,-9.97],
|
||||
"rec":[-34.88,-8.05],
|
||||
"rek":[-21.94,64.15],
|
||||
"ria":[-53.81,-29.68],
|
||||
"rio":[-43.11,-22.57],
|
||||
"rom":[12.5,41.9],
|
||||
"ror":[134.48,7.34],
|
||||
"ruh":[46.72,24.71],
|
||||
"sao":[-46.63,-23.55],
|
||||
"scl":[-70.67, -33.45],
|
||||
"sea":[-122.33,47.61],
|
||||
"sgn":[106.66, 10.76],
|
||||
"sha":[121.47,31.23],
|
||||
"sin":[103.82,1.35],
|
||||
"sjc":[-121.89,37.34],
|
||||
"sjo":[-84.09,9.93],
|
||||
"sjp":[-49.38,-20.81],
|
||||
"slc":[-111.89,40.76],
|
||||
"slz":[-44.3,-2.53],
|
||||
"sof":[23.32,42.7],
|
||||
"ssa":[-38.5,-12.97],
|
||||
"stg":[9.18,48.78],
|
||||
"sto":[18.07,59.33],
|
||||
"suv":[178.44,-18.14],
|
||||
"svg":[5.73,58.97],
|
||||
"syd":[151.21,-33.87],
|
||||
"tbu":[-175.2,-21.14],
|
||||
"tci":[-16.3,28.44],
|
||||
"the":[-42.8,-5.09],
|
||||
"tll":[24.45,58.9],
|
||||
"tok":[139.69,35.69],
|
||||
"tor":[-79.38,43.65],
|
||||
"tpe":[121.56, 25.03],
|
||||
"tun":[10.18,36.81],
|
||||
"uio":[-78.47,-0.18],
|
||||
"van":[-123.12,49.28],
|
||||
"vie":[16.37, 48.21],
|
||||
"vix":[-40.31,-20.32],
|
||||
"waw":[21.01, 52.23],
|
||||
"wdh":[17.08,-22.56],
|
||||
"zrh":[8.54,47.37],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -203,6 +203,69 @@ const CITIES=[
|
|||
{id:'svg',name:'Stavanger',x:0,y:0,land:'eu',reg:'EU',P:60,ix:'Brunost-IX',dc:'Inside-a-Mountain DC',note:tr('Norway’s oil capital, now full of data centers inside mountains, run on hydro and cooled by the fjord. North Sea cables land here.')},
|
||||
];
|
||||
// Display-only nudges for cities that sit on top of each other at map scale; distances still use real lon/lat.
|
||||
const CITY_NUDGE={stg:[7,1],zrh:[-3,3],bru:[1,3],oos:[-3,0],van:[-3,-6],sea:[1,4],ott:[-3,-3],bcn:[-6,-4],auh:[-5,6],dxb:[9,-7],fuj:[8,15],tll:[-4,22],osa:[-10,6],khi:[-2,-6],hou:[0,6],dal:[0,-4],nyc:[.3,-.7],mia:[-.6,.4],mtl:[.8,0],cph:[-.7,.3],hel:[-.8,-.2],akl:[.6,.4],sin:[-1.3,-1.3],hkg:[.8,0],ist:[.8,0],lis:[.8,0],aju:[-13.5,-2.7],bel:[0.4,0.4],cac:[2.4,-0.7],cpv:[-10.2,-5.1],cpq:[-2.8,-5.2],cau:[-10.2,2.4],cxj:[5.4,-9.4],fec:[-10.8,1.4],fln:[0.8,4.4],igu:[-3.9,5.3],gyn:[-4,2.6],jpa:[-0.9,0.6],ljd:[-5.2,-7.7],ldb:[6.2,0.1],mcp:[-1.7,1.7],mcz:[-7.2,8],mgf:[-5.8,-4.4],nat:[-1.5,-3.3],rao:[3.6,-2.6],rec:[-2.4,7.2],ssa:[0.5,-0.2],ria:[-2.4,4.9],sjp:[-3.5,0.4],slz:[0.3,0.3],vix:[-0.4,0.4],mvd:[2.2,-4.3],asu:[-1.2,-0.8],mde:[-1.7,-1.9],qro:[-1.9,-3.9],gdl:[-1.2,0.2],cas:[0.6,0.6],alg:[0.9,0.9],jib:[0.1,0.2],mba:[-0.8,0],dar:[0,12.6],dur:[-0.2,0]};
|
||||
const CITY_NUDGE={
|
||||
aju:[-13.5,-2.7],
|
||||
akl:[.6,.4],
|
||||
alg:[0.9,0.9],
|
||||
asu:[-1.2,-0.8],
|
||||
auh:[-5,6],
|
||||
bcn:[-6,-4],
|
||||
bel:[0.4,0.4],
|
||||
bru:[1,3],
|
||||
cac:[2.4,-0.7],
|
||||
cas:[0.6,0.6],
|
||||
cau:[-10.2,2.4],
|
||||
cph:[-.7,.3],
|
||||
cpq:[-2.8,-5.2],
|
||||
cpv:[-10.2,-5.1],
|
||||
cxj:[5.4,-9.4],
|
||||
dal:[0,-4],
|
||||
dar:[0,12.6],
|
||||
dur:[-0.2,0],
|
||||
dxb:[9,-7],
|
||||
fec:[-10.8,1.4],
|
||||
fln:[0.8,4.4],
|
||||
fuj:[8,15],
|
||||
gdl:[-1.2,0.2],
|
||||
gyn:[-4,2.6],
|
||||
hel:[-.8,-.2],
|
||||
hkg:[.8,0],
|
||||
hou:[0,6],
|
||||
igu:[-3.9,5.3],
|
||||
ist:[.8,0],
|
||||
jib:[0.1,0.2],
|
||||
jpa:[-0.9,0.6],
|
||||
khi:[-2,-6],
|
||||
ldb:[6.2,0.1],
|
||||
lis:[.8,0],
|
||||
ljd:[-5.2,-7.7],
|
||||
mba:[-0.8,0],
|
||||
mcp:[-1.7,1.7],
|
||||
mcz:[-7.2,8],
|
||||
mde:[-1.7,-1.9],
|
||||
mgf:[-5.8,-4.4],
|
||||
mia:[-.6,.4],
|
||||
mtl:[.8,0],
|
||||
mvd:[2.2,-4.3],
|
||||
nat:[-1.5,-3.3],
|
||||
nyc:[.3,-.7],
|
||||
oos:[-3,0],
|
||||
osa:[-10,6],
|
||||
ott:[-3,-3],
|
||||
qro:[-1.9,-3.9],
|
||||
rao:[3.6,-2.6],
|
||||
rec:[-2.4,7.2],
|
||||
ria:[-2.4,4.9],
|
||||
sea:[1,4],
|
||||
sin:[-1.3,-1.3],
|
||||
sjp:[-3.5,0.4],
|
||||
slz:[0.3,0.3],
|
||||
ssa:[0.5,-0.2],
|
||||
stg:[7,1],
|
||||
tll:[-4,22],
|
||||
van:[-3,-6],
|
||||
vix:[-0.4,0.4],
|
||||
zrh:[-3,3],
|
||||
};
|
||||
for(const c of CITIES){const q=CITY_LL[c.id];if(q){c.lon=q[0];c.lat=q[1];const pt=proj(q[0],q[1]),n=CITY_NUDGE[c.id]||[0,0];c.x=pt[0]+n[0];c.y=pt[1]+n[1];}}
|
||||
const CITY=Object.fromEntries(CITIES.map(c=>[c.id,c])),CIDX=Object.fromEntries(CITIES.map((c,i)=>[c.id,i]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue