Express fiber: light a wave through a city without its router (#58)
An express lightpath runs from A to C over your own or IRU dark fibers A-B, B-C (up to six) and passes B through its ROADM as light: ports only at its two ends, no hop in B, the fibers' latency added up. It takes one channel slot on every fiber it rides, needs a ROADM line system on each, and an optic that makes the whole run between regen sites. Routing, the route worker, traceroute, diverse paths and saves see it as a link A-C. A cut, a build, an amp or ROADM failure or a line system swap on any fiber under it darkens it; backhoes and the chaos monkey still find fibers that only carry expresses. "Express to..." on a fiber and an Express tab in the link window plan one, with reach, slots per fiber and the price. The intern's optics order leaves fibers that only carry expresses bare, decom never hands one back, and the build standard keeps a fiber's line system while an express on it carries traffic.
This commit is contained in:
parent
eac0604300
commit
8e1f2d66a5
41 changed files with 883 additions and 53 deletions
|
|
@ -106,7 +106,7 @@ function cityPanel(c){
|
|||
h+=`<section><h3>${tr('city_panel.fiber_from_city',{city:C.name})}</h3><p class="lead">${tr('city_panel.drag_from_this_router_to_any')}</p>`;
|
||||
if(!ls.length)h+=`<p class="empty">${tr('common.no_links_yet')}</p>`;
|
||||
for(const l of ls){const o=l.a===c?l.b:l.a,u=capOf(l)?(R.load[l.id]||0)/capOf(l):0,cut=linkDown(l);
|
||||
h+=`<div class="row"><div class="grow"><div class="nm">→ ${CITY[o].name}${l.mult>1?' · '+tr('common.diverse'):''} ${cut?'<span class="tag restrictive">'+tr('common.cut')+'</span>':''}</div><div class="meta">${capName(l)} · ${l.km.toLocaleString()} km ${l.kind==='vxc'?tr('city_panel.virtual_circuit_via_fab',{fab:esc(FAB[l.prov].name)}):l.kind==='df'?(l.own?(l.sub&&l.cname?tr('city_panel.your_own_subsea_cable_name',{name:esc(l.cname)}):tr('common.own_dark_fiber')):tr('city_panel.dark_fiber_iru'))+(l.ready>S.day?` · ${tr('city_panel.ready_in_n_d',{n:l.ready-S.day})}`:''):l.sub?tr('common.subsea'):tr('common.terrestrial')} · ${tr('common.price_mo',{price:fmt$(l.mo)})}</div><div class="bar ${barCls(u)}"><i style="width:${u*100}%"></i></div></div>${btn(tr('common.open'),'selLink',{id:l.id},'ghost sm')}</div>`;}
|
||||
h+=`<div class="row"><div class="grow"><div class="nm">→ ${CITY[o].name}${l.mult>1?' · '+tr('common.diverse'):''} ${cut?'<span class="tag restrictive">'+tr('common.cut')+'</span>':''}</div><div class="meta">${capName(l)} · ${l.km.toLocaleString()} km ${l.kind==='vxc'?tr('city_panel.virtual_circuit_via_fab',{fab:esc(FAB[l.prov].name)}):l.kind==='xp'?tr('express.city_via',{via:xpVia(l)}):l.kind==='df'?(l.own?(l.sub&&l.cname?tr('city_panel.your_own_subsea_cable_name',{name:esc(l.cname)}):tr('common.own_dark_fiber')):tr('city_panel.dark_fiber_iru'))+(l.ready>S.day?` · ${tr('city_panel.ready_in_n_d',{n:l.ready-S.day})}`:''):l.sub?tr('common.subsea'):tr('common.terrestrial')} · ${tr('common.price_mo',{price:fmt$(l.mo)})}</div><div class="bar ${barCls(u)}"><i style="width:${u*100}%"></i></div></div>${btn(tr('common.open'),'selLink',{id:l.id},'ghost sm')}</div>`;}
|
||||
h+=`</section>`;
|
||||
if(Object.keys(S.pops).length>1)h+=`<section><h3>${tr('common.decommission')}</h3><p class="lead">${tr('city_panel.shut_this_pop_down_its_links')}</p><div class="btns">${btn(tr('city_panel.decommission_city',{city:C.name}),'decomOpen',{city:c},'ghost sm')}${btn(tr('city_panel.decommission_several_pops'),'decomOpen',{},'ghost sm')}</div></section>`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
/* Decommissioning POPs. Customers that touch a decommissioned city, or ride a removed link, are let go
|
||||
with an early-termination penalty of three months of their contract. */
|
||||
const DECOM_MONTHS=3;
|
||||
function decomImpact(cities){const set=new Set(cities),links=S.links.filter(l=>set.has(l.a)||set.has(l.b)),lids=new Set(links.map(l=>l.id));
|
||||
// An express riding a fiber that goes is decommissioned with it.
|
||||
function decomImpact(cities){const set=new Set(cities),links=xpWith(S.links.filter(l=>set.has(l.a)||set.has(l.b))),lids=new Set(links.map(l=>l.id));
|
||||
const biz=S.biz.filter(b=>bCities(b).some(c=>set.has(c))||(b.link&&lids.has(b.link)));
|
||||
const pen=b=>Math.max(2000,Math.round(b.fee?b.fee*0.5:b.bw*b.rate*DECOM_MONTHS));
|
||||
return {links,biz,pen,fee:biz.reduce((a,b)=>a+pen(b),0),eye:cities.reduce((a,c)=>a+(R.cityEye[c]||0),0)};}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ function dfPanel(l){
|
|||
if(bld){const tot=Math.max(1,l.ready-l.day),done=clamp((S.day-l.day)/tot,0,1);
|
||||
h+=`<section><h3>${l.own?tr('common.under_construction'):tr('common.being_spliced')}</h3><div class="kv"><span>${l.own?tr('link_panels.permits_trenching_splicing'):tr('common.iru_handover')}</span><b>${tr('common.n_days_left',{n:l.ready-S.day})}</b></div><div class="bar me"><i style="width:${done*100}%"></i></div>${l.own&&l.sub?layPanel(l):l.own?`<div class="btns">${btn(tr('link_panels.hire_extra_crews_price_30_days',{price:fmt$(crewCost(l))}),'crews',{id:l.id},'sm',!crewSteps(l)||S.cash<crewCost(l))}${btn(trn('link_panels.all_crews_done_in_n_days_price',Math.max(1,crewFloor(l)-S.day),{price:fmt$(crewSteps(l)*crewCost(l))}),'crews',{id:l.id,all:1},'sm',!crewSteps(l)||S.cash<crewSteps(l)*crewCost(l))}</div>${!crewSteps(l)&&l.ready>S.day+1?`<p class="note">${tr('link_panels.crews_can_halve_a_build_at_most')}</p>`:''}`:''}<p class="note">${tr('link_panels.you_can_pre_install_optics_now')}</p></section>`;}
|
||||
else if(inc&&linkDown(l))h+=`<section><h3 style="color:var(--bad)">${tr('common.dark_6bf5')}</h3><p class="lead">${esc(inc.msg)}</p>${shipNote(inc)}${inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash<inc.cost):''}</section>`;
|
||||
h+=`<section><h3>${tr('common.capacity')}</h3><div class="kv"><span>${tr('link_panels.n_of_max_channels_lit',{n:(l.ch||[]).length,max:chMax(l)})}${soldSlots(l)?` · ${tr('link_panels.n_sold_as_alien_waves',{n:soldSlots(l)})}`:''}</span><b>${fmtG(load)} / ${fmtG(cap)}</b></div><div class="bar ${barCls(u)}"><i style="width:${Math.min(100,u*100)}%"></i></div>
|
||||
h+=`<section><h3>${tr('common.capacity')}</h3><div class="kv"><span>${tr('link_panels.n_of_max_channels_lit',{n:(l.ch||[]).length,max:chMax(l)})}${soldSlots(l)?` · ${tr('link_panels.n_sold_as_alien_waves',{n:soldSlots(l)})}`:''}${xpSlots(l)?` · ${trn('express.n_carry_expresses',xpSlots(l))}`:''}</span><b>${fmtG(load)} / ${fmtG(cap)}</b></div><div class="bar ${barCls(u)}"><i style="width:${Math.min(100,u*100)}%"></i></div>
|
||||
${seatPanel(l)}${l.own&&l.sub?`<div class="kv"><span>${tr('common.cable_design')}</span><b>${tr((SEA_DESIGNS[l.seaDesign]||SEA_DESIGNS.standard).n)}</b></div>`:''}
|
||||
<div class="kv"><span>${tr('common.latency')}</span><b>${tr('common.ms_ms_one_way',{ms:linkLat(l).toFixed(1)})}</b></div><div class="kv"><span>${l.own?tr('link_panels.right_of_way_upkeep'):tr('common.iru_lease')}</span><b>${tr('common.price_mo',{price:fmt$(l.mo)})}</b></div><div class="kv"><span>${tr('link_panels.n_amp_huts',{n:amps})}</span><b>${tr('common.price_mo',{price:fmt$(amps*AMP_MO)})}</b></div>${!bld&&!(l.ch||[]).length?`<p class="why">${tr('link_panels.this_fiber_is_dark_add_optics')}</p>`:''}</section>`;
|
||||
if(!bld){const sold=S.biz.filter(b=>b.link===l.id&&(b.type==='wwave'||b.type==='dfpair'||b.type==='pairs')),off=S.offers.find(o=>o.link===l.id),fc=freeCh(l);
|
||||
|
|
@ -134,6 +134,7 @@ function dfPanel(l){
|
|||
const rg=l.regen|0,rgAdd=REGEN_COST+Math.round((l.ch||[]).reduce((a,c)=>a+optCost(c),0)*REGEN_CH);
|
||||
h+=`</section><section><h3>${tr('common.line_system')}</h3><div class="kv"><span>${esc(sysD.n)}</span><b>${tr('link_panels.n_amplifiers',{n:amps})}</b></div>
|
||||
<div class="kv"><span>${tr('common.regen_sites')}</span><b>${rg?tr('link_panels.n_optical_spans_of_km_km',{n:rg,km:spanKm(l).toLocaleString()}):tr('common.none')}</b></div><p class="note">${tr('link_panels.a_regen_site_turns_the_light',{price:fmt$(REGEN_MO)})}</p>${l.seat?`<p class="note">${tr('broker.seat_regen_note')}</p>`:''}${l.sub&&l.own&&!l.seat?`<p class="note">${tr('link_panels.no_regen_sites_in_the_middle')}</p>`:`<div class="btns">${rg<REGEN_MAX?btn(tr('link_panels.regen_site_price',{price:fmt$(rgAdd)}),'regen',{id:l.id,d:1},'sm',S.cash<rgAdd):''}${rg?btn(tr('common.regen_site'),'regen',{id:l.id,d:-1},'ghost sm'):''}</div>`}<p class="note">${esc(sysD.blurb)}</p><div class="btns">${(()=>{const t=sysNext(l);if(!t)return '';const T=DF_SYS[t],c=sysUpCost(l);return !techOk('sys',t,T.lvl)?demoBtn('sys',t,T.lvl,tr('link_panels.sys_level_n',{sys:T.n,n:T.lvl}),'sm'):btn(tr('link_panels.upgrade_to_sys_price',{sys:T.n,price:fmt$(c)}),'upSys',{id:l.id},'sm',S.cash<c);})()}${pairBtn(l)}${btn(l.spares?tr('link_panels.spares_kit_on'):tr('link_panels.keep_a_spares_kit_price_mo',{price:fmt$(Math.round(150+(l.ch||[]).length*80))}),'spares',{id:l.id},l.spares?'green sm':'sm')}</div><p class="note">${tr('link_panels.spare_optics_and_amplifier_cards_on')}</p></section>`;
|
||||
h+=xpDfSection(l);
|
||||
{const sib=pairLinks(l.a,l.b).filter(x=>x!==l&&x.kind!=='vxc');h+=`<section><h3>${tr('common.redundancy')}</h3><p class="lead">${sib.length?tr('link_panels.other_links_between_these_cities'):tr('link_panels.this_is_the_only_link_between')}</p>${sib.map(x=>`<div class="row"><div class="grow"><div class="nm">${esc(capName(x))} ${linkDown(x)?'<span class="tag restrictive">'+tr('common.cut')+'</span>':''}${x.standby?' <span class="tag st">'+tr('common.standby')+'</span>':''}</div><div class="meta">${(x.trench||x.id)===(l.trench||l.id)?tr('common.same_trench'):tr('common.diverse_route')}</div></div>${btn(tr('common.open'),'selLink',{id:x.id},'ghost sm')}</div>`).join('')}<div class="btns">${btn(tr('link_panels.add_parallel_link'),'addParallel',{id:l.id},'pink sm')}</div></section>`;}
|
||||
h+=`${trafficSection(l)}${metricSection(l)}<section>${btn(UI.confirm===l.id?tr('link_panels.really_give_it_up'):(l.own?tr('link_panels.abandon_the_fiber'):tr('link_panels.cancel_the_iru')),'rmLink',{id:l.id},'ghost sm')}${cabBack(l)>0?`<p class="note">${tr('link_panels.giving_it_up_now_returns_price',{price:fmt$(cabBack(l))})}</p>`:''}</section></div>`;
|
||||
return h;
|
||||
|
|
@ -146,6 +147,7 @@ function linkPanel(id){
|
|||
const l=S.links.find(x=>x.id===id);if(!l){UI.sel=null;return '';}
|
||||
if(l.kind==='vxc')return vxcPanel(l);
|
||||
if(l.kind==='df')return dfPanel(l);
|
||||
if(l.kind==='xp')return xpPanel(l);
|
||||
const load=R.load[l.id]||0,cap=LT[l.tier].g,u=load/cap,cut=l.cut>S.day,trk=l.trench||l.id,inc=S.inc.find(i=>(LINKCUT_TR.includes(i.type)&&i.ref===trk)||((i.type==='fatwave'||i.type==='label'||i.type==='mtu')&&i.ref===l.id)),sib=pairLinks(l.a,l.b).filter(x=>x!==l&&x.kind!=='vxc'),mates=sib.filter(x=>(x.trench||x.id)===trk);
|
||||
let h=`<div class="ph"><div><div class="eyebrow">${l.cable?esc(CAB[l.cable].name):l.sub?tr('common.subsea_cable'):tr('common.terrestrial_fiber')} · ${l.km.toLocaleString()} km</div><h2>${CITY[l.a].name} ⇄ ${CITY[l.b].name}</h2></div><button class="x" data-act="closePanel" aria-label="${tr('common.close')}">×</button></div><div class="scroll">`;
|
||||
if(cut)h+=`<section><h3 style="color:var(--bad)">${tr('common.cut_2e50')}</h3><p class="lead">${inc?esc(inc.msg):''} ${inc&&shipSea(inc)?'':tr('link_panels.back_in_n_days',{n:l.cut-S.day})}</p>${shipNote(inc)}${inc&&inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash<inc.cost):''}</section>`;
|
||||
|
|
|
|||
48
src/game/93-ui/72-express.js
Normal file
48
src/game/93-ui/72-express.js
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* Express lightpaths (#58): the panel of one, the section on a dark fiber's panel (what rides it, where it chains on)
|
||||
and the Express tab of the link window (70-link-modal.js). The rules are in 80-simulation/65-express.js. */
|
||||
const xpSpanName=s=>`${CITY[s.a].name} ⇄ ${CITY[s.b].name}`;
|
||||
// Why an express is dark today, fiber by fiber.
|
||||
function xpDarkWhy(l){const sp=xpSpans(l);if(!sp)return [tr('express.dark_gone')];const d=S.day,out=[];
|
||||
for(const s of sp){const n=xpSpanName(s);if(linkCut(s))out.push(tr('express.dark_cut',{span:n}));else if(s.ready>d)out.push(trn('express.dark_building',s.ready-d,{span:n}));else if(s.eqDown>d)out.push(tr('express.dark_system',{span:n}));}
|
||||
if(!out.length)out.push(tr('express.dark_reach'));return out;}
|
||||
// One fiber of a path: whose it is, how long, the slots left for express channels.
|
||||
const xpSpanMeta=s=>`${s.own?tr('common.own_dark_fiber'):tr('common.leased_iru')} · ${Math.round(s.km).toLocaleString()} km · ${tr('express.free_slots',{n:Math.max(0,xpFree(s)),max:chMax(s)})}`;
|
||||
// An optic's settings over a run, as the fiber panel lists them.
|
||||
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=`<div class="ph"><div><div class="eyebrow">${tr('express.eyebrow',{km:Math.round(l.km).toLocaleString()})}</div><h2>${A} ⇄ ${B}</h2></div><button class="x" data-act="closePanel" aria-label="${tr('common.close')}">×</button></div><div class="scroll">`;
|
||||
if(down)h+=`<section><h3 style="color:var(--bad)">${tr('common.dark_6bf5')}</h3>${xpDarkWhy(l).map(t=>`<p class="lead">${t}</p>`).join('')}</section>`;
|
||||
h+=`<section><h3>${tr('common.capacity')}</h3><div class="kv"><span>${trn('express.n_channels',ch.length)}</span><b>${fmtG(load)} / ${fmtG(cap)}</b></div><div class="bar ${barCls(u)}"><i style="width:${Math.min(100,u*100)}%"></i></div>
|
||||
<div class="kv"><span>${tr('common.latency')}</span><b>${tr('common.ms_ms_one_way',{ms:linkLat(l).toFixed(1)})}</b></div><div class="kv"><span>${tr('express.optical_run')}</span><b>${run.toLocaleString()} km</b></div>
|
||||
<p class="note">${tr('express.passes',{via:esc(xpVia(l))})}</p></section>`;
|
||||
if(sp)h+=`<section><h3>${tr('express.its_fibers')}</h3>${sp.map(s=>`<div class="row"><div class="grow"><div class="nm">${xpSpanName(s)} ${linkCut(s)?'<span class="tag restrictive">'+tr('common.cut')+'</span>':''}</div><div class="meta">${xpSpanMeta(s)}</div></div>${btn(tr('common.open'),'selLink',{id:s.id},'ghost sm')}</div>`).join('')}<p class="note">${tr('express.slot_note')}</p></section>`;
|
||||
if(sp){h+=`<section><h3>${tr('common.optics')}</h3>`;
|
||||
for(const k of Object.keys(OPT)){const O=OPT[k],n=ch.filter(x=>x===k).length;if(!n&&!techOk('opt',k,O.lvl))continue;const why=xpWhy(l.a,l.b,sp,k),c=xpCost(sp,k,false),spn=spareN(k);
|
||||
h+=`<div class="row"><div class="grow"><div class="nm">${O.n}</div><div class="meta">${xpModes(k,run)}${n?` · <b>${tr('link_panels.n_lit',{n})}</b>`:''}${spn?` · ${trn('link_panels.n_spare_on_the_shelf',spn)}`:''}</div>${why?`<div class="why">${esc(why)}</div>`:''}</div>${n&&ch.length>1?btn('−','xpCh',{id:l.id,o:k,d:-1},'ghost sm'):''}${btn(`+ <small>${spn?tr('link_panels.spare_price',{price:fmt$(c)}):fmt$(c)}</small>`,'xpCh',{id:l.id,o:k,d:1},'sm',!!why||S.cash<c)}</div>`;}
|
||||
h+=`<p class="note">${tr('link_panels.unplugged_optics_go_on_the_spares')}</p></section>`;}
|
||||
h+=`${trafficSection(l)}${metricSection(l)}<section>${btn(UI.confirm===l.id?tr('link_panels.really_give_it_up'):tr('express.tear_down'),'rmLink',{id:l.id},'ghost sm')}<p class="note">${tr('express.tear_down_note')}</p></section></div>`;
|
||||
return h;}
|
||||
// Where an express can go from this fiber: through either end and on over your other ROADM fibers.
|
||||
function xpTargets(l){const out=[];for(const [x,y] of [[l.a,l.b],[l.b,l.a]])for(const p of xpPaths(x,null,l,6))if(xpRunKm(p.sp)<=xpReachMax())out.push({from:x,...p});
|
||||
return out.sort((p,q)=>p.km-q.km).slice(0,6);}
|
||||
// On a dark fiber's panel: the expresses riding it, and where one could go from here.
|
||||
function xpDfSection(l){if(l.sub)return '';const on=xpOver(l.id),rdm=isRdm(l.sys),tg=rdm?xpTargets(l):[];
|
||||
// Without a ROADMaster the hint is only worth showing where another fiber of yours meets this one.
|
||||
const near=!rdm&&S.links.some(x=>x!==l&&x.kind==='df'&&!x.sub&&[x.a,x.b].some(c=>c===l.a||c===l.b));
|
||||
if(!on.length&&!tg.length&&!near)return '';
|
||||
let h=`<section><h3>${tr('express.title')}</h3><p class="lead">${tr('express.lead')}</p>`;
|
||||
if(!rdm)h+=`<p class="why">${tr('express.needs_roadm')}</p>`;
|
||||
if(on.length)h+=`<h4 class="sub4">${tr('express.riding_here')}</h4>`+on.map(x=>`<div class="row"><div class="grow"><div class="nm">${CITY[x.a].name} ⇄ ${CITY[x.b].name} ${linkDown(x)?'<span class="tag restrictive">'+tr('common.dark')+'</span>':''}</div><div class="meta">${capName(x)} · ${trn('express.n_channels',(x.ch||[]).length)} · ${tr('express.city_via',{via:esc(xpVia(x))})}</div></div>${btn(tr('common.open'),'selLink',{id:x.id},'ghost sm')}</div>`).join('')+`<p class="note">${tr('express.riding_note')}</p>`;
|
||||
if(tg.length)h+=`<h4 class="sub4">${tr('express.express_to')}</h4>`+tg.map(t=>{const cs=xpCities(t.from,t.sp);return `<div class="row"><div class="grow"><div class="nm">${CITY[t.from].name} → ${CITY[t.to].name}</div><div class="meta">${tr('express.via_km',{via:cs.slice(1,-1).map(c=>CITY[c].name).join(', '),km:Math.round(t.km).toLocaleString()})}</div></div>${btn(tr('express.plan'),'xpOpen',{a:t.from,b:t.to,via:t.sp.map(s=>s.id).join(',')},'pink sm')}</div>`;}).join('');
|
||||
return h+`</section>`;}
|
||||
// The link window's Express tab: the ways your fibers chain from a to b, shortest first, an optic per button. Optic
|
||||
// names are long: they go above the reason, not in the narrow column a wave's '400G' fits in.
|
||||
function xpModalBody(a,b,routes){let h=`<p class="lead" style="margin-top:8px">${tr('express.modal_lead',{a:CITY[a].name,b:CITY[b].name})}</p>`;
|
||||
for(const r of routes){const sp=r.sp,ids=sp.map(s=>s.id),cs=xpCities(a,sp),run=xpRunKm(sp),old=xpFind(a,b,ids),lat=sp.reduce((x,s)=>x+linkLat(s),0);
|
||||
h+=`<h4 class="sub4">${tr('express.via_km',{via:cs.slice(1,-1).map(c=>CITY[c].name).join(', '),km:Math.round(r.km).toLocaleString()})}</h4>
|
||||
${sp.map(s=>`<div class="meta">${xpSpanName(s)} · ${xpSpanMeta(s)}</div>`).join('')}
|
||||
<div class="kv"><span>${tr('express.optical_run')}</span><b>${run.toLocaleString()} km</b></div><div class="kv"><span>${tr('common.latency')}</span><b>${tr('common.ms_ms_one_way',{ms:lat.toFixed(1)})}</b></div>
|
||||
${old?`<p class="note">${trn('express.already',(old.ch||[]).length)}</p>`:''}
|
||||
<div class="tiers">${Object.keys(OPT).filter(k=>techOk('opt',k,OPT[k].lvl)).map(k=>{const O=OPT[k],why=xpWhy(a,b,sp,k),c=xpCost(sp,k,!old),g=xpOptG(k,run);
|
||||
return `<button class="tierbtn" data-act="xpBuild" data-args="${esc(JSON.stringify({a,b,via:ids.join(','),o:k}))}"${why||S.cash<c?' disabled':''}><span class="grow"><span class="onm">${O.n}</span><span class="meta">${why?esc(why):tr('express.runs_at',{g:fmtG(g)})}</span></span><span class="pr num">${fmt$(c)}</span></button>`;}).join('')}</div>`;}
|
||||
return h+`<p class="note">${tr('express.modal_note',{price:fmt$(XP_PASS)})}</p>`;}
|
||||
Loading…
Add table
Add a link
Reference in a new issue