Architect runs: gold sites are now mission-critical (🚨), in all six languages

This commit is contained in:
Frederic Jung 2026-10-30 09:05:29 +01:00
parent eeac6ebcf4
commit ab05c80d68
No known key found for this signature in database
11 changed files with 74 additions and 74 deletions

View file

@ -95,9 +95,9 @@ function arShape(){const ns=Object.keys(S.pops),n=ns.length;if(n<2||!S.links.len
k=cs.length<n&&cs.every(c=>core[c].size===2)?'lolli':cs.length===n&&n>=6&&n%2===0&&cm===3*n/2-2&&d2===4&&cs.every(c=>core[c].size<=3)?'ladder':m>=n*1.8?'spaghetti':'mesh';}
return {k,i:AR_SHAPES[k][0],n:tr(AR_SHAPES[k][1])};}
// What later briefs do to a city, for the map: [{n: brief number, i: icon}], earliest first.
function arTags(c){const A=S.ar,out=[];arRun().briefs.forEach((b,j)=>{if(j<=A.bi)return;const i=(b.gold||[]).includes(c)?'🥇':(b.add||[]).includes(c)?'📍':(b.drop||[]).includes(c)?'🚫':b.dem&&b.dem[c]?'📈':(b.ring||[]).includes(c)?'💍':b.lat&&b.lat.slice(0,2).includes(c)?'⏱':'';if(i)out.push({n:j+1,i});});return out;}
function arTags(c){const A=S.ar,out=[];arRun().briefs.forEach((b,j)=>{if(j<=A.bi)return;const i=(b.gold||[]).includes(c)?'🚨':(b.add||[]).includes(c)?'📍':(b.drop||[]).includes(c)?'🚫':b.dem&&b.dem[c]?'📈':(b.ring||[]).includes(c)?'💍':b.lat&&b.lat.slice(0,2).includes(c)?'⏱':'';if(i)out.push({n:j+1,i});});return out;}
// One line per brief for the plan on the card.
function arSum(b){const nm=c=>CITY[c].name,t=[],d=b.dem||{};if(b.add)t.push(b.add.map(c=>'+'+nm(c)+(d[c]?' '+arG(d[c]):'')).join(' '));for(const c in d)if(!(b.add||[]).includes(c))t.push('📈 '+nm(c)+' '+arG(d[c]));if(b.gold)t.push('🥇 '+b.gold.map(nm).join(', '));
function arSum(b){const nm=c=>CITY[c].name,t=[],d=b.dem||{};if(b.add)t.push(b.add.map(c=>'+'+nm(c)+(d[c]?' '+arG(d[c]):'')).join(' '));for(const c in d)if(!(b.add||[]).includes(c))t.push('📈 '+nm(c)+' '+arG(d[c]));if(b.gold)t.push('🚨 '+b.gold.map(nm).join(', '));
if(b.ring)t.push('💍 '+b.ring.map(nm).join('–'));if(b.lat)t.push(`⏱ ${nm(b.lat[0])}⇄${nm(b.lat[1])} < ${b.lat[2]} ms`);if(b.drop)t.push('🚫 '+b.drop.map(nm).join(', '));
if(b.tubes!=null)t.push(trn('architect.n_tubes',b.tubes));return t.join(' · ');}
// ---------- starting, briefs and the end ----------

View file

@ -5,8 +5,8 @@ function arRender(el){const A=S.ar,run=arRun(),b=arBrief(),e=arEval(),sh=UI.arSh
let h=`<div class="grab" data-grab="pz" aria-hidden="true"></div><div class="pzh"><div class="grow"><div class="eyebrow">🏗️ ${esc(run.n)}</div><h3>${tr('architect.brief_n_of_m',{n:A.bi+1,m:n})}</h3></div>${btn('☰','puzzleMenu',{},'ghost sm')}</div>`;
h+=`<div class="arsteps">${run.briefs.map((x,i)=>`<i class="${i<A.bi||(i===A.bi&&e.passed)?'done':i===A.bi?'on':''}"></i>`).join('')}</div>`;
h+=`<p class="arbrief">${esc(b.t)}</p>`;
h+=`<div class="arsites">${e.sites.map(s=>`<span class="arsite${s.ok&&s.full?' ok':''}${s.ok&&!s.full?' thin':''}${s.gold?' gold':''}">${s.hq?'🏠':s.gold?'🥇':s.ok?'✓':'○'} ${nm(s.c)}${s.hq?'':` <small>${s.ok&&!s.full?arG(s.got)+'/':''}${arG(s.dem)}</small>`}</span>`).join('')}</div>`;
if(A.gold.length)h+=`<div class="arline">🥇 ${tr('architect.gold_must_survive',{list:A.gold.map(nm).join(', ')})}</div>`;
h+=`<div class="arsites">${e.sites.map(s=>`<span class="arsite${s.ok&&s.full?' ok':''}${s.ok&&!s.full?' thin':''}${s.gold?' gold':''}">${s.hq?'🏠':s.gold?'🚨':s.ok?'✓':'○'} ${nm(s.c)}${s.hq?'':` <small>${s.ok&&!s.full?arG(s.got)+'/':''}${arG(s.dem)}</small>`}</span>`).join('')}</div>`;
if(A.gold.length)h+=`<div class="arline">🚨 ${tr('architect.gold_must_survive',{list:A.gold.map(nm).join(', ')})}</div>`;
for(const r of e.rings)h+=`<div class="arline ${r.ok?'ok':'bad'}">💍 ${tr('architect.ring_list',{list:r.cs.map(nm).join(' · ')})} ${r.ok?'✓':''}</div>`;
if(e.lat)h+=`<div class="arline ${e.lat.ok?'ok':'bad'}">⏱ ${nm(e.lat.a)} ⇄ ${nm(e.lat.b)}: ${e.lat.ms==null?tr('common.no_path'):e.lat.ms.toFixed(1)+' ms'} / ${e.lat.cap} ms</div>`;
for(const c of S.pz.avoid)h+=`<div class="arline ${S.pops[c]?'bad':'ok'}">🚫 ${tr('architect.closed_city',{city:nm(c)})}</div>`;
@ -23,7 +23,7 @@ function arRender(el){const A=S.ar,run=arRun(),b=arBrief(),e=arEval(),sh=UI.arSh
function arPanel(sel){const A=S.ar,head=(eb,name,facts)=>`<div class="ph"><div style="min-width:0"><div class="eyebrow">${eb}</div><h2>${name}</h2>${facts?`<div class="facts">${facts}</div>`:''}</div><button class="x" data-act="closePanel" aria-label="${tr('common.close')}">×</button></div>`;
const old=x=>(x.br|0)<A.bi?`<p class="note">${tr('architect.built_in_an_earlier_brief')}</p>`:'';
if(sel.type==='city'){const c=sel.id,k=pzKind(c),p=S.pops[c];if(!k)return '';
const tg=arTags(c),eb=c===A.hq?'🏠 '+tr('architect.hq'):A.gold.includes(c)?'🥇 '+tr('architect.gold_site'):k==='goal'?'🎯 '+tr('architect.site'):k==='via'&&tg.length?'🔜 '+tr('architect.joins_in_brief_n',{n:tg[0].n}):k==='via'?'🪨 '+tr('puzzles.stepping_stone_optional'):k==='avoid'?'🚫 '+tr('architect.closed'):'📍 '+tr('puzzles.not_in_the_plan');
const tg=arTags(c),eb=c===A.hq?'🏠 '+tr('architect.hq'):A.gold.includes(c)?'🚨 '+tr('architect.gold_site'):k==='goal'?'🎯 '+tr('architect.site'):k==='via'&&tg.length?'🔜 '+tr('architect.joins_in_brief_n',{n:tg[0].n}):k==='via'?'🪨 '+tr('puzzles.stepping_stone_optional'):k==='avoid'?'🚫 '+tr('architect.closed'):'📍 '+tr('puzzles.not_in_the_plan');
let h=head(eb,esc(CITY[c].name),p?`<span class="fact mine">${tr('common.your_pop')}</span><span class="fact">${tr('puzzles.price_per_year',{price:fmt$(arPopCost(c))})}</span>`:'')+'<div class="scroll">';
if(c===A.hq)h+=`<p class="lead">${tr('architect.hq_lead')}</p>`;else if(A.gold.includes(c))h+=`<p class="lead">${tr('architect.gold_lead')}</p>`;
if(tg.length)h+=`<div class="arplan"><div class="eyebrow">${tr('architect.coming_up')}</div>${tg.map(t=>`<div><b>${t.n}</b> ${esc(arSum(arRun().briefs[t.n-1]))}</div>`).join('')}</div>`;

View file

@ -32,22 +32,22 @@
"architect.cut_n_of_m":"Cut {n} of {m}…",
"architect.cut_on_x_cuts_off_y":"A cut on {x} cuts off {y}.",
"architect.cut_on_x_no_room":"A cut on {x} leaves no room on the detour. Short: {y}.",
"architect.dark_list":"Dark for now: {list}. Not gold, so that's allowed.",
"architect.dark_list":"Dark for now: {list}. Not mission-critical, so that's allowed.",
"architect.drag_from_your_hq":"Drag from your HQ to another city to lay a tube",
"architect.euro_1":"Your servers live in Amsterdam. First customer: Frankfurt. Connect it.",
"architect.euro_2b":"Paris and London want in.",
"architect.euro_3b":"Frankfurt and Paris sign banks. Both go gold.",
"architect.euro_5":"Zürich, another bank. Gold from day one.",
"architect.euro_6":"Your Frankfurt landlord sold the building. Move out. The bank moves to Düsseldorf, and it is still gold.",
"architect.euro_3b":"Frankfurt and Paris sign banks. Both are now mission-critical.",
"architect.euro_5":"Zürich, another bank. Mission-critical from day one.",
"architect.euro_6":"Your Frankfurt landlord sold the building. Move out. The bank moves to Düsseldorf, and it is still mission-critical.",
"architect.euro_ring_grow":"Paris doubles to 100G. And London, Paris and Amsterdam want a ring between them.",
"architect.euro_run":"Euro Run",
"architect.euro_run_joke":"Six briefs, one landlord, one very nervous bank.",
"architect.finish_the_run":"Finish the run",
"architect.fix_it_and_send_it_again":"Fix it, then send the backhoe again.",
"architect.from_x":"from {x}",
"architect.gold_lead":"Gold: this site must stay connected to HQ whichever single trench or cable is cut, and the detour needs room for its traffic.",
"architect.gold_lead":"Mission-critical: this site must stay connected to HQ whichever single trench or cable is cut, and the detour needs room for its traffic.",
"architect.gold_must_survive":"Must survive any single cut: {list}",
"architect.gold_site":"Gold site",
"architect.gold_site":"Mission-critical site",
"architect.hide_other_cities":"Hide other cities",
"architect.hq":"HQ",
"architect.hq_lead":"Your servers live here. Every site needs a path to HQ.",
@ -72,13 +72,13 @@
"architect.or_drag_a_tube_here":"Or drag a tube here from one of your POPs.",
"architect.pac_1":"Your servers live in Tokyo. Hong Kong first.",
"architect.pac_2":"Singapore wants in.",
"architect.pac_3":"A stock exchange in Hong Kong. Hong Kong is gold.",
"architect.pac_4":"Singapore signs a bank. Gold too.",
"architect.pac_3":"A stock exchange in Hong Kong. Hong Kong is mission-critical.",
"architect.pac_4":"Singapore signs a bank. Mission-critical too.",
"architect.pac_5":"Sydney. Far from everything: that is the point, and the problem.",
"architect.pacific_rim":"Pacific Rim",
"architect.pacific_rim_joke":"Oceans, anchors and very expensive glass.",
"architect.plus_router_x":"+ bigger router {x}",
"architect.ready_no_gold_yet":"Ready. No gold sites yet, so the backhoe can only make a mess.",
"architect.ready_no_gold_yet":"Ready. Nothing is mission-critical yet, so the backhoe can only make a mess.",
"architect.ready_send_the_backhoe":"Ready. Send the backhoe and see what survives.",
"architect.reset_brief":"Reset brief",
"architect.review_passed":"Review passed",
@ -118,10 +118,10 @@
"architect.tubes_this_brief":"Tubes this brief",
"architect.usa_1":"Your servers live in Ashburn. New York first.",
"architect.usa_2":"Chicago wants in.",
"architect.usa_3":"A bank in New York. New York is gold.",
"architect.usa_3":"A bank in New York. New York is mission-critical.",
"architect.usa_4":"Traders want New York ⇄ Chicago under 8 ms.",
"architect.usa_5":"Dallas and Silicon Valley want in.",
"architect.usa_6":"A cloud deal in Silicon Valley. It goes gold.",
"architect.usa_6":"A cloud deal in Silicon Valley. It's mission-critical.",
"architect.x_paid_for_and_gone":"{x} of that paid for things you removed",
"architect.your_shape":"Your shape",
"badges.a_petabit_a_second":"A Petabit a Second",

View file

@ -4,7 +4,7 @@
.arbrief{margin:2px 0 8px;font-size:14.5px;font-weight:800;line-height:1.35}
.arsites{display:flex;flex-wrap:wrap;gap:5px;margin:4px 0 6px}
.arsite{font-weight:900;font-size:12px;border:2px solid var(--line);border-radius:999px;padding:1px 8px;background:#fff;color:var(--ink2)}
.arsite.ok{border-color:var(--ok);color:var(--ink)}.arsite.gold{border-color:#E0A000;background:#FFF3C4}
.arsite.ok{border-color:var(--ok);color:var(--ink)}.arsite.gold{border-color:#E5484D;background:#FFE8E8}
.arline{font-size:12.5px;font-weight:800;margin:3px 0;color:var(--ink2)}.arline.ok{color:var(--ink)}.arline.bad{color:var(--bad)}
.arshape{font-size:12.5px;font-weight:900;margin:4px 0}
.arrev{font-size:12.5px;font-weight:800;margin:6px 0;padding:5px 8px;border:2px solid var(--line);border-radius:10px;color:var(--ink2)}