The intern and customers' promises counted once per network: ports, caches and PNIs in one pass, shared searches

The game plays exactly as before.

* The NOC intern plans every POP in one pass: portsAt() counts router ports for all cities at once (routers, ports
  and cache orders; the ports job keeps ports in use and reserved by city between two jobs), cachePlan() sorts the
  boxes by POP once and cityShSum() sums a city's shares once per table, pniFlows() reads every POP's flows from
  routing's columns (R.flc) in one pass and pniWant() gives the weekly PNI round its sort key from typed columns.
  pniBatchRun() lets a frame through every few networks; pniQuote() looks existing PNIs and ports up from the batch.
* A dark fiber's capacity asks optG() once per run of identical optics (dfLit()); linkDown() and ownGlass() ask
  dfOn(), whether it carries anything for you, without the sum unless an optic is out or managed waves are sold on
  it. terrIslands() tests !l.sub first.
* Latency: latGraph() lists each city's links once in S.links order (typed arrays), latRun() is the same search with
  the same sums, latPairs() searches once per city for a boutique's finance routes and the latency offers.
* Diverse paths: divGraph()/divOn() number the cities and risks once; promiseCheck() shares a diversity graph, the
  land islands and one latency search per origin across every customer when the intern weighs taking a fiber out,
  and spots0() shares the graph for sovereign offers.

Tests: day-steps (cache planner, ports at every POP and flows from columns equal the old ways; the PNI round through
pniBatchRun), fiber-lit-and-latency (with failed optics and managed waves), shared-promise-checks, intern-personas.
This commit is contained in:
Antoine 2026-11-07 22:21:22 +01:00
parent d03dde6fcd
commit 44116103be
No known key found for this signature in database
GPG key ID: 728FF1CE15732B05
16 changed files with 373 additions and 66 deletions

View file

@ -134,9 +134,11 @@ The day:
Then the NOC intern's standing orders (`opsRun()`, or `opsDay()` in one go), if one is hired: each order clicks the
same `ACT` actions a player would, muted, within its monthly budget, and the shift routes again (a yield) before
decommissioning, which reads today's loads, and at the end, each only if a job changed the network. An order that
throws is paused; the day goes on. The NOC gets one notice a week.
throws is paused; the day goes on. The NOC gets one notice a week. The orders plan for every POP each day, so what
they count is counted for all POPs in one pass (`portsAt()`, `cachePlan()`, `pniFlows()`, `pniBatch()`), never one
pass over the network per POP.
Then the sales desk (`slAutoDay()`), if someone runs sales and the player lets them sign: deals are Sales', never
the intern's. Each salesperson signs in their own style (a routing trial a day, or the shark's sign-everything).
the intern's. Each salesperson signs in their own style (a routing trial a day, or the shark's sign-everything).5. Updates customer mood, churn and new offers; IX members join; loans tick.
5. Updates customer mood, churn and new offers; IX members join; loans tick.
6. Every 30 days: bills the month (revenue minus costs) and checks for bankruptcy.
7. Checks goals, level, badges and scenario end conditions.