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
|
|
@ -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