diff --git a/CHANGELOG.md b/CHANGELOG.md index f5812f6..e36bc6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,10 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] -- Linking to an island or remote town where no subsea cable lands, like Iqaluit or Adamstown, now says that a satellite can get there too. Each of your teleports that reaches it gets a button to its order sheet; without one, the window says where a teleport would have to go (#83). -- IPv4 notices in the NOC's notifications, like "Your IPv4 is full", now have an Open button that takes you to the bank's Address space, as the notice's own button does (#150). -- 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 build standard has a new target while IPv4 is scarce, Broadband: IPv6-only: every broadband city still on dual stack swaps its home routers for 464XLAT ones, the cities with the most dual-stack homes first. "Bring everything up now" and your intern's Keep to the build standard order start a city's swap only with all of it to spare, on top of what the swaps under way still owe, and the intern counts it against the order's monthly budget (#150). +- Linking to an island or remote town where no subsea cable lands, like Iqaluit or Adamstown, now says that a satellite can get there too. The window has a button to the order sheet from your teleports that reach it, up to four of them; without one, it says where a teleport would have to go (#83). +- IPv4 notices in the NOC's notifications now have an Open button to the bank's Address space (#150). Notices like "Your IPv4 is full" already had that button when they popped up; now they keep it. +- Red warning text and the capacity market's Hot and Cool tags now read well in dark mode (#80). The red is a lighter one on the dark panels, and the tags take the night colours instead of staying bright pastel chips. +- The build standard can now take every broadband city IPv6-only while IPv4 is scarce (#150). Its new target, Broadband: IPv6-only, swaps the home routers of every city still on dual stack for 464XLAT ones, the cities with the most dual-stack homes first. "Bring everything up now" and your intern's Keep to the build standard order start a city's swap only with all of it to spare, and the intern counts it against the order's monthly budget. What the swaps under way still owe is set aside: the button's other jobs and every one of your intern's standing orders leave it alone, above the cash floor. - "Bring everything up now" in the build standard no longer takes a fiber dark for a day while a customer's alien or managed wave rides it. Such a fiber keeps its line system and the sheet says why; the upgrade button on the fiber itself still does it when you choose. Your intern waits for those fibers too, but no longer skips fibers that only carry leased pairs or IRUs, which a line system swap never touches. - 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. @@ -23,7 +23,7 @@ All notable changes to this project are documented here. The project follows - Set a build standard for your whole network: routers, a second building and a generator at every POP, LAGs, exchange ports and PNIs, line systems, optics and wave sizes, all in one sheet. New POPs get the POP part the day they open, the sheet shows what is below the standard and what fixing it costs, one tap brings everything up, and the new "Keep to the build standard" order has your intern do it a few jobs a day with money to spare. Find it in the menu, the Standing orders sheet and every POP's router section. - IPv4 is scarce now: business customers need public address blocks, and the homes that do not fit share addresses behind CGNAT. A new network starts with a /21 from its registry, enough for its first months; buy, lease or sell blocks from /24 to /16 on the transfer market in the bank's new Address space section, or lease spare ones out for a monthly income. An offer you have no addresses for says so and waits, a customer that wants to grow at renewal stays at its size until you have the addresses, CGNAT costs a little and annoys some gamers, and you pick how many homes share an address. IPv6 stays free for everyone. This is part of On-call and BGP at 3 a.m.; the gentler rules, Sandbox, puzzles and scenarios keep IPv4 plentiful, and saved games get the addresses they already use plus room to grow (#150). - Express lightpaths now pay their share when you add a regen site, and a dirty connector on a fiber dims the expresses riding it too (#58). A regen site added to a fiber that already carries expresses needs a regen card for each of their channels, just as for the fiber's own, and the price on the fiber's button includes them. A dirty connector dims every wave in that fiber, and the express's panel says which fiber it is; an MTU mismatch, microbursts or a marginal optic stay with that fiber's own routers and optics, which an express passes by. -- Many selective networks now refuse to peer on an island or in a remote town that only a satellite circuit joins to the rest of your network (#83). They would hand you traffic for your whole network to haul through orbit, so more of them turn down a GEO hop (about 600 ms there and back) than a MEO one (about 130 ms), and each says why on the exchange and PNI lists. Once a wave, fiber or cable to the island is lit they peer again; a session you already had there pauses until then. +- Many selective networks now refuse to peer where a satellite circuit is your only way out (#83). On an island or in a remote town that only a satellite joins to the rest of your network, they would hand you traffic for your whole network to haul through orbit, so more of them turn down a GEO hop (about 600 ms there and back) than a MEO one (about 130 ms), and each says why on the exchange and PNI lists. Once a wave, fiber or cable to the island is lit they peer again. An exchange session you already had there pauses until then; a PNI you already have and the members of an exchange you run yourself keep peering. ## [3.3.0] — 2026-11-09 diff --git a/docs/plans/next-session.md b/docs/plans/next-session.md index f10851d..3b0499b 100644 --- a/docs/plans/next-session.md +++ b/docs/plans/next-session.md @@ -25,7 +25,8 @@ faster routing (3.3.0)"; earlier merges 032470f and 4b922ab): ### Built in the batch of 2026-11-09 -Nine commits after 3e30621 (and the one that wrote this list); every code change comes with its test: +Nine commits after 3e30621, the one that wrote this list and "Review fixes for the small-fix batch" (folded into +the entries below); every code change comes with its test: - 8068a45 "Plans: the server-run design in the repo, what is left now, and the fork's files" (this file, `server-run.md`, the fork's files in `ARCHITECTURE.md`, a note in `MULTIPLAYER.md`). - **Dark mode (#80)**, 27ffa33: red text is `--tx-red` (a lighter red at night) everywhere it is text, in the styles @@ -35,7 +36,7 @@ Nine commits after 3e30621 (and the one that wrote this list); every code change - **IPv4 (#150)**, 7930d33: IPv4 notices in the notification log open the Address space (log target `{a:'ip4'}`, `ip4Open` in `NOC_GO`); with IPv4 off since, they open the bank. - **Satellites (#83)**, 2dc8274: the "no subsea cable lands here" hint (#321) names a satellite circuit where one can - reach the city, with a "From X" button per teleport to the order sheet (`satNoCable()`), or where a teleport would + reach the city, with a "From X" button per teleport (up to four) to the order sheet (`satNoCable()`), or where a teleport would have to go. It covers only the city the hint names. - **Express fiber (#58)**, ae78e82: a regen site added later charges a regen card per express channel on its fiber (`regenAddCost()`, used by the action, the button's price and the MCP quote); a dirty connector (loss with @@ -43,8 +44,9 @@ Nine commits after 3e30621 (and the one that wrote this list); every code change an MTU mismatch, microbursts and a marginal optic's CRC errors stay with the fiber's own routers and optics, which an express passes by (as an optic failure already did, while amp-hut and ROADM incidents darken expresses). - **Satellites (#83)**, 1f76639: selective networks refuse to peer where a satellite circuit is the island's or - town's only way out (`satOnly()`): 60 in 100 refuse a GEO hop, 15 in 100 a MEO one, each network's answer fixed; a - session already there stops carrying until a wave or cable is lit. Decided not to: a worse traffic ratio for MEO, + town's only way out (`satOnly()`: a fiber or cable with no optics of its own does not count): 60 in 100 refuse a + GEO hop, 15 in 100 a MEO one, each network's answer fixed; a session already there stops carrying until a wave or + cable is lit. Decided not to: a worse traffic ratio for MEO, refusals at exchanges you run, and any effect on PNIs already there. - **Build standard**, 286ae48: "Bring everything up now" and the intern follow one rule: a fiber a customer's alien or managed wave rides keeps its line system (`dfWaveCust()`), and the sheet says why (`bstd.held_wave`); leased pairs @@ -56,6 +58,9 @@ Nine commits after 3e30621 (and the one that wrote this list); every code change while `ip4On()`). `bstdPlan()` makes one job per dual-stack broadband city (`ip6Todo()`), the most dual-stack homes first, priced as the whole swap (`ip6Cost()`); the button and the `std` order start one only with all of it above the floor on top of what running swaps still owe (`ip6Owed()`), and the order counts it against its month's budget. + What running swaps owe, whoever started them, is set aside for every later job: the button's, and every standing + order's (`X.ow` in `opsShift()`, refreshed when the `std` order starts a swap). Decided not to: a separate hold in + `ip6Day()` at the cash floor; with the money set aside, the swaps pay down to the floor at most. ## The user's answers (2026-11-09) @@ -104,10 +109,6 @@ Asked on 2026-11-09, not answered yet: ## Next -- **Small follow-ups from the batch** (none needs the user's go): - - the standing-order descriptions `ops.o_std_around_d` and `ops.o_optup_std_d` still say a line system changes only - where "no customer rides it"; that is now true only of wave customers (leased pairs and IRUs no longer hold a - fiber). Rewording needs new labels and six translations. - **After the user's go:** T3 (host and protocol), T4 (the browser client) and the integration of server-run play, as `docs/plans/server-run.md` describes them, with the corrections at its top. That includes the Q1 work: the game's `S.day0` and day-0 rules, a start day for a new network on the server, and `CLOCK.off` taken out of the contract. diff --git a/site/i18n/de.js b/site/i18n/de.js index 4da418f..ab92e93 100644 --- a/site/i18n/de.js +++ b/site/i18n/de.js @@ -452,7 +452,7 @@ "bstd.second_building":"zweites Gebäude", "bstd.tagline":"Ein Design fürs ganze Netz: was jeder POP, Port und jede Glasfaser haben soll. Neue POPs bekommen den POP-Teil am Tag der Eröffnung; dein Praktikant oder der Button unten zieht den Rest nach.", "bstd.title":"Build-Standard", -"bstd.v6_note":"Nur IPv6 tauscht die Heimrouter jeder Breitband-Stadt, zuerst dort, wo die meisten Dual-Stack-Haushalte sind. Der Preis ist der ganze Tausch, bezahlt beim Einbau, und eine Stadt startet erst, wenn alles davon übrig ist.", +"bstd.v6_note":"Nur IPv6 tauscht die Heimrouter jeder Breitband-Stadt, zuerst dort, wo die meisten Dual-Stack-Haushalte sind. Der Preis ist der ganze Tausch, bezahlt beim Einbau, und eine Stadt startet erst, wenn du den ganzen Betrag übrig hast.", "businesses.a_free_pni_with_voda_phony":"Ein kostenloser PNI mit Voda-Phony. Hardware: Absolute-Unit-3.2T-Router, 3.2T-Ports und 12.8T-Waves.", "businesses.agi_lab_allegedly":"AGI-Labor (angeblich)", "businesses.agi_labs_allegedly_wanting_ai_wans":"AGI-Labore (angeblich), die KI-WANs mit 12,8 bis 25,6 Tbps wollen, und kostenlose PNIs mit Du-opoly und Ooh-redoo. Hardware: Mikrowtik-CCR-3.2T-Router.", @@ -2072,7 +2072,7 @@ "express.dark_gone":"Eine der Glasfasern darunter gibt es nicht mehr.", "express.dark_reach":"Keine ihrer Optiken schafft diese Strecke.", "express.dark_system":"Auf {span} ist das Line System down.", -"express.dim":"{span} hat einen verschmutzten Stecker: Jede Welle in dieser Faser, auch dieser Express, läuft mit {p}, bis jemand ihn reinigt.", +"express.dim":"{span} hat einen verschmutzten Stecker: Jede Wave auf dieser Glasfaser, auch dieser Express, läuft mit {p}, bis jemand den Stecker reinigt.", "express.express_to":"Express nach …", "express.eyebrow":"Express-Lightpath · {km} km", "express.fiber_busy":{"one":"Über diese Glasfaser läuft ein Express-Lightpath.
Bau ihn zuerst ab: Öffne ihn im Express-Abschnitt dieser Glasfaser.","other":"Über diese Glasfaser laufen {n} Express-Lightpaths.
Bau sie zuerst ab: Öffne sie im Express-Abschnitt dieser Glasfaser."}, @@ -3614,7 +3614,7 @@ "ops.o_optics":"Mehr Dark Fiber beleuchten", "ops.o_optics_d":"Optiken auf heiß laufende Dark Fiber stecken und neue Glasfaser am Tag der Übergabe beleuchten.", "ops.o_optup":"Optischen Transport ausbauen", -"ops.o_optup_std_d":"Auf Glasfaser, die voll ist und heiß läuft, das Line System eine Größe hochziehen oder die kleinsten Kanäle gegen größere Optiken tauschen (die alten kommen ins Ersatzteillager). Steht ein Line System im Build-Standard, wird jede Faser mit einem kleineren darauf hochgezogen. Ein Tausch des Line Systems legt die Faser für einen Tag lahm, also nur, wo der Traffic einen Weg drumherum hat und kein Kunde darauf fährt, einer pro Nacht zusammen mit „Build-Standard einhalten“.", +"ops.o_optup_wave_d":"Auf Glasfaser, die voll ist und heiß läuft, das Line System eine Größe hochziehen oder die kleinsten Kanäle gegen größere Optiken tauschen (die alten kommen ins Ersatzteillager). Steht ein Line System im Build-Standard, wird jede Faser mit einem kleineren darauf hochgezogen. Ein Tausch des Line Systems legt die Faser für einen Tag lahm, also nur, wo der Traffic einen Weg drumherum hat und keine Wave eines Kunden darauf läuft, einer pro Nacht zusammen mit „Build-Standard einhalten“.", "ops.o_pni":"PNI mit den Großen", "ops.o_pni_d":"Jede Woche: mit jedem willigen Netz, das an deinen POPs genug Traffic schickt, einen PNI bestellen, in der jeweils kleinsten Größe des Netzes.", "ops.o_ports":"Peering-Reserve halten", @@ -3624,7 +3624,7 @@ "ops.o_routers":"Router voraus halten", "ops.o_routers_std_d":"Einen Router dazustellen oder auf die nächste Generation tauschen, wo ein zweiter Router den Traffic trägt, sobald Last oder Ports eine Grenze überschreiten. Steht ein Router-Modell im Build-Standard, wird stattdessen jeder POP mit einem kleineren darauf getauscht, der am meisten ausgelastete zuerst, im Rahmen des Budgets.", "ops.o_std":"Build-Standard einhalten", -"ops.o_std_around_d":"POPs, Ports und Glasfaser auf deinen Build-Standard bringen, die meistbelasteten zuerst, ein paar Jobs pro Schicht. Vor einem Tausch kommt ein zweiter Router rein, und ein Line System wechselt nur, wo der Traffic für den dunklen Tag einen Weg um die Faser hat und kein Kunde darauf fährt, einer pro Nacht zusammen mit „Optischen Transport ausbauen“.", +"ops.o_std_wave_d":"POPs, Ports und Glasfaser auf deinen Build-Standard bringen, die meistbelasteten zuerst, ein paar Jobs pro Schicht. Vor einem Tausch kommt ein zweiter Router rein, und ein Line System wechselt nur, wo der Traffic für den dunklen Tag einen Weg um die Faser hat und keine Wave eines Kunden darauf läuft, einer pro Nacht zusammen mit „Optischen Transport ausbauen“.", "ops.o_transit":"Transit-Reserve halten", "ops.o_transit_d":"Transit an jedem POP über einem Vielfachen seiner 30-Tage-Spitze halten: ein LAG-Member dazu oder eine Portgröße hoch.", "ops.ops":"Ops", diff --git a/site/i18n/es.js b/site/i18n/es.js index 808e9b1..784fc45 100644 --- a/site/i18n/es.js +++ b/site/i18n/es.js @@ -450,7 +450,7 @@ "bstd.second_building":"segundo edificio", "bstd.tagline":"Un solo diseño para toda la red: lo que debe tener cada POP, puerto y fibra. Los POP nuevos reciben la parte del POP el día que abren; tu becario, o el botón de abajo, pone el resto al día.", "bstd.title":"Estándar de red", -"bstd.v6_note":"Solo IPv6 cambia los routers domésticos de cada ciudad con banda ancha, primero donde hay más hogares en doble pila. Su precio es el cambio entero, pagado a medida que se instalan, y una ciudad empieza solo cuando te sobra todo.", +"bstd.v6_note":"Solo IPv6 cambia los routers domésticos de cada ciudad con banda ancha, primero donde hay más hogares en doble pila. Su precio es el cambio entero, pagado a medida que se instalan, y una ciudad empieza solo cuando te sobra todo ese importe.", "businesses.a_free_pni_with_voda_phony":"Un PNI gratis con Voda-Phony. Equipo: routers Absolute Unit 3.2T, puertos de 3.2T y ondas de 12.8T.", "businesses.agi_lab_allegedly":"Laboratorio de AGI (supuestamente)", "businesses.agi_labs_allegedly_wanting_ai_wans":"Laboratorios de AGI (supuestamente) que quieren WAN de IA de 12.8 a 25.6 Tbps, y PNIs gratis con Du-opoly y Ooh-redoo. Equipo: routers Mikrowtik CCR 3.2T.", @@ -3612,7 +3612,7 @@ "ops.o_optics":"Encender más fibra", "ops.o_optics_d":"Añadir ópticas a la fibra oscura que va caliente y encender la fibra nueva el día que te la entregan.", "ops.o_optup":"Mejorar el transporte óptico", -"ops.o_optup_std_d":"En la fibra que está llena y va caliente, sube el sistema de línea un tamaño o cambia los canales más pequeños por ópticas más grandes (las viejas van a la estantería). Con un sistema de línea en el estándar de red, cada fibra con uno más pequeño sube a ese. Cambiar el sistema de línea deja la fibra sin servicio un día, así que solo donde el tráfico puede rodearla y ningún cliente va por ella, uno por noche junto con «Mantener el estándar de red».", +"ops.o_optup_wave_d":"En la fibra que está llena y va caliente, sube el sistema de línea un tamaño o cambia los canales más pequeños por ópticas más grandes (las viejas van a la estantería). Con un sistema de línea en el estándar de red, cada fibra con uno más pequeño sube a ese. Cambiar el sistema de línea deja la fibra sin servicio un día, así que solo donde el tráfico puede rodearla y ninguna wave de un cliente va por ella, uno por noche junto con «Mantener el estándar de red».", "ops.o_pni":"PNI con los grandes", "ops.o_pni_d":"Cada semana: pedir un PNI a cada red dispuesta que envíe suficiente tráfico en tus POPs, con el tamaño mínimo de cada red.", "ops.o_ports":"Margen en puertos de peering", @@ -3622,7 +3622,7 @@ "ops.o_routers":"Routers por delante", "ops.o_routers_std_d":"Añadir un router, o pasar a la siguiente generación donde un segundo router lleve el tráfico, cuando la carga o los puertos pasen de un nivel. Con un modelo de router en el estándar de red, cada POP con uno más pequeño se cambia a ese, primero el más cargado, dentro del presupuesto.", "ops.o_std":"Mantener el estándar de red", -"ops.o_std_around_d":"Poner los POP, los puertos y la fibra al nivel de tu estándar de red, los más cargados primero, unos pocos trabajos por turno. Antes de un cambio entra un segundo router, y el sistema de línea solo cambia donde el tráfico puede rodear la fibra el día que queda a oscuras y ningún cliente va por ella, uno por noche junto con «Mejorar el transporte óptico».", +"ops.o_std_wave_d":"Poner los POP, los puertos y la fibra al nivel de tu estándar de red, los más cargados primero, unos pocos trabajos por turno. Antes de un cambio entra un segundo router, y el sistema de línea solo cambia donde el tráfico puede rodear la fibra el día que queda a oscuras y ninguna wave de un cliente va por ella, uno por noche junto con «Mejorar el transporte óptico».", "ops.o_transit":"Margen de tránsito", "ops.o_transit_d":"Mantener el tránsito de cada POP por encima de un múltiplo de su pico de 30 días: un miembro LAG más o un tamaño de puerto mayor.", "ops.ops":"Ops", diff --git a/site/i18n/fr.js b/site/i18n/fr.js index 8b00346..8e01bb5 100644 --- a/site/i18n/fr.js +++ b/site/i18n/fr.js @@ -3612,7 +3612,7 @@ "ops.o_optics":"Allumer plus de fibre", "ops.o_optics_d":"Ajouter des optiques sur la fibre noire qui chauffe, et allumer la nouvelle fibre le jour de sa livraison.", "ops.o_optup":"Améliorer le transport optique", -"ops.o_optup_std_d":"Sur une fibre pleine qui chauffe, passer le système de ligne à la taille au-dessus, ou échanger les plus petits canaux contre des optiques plus grandes (les anciennes partent sur l’étagère). Avec un système de ligne dans le standard réseau, chaque fibre équipée d’un plus petit y passe. Un changement de système de ligne coupe la fibre pour une journée : seulement là où le trafic peut la contourner et où aucun client ne passe, un par nuit avec « Tenir le standard réseau ».", +"ops.o_optup_wave_d":"Sur une fibre pleine qui chauffe, passer le système de ligne à la taille au-dessus, ou échanger les plus petits canaux contre des optiques plus grandes (les anciennes partent sur l’étagère). Avec un système de ligne dans le standard réseau, chaque fibre équipée d’un plus petit y passe. Un changement de système de ligne coupe la fibre pour une journée : seulement là où le trafic peut la contourner et où aucune wave de client ne passe, un par nuit avec « Tenir le standard réseau ».", "ops.o_pni":"PNI avec les gros", "ops.o_pni_d":"Chaque semaine : commander un PNI avec chaque réseau partant qui envoie assez de trafic sur tes POP, à la taille minimale de chaque réseau.", "ops.o_ports":"Garder de la marge sur les ports de peering", @@ -3622,7 +3622,7 @@ "ops.o_routers":"Garder les routeurs en avance", "ops.o_routers_std_d":"Ajouter un routeur, ou passer à la génération suivante là où un second routeur porte le trafic, quand la charge ou les ports dépassent un seuil. Avec un modèle de routeur dans le standard réseau, chaque POP équipé d’un plus petit passe à celui-ci, le plus chargé d’abord, dans la limite du budget.", "ops.o_std":"Tenir le standard réseau", -"ops.o_std_around_d":"Mettre POP, ports et fibre au niveau de ton standard réseau, les plus chargés d’abord, quelques chantiers par service. Un second routeur arrive avant un échange, et le système de ligne ne change que là où le trafic peut contourner la fibre le jour où elle est coupée et où aucun client ne passe, un par nuit avec « Améliorer le transport optique ».", +"ops.o_std_wave_d":"Mettre POP, ports et fibre au niveau de ton standard réseau, les plus chargés d’abord, quelques chantiers par service. Un second routeur arrive avant un échange, et le système de ligne ne change que là où le trafic peut contourner la fibre le jour où elle est coupée et où aucune wave de client ne passe, un par nuit avec « Améliorer le transport optique ».", "ops.o_transit":"Garder de la marge de transit", "ops.o_transit_d":"Garder le transit de chaque POP au-dessus d'un multiple de son pic sur 30 jours : un membre LAG de plus, ou une taille de port au-dessus.", "ops.ops":"Ops", diff --git a/site/i18n/it.js b/site/i18n/it.js index bf54545..03250ac 100644 --- a/site/i18n/it.js +++ b/site/i18n/it.js @@ -2070,7 +2070,7 @@ "express.dark_gone":"Una delle fibre sotto non c’è più.", "express.dark_reach":"Nessuna delle sue ottiche arriva così lontano.", "express.dark_system":"{span} ha il line system giù.", -"express.dim":"{span} ha un connettore sporco: ogni onda in quella fibra, anche questo express, va al {p} finché qualcuno non lo pulisce.", +"express.dim":"{span} ha un connettore sporco: ogni wave in quella fibra, anche questo express, va al {p} finché qualcuno non lo pulisce.", "express.express_to":"Express verso…", "express.eyebrow":"Lightpath express · {km} km", "express.fiber_busy":{"one":"Su questa fibra passa un lightpath express.
Smontalo prima: aprilo dalla sezione Express di questa fibra.","other":"Su questa fibra passano {n} lightpath express.
Smontali prima: aprili dalla sezione Express di questa fibra."}, @@ -3612,7 +3612,7 @@ "ops.o_optics":"Accendi più fibra", "ops.o_optics_d":"Aggiungi ottiche alla dark fiber che scotta e accendi la fibra nuova il giorno della consegna.", "ops.o_optup":"Potenzia il trasporto ottico", -"ops.o_optup_std_d":"Sulla fibra piena che va calda, porta il line system alla taglia successiva, o scambia i canali più piccoli con ottiche più grandi (le vecchie finiscono a scaffale). Con un line system nello standard di rete, ogni fibra con uno più piccolo passa a quello. Cambiare line system spegne la fibra per un giorno, quindi solo dove il traffico può girarle intorno e nessun cliente ci passa, uno per notte insieme a “Tieni lo standard di rete”.", +"ops.o_optup_wave_d":"Sulla fibra piena che va calda, porta il line system alla taglia successiva, o scambia i canali più piccoli con ottiche più grandi (le vecchie finiscono a scaffale). Con un line system nello standard di rete, ogni fibra con uno più piccolo passa a quello. Cambiare line system spegne la fibra per un giorno, quindi solo dove il traffico può girarle intorno e nessuna wave di un cliente ci passa, uno per notte insieme a “Tieni lo standard di rete”.", "ops.o_pni":"PNI con i grandi", "ops.o_pni_d":"Ogni settimana: ordina un PNI con ogni rete disponibile che manda abbastanza traffico nei tuoi POP, alla taglia minima di ciascuna rete.", "ops.o_ports":"Margine sulle porte di peering", @@ -3622,7 +3622,7 @@ "ops.o_routers":"Router sempre avanti", "ops.o_routers_std_d":"Aggiungi un router, o passa alla generazione successiva dove un secondo router regge il traffico, quando carico o porte superano una soglia. Con un modello di router nello standard di rete, ogni POP con uno più piccolo passa a quello, prima il più carico, nei limiti del budget.", "ops.o_std":"Tieni lo standard di rete", -"ops.o_std_around_d":"Porta POP, porte e fibra al tuo standard di rete, i più carichi prima, qualche lavoro a turno. Prima di uno scambio arriva un secondo router, e il sistema di linea cambia solo dove il traffico può girare intorno alla fibra nel giorno in cui è spenta e nessun cliente ci passa, uno per notte insieme a “Potenzia il trasporto ottico”.", +"ops.o_std_wave_d":"Porta POP, porte e fibra al tuo standard di rete, i più carichi prima, qualche lavoro a turno. Prima di uno scambio arriva un secondo router, e il sistema di linea cambia solo dove il traffico può girare intorno alla fibra nel giorno in cui è spenta e nessuna wave di un cliente ci passa, uno per notte insieme a “Potenzia il trasporto ottico”.", "ops.o_transit":"Margine di transit", "ops.o_transit_d":"Tieni il transit di ogni POP sopra un multiplo del suo picco a 30 giorni: un membro LAG in più, o una porta più grande.", "ops.ops":"Ops", diff --git a/site/i18n/pt.js b/site/i18n/pt.js index c0feb10..594808b 100644 --- a/site/i18n/pt.js +++ b/site/i18n/pt.js @@ -3612,7 +3612,7 @@ "ops.o_optics":"Acender mais fibra", "ops.o_optics_d":"Adicionar ópticas à fibra escura que está esquentando e acender a fibra nova no dia da entrega.", "ops.o_optup":"Melhorar o transporte óptico", -"ops.o_optup_std_d":"Na fibra que está cheia e esquentando, sobe o sistema de linha um tamanho ou troca os canais menores por ópticas maiores (as antigas vão para a prateleira). Com um sistema de linha no padrão de rede, cada fibra com um menor sobe para ele. Trocar o sistema de linha derruba a fibra por um dia, então só onde o tráfego consegue contorná-la e nenhum cliente passa por ela, uma por noite junto com “Manter o padrão de rede”.", +"ops.o_optup_wave_d":"Na fibra que está cheia e esquentando, sobe o sistema de linha um tamanho ou troca os canais menores por ópticas maiores (as antigas vão para a prateleira). Com um sistema de linha no padrão de rede, cada fibra com um menor sobe para ele. Trocar o sistema de linha derruba a fibra por um dia, então só onde o tráfego consegue contorná-la e nenhuma wave de cliente passa por ela, uma por noite junto com “Manter o padrão de rede”.", "ops.o_pni":"PNI com os grandes", "ops.o_pni_d":"Toda semana: pedir um PNI com cada rede disposta que mande tráfego suficiente nos seus POPs, no tamanho mínimo de cada rede.", "ops.o_ports":"Folga nas portas de peering", @@ -3622,7 +3622,7 @@ "ops.o_routers":"Roteadores à frente", "ops.o_routers_std_d":"Adicionar um roteador, ou trocar para a próxima geração onde um segundo roteador segura o tráfego, quando a carga ou as portas passarem de um nível. Com um modelo de roteador no padrão de rede, cada POP com um menor é trocado para ele, o mais carregado primeiro, dentro do orçamento.", "ops.o_std":"Manter o padrão de rede", -"ops.o_std_around_d":"Colocar POPs, portas e fibra no seu padrão de rede, os mais carregados primeiro, alguns trabalhos por turno. Antes de uma troca entra um segundo roteador, e o sistema de linha só muda onde o tráfego consegue contornar a fibra no dia em que ela fica apagada e nenhum cliente passa por ela, uma por noite junto com “Melhorar o transporte óptico”.", +"ops.o_std_wave_d":"Colocar POPs, portas e fibra no seu padrão de rede, os mais carregados primeiro, alguns trabalhos por turno. Antes de uma troca entra um segundo roteador, e o sistema de linha só muda onde o tráfego consegue contornar a fibra no dia em que ela fica apagada e nenhuma wave de cliente passa por ela, uma por noite junto com “Melhorar o transporte óptico”.", "ops.o_transit":"Folga de trânsito", "ops.o_transit_d":"Manter o trânsito de cada POP acima de um múltiplo do seu pico de 30 dias: mais um membro LAG, ou um tamanho de porta acima.", "ops.ops":"Ops", diff --git a/src/game/60-features/34-ipv6-only.js b/src/game/60-features/34-ipv6-only.js index 1464315..5611a02 100644 --- a/src/game/60-features/34-ipv6-only.js +++ b/src/game/60-features/34-ipv6-only.js @@ -27,9 +27,10 @@ function ip6Free(c){const p=ip6Pop(c);if(!p||!p.bb)return 0;return ip4Use(ip6If( function ip6Mo(c,eye){const p=ip6Pop(c);if(!p||!p.bb)return 0;const m=b=>b.box+b.box64+b.refund;return m(ip4Bill(eye,ip6If(c,p)))-m(ip4Bill(eye));} // A city the build standard's IPv6-only row would start (bstdPlan()): broadband with dual-stack homes, no swap running. const ip6Todo=c=>{const p=ip6Pop(c);return !!p&&!!p.bb&&!p.bb.v6e&&!(p.bb.v6>=1)&&ip6Homes(p)>0;}; -// What the swaps under way still have to pay for, router by router: the build standard starts another only with that -// much on top of its own price above the cash floor, since a swap pays as it goes and the cash has not moved yet. -const ip6Owed=()=>{let n=0;for(const c in S.pops){const b=S.pops[c].bb;if(b&&b.v6e)n+=ip6Homes(S.pops[c])*IP6_CPE;}return n;}; +// What the swaps under way still have to pay for, router by router: the build standard's button starts a job, and the +// intern's orders anything, only with that much on top of its own price (above the cash floor), since a swap pays as it +// goes and the cash has not moved yet. Nothing while IPv4 is plentiful: the swaps wait then (ip6Day()). +const ip6Owed=()=>{if(!ip4On())return 0;let n=0;for(const c in S.pops){const b=S.pops[c].bb;if(b&&b.v6e)n+=ip6Homes(S.pops[c])*IP6_CPE;}return n;}; // Why this city cannot start a swap now ('' when it can). function ip6Why(c){const p=ip6Pop(c);if(!ip4On())return tr('ip4.off');if(!p||!p.bb)return tr('ip6.no_bb');if(p.bb.v6e)return tr('ip6.busy');if(p.bb.v6>=1)return tr('ip6.already');return '';} // Today's routers: an even share of what is left, so the swap ends on its day however the city grows meanwhile. diff --git a/src/game/60-features/45-teleports.js b/src/game/60-features/45-teleports.js index 895a750..ecd6a19 100644 --- a/src/game/60-features/45-teleports.js +++ b/src/game/60-features/45-teleports.js @@ -41,10 +41,12 @@ const satFrom=b=>satRemote(b)?teleCities().filter(a=>a!==b&&satBirds(a,b).length function satBeside(a,b){const ls=pairLinks(a,b).filter(l=>l.kind==='sat'&&!l.standby);for(const l of ls)l.standby=true; if(ls.length)toast(trn('satellites.n_circuits_go_on_standby',ls.length,{a:CITY[a].name,b:CITY[b].name}));return ls.length;} /* An island or remote town that only satellites join to the rest of your network: its fastest circuit (null when a wave, - a fiber, a cable or a pie dish reaches it too). What is built counts, never today's cuts: a selective peer judges what - you built, not this week's repair (50-peering-policy.js). */ + a lit fiber, a cable or a pie dish reaches it too). What is built and lit counts, never today's cuts: a selective peer + judges what you built, not this week's repair (50-peering-policy.js). A fiber or cable with no optics of its own yet + carries nothing (an express only passes through a city's ROADM, and is a link of its own where it ends). */ function satOnly(c){if(!satRemote(c)||!S.pops[c]||S.pie&&(S.pie.dishes||[]).some(x=>x.city===c))return null;let best=null; - for(const l of S.links){if(l.a!==c&&l.b!==c)continue;if(l.kind!=='sat'){if(!(l.ready>S.day))return null;continue;}if(!best||satLat(l)S.day)&&(l.kind!=='df'||(l.ch||[]).length))return null;continue;}if(!best||satLat(l)1?TRK_MO:0);}for(const l of S.links)if(l.kind==='sat')m+=l.mo||0;return m;} diff --git a/src/game/60-features/95-standing-orders.js b/src/game/60-features/95-standing-orders.js index 2daa2c4..3af35f3 100644 --- a/src/game/60-features/95-standing-orders.js +++ b/src/game/60-features/95-standing-orders.js @@ -21,7 +21,7 @@ const OPS=[ // The model to standardize on is the build standard's, set in its sheet (96-pop-standard.js): none of its own here. {k:'routers',i:'🧠',pop:1,cap:250000,t:N_('ops.o_routers'),d:N_('ops.o_routers_std_d'),p:{at:{d:80,v:[60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'},how:{d:'auto',v:['auto','add','swap'],l:N_('ops.p_how'),f:v=>tr({auto:N_('ops.how_auto'),add:N_('ops.how_add'),swap:N_('ops.how_swap')}[v])}}}, // The build standard (96-pop-standard.js): its targets are set in their own sheet, so here it has only the budget. - {k:'std',i:'📐',pop:1,cap:250000,t:N_('ops.o_std'),d:N_('ops.o_std_around_d'),p:{}}, + {k:'std',i:'📐',pop:1,cap:250000,t:N_('ops.o_std'),d:N_('ops.o_std_wave_d'),p:{}}, {k:'caches',i:'📦',pop:1,cap:5000,mo:1,t:N_('ops.o_caches'),d:N_('ops.o_caches_d'),p:{g:{d:5,v:[1,5,10,25,50],l:N_('ops.p_g'),f:v=>fmtG(v)}}}, {k:'ix',i:'🔀',t:N_('ops.o_ix'),d:N_('ops.o_ix_d'),p:{}}, {k:'pni',i:'🤝',pop:1,cap:50000,t:N_('ops.o_pni'),d:N_('ops.o_pni_d'),p:{g:{d:25,v:[5,10,25,50,100],l:N_('ops.p_g'),f:v=>fmtG(v)},tier:{d:0,v:[0,1,2],l:N_('ops.p_tier'),f:v=>tr('ops.at_least_port',{port:PORT[v].n})},paid:{d:false,v:[false,true],l:N_('ops.p_paid'),f:v=>v?tr('common.on'):tr('common.off')}}}, @@ -29,7 +29,7 @@ const OPS=[ {k:'optics',i:'🌈',cap:250000,t:N_('ops.o_optics'),d:N_('ops.o_optics_d'),p:{at:{d:70,v:[50,60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'},pick:{d:'cheap',v:['cheap','big'],l:N_('ops.p_pick'),f:v=>tr({cheap:N_('ops.pick_cheap'),big:N_('ops.pick_big')}[v])}}}, // Line systems up to a bigger one, and optics swapped for bigger ones, on fiber that is full and runs hot, or every fiber up to // the build standard's line system. A line system swap is a day without that fiber: only where the traffic gets around it. - {k:'optup',i:'🔭',cap:250000,t:N_('ops.o_optup'),d:N_('ops.o_optup_std_d'),p:{at:{d:80,v:[60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'}, + {k:'optup',i:'🔭',cap:250000,t:N_('ops.o_optup'),d:N_('ops.o_optup_wave_d'),p:{at:{d:80,v:[60,70,80,90],l:N_('ops.p_at'),f:v=>v+'%'}, swap:{d:true,v:[true,false],l:N_('ops.p_swap'),f:v=>v?tr('common.on'):tr('common.off')}}}, {k:'decom',i:'🧹',t:N_('ops.o_decom'),d:N_('ops.o_decom_d'),p:{keep:{d:true,v:[true,false],l:N_('ops.p_keep'),f:v=>v?tr('common.on'):tr('common.off')}}}, ]; @@ -126,13 +126,15 @@ function opsQuiet(fn){const a=after,t=toast,s=sfx,f=floater,sel=UI.sel,cf=UI.con // up/mo: what this shift paid up front and added to the monthly bill. // dk: the night's fibers taken dark (n) and routings to test one (t), shared by the orders that do it (opsDarkRoom()). // fib: the fibers and waves an order worked on this shift, by order: one owner per fiber a shift. +// ow: money already promised that has not left yet, what the IPv6-only swaps under way still owe (ip6Owed()), whoever +// started them: every order keeps it above the cash floor, so the swaps pay their routers without going under it. +// The order that starts a swap counts it again (bstdShift()). function opsShift(){const r=new Map(),broke=new Set(); - return {r,broke,dirty:false,up:0,mo:0,dk:{n:0,t:0},fib:new Map(),did(k,w){this.dirty=true;const x=r.get(k)||{n:0,w:[]};x.n++;if(w&&x.w.length<3&&!x.w.includes(w))x.w.push(w);r.set(k,x);}, + return {r,broke,dirty:false,up:0,mo:0,dk:{n:0,t:0},fib:new Map(),ow:ip6Owed(),did(k,w){this.dirty=true;const x=r.get(k)||{n:0,w:[]};x.n++;if(w&&x.w.length<3&&!x.w.includes(w))x.w.push(w);r.set(k,x);}, // A job that costs nothing up front still has to pass the cash floor if it adds to the monthly bill. - // quiet: only asking, so a no is not logged as the budget running out. owed: money already promised that has not - // left yet (IPv6-only swaps under way), which the floor has to hold too. - can(k,cost,mo=0,quiet,owed=0){const O=S.ops,cap=opsCap(k);if(cost<=0&&!(mo>0))return true; - if(S.cash-Math.max(0,cost)-owedcap)){if(!quiet)broke.add(k);return false;}return true;}, + // quiet: only asking, so a no is not logged as the budget running out. + can(k,cost,mo=0,quiet){const O=S.ops,cap=opsCap(k);if(cost<=0&&!(mo>0))return true; + if(S.cash-Math.max(0,cost)-this.owcap)){if(!quiet)broke.add(k);return false;}return true;}, book(k,d,dm){const O=S.ops;if(d>0){this.up+=d;if(OPSK[k].cap)O.spent[k]=(O.spent[k]||0)+d;}if(dm){this.mo+=dm;O.addMo[k]=(O.addMo[k]||0)+dm;}}, // Run a click and book what it really cost; false when the action refused (no ports, no cash, a quote changed). pay(k,fn){const c0=S.cash,m0=opsMoNow(),x=fn();this.book(k,c0-S.cash,opsMoNow()-m0);return x===undefined?c0-S.cash>0:x;}};} diff --git a/src/game/60-features/96-pop-standard.js b/src/game/60-features/96-pop-standard.js index 1d4fa0b..bff41d1 100644 --- a/src/game/60-features/96-pop-standard.js +++ b/src/game/60-features/96-pop-standard.js @@ -105,7 +105,8 @@ function bstdPlan(intern){const J=[];J.held=[];J.wv=[];if(!S||!S.popStd||pzOn()) V[c]={g,rt,site2:!!p.site2||D.site2,sw,s2};} // Broadband IPv6-only: every city still on dual stack starts its home-router swap (ACT.ip6Go()), the most dual-stack // homes first: those are the most behind CGNAT, and free the most addresses. Its price is the whole swap, paid as the - // routers go in (ip6Day()): later, so the shift and the button keep it, and the swaps still running, above the floor. + // routers go in (ip6Day()): later, so the shift and the button keep what it still owes, as for every swap running, above + // the floor for every job after it. // mo: what it does to the month's IPv4 bill, counted one city after another on a copy, so the sum is all of them done. if(D.v6&&ip4On()){const v6=cs.filter(ip6Todo).sort((a,b)=>ip6Homes(S.pops[b])-ip6Homes(S.pops[a])||(ab.box+b.box64+b.refund,s={ip4:S.ip4,biz:S.biz,pops:{...S.pops}};let b0=v6.length?m(ip4Bill(eye,s)):0; @@ -248,9 +249,10 @@ const bstdFast=()=>!!(S.popStd&&opsHired()&&S.ops.on.std&&bstd().opt==='fast'); rests between jobs: a POP decommissioned or a link given up meanwhile is not worked on (the links last: a walk of them, only for a job the budget lets through). */ // An IPv6-only swap (j.later) pays nothing today: the whole swap counts against the month's budget when it starts, and -// the cash floor holds it on top of what the swaps under way still owe (ip6Owed()). Not in what the shift paid up front. +// from then on it is owed (X.ow): every later job of every order keeps it above the cash floor, as for the swaps already +// under way. Not in what the shift paid up front. function* bstdShift(X){const mine=j=>(!j.c||!!S.pops[j.c])&&(!j.l||(X.fib.get(j.l.id)||'std')==='std'); - yield* bstdRun(bstdPlan(true),j=>mine(j)&&X.can('std',bstdPrice(j),j.mo,false,j.later?ip6Owed():0)&&(!j.l||S.links.includes(j.l)), - j=>{const k=j.later?bstdPrice(j):0;if(!X.pay('std',()=>j.go()))return false;if(k)S.ops.spent.std=(S.ops.spent.std||0)+k;X.did('std',j.w);return true;}, + yield* bstdRun(bstdPlan(true),j=>mine(j)&&X.can('std',bstdPrice(j),j.mo)&&(!j.l||S.links.includes(j.l)), + j=>{const k=j.later?bstdPrice(j):0;if(!X.pay('std',()=>j.go()))return false;if(k){S.ops.spent.std=(S.ops.spent.std||0)+k;X.ow=ip6Owed();}X.did('std',j.w);return true;}, function*(j){const l=j.l;if(OPTUP_NO.get(l.id)>S.day||!opsDarkRoom(X))return false;const ok=yield* opsDark(l,X);if(!ok)OPTUP_NO.set(l.id,S.day+OPTUP_WAIT);return ok;}, (j,first)=>{if(j.l)X.fib.set(j.l.id,'std');if(first)X.dk.n++;},BSTD_MAX);} diff --git a/src/game/70-rules/20-exchanges.js b/src/game/70-rules/20-exchanges.js index 52b4e2d..106369a 100644 --- a/src/game/70-rules/20-exchanges.js +++ b/src/game/70-rules/20-exchanges.js @@ -28,8 +28,10 @@ function lagName(tier,n){return (n||1)>1?`${n}×${PORT[tier].n} LAG`:tr('common. function ixCap(c){return ixLagF(c)*(S.myIx[c]?myFab(c).g*(myIxLive(c)?1:0):liveCap(PORT[S.ixp[c]].g,ixCity(c),(S.ixSite||{})[c],(S.ixn||{})[c])*(isRemote(c)?REMOTE_CAP:1));} function ixSessions(c){ const s=new Set(); if(S.ixp[c]===undefined)return s; + // satNo() for every member, with the city's satellite circuit (most cities have none) looked up once. + const so=satOnly(ixCity(c)),orb=so&&SATS[so.bird].orb; for(const id of ixMembers(c)){const n=NET[id]; - if(S.peers[id+'@'+c]&&!snub(id,c)&&!(isRemote(c)&&noRemote(id))&&!satNo(id,ixCity(c)))s.add(id); + if(S.peers[id+'@'+c]&&!snub(id,c)&&!(isRemote(c)&&noRemote(id))&&!(so&&noSat(id,orb)))s.add(id); else if(S.rs[c]&&n.pol==='open'&&ppol()==='open')s.add(id); else if(S.myIx[c]&&(n.pol==='open'||n.pol==='selective'))s.add(id);} return s; diff --git a/src/game/90-actions/88-build-standard.js b/src/game/90-actions/88-build-standard.js index 903dae4..3948306 100644 --- a/src/game/90-actions/88-build-standard.js +++ b/src/game/90-actions/88-build-standard.js @@ -15,9 +15,9 @@ Object.assign(ACT,{ bstdApply:({quote,q}={})=>{if(!S||pzOn()||!S.popStd)return;const J=bstdPlan(false); if((quote!==undefined||q!==undefined)&&(!J.length||(quote!==undefined&&String(quote)!==bstdPlanKey(J))||(q!==undefined&&!quoteNear(+q,bstdSum(J))))){bstdModal(tr('utilities.quote_changed'));sfx('err');return;} if(!J.length)return;const c0=S.cash;let n=0,later=0; - // An IPv6-only swap pays as its routers go in: it starts with the whole swap in hand, on top of what those running - // owe, and the toast counts it whole, as the quote did. - opsQuiet(()=>{const did=bstdDo(J,j=>{const c=bstdPrice(j);return c<=0||S.cash-(j.later?ip6Owed():0)>=c;},j=>!!j.go());n=did.length;for(const j of did)if(j.later)later+=j.cost;}); + // An IPv6-only swap pays as its routers go in: what the swaps under way still owe (one this click started too) stays + // in hand, so every job, a swap or not, needs its price on top of that. The toast counts a swap whole, as the quote did. + opsQuiet(()=>{const did=bstdDo(J,j=>{const c=bstdPrice(j);return c<=0||S.cash-ip6Owed()>=c;},j=>!!j.go());n=did.length;for(const j of did)if(j.later)later+=j.cost;}); after();const z=bstdQuote(false),left=z.pops+z.ports+z.links; toast((n?trn('bstd.applied',n,{cost:fmt$(c0-S.cash+later)}):tr('bstd.applied_none'))+(left?' '+trn('bstd.left',left):''),n?'good':'bad');sfx(n?'build':'err'); if(bstdShown())bstdModal();}, diff --git a/src/game/93-ui/59-build-standard.js b/src/game/93-ui/59-build-standard.js index 85daaf6..3787cbd 100644 --- a/src/game/93-ui/59-build-standard.js +++ b/src/game/93-ui/59-build-standard.js @@ -32,7 +32,7 @@ function bstdModal(msg){if(!S||pzOn())return;const D=bstd(),q=bstdQuote(false),h +(q.wait.length?`

${trn('bstd.held',q.wait.length)}

`:'')+(q.wv.length?`

${trn('bstd.held_wave',q.wv.length)}

`:'') :`

${S.popStd?tr('bstd.all_up'):tr('bstd.none_set')}

`}`; // The intern keeps it there: the order's switch and budget, or a word on hiring one. - h+=`

${tr('ops.o_std')}

${hired?`
${esc(tr('bstd.intern_keeps',{name:opsName()}))}
${tr('ops.o_std_around_d')}
+ h+=`

${tr('ops.o_std')}

${hired?`
${esc(tr('bstd.intern_keeps',{name:opsName()}))}
${tr('ops.o_std_wave_d')}
${on?`
${opsSel(tr('ops.budget'),'opsCap',{k:'std'},opsCaps('std'),opsCap('std'),v=>opsCapName('std',v))}
`:''}
` :`

${tr('bstd.hire_note')}

${btn(tr('ops.hire_an_intern'),'opsOpen',{},'ghost sm',!opsCanHire()||!rule('clock'))}
`}
`; diff --git a/src/i18n/en.js b/src/i18n/en.js index b9787ca..74d4253 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -3613,7 +3613,7 @@ "ops.o_optics":"Light more fiber", "ops.o_optics_d":"Add optics to dark fiber that runs hot, and light new fiber the day it is handed over.", "ops.o_optup":"Upgrade optical transport", -"ops.o_optup_std_d":"On fiber that is full and runs hot, move the line system up a size, or trade the smallest channels for bigger optics (the old ones go on the shelf). With a line system in the build standard, every fiber on a smaller one is moved up to it. A line system swap takes the fiber down for a day, so only where the traffic gets around it and no customer rides it, one a night together with Keep to the build standard.", +"ops.o_optup_wave_d":"On fiber that is full and runs hot, move the line system up a size, or trade the smallest channels for bigger optics (the old ones go on the shelf). With a line system in the build standard, every fiber on a smaller one is moved up to it. A line system swap takes the fiber down for a day, so only where the traffic gets around it and no customer's wave rides it, one a night together with Keep to the build standard.", "ops.o_pni":"PNI with the big ones", "ops.o_pni_d":"Every week: order a PNI with every willing network sending enough traffic at your POPs, at each network's own minimum size.", "ops.o_ports":"Keep peering headroom", @@ -3623,7 +3623,7 @@ "ops.o_routers":"Keep routers ahead", "ops.o_routers_std_d":"Add a router, or swap to the next generation where a second router carries the traffic, when load or ports pass a level. With a router model in the build standard, every POP on a smaller one is swapped to it instead, the busiest first, within the budget.", "ops.o_std":"Keep to the build standard", -"ops.o_std_around_d":"Bring POPs, ports and fiber up to your build standard, the busiest first, a few jobs a shift. A second router goes in before a swap, and a line system only changes where the traffic gets around the fiber for its day dark and no customer rides it, one a night together with Upgrade optical transport.", +"ops.o_std_wave_d":"Bring POPs, ports and fiber up to your build standard, the busiest first, a few jobs a shift. A second router goes in before a swap, and a line system only changes where the traffic gets around the fiber for its day dark and no customer's wave rides it, one a night together with Upgrade optical transport.", "ops.o_transit":"Keep transit headroom", "ops.o_transit_d":"Keep transit at each POP above a multiple of its 30-day peak: add a LAG member, or move up a port size.", "ops.ops":"Ops", diff --git a/tests/bstd-ipv6-only.test.js b/tests/bstd-ipv6-only.test.js index 15a09cf..7767b96 100644 --- a/tests/bstd-ipv6-only.test.js +++ b/tests/bstd-ipv6-only.test.js @@ -99,6 +99,60 @@ test("the intern rolls it out within the order's budget and the cash floor, and assert.deepEqual(errors, []); }); +// Only Amsterdam has homes to swap: one $12k swap. A quiet lite fiber Frankfurt–Paris for the line-system target. +const AMS_ONLY = "S.pops.fra.bb.d=0;S.pops.par.bb.d=0;compute()"; +const FIBER = "S.links.push({id:'q',a:'fra',b:'par',kind:'df',own:false,sys:'lite',ch:[],km:Math.round(kmBetween('fra','par')),sub:false,cable:null,mo:1000,trench:'q',cut:0,day:0,ready:0,spares:false});compute()"; + +test("what a swap still owes stays above the intern's cash floor for every job after it, in every order", (t) => { + const { ev, errors } = game(t); + ev(AMS_ONLY); + ev("ACT.opsHire({id:'annie'});closeModal();for(const k in S.ops.on)S.ops.on[k]=false;S.ops.on.std=true;S.ops.floor=50000;S.ops.cap.std=1e6"); + std(ev, { v6: true }); + ev(`S.cash=50000+${COST.ams}+500;opsDay(S.day)`); + assert.deepEqual(swapping(ev), ['ams']); + assert.equal(ev('ip6Owed()'), COST.ams); + // The next day the standard wants a generator at every POP too. The cash above the floor covers one only with the + // swap's money: it waits. + assert.equal(ev('GEN_COST'), 12000); + std(ev, { v6: true, gen: true }); + ev('S.day++;compute();opsDay(S.day)'); + assert.deepEqual(J(ev, 'Object.keys(S.pops).filter(c=>S.pops[c].gen)'), []); + assert.deepEqual(J(ev, 'S.ops.log[0].r'), [['broke', 1, ['std']]]); + // With no income at all, the swap then pays its routers day by day and never takes the cash under the floor. + const low = ev('(()=>{let m=S.cash;for(let i=0;i<60;i++){S.day++;ip6Day(S.day);m=Math.min(m,S.cash);}return m;})()'); + assert.equal(ev('S.pops.ams.bb.v6'), 1); + assert.ok(low >= 50000 - 1e-6, 'the floor held: ' + low); + // A swap started by hand is owed too, and every order keeps it aside: the routers order here. + ev("S.pops.ams.bb.d=600;delete S.pops.ams.bb.v6;compute();ACT.ip6Go({city:'ams'})"); + assert.equal(ev('!!S.pops.ams.bb.v6e'), true); + const owed = ev('ip6Owed()'); + assert.ok(owed > 0); + assert.deepEqual(J(ev, `(()=>{const r=[];for(const d of [-1,0]){S.cash=50000+1000+${owed}+d;r.push(opsShift().can('routers',1000));}return r;})()`), [false, true]); + assert.deepEqual(errors, []); +}); + +test('the button keeps what a swap it just started owes for the jobs after it in the same click', (t) => { + const { ev, dom, errors } = game(t); + ev(AMS_ONLY); + ev(FIBER); + std(ev, { v6: true, sys: 'roadm' }); + const plan = J(ev, 'bstdPlan(false).map(j=>[j.k,j.w,j.cost])'); + assert.deepEqual(plan.map((j) => j.slice(0, 2)), [['v6', 'ams IPv6'], ['sys', 'fra|par']], 'the swap first, then the fiber'); + const sys = plan[1][2]; + // A dollar short of both: the swap starts, and the fiber waits rather than spend the swap's routers. + ev(`S.cash=${COST.ams + sys - 1};ACT.bstdApply({})`); + assert.deepEqual(swapping(ev), ['ams']); + assert.equal(ev("S.links.find(l=>l.id==='q').sys"), 'lite'); + assert.equal(ev('S.cash'), COST.ams + sys - 1); + assert.ok(dom.window.document.getElementById('toasts').textContent.includes(`One job done for the build standard, ${ev(`fmt$(${COST.ams})`)}. One thing is still below it`), "the toast: the swap, and the fiber still below the standard"); + // A dollar more, and the next tap swaps the fiber with the swap's routers still in hand. + ev('S.cash+=1;ACT.bstdApply({})'); + assert.equal(ev("S.links.find(l=>l.id==='q').sys"), 'roadm'); + assert.equal(ev('S.cash'), COST.ams); + assert.equal(ev('ip6Owed()'), COST.ams); + assert.deepEqual(errors, []); +}); + test('only while IPv4 is scarce: no row, no jobs and no count in the gentler rules; saves keep the target', (t) => { const { ev, dom, errors } = game(t); std(ev, { v6: true }); diff --git a/tests/satellites.test.js b/tests/satellites.test.js index 4c6fb88..d5f9e5d 100644 --- a/tests/satellites.test.js +++ b/tests/satellites.test.js @@ -135,6 +135,20 @@ test('selective peers will not meet you on an island only a satellite reaches: m ev(`S.peers['${k}@suv']=true;compute()`); assert.equal(ev(`ixSessions('suv').has('${k}')`), false); assert.equal(ev(`!!S.peers['${k}@suv']`), true, 'not torn down'); + // Glass to the island with no optics yet carries nothing: the satellite is still the way out until it is lit. + const d1 = "S.links.find(l=>l.id==='d1')"; + ev("S.links.push({id:'d1',a:'syd',b:'suv',kind:'df',own:false,sys:'roadm',ch:[],km:Math.round(kmBetween('syd','suv')),sub:true,cable:null,mo:1,trench:'d1',cut:0,day:0,ready:0,spares:false,regen:0});compute()"); + assert.equal(ev(`linkDown(${d1})`), true); + assert.equal(ev("satOnly('suv').bird"), 'is18', 'dark glass is no way out'); + for (const id of geoNo) assert.equal(J(ev, `peerOk('${id}','pni','suv')`).sat, true, id + ' over dark glass'); + assert.equal(ev(`ixSessions('suv').has('${k}')`), false); + const opt = ev(`Object.keys(OPT).find(o=>optG(o,${d1})>0)`); + assert.ok(opt, 'an optic that reaches Suva'); + ev(`${d1}.ch=['${opt}'];compute()`); + assert.equal(ev("satOnly('suv')"), null, 'lit'); + assert.equal(ev(`ixSessions('suv').has('${k}')`), true); + ev("S.links=S.links.filter(l=>l.id!=='d1');compute()"); + assert.equal(ev("satOnly('suv').bird"), 'is18'); // The why, in the island's exchange section, at 360 px. ev("UI.sel={type:'city',id:'suv'};UI.tab='peer';renderAll()"); assert.ok(ev("$('panel').textContent").includes(`Won't peer in Suva while a GEO satellite is your only way out (${ms} ms there and back)`));