diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d2355d..94996c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,29 @@ All notable changes to this project are documented here. The project follows - Zoom in twice as far as before, handy for crowded spots like the UAE, Singapore or Central Europe. - Half speed: a new ½× button, or press 0. +- NOC dashboard: a legend explains the colours in "How it arrives", the + network table sorts by any column (traffic, transit cost, loss, name), and a + new "Who your transit carries" list shows the networks you pay transit to + reach, with the cheapest way to move each one to peering (#7). +- The Transit tab shows the top destinations on each transit port, with the + same hint, so you can see who to peer with in that city (#7). +- A full code review, and about 40 fixes from it: + - Saves and imported files are checked and repaired before use, so a + damaged or hand-edited save can no longer break the game or inject + anything into the page. + - Loophole fixes: flipping crypto loans for profit, free repairs of + geopolitical cable cuts, re-rolling DE-KICKS quotes, walking out of a + failing event, and selling the same trench twice. + - The Red Sea scenario really cuts the Red Sea now, the weekly challenge + gives everyone the same world, and its "pricey" and "poor" twists work. + - China Telecomet and China Unicorn no longer act like Tier 1s. + - Metro ring cuts now alert you, overlapping site outages no longer cancel + each other, and alien waves work on unlit fiber. + - Routing is several times faster on big networks. + - The map fills wide screens at any zoom, pinch zoom goes as far as the + mouse wheel, and touch scrolling and cancelled touches behave. + - Starting a scenario from a running game asks first, and Space no longer + pauses when you meant to press a button. ## [1.8.1] — 2026-10-23 diff --git a/site/index.html b/site/index.html index 014a734..fc6841c 100644 --- a/site/index.html +++ b/site/index.html @@ -252,6 +252,8 @@ section h3{font-size:17px;margin-bottom:6px;display:flex;align-items:center;gap: :root.no-anim .coach-glow{outline:3px solid #FF4F9A} .setline{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0} .setline>span{font-weight:800} +.thb{font:inherit;font-weight:900;background:none;border:0;padding:0;cursor:pointer;color:inherit} +.ttop{margin:4px 0;padding:4px 8px;border-left:3px solid #FF8A3D;background:#FFF6EC;border-radius:6px} .menu-list{display:flex;flex-direction:column;gap:8px;margin-top:12px} .menu-list .b{justify-content:space-between;width:100%} #mega{position:fixed;left:0;right:0;bottom:0;z-index:17;background:#7A86B8;border-top:3px solid var(--ink);overflow:hidden;white-space:nowrap;pointer-events:none;animation:megaflash 1.2s steps(2) infinite} @@ -807,7 +809,7 @@ const GOALS=[ let S=null, R=emptyR(); const UI={sel:null,tab:'cust',left:'goals',speed:1,hover:null,drag:null,snap:null,pending:null,confirm:null,leftOpen:false,muted:false,startCity:'fra',hintOff:false}; let uidN=1; const uid=()=>'i'+(Date.now()%1e7).toString(36)+(uidN++); -function emptyR(){return {egT:{},netEg:{},l2lat:{},nodeLoad:{},nodeCap:{},div:{},l2:{},gfwLost:0,gfwCross:0,ef:{},egDesc:{},p95:{},peered:0,peerShare:0,load:{},useT:{},useIx:{},usePni:{},useCache:{},cityDem:{},citySrv:{},cityEye:{},demTo:{},served:0,demand:0,reach:0,sessions:0,revMo:0,costMo:0,cost:{},rev:{},reachable:{}};} +function emptyR(){return {tNet:{},egT:{},netEg:{},l2lat:{},nodeLoad:{},nodeCap:{},div:{},l2:{},gfwLost:0,gfwCross:0,ef:{},egDesc:{},p95:{},peered:0,peerShare:0,load:{},useT:{},useIx:{},usePni:{},useCache:{},cityDem:{},citySrv:{},cityEye:{},demTo:{},served:0,demand:0,reach:0,sessions:0,revMo:0,costMo:0,cost:{},rev:{},reachable:{}};} /* ================= BANKS & LOANS ================= Lenders make offers now and then (more often when you are broke). Each loan is a fixed monthly payment that shows up in your costs; conditions are checked @@ -1226,7 +1228,7 @@ function compute(){ if(!f.junk){let ok=amt;const fc=cnCity(f.c),ec=cnCity(e.city),nc=!!NET[f.n].cn; if(fc!==ec||(fc&&!nc)||(!fc&&nc&&e.k==='t')){const prem=(e.k==='t'&&e.prem)||(e.k==='p'&&e.pnc)||path.some(x=>x.links&&x.links.some(y=>y.premium));const loss=prem?0.03:(ev.gfw>day?0.35:0.2);R2.gfwLost+=amt*loss;R2.gfwCross+=amt;ok=amt*(1-loss);} if(f.n==='ggl'&&ruCity(f.c))ok*=0.5; - R2.citySrv[f.c]+=ok;R2.served+=ok;if(e.rank<=2)R2.peered+=ok;R2.egT[e.k]=(R2.egT[e.k]||0)+ok;const ne=R2.netEg[f.n]||(R2.netEg[f.n]={c:0,p:0,ix:0,t:0});ne[e.k]+=ok;} + R2.citySrv[f.c]+=ok;R2.served+=ok;if(e.rank<=2)R2.peered+=ok;if(e.k==='t'){const m=R2.tNet[e.id]||(R2.tNet[e.id]={});m[f.n]=(m[f.n]||0)+ok;}R2.egT[e.k]=(R2.egT[e.k]||0)+ok;const ne=R2.netEg[f.n]||(R2.netEg[f.n]={c:0,p:0,ix:0,t:0});ne[e.k]+=ok;} return amt; }; // Shortest path first. With Auto-TE, whatever does not fit spills onto up to two alternate paths @@ -1753,6 +1755,7 @@ const ACT={ help:()=>showHelp(), dash:()=>{if(!S)return;const d=$('dash');d.hidden=!d.hidden;if(!d.hidden)renderDash();}, dashClose:()=>{$('dash').hidden=true;}, + dashSort:({k})=>{if(!['name','asn','type','traffic','cost','lost'].includes(k))return;if(UI.dashSort===k)UI.dashDir=-(UI.dashDir||-1);else{UI.dashSort=k;UI.dashDir=k==='name'||k==='type'||k==='asn'?1:-1;}renderDash();}, bank:()=>{if(!S)return;UI.confirm=null;$('dash').hidden=true;const b=$('bankBox');b.hidden=false;UI._bh=null;renderBank();}, bankClose:()=>{UI.confirm=null;$('bankBox').hidden=true;}, takeLoan:({id})=>{const o=S.loanOffers.find(x=>x.id===id);if(!o)return;S.stats.loans=(S.stats.loans||0)+1;const B=BANKS[o.bank];let got=o.amount,note=''; @@ -2077,7 +2080,7 @@ function cityPanel(c){ for(const n of prov){const t=S.transit.find(x=>x.city===c&&x.net===n.id);const pr=n.price*S.priceMul*(t&&t.premium&&c==='hkg'?n.premium:1)*regionMult(c); h+=`
Where your users' traffic comes from, and how it gets to you. Red in the mix is paid transit; everything else is free or cheap.
| Network | AS | Type | Traffic | How it arrives | Transit cost | Lost |
|---|---|---|---|---|---|---|
| ${logo(n)}${esc(n.name)} | ${n.asn} | ${TYPE_L[n.type]} | ${fmtG(t)} | ${['c','p','ix','t'].map(k=>``).join('')} | ${e.t>0.01?fmt$((R.cost.transit||0)*e.t/tT)+'/mo':'—'} | ${want>0.01?pct(Math.max(0,1-t/want)):'—'} |
Where your users' traffic comes from, and how it gets to you. Transit is the only part you pay per gigabit; caches, PNIs and IX peering are free or flat-rate. Tap a column to sort.
| ${k==='mix'?l:``} | `).join('')}||||||
|---|---|---|---|---|---|---|
| ${logo(n)}${esc(n.name)} | ${n.asn} | ${TYPE_L[n.type]} | ${fmtG(t)} | ${['c','p','ix','t'].map(k=>``).join('')} | ${e.t>0.01?fmt$((R.cost.transit||0)*e.t/tT)+'/mo':'—'} | ${want>0.01?pct(Math.max(0,1-t/want)):'—'} |
The networks you pay transit to reach, biggest first, and the cheapest way to move each one to peering. This is your to-do list on the way to Tier 1.
${top.map(([id,v])=>`No links yet.
'}