diff --git a/site/i18n/de.js b/site/i18n/de.js
index 0f13a5c..5a95062 100644
--- a/site/i18n/de.js
+++ b/site/i18n/de.js
@@ -29,7 +29,6 @@
"architect.closed_lead":"Diese Stadt ist jetzt dicht. Zieh aus: Entferne den POP und finde einen anderen Weg.",
"architect.coast_to_coast":"Coast to Coast",
"architect.coast_to_coast_joke":"Von der Data Center Alley bis ins Silicon Valley, ein Auftrag nach dem anderen.",
-"architect.coming_up":"Demnächst",
"architect.cut_n_of_m":"Schnitt {n} von {m}…",
"architect.cut_on_x_cuts_off_y":"Ein Schnitt auf {x} schneidet {y} ab.",
"architect.cut_on_x_no_room":"Ein Schnitt auf {x} lässt auf dem Umweg keinen Platz. Es fehlt: {y}.",
@@ -52,7 +51,6 @@
"architect.hide_other_cities":"Andere Städte ausblenden",
"architect.hq":"HQ",
"architect.hq_lead":"Hier stehen deine Server. Jeder Standort braucht einen Weg zum HQ.",
-"architect.joins_in_brief_n":"Kommt in Auftrag {n} dazu",
"architect.keep_going":"Weiterbauen",
"architect.last_brief_done":"Das war der letzte Auftrag.",
"architect.lay_a_tube_to":"Röhre legen nach",
@@ -62,14 +60,12 @@
"architect.move_out_of_city":"Zieh zuerst aus {city} aus.",
"architect.n_briefs":"{n} Aufträge",
"architect.n_over_plan":"{n} über Plan",
-"architect.n_tubes":{"one":"{n} Röhre","other":"{n} Röhren"},
"architect.new":"Neu",
"architect.next_brief":"Nächster Auftrag",
"architect.next_brief_waiting":"Der nächste Auftrag wartet.",
"architect.next_run":"Nächster Run",
"architect.not_a_ring_yet":"Noch kein Ring.",
"architect.not_connected_yet_list":"Noch nicht mit dem HQ verbunden: {list}",
-"architect.numbers_on_the_map_show":"Die Zahlen auf der Karte zeigen, was spätere Aufträge bringen. Du darfst dort schon früher bauen.",
"architect.or_drag_a_tube_here":"Oder zieh eine Röhre von einem deiner POPs hierher.",
"architect.pac_1":"Deine Server stehen in Tokio. Zuerst Hongkong.",
"architect.pac_2":"Singapur will auch.",
diff --git a/site/i18n/es.js b/site/i18n/es.js
index 5c252e7..481f2a2 100644
--- a/site/i18n/es.js
+++ b/site/i18n/es.js
@@ -27,7 +27,6 @@
"architect.closed_lead":"Esta ciudad ya está cerrada. Múdate: quita el POP y busca otro camino.",
"architect.coast_to_coast":"De costa a costa",
"architect.coast_to_coast_joke":"Del callejón de los data centers a Silicon Valley, encargo a encargo.",
-"architect.coming_up":"Próximamente",
"architect.cut_n_of_m":"Corte {n} de {m}…",
"architect.cut_on_x_cuts_off_y":"Un corte en {x} deja aislado a {y}.",
"architect.cut_on_x_no_room":"Un corte en {x} no deja sitio en el desvío. Falta: {y}.",
@@ -50,7 +49,6 @@
"architect.hide_other_cities":"Ocultar otras ciudades",
"architect.hq":"Sede",
"architect.hq_lead":"Aquí viven tus servidores. Cada sitio necesita un camino a la sede.",
-"architect.joins_in_brief_n":"Llega en el encargo {n}",
"architect.keep_going":"Seguir construyendo",
"architect.last_brief_done":"Ese era el último encargo.",
"architect.lay_a_tube_to":"Tender un tubo a",
@@ -60,14 +58,12 @@
"architect.move_out_of_city":"Primero sal de {city}.",
"architect.n_briefs":"{n} encargos",
"architect.n_over_plan":"{n} por encima del plan",
-"architect.n_tubes":{"one":"{n} tubo","other":"{n} tubos"},
"architect.new":"Nuevo",
"architect.next_brief":"Siguiente encargo",
"architect.next_brief_waiting":"El siguiente encargo te espera.",
"architect.next_run":"Siguiente partida",
"architect.not_a_ring_yet":"Todavía no es un anillo.",
"architect.not_connected_yet_list":"Aún sin conexión a la sede: {list}",
-"architect.numbers_on_the_map_show":"Los números del mapa muestran lo que traen los próximos encargos. Puedes construir allí antes.",
"architect.or_drag_a_tube_here":"O arrastra un tubo hasta aquí desde uno de tus POP.",
"architect.pac_1":"Tus servidores viven en Tokio. Primero, Hong Kong.",
"architect.pac_2":"Singapur se apunta.",
diff --git a/site/i18n/fr.js b/site/i18n/fr.js
index 3531dc6..b84ff22 100644
--- a/site/i18n/fr.js
+++ b/site/i18n/fr.js
@@ -27,7 +27,6 @@
"architect.closed_lead":"Cette ville est fermée maintenant. Déménage : retire le POP et trouve un autre chemin.",
"architect.coast_to_coast":"D’une côte à l’autre",
"architect.coast_to_coast_joke":"De l’allée des data centers à la Silicon Valley, un brief à la fois.",
-"architect.coming_up":"À venir",
"architect.cut_n_of_m":"Coupure {n} sur {m}…",
"architect.cut_on_x_cuts_off_y":"Une coupure sur {x} isole {y}.",
"architect.cut_on_x_no_room":"Une coupure sur {x} ne laisse pas de place sur le détour. Manque : {y}.",
@@ -50,7 +49,6 @@
"architect.hide_other_cities":"Masquer les autres villes",
"architect.hq":"QG",
"architect.hq_lead":"Tes serveurs vivent ici. Chaque site a besoin d’un chemin vers le QG.",
-"architect.joins_in_brief_n":"Arrive au brief {n}",
"architect.keep_going":"Continuer à construire",
"architect.last_brief_done":"C’était le dernier brief.",
"architect.lay_a_tube_to":"Poser un tube vers",
@@ -60,14 +58,12 @@
"architect.move_out_of_city":"Quitte d’abord {city}.",
"architect.n_briefs":"{n} briefs",
"architect.n_over_plan":"{n} au-delà du plan",
-"architect.n_tubes":{"one":"{n} tube","other":"{n} tubes"},
"architect.new":"Nouveau",
"architect.next_brief":"Brief suivant",
"architect.next_brief_waiting":"Le brief suivant t’attend.",
"architect.next_run":"Partie suivante",
"architect.not_a_ring_yet":"Pas encore un anneau.",
"architect.not_connected_yet_list":"Pas encore relié au QG : {list}",
-"architect.numbers_on_the_map_show":"Les chiffres sur la carte montrent ce qu’apportent les briefs suivants. Tu peux y construire en avance.",
"architect.or_drag_a_tube_here":"Ou fais glisser un tube jusqu’ici depuis un de tes POP.",
"architect.pac_1":"Tes serveurs vivent à Tokyo. D’abord Hong Kong.",
"architect.pac_2":"Singapour veut en être.",
diff --git a/site/i18n/it.js b/site/i18n/it.js
index 4c92ff7..de9a748 100644
--- a/site/i18n/it.js
+++ b/site/i18n/it.js
@@ -27,7 +27,6 @@
"architect.closed_lead":"Questa città ora è chiusa. Trasloca: togli il POP e trova un’altra strada.",
"architect.coast_to_coast":"Da costa a costa",
"architect.coast_to_coast_joke":"Dal vicolo dei data center alla Silicon Valley, un incarico alla volta.",
-"architect.coming_up":"In arrivo",
"architect.cut_n_of_m":"Taglio {n} di {m}…",
"architect.cut_on_x_cuts_off_y":"Un taglio su {x} isola {y}.",
"architect.cut_on_x_no_room":"Un taglio su {x} non lascia spazio sulla deviazione. Manca: {y}.",
@@ -50,7 +49,6 @@
"architect.hide_other_cities":"Nascondi le altre città",
"architect.hq":"Sede",
"architect.hq_lead":"Qui vivono i tuoi server. Ogni sito ha bisogno di una strada verso la sede.",
-"architect.joins_in_brief_n":"Arriva nell’incarico {n}",
"architect.keep_going":"Continua a costruire",
"architect.last_brief_done":"Era l’ultimo incarico.",
"architect.lay_a_tube_to":"Posa un tubo verso",
@@ -60,14 +58,12 @@
"architect.move_out_of_city":"Prima lascia {city}.",
"architect.n_briefs":"{n} incarichi",
"architect.n_over_plan":"{n} oltre il piano",
-"architect.n_tubes":{"one":"{n} tubo","other":"{n} tubi"},
"architect.new":"Nuovo",
"architect.next_brief":"Prossimo incarico",
"architect.next_brief_waiting":"Il prossimo incarico ti aspetta.",
"architect.next_run":"Prossima partita",
"architect.not_a_ring_yet":"Non è ancora un anello.",
"architect.not_connected_yet_list":"Non ancora collegati alla sede: {list}",
-"architect.numbers_on_the_map_show":"I numeri sulla mappa mostrano cosa portano i prossimi incarichi. Puoi costruirci già prima.",
"architect.or_drag_a_tube_here":"Oppure trascina qui un tubo da uno dei tuoi POP.",
"architect.pac_1":"I tuoi server vivono a Tokyo. Prima Hong Kong.",
"architect.pac_2":"Anche Singapore vuole entrare.",
diff --git a/site/i18n/pt.js b/site/i18n/pt.js
index aea7dad..df7ae8f 100644
--- a/site/i18n/pt.js
+++ b/site/i18n/pt.js
@@ -27,7 +27,6 @@
"architect.closed_lead":"Esta cidade fechou. Saia de lá: remova o POP e ache outro caminho.",
"architect.coast_to_coast":"De costa a costa",
"architect.coast_to_coast_joke":"Do beco dos data centers ao Vale do Silício, um pedido de cada vez.",
-"architect.coming_up":"Vem aí",
"architect.cut_n_of_m":"Corte {n} de {m}…",
"architect.cut_on_x_cuts_off_y":"Um corte em {x} isola {y}.",
"architect.cut_on_x_no_room":"Um corte em {x} não deixa espaço no desvio. Falta: {y}.",
@@ -50,7 +49,6 @@
"architect.hide_other_cities":"Esconder outras cidades",
"architect.hq":"Sede",
"architect.hq_lead":"Seus servidores moram aqui. Todo site precisa de um caminho até a sede.",
-"architect.joins_in_brief_n":"Entra no pedido {n}",
"architect.keep_going":"Continuar construindo",
"architect.last_brief_done":"Esse foi o último pedido.",
"architect.lay_a_tube_to":"Lançar um tubo até",
@@ -60,14 +58,12 @@
"architect.move_out_of_city":"Saia de {city} primeiro.",
"architect.n_briefs":"{n} pedidos",
"architect.n_over_plan":"{n} acima do plano",
-"architect.n_tubes":{"one":"{n} tubo","other":"{n} tubos"},
"architect.new":"Novo",
"architect.next_brief":"Próximo pedido",
"architect.next_brief_waiting":"O próximo pedido está esperando.",
"architect.next_run":"Próxima partida",
"architect.not_a_ring_yet":"Ainda não é um anel.",
"architect.not_connected_yet_list":"Ainda sem ligação com a sede: {list}",
-"architect.numbers_on_the_map_show":"Os números no mapa mostram o que os próximos pedidos trazem. Dá para construir lá antes.",
"architect.or_drag_a_tube_here":"Ou arraste um tubo até aqui de um dos seus POPs.",
"architect.pac_1":"Seus servidores moram em Tóquio. Primeiro, Hong Kong.",
"architect.pac_2":"Singapura quer entrar.",
diff --git a/src/game/60-features/96-architect.js b/src/game/60-features/96-architect.js
index b720cc0..1fb2f5a 100644
--- a/src/game/60-features/96-architect.js
+++ b/src/game/60-features/96-architect.js
@@ -95,11 +95,6 @@ function arShape(){const ns=Object.keys(S.pops),n=ns.length;if(n<2||!S.links.len
k=cs.length
${esc(b.t)}${i===0&&arRun().briefs.length>1?'
'+tr('architect.numbers_on_the_map_show')+'':''}`,'goal');sfx('click');}
+ toast(`${tr('architect.brief_n_of_m',{n:i+1,m:arRun().briefs.length})}
${esc(b.t)}`,'goal');sfx('click');}
function arNext(){if(!arOn())return;const e=arEval();if(!e.passed)return;if(arLast()){arResults(true);return;}S.ar.over+=e.tubes.over;arApply(S.ar.bi+1);}
function arReset(){const o=JSON.parse(S.ar.start);S.pops=o.p;S.links=o.l;S.pairMet=o.m||{};S.ar.sunk=o.k||0;arDemand();UI.sel=null;}
// Tubes over plan in the run so far, this brief included.
diff --git a/src/game/95-modals/96-architect.js b/src/game/95-modals/96-architect.js
index fa37c81..a150a98 100644
--- a/src/game/95-modals/96-architect.js
+++ b/src/game/95-modals/96-architect.js
@@ -23,10 +23,9 @@ 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)=>`${name}
${facts?`
${tr('architect.hq_lead')}
`;else if(A.gold.includes(c))h+=`${tr('architect.gold_lead')}
`; - if(tg.length)h+=`${tr('puzzles.not_this_one_find_a_way_around')}
${tr('architect.or_drag_a_tube_here')}
`;} if(k==='avoid')h+=`${tr('architect.closed_lead')}
`; diff --git a/src/game/96-map/60-draw.js b/src/game/96-map/60-draw.js index 42f15db..4874205 100644 --- a/src/game/96-map/60-draw.js +++ b/src/game/96-map/60-draw.js @@ -85,7 +85,7 @@ function drawFrame(now){ // Which cities show an offer bubble (a big one?) or an incident marker, worked out once for all of them. CM.off=new Set();CM.big=new Set();for(const o of S.offers){const big=BIZ_T[o.type].lv>=3||BIZ_T[o.type].event;for(const c of bCities(o)){CM.off.add(c);if(big)CM.big.add(c);}} CM.inc=new Set(S.inc.filter(i=>i.type!=='leak').map(i=>i.ref));CM.far=farL; - if(pzOn()){for(const v of vis.slice().reverse())pzDrawCity(v,sc,now);if(S.ar)for(const v of vis)arDrawTags(v,sc);}else for(const v of vis.slice().reverse())drawCity(v.C,v.sx,v.sy,sc,now,v.ly); + if(pzOn()){for(const v of vis.slice().reverse())pzDrawCity(v,sc,now);}else for(const v of vis.slice().reverse())drawCity(v.C,v.sx,v.sy,sc,now,v.ly); if(UI.mk)mkDraw(ks); // floaters for(let i=FLOATS.length-1;i>=0;i--){const f=FLOATS[i],a=(now-f.t)/1600;if(a>1){FLOATS.splice(i,1);continue;} diff --git a/src/game/96-map/85-puzzle-cities.js b/src/game/96-map/85-puzzle-cities.js index 621b5e7..19041d1 100644 --- a/src/game/96-map/85-puzzle-cities.js +++ b/src/game/96-map/85-puzzle-cities.js @@ -14,7 +14,3 @@ function pzDrawCity(v,sc,now){const k=pzKind(v.C.id); // In a puzzle every line says what it is ("2×100G · 70%"), and a selected POP lights up every pair it has links on. function pzLinkLab(grp,up,load,cap){if(S.ar)return groupLabel(grp,up)+(cap?` · ${Math.round(load/cap*100)}%`:'');return groupLabel(grp,up)+(cap?` · ${Math.round(load/cap*100)}%`:'');} const pzLinkHot=grp=>!!(UI.sel&&UI.sel.type==='city'&&grp.some(x=>x.a===UI.sel.id||x.b===UI.sel.id)); -// Architect runs: what later briefs do here, as small numbered tags beside the city ("4🥇", "6🚫"). -function arDrawTags(v,sc){const tg=arTags(v.C.id).slice(0,2);if(!tg.length||!pzKind(v.C.id))return;const r=(CM.far?16:34)*sc,y=v.sy-(CM.far?0:6*sc);const t=tg.map(x=>x.n+x.i).join(' '); - ctx.save();ctx.font=`900 ${Math.round((CM.far?10:12)*Math.max(0.9,Math.min(1.3,sc)))}px "Baloo 2", sans-serif`;const w=ctx.measureText(t).width+12,h=18,x=v.sx-r-w*0.35,yy=y-r-4; - ctx.fillStyle='#fff';ctx.strokeStyle='#1E2640';ctx.lineWidth=2;rr(x,yy,w,h,9);ctx.fill();ctx.stroke();ctx.fillStyle='#1E2640';ctx.textAlign='center';ctx.textBaseline='middle';ctx.fillText(t,x+w/2,yy+h/2+1);ctx.restore();} diff --git a/src/i18n/en.js b/src/i18n/en.js index d334d8c..f33be0d 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -28,7 +28,6 @@ "architect.closed_lead":"This city is closed now. Move out: remove the POP and find another way.", "architect.coast_to_coast":"Coast to Coast", "architect.coast_to_coast_joke":"From data center alley to Silicon Valley, one brief at a time.", -"architect.coming_up":"Coming up", "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}.", @@ -51,7 +50,6 @@ "architect.hide_other_cities":"Hide other cities", "architect.hq":"HQ", "architect.hq_lead":"Your servers live here. Every site needs a path to HQ.", -"architect.joins_in_brief_n":"Joins in brief {n}", "architect.keep_going":"Keep building", "architect.last_brief_done":"That was the last brief.", "architect.lay_a_tube_to":"Lay a tube to", @@ -61,14 +59,12 @@ "architect.move_out_of_city":"Move out of {city} first.", "architect.n_briefs":"{n} briefs", "architect.n_over_plan":"{n} over plan", -"architect.n_tubes":{"one":"{n} tube","other":"{n} tubes"}, "architect.new":"New", "architect.next_brief":"Next brief", "architect.next_brief_waiting":"The next brief is waiting.", "architect.next_run":"Next run", "architect.not_a_ring_yet":"Not a ring yet.", "architect.not_connected_yet_list":"Not connected to HQ yet: {list}", -"architect.numbers_on_the_map_show":"Numbers on the map show what later briefs bring. You can build there early.", "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.", diff --git a/src/styles/71-architect.css b/src/styles/71-architect.css index a31a7e3..e4f6d62 100644 --- a/src/styles/71-architect.css +++ b/src/styles/71-architect.css @@ -13,7 +13,6 @@ #pzBox .arbtns .b.big{flex:1 1 100%} .artubes{display:flex;justify-content:space-between;align-items:center;font-size:12.5px;font-weight:800;margin:4px 0}.artubes b{font-size:15px;letter-spacing:2px;color:var(--me)} .artubes em{font-style:normal;font-size:11.5px;letter-spacing:0;color:#B86A00}.artubes.over b{color:#B86A00} -.arplan{margin:6px 0;padding:5px 8px;border:2px dashed var(--line);border-radius:10px;font-size:12px;font-weight:700;color:var(--ink2)}.arplan b{display:inline-block;min-width:14px;color:var(--ink)} /* Laptops and up: a bigger card, easier to read at a glance */ @media (min-width:761px) and (min-height:501px){ #pzBox.ar{width:390px;padding:14px 18px 16px} @@ -21,7 +20,7 @@ #pzBox.ar .arsteps i{height:9px} #pzBox.ar .arbrief{font-size:17.5px;margin:4px 0 10px} #pzBox.ar .arsite{font-size:14px;padding:2px 10px} - #pzBox.ar .arline,#pzBox.ar .arrev,#pzBox.ar .artubes,#pzBox.ar .pzbud .kv,#pzBox.ar .arplan{font-size:14px} + #pzBox.ar .arline,#pzBox.ar .arrev,#pzBox.ar .artubes,#pzBox.ar .pzbud .kv{font-size:14px} #pzBox.ar .artubes b{font-size:19px}#pzBox.ar .pzbud .bar{height:12px} #pzBox.ar .arbtns .b.sm{font-size:13px;padding:5px 11px} } diff --git a/tests/architect.test.js b/tests/architect.test.js index c17929f..d54d1ac 100644 --- a/tests/architect.test.js +++ b/tests/architect.test.js @@ -38,7 +38,11 @@ test('architect runs: the chaos monkey finds a shared trench, edits clear the cu const { ev, errors } = load(); ev("ACT.pzArStart({id:'euro'})"); assert.equal(ev("arHide('lis')&&arHide('bru')"), true, 'cities outside the run are hidden'); - assert.deepEqual(JSON.parse(ev("JSON.stringify([arHide('dus'),arTags('dus'),arTags('fra').map(t=>t.n+t.i)])")), [false, [{ n: 6, i: '🚨' }], ['3🚨', '6🚫']], 'later briefs show on the map, numbered'); + assert.equal(ev("arHide('dus')"), false); + // Later briefs stay a surprise: nothing on the map or a city card says where the run goes next. + assert.equal(ev("typeof arTags"), 'undefined'); + ev("UI.sel={type:'city',id:'fra'};renderPanel()"); + assert.doesNotMatch(ev("document.getElementById('panelBody')?.textContent||''"), /brief \d|Coming up/i); ev('ACT.pzArAll()'); assert.equal(ev("arHide('lis')"), false, 'and shown on request'); ev('ACT.pzArAll()'); @@ -99,7 +103,6 @@ test('architect runs: a ring goal needs one cycle through its cities', () => { assert.match(ev('arEval().why'), /ring/i); lay(ev, 'lon', 'par', 'pasdc'); assert.equal(ev("arRingOk(['ams','par','lon'])&&arEval().ready"), true); - assert.ok(ev("arSum(arRun().briefs[5])").includes('Frankfurt'), 'the plan shows what is coming'); assert.deepEqual(errors, []); });