diff --git a/CHANGELOG.md b/CHANGELOG.md index cf6cc92..b7481d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] +- In dark mode, red warning text is now a lighter red that reads well on the dark panels, and the capacity market's Hot and Cool tags take the night colours instead of staying bright pastel chips (#80). - The NOC dashboard's connections list no longer breaks when one of your fabric ports is already at 400G, the biggest a fabric port gets: it offers a LAG member instead of an upgrade. - Broadband cities can now go IPv6-only with 464XLAT, a second way to save IPv4 next to CGNAT. Start it from a city's Home broadband, which also says what it does to your monthly IPv4 bill: its home routers are swapped over a month or more, paid as each one goes in (new homes there get one too, at the same price), and the homes then need no IPv4 address of their own, only a share of a NAT64 pool at up to 256 homes per address, with fewer refunds than CGNAT at the same ratio. The bank's Address space section shows your homes as public, behind CGNAT and IPv6-only, with the NAT64 ratio next to the CGNAT one, and says which of the two to stretch when space runs out. - CGNAT gets a little cheaper every year: the world moves to IPv6 about two points a year, so less of your homes' traffic needs IPv4 and the CGNAT and NAT64 boxes carry less of it. diff --git a/src/game/60-features/37-customer-paths.js b/src/game/60-features/37-customer-paths.js index 670fe66..032457f 100644 --- a/src/game/60-features/37-customer-paths.js +++ b/src/game/60-features/37-customer-paths.js @@ -56,7 +56,7 @@ function circuitTargets(b){const G=pathEdges(),now=pathNow(b,G);if(!now)return { function pinRoute(p,edges){const path=[];for(let i=1;i
${tr('customer_paths.no_other_path',{a,b:z})}
`; - for(const t of alts){const warn=[t.room${tr('peering_policy.remote_peering_is_a_last_resort')}
`; +const REMOTE_WARN=`${tr('peering_policy.remote_peering_is_a_last_resort')}
`; const REMOTE_WHY=[tr('peering_policy.policy_no_remote_peers_be_in'),tr('peering_policy.saw_your_session_come_in_over'),tr('peering_policy.only_peers_with_members_they_can'),tr('peering_policy.their_pearingdb_entry_says_remote'),tr('peering_policy.tried_a_remote_peer_once_it')]; function isRemote(c){return S.ixp[c]!==undefined&&!S.pops[ixCity(c)]&&!S.myIx[c];} function noRemote(id){const n=NET[id];if(!n||n.pol!=='selective')return false;return hstr(id+'|remote')%100<(n.share>=0.03?60:30);} diff --git a/src/game/80-simulation/60-requirements.js b/src/game/80-simulation/60-requirements.js index 1da5793..978bdb3 100644 --- a/src/game/80-simulation/60-requirements.js +++ b/src/game/80-simulation/60-requirements.js @@ -32,7 +32,7 @@ function terrestrialPath(a,b){if(TERR&&TERR.S===S){if(TERR.gen!==RW.gen||!TERR.m const reqOk=b=>(b.reqs||[]).every(k=>REQS[k]&&REQS[k].ok(b)); // Some requirements only make sense for some customers: nobody can reach another continent without getting wet. const reqCan=(k,b)=>!REQS[k].can||REQS[k].can(b); -function reqList(o){return (o.reqs||[]).map(k=>{const ok=REQS[k].ok(o),lab=typeof REQS[k].l==='function'?REQS[k].l(o):REQS[k].l;return ``;}).join('');} +function reqList(o){return (o.reqs||[]).map(k=>{const ok=REQS[k].ok(o),lab=typeof REQS[k].l==='function'?REQS[k].l(o):REQS[k].l;return ``;}).join('');} /* diversePaths(): a shortest path by hops over the live links (and VXCs to remote cities), then another one that shares none of its risks. divGraph() numbers the cities and the risks and lists each city's links once, in list order, as disjointOn() reads them; divOn() asks it, so many pairs on one network (spots0(), opsDecomSafe()) share one graph. The diff --git a/src/game/80-simulation/75-customer-lifecycle.js b/src/game/80-simulation/75-customer-lifecycle.js index 8e5aab6..8add751 100644 --- a/src/game/80-simulation/75-customer-lifecycle.js +++ b/src/game/80-simulation/75-customer-lifecycle.js @@ -129,7 +129,7 @@ function clPanel(){const C=S.cl||{mo:[]},mo=C.mo.slice(-12);const soon=S.biz.fil const sum=k=>mo.reduce((a,e)=>a+(k==='lost'?Object.values(e.lost).reduce((x,y)=>x+y,0):e[k]||0),0),why={};for(const e of mo)for(const k in e.lost)why[k]=(why[k]||0)+e.lost[k]; let h=`${tr('lifecycle.won_and_lost_note')}
${tr('game_and_settings.name_and_everything_it_owns_will',{name:esc(e.name||tr('common.unnamed_network'))})}
${slotBusy(id)?`${tr('slots.it_is_open_in_another_window')}
`:''}${tr('game_and_settings.name_and_everything_it_owns_will',{name:esc(e.name||tr('common.unnamed_network'))})}
${slotBusy(id)?`${tr('slots.it_is_open_in_another_window')}
`:''}${i?esc(i.msg):''} ${tr('city_panel.customers_here_get_nothing_until_it')}
${i&&i.cost?btn(`${esc(i.fix||tr('common.rush_repair'))} ${fmt$(i.cost)}`,'fixInc',{id:i.id},'red'):''}${i?esc(i.msg):''} ${tr('city_panel.customers_here_get_nothing_until_it')}
${i&&i.cost?btn(`${esc(i.fix||tr('common.rush_repair'))} ${fmt$(i.cost)}`,'fixInc',{id:i.id},'red'):''}${tr('city_panel.your_routers_here_are_forwarding',{load:fmtG(nl),cap:fmtG(nc)})}
${btn(tr('common.open_infra'),'tab',{t:'links'},'pink sm')}${tr('city_panel.your_routers_here_are_forwarding',{load:fmtG(nl),cap:fmtG(nc)})}
${btn(tr('common.open_infra'),'tab',{t:'links'},'pink sm')}${tr('city_panel.sell_internet_to_homes_here_starts',{start:fmtG(s),max:fmtG(eyeP(c)),rate:fmt$(EYE_RATE*arpuOf(c))})}${C.au?` ${scnRule('levy')?tr('city_panel.it_runs_on_your_own_fibre',{pct:pct(AU_LEVY)}):tr('city_panel.the_nearly_broadband_network_keeps',{pct:pct(AU_WHOLESALE)})}`:''}
${btn(tr('city_panel.launch_broadband_cost',{cost:fmt$(bbCost(c))}),'launchBB',{city:c},'pink big',S.cash${tr('city_panel.more_traffic_over_peering_pnis_and')}
${sf<0.9?`${tr('city_panel.customers_are_unhappy_and_leaving')}
`:''} @@ -37,7 +37,7 @@ function cityPanel(c){ h+=`${tr('city_panel.no_businesses_yet_offers_pop_up')}
`; - for(const b of bz)h+=`${tr('city_panel.only_the_cn_too_premium_crossing')}
`:premCity(n,c)?`${tr('city_panel.only_the_cn_too_premium_crossing')}
`:premCity(n,c)?`${tr('city_panel.the_model_sets_your_fastest')}
${tr('city_panel.every_port_is_taken_add_a')}
`:''} -${tr('city_panel.this_chassis_takes_forever_to_boot')}
`:''} +${tr('city_panel.this_chassis_takes_forever_to_boot')}
`:''} ${(()=>{const fc=G.fsN||0,u=(R.fsUse&&R.fsUse[c])?R.fsUse[c].used:0;return `${tr('city_panel.maxed_out_traffic_here_is_being')}
`:''} diff --git a/src/game/93-ui/60-decommission.js b/src/game/93-ui/60-decommission.js index 6b3024a..80040be 100644 --- a/src/game/93-ui/60-decommission.js +++ b/src/game/93-ui/60-decommission.js @@ -10,7 +10,7 @@ function decomModal(){const sel=[...(UI.decom||[])],im=decomImpact(sel),all=Obje const rows=all.map(c=>``).join(''); openModal(`${tr('decommission.pick_the_pops_to_shut_down')}
${rows} - ${sel.length?`${tr('decommission.keep_at_least_one_pop')}
`:''}${tr('link_panels.there_s_no_ix_in_city',{city:C.name})}
${S.pops[city]?btn(tr('link_panels.found_your_own_ix_cost_mo',{cost:fmt$(MYIX_COST),mo:fmt$(MYIX_MO)}),'foundIx',{city:c},'pink',S.cash${tr('link_panels.ix_is_a_shared_switch_one',{ix:esc(ix),list:(()=>{const m=ixMembers(c),big=m.filter(id=>!NET[id].tail),t=m.length-big.length;return (big.map(id=>esc(NET[id].name)).join(', ')||tr('common.nobody_yet'))+(t?trn('link_panels.plus_n_small_network',t):'');})()})}
${S.pops[city]?'':REMOTE_WARN}${X?`${esc(X.blurb)} ${X.freeTo!==undefined?tr('link_panels.ports_up_to_port_are_free',{port:PORT[X.freeTo].n}):tr('link_panels.ports_at_p_of_the_usual',{p:Math.round(ixMul(c)*100)})}
`:''}${CITY[city].ixCheap?`${tr('link_panels.run_by_a_nonprofit_public_prices')}
`:''}${isDk(c)?`${tr('link_panels.run_by_de_kicks_group_no')}
`:''}${rt&&rt>S.day?tr('link_panels.de_kicks_personalised_pricing_p_of',{p:Math.round(dkMult(c)*100),n:rt-S.day}):tr('link_panels.de_kicks_personalised_pricing_p_of_3d4f',{p:Math.round(dkMult(c)*100)})}
`; for(const x of ad)h+=`${trn('link_panels.remote_port_via_a_reseller_1',ixMembers(c).filter(noRemote).length)}
`; @@ -25,7 +25,7 @@ function ixBlock(c,multi){const city=ixCity(c),C=CITY[city],ix=ixName(c),X=XIXM[ function vxcPanel(l){ const load=R.load[l.id]||0,cap=VXC[l.vt].g,u=load/cap,down=linkDown(l),f=FAB[l.prov]; let h=`${tr('link_panels.name_is_down_nothing_you_can',{name:esc(f.name)})}
${tr('link_panels.name_is_down_nothing_you_can',{name:esc(f.name)})}
${tr('link_panels.remote_peering_leg_into_ix',{ix:esc(CITY[l.b].ix)})}
`:''}${tr('link_panels.foreign_networks_need_a_local_joint')}
${btn(tr('link_panels.apply_for_a_license_price_mo_n_days',{price:fmt$(CN_LIC),mo:fmt$(CN_JV_MO),n:leadDays(45)}),'applyCn',{},'pink',S.cash${tr('link_panels.your_joint_venture_holds_an')}
`; - if(R.gfwCross>0.5)h+=`${tr('common.better_terminals_and_optical_tuning')}
`+Object.entries(SUB_UPGRADES).map(([k,U])=>{ const at=l['sub'+k],done=subUpgradeReady(l,k),cost=subUpgradeCost(l,k),preview={...l,['sub'+k]:S.day},use=at!==undefined||subHelps(l.km,k,l['sub'+subOther(k)]!==undefined); @@ -116,7 +116,7 @@ function dfPanel(l){ let h=`${tr('link_panels.crews_can_halve_a_build_at_most')}
`:''}`:''}${tr('link_panels.you_can_pre_install_optics_now')}
`;} - else if(inc&&linkDown(l))h+=`${esc(inc.msg)}
${shipNote(inc)}${inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash${esc(inc.msg)}
${shipNote(inc)}${inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash${tr('link_panels.this_fiber_is_dark_add_optics')}
`:''}${inc?esc(inc.msg):''} ${inc&&shipSea(inc)?'':tr('link_panels.back_in_n_days',{n:l.cut-S.day})}
${shipNote(inc)}${inc&&inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash${inc?esc(inc.msg):''} ${inc&&shipSea(inc)?'':tr('link_panels.back_in_n_days',{n:l.cut-S.day})}
${shipNote(inc)}${inc&&inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash${tr('link_panels.congested_upgrade_it_or_add_a')}
`:''} diff --git a/src/game/93-ui/72-express.js b/src/game/93-ui/72-express.js index 86633fd..0eff6b5 100644 --- a/src/game/93-ui/72-express.js +++ b/src/game/93-ui/72-express.js @@ -11,7 +11,7 @@ const xpSpanMeta=s=>`${s.own?tr('common.own_dark_fiber'):tr('common.leased_iru') const xpModes=(o,run)=>OPT[o].modes.map(([g,r])=>tr('link_panels.g_to_km_km',{g:fmtG(g),km:r.toLocaleString()})).join(' · ')+` · ${xpOptG(o,run)?tr('express.runs_at',{g:fmtG(xpOptG(o,run))}):tr('express.out_of_reach')}`; function xpPanel(l){const sp=xpSpans(l),load=R.load[l.id]||0,cap=capOf(l),u=cap?load/cap:0,down=linkDown(l),A=CITY[l.a].name,B=CITY[l.b].name,run=sp?xpRunKm(sp):0,ch=l.ch||[]; let h=`${t}
`).join('')}${t}
`).join('')}${tr('express.passes',{via:esc(xpVia(l))})}
${tr('customers.everyone_who_pays_you_happiest_last')}
`; - h+=`${F.f?tr('customers.nobody_is_unhappy_enjoy_it_while'):tr('customers.no_customers_here')}
${tr('lease_swaps.every_wave_fabric_circuit_and_dark')}
${xs.length?`