The no-cable hint in the link window names the satellite (#83)
Upstream 3.3's hint for a coast where no subsea cable lands (#321) said only a cable of your own could get to Iqaluit or Adamstown, and left satellites out at Pevek, though a teleport reaches all three. Once teleports are on sale (level 2) and a bird you may rent from sees the city, the 'own' case says a satellite circuit or a cable of your own can get there (a new string), and every case adds the satellite line: the city panel's 'Your teleports can reach' with a button per teleport to its order sheet (satOpen), or where to build one. Not in puzzles, and not before level 2, like the rest of the satellites.
This commit is contained in:
parent
7930d332f1
commit
2dc8274f34
10 changed files with 68 additions and 3 deletions
|
|
@ -25,6 +25,12 @@ function teleHtml(c){if(pzOn())return '';const t=teleOf(c),from=satFrom(c),open=
|
|||
return h+`</section>`;}
|
||||
// Teleports that reach city c: a button each, to the order sheet.
|
||||
const satReach=(c,from)=>`<p class="note">${tr('satellites.reachable_from_your_teleports',{city:CITY[c].name})}</p><div class="btns">${from.slice(0,4).map(a=>btn(tr('fiber_modals.from_city',{city:CITY[a].name}),'satOpen',{a,b:c},'ghost sm')).join('')}</div>`;
|
||||
// Whether a satellite can get to city c: a teleport of yours reaches it, or (once teleports are on sale) a bird you may
|
||||
// rent from sees it. Never in a puzzle, as the rest of the satellites.
|
||||
const satCan=c=>!pzOn()&&(satFrom(c).length>0||lvl()>=SAT_ORB.geo.lv&&satRemote(c)&&teleSees(c).some(id=>lvl()>=SAT_ORB[SATS[id].orb].lv));
|
||||
// Under the link window's "no subsea cable lands here" (#321): the teleports that reach c, a button each to the order
|
||||
// sheet, or where to build one.
|
||||
const satNoCable=c=>{const from=satFrom(c);return from.length?satReach(c,from):`<p class="note">${tr('satellites.no_teleport_reaches_city',{city:CITY[c].name})}</p>`;};
|
||||
// A city without a POP of yours, that a teleport of yours reaches: a POP and a circuit in one go.
|
||||
function satNoPop(c){if(pzOn()||S.pops[c])return '';const from=satFrom(c);if(!from.length)return '';
|
||||
return `<section><h3>🛰️ ${tr('satellites.by_satellite')}</h3><p class="lead">${tr('satellites.no_cable_needed_a_pop_here',{city:CITY[c].name})}</p>${satReach(c,from)}</section>`;}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ function openLinkModal(a,b){
|
|||
if(mode==='df'){openModal(head+dfModalBody(a,b,km,pop));return;}
|
||||
if(mode==='xp'){openModal(head+xpModalBody(a,b,xr));return;}
|
||||
if(sub&&!cablesOk(a,b).length){const fr=[...new Set(CABLE_PAIRS.filter(c=>c.a===a||c.b===a).map(c=>CITY[c.a===a?c.b:c.a].name))],dry=[a,b].find(c=>!landing(c));
|
||||
// a beach with no cable yet (#321): hopping cannot help, only a road in or a cable of your own
|
||||
const bare=!dry&&[a,b].find(c=>!CABLE_PAIRS.some(p=>p.a===c||p.b===c)),road=bare&&CITIES.some(x=>x.id!==bare&&!isSub(bare,x.id));
|
||||
openModal(head+`<p class="lead" style="margin-top:10px">${dry?tr('link_modal.no_subsea_cable_lands_in_city',{city:CITY[dry].name,near:CITY[nearLanding(dry)].name}):bare?(road?tr('link_modal.no_subsea_cable_lands_in_city_land',{city:CITY[bare].name}):tr('link_modal.no_subsea_cable_lands_in_city_own',{city:CITY[bare].name})):tr('link_modal.no_subsea_cable_lands_in_both',{a:CITY[a].name,b:CITY[b].name,list:fr.join(', ')})}</p>${(cabOpen()?!ownCabWhy(a,b):bare)?ownCabTeaser(a,b):''}`);return;}
|
||||
// a beach with no cable yet (#321): hopping cannot help, only a road in, a cable of your own, or a satellite (#83)
|
||||
const bare=!dry&&[a,b].find(c=>!CABLE_PAIRS.some(p=>p.a===c||p.b===c)),road=bare&&CITIES.some(x=>x.id!==bare&&!isSub(bare,x.id)),far=dry||bare,sat=!!far&&satCan(far);
|
||||
openModal(head+`<p class="lead" style="margin-top:10px">${dry?tr('link_modal.no_subsea_cable_lands_in_city',{city:CITY[dry].name,near:CITY[nearLanding(dry)].name}):bare?(road?tr('link_modal.no_subsea_cable_lands_in_city_land',{city:CITY[bare].name}):sat?tr('link_modal.no_subsea_cable_lands_in_city_own_sat',{city:CITY[bare].name}):tr('link_modal.no_subsea_cable_lands_in_city_own',{city:CITY[bare].name})):tr('link_modal.no_subsea_cable_lands_in_both',{a:CITY[a].name,b:CITY[b].name,list:fr.join(', ')})}</p>${sat?satNoCable(far):''}${(cabOpen()?!ownCabWhy(a,b):bare)?ownCabTeaser(a,b):''}`);return;}
|
||||
if(isSub(a,b)&&S.ev.landban&&S.ev.landban.until>S.day&&[a,b].includes(S.ev.landban.city)){openModal(head+`<p class="lead" style="margin-top:10px">${tr('link_modal.the_landing_permit_dispute_in_city',{city:CITY[S.ev.landban.city].name,n:S.ev.landban.until-S.day})}</p>`);return;}
|
||||
if(uaePair(a,b)||andesPair(a,b)||rainPair(a,b)||borderPair(a,b))route+=`<p class="note" style="margin-top:8px">${landWhy(a,b)}</p>`;
|
||||
route+=`<p class="note" style="margin-top:6px">📈 ${esc(marketNote(a,b,sub))}</p>`;
|
||||
|
|
|
|||
|
|
@ -2942,6 +2942,7 @@
|
|||
"link_modal.no_subsea_cable_lands_in_city":"No subsea cable lands in {city}. The nearest landing station is {near}: run fiber there first, then take a cable from it.",
|
||||
"link_modal.no_subsea_cable_lands_in_city_land":"No subsea cable lands in {city} yet. Reach it overland, or lay a subsea cable of your own.",
|
||||
"link_modal.no_subsea_cable_lands_in_city_own":"No subsea cable lands in {city} yet, and no road or fiber reaches it overland. Only a subsea cable of your own can get there.",
|
||||
"link_modal.no_subsea_cable_lands_in_city_own_sat":"No subsea cable lands in {city} yet, and no road or fiber reaches it overland. Only a satellite circuit or a subsea cable of your own can get there.",
|
||||
"link_modal.nobody_sells_capacity_between_kyiv":"Nobody sells capacity between Kyiv and Moscow, and nobody is going to. Route through Warsaw, Bucharest or Helsinki instead.",
|
||||
"link_modal.not_without_a_license":"Not without a license",
|
||||
"link_modal.premium_crossing_60_3_loss":"Premium crossing <small>+60% · ~3% loss</small>",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue