From 7967a29083bde99af366e513dd72df042dd5cd3c Mon Sep 17 00:00:00 2001 From: jvanvik Date: Thu, 12 Nov 2026 01:34:46 +0100 Subject: [PATCH 1/8] Rent low-orbit satellite capacity from Starblink (#83) A Starblink gateway on a teleport at a POP on your fiber (level 5, within 56 degrees of the equator) rents LEO circuits of 5 to 50 Gbps to small islands and remote towns within 1,200 km: a bent pipe 550 km up, about 30 ms round trip, 3% of the service counted as bad, and no selective network refuses it. LEO puts GEO and MEO circuits on the same pair on standby and waits beside a cable. The gateway's Infra section shows its POP's forwarding load and the fiber out of the city, the islands' bottleneck. A rare solar storm (and Pie's own) puts LEO in safe mode for a day or two. Once your own crust carries traffic Starblink sells nothing new. Rule O8. Hooks for island Wi-Fi: leoReachLL, leoKmLL, leoMsLL. --- .claude/skills/gameplay-rules/SKILL.md | 1 + CHANGELOG.md | 1 + docs/plans/pie-in-the-sky.md | 3 + scripts/lib/mp-sim-acts.js | 3 + site/i18n/de.js | 22 ++ site/i18n/es.js | 22 ++ site/i18n/fr.js | 22 ++ site/i18n/it.js | 22 ++ site/i18n/pt.js | 22 ++ src/agent/20-commands.js | 13 +- src/agent/30-docs.js | 4 +- src/game/10-catalog/75-satellites.js | 41 ++- src/game/40-progress/30-rules.js | 2 +- src/game/60-features/45-teleports.js | 73 ++++- src/game/80-simulation/40-billing.js | 2 +- src/game/85-incidents/20-failures.js | 6 +- src/game/85-incidents/60-pie.js | 3 + src/game/90-actions/87-teleports.js | 15 +- src/game/93-ui/72-teleport-panels.js | 26 +- src/i18n/en.js | 24 +- tests/canonical-state.test.js | 10 +- tests/gameplay-rules.test.js | 26 ++ tests/leo.test.js | 364 +++++++++++++++++++++++++ tests/mcp-commands.test.js | 2 +- tests/mp-sim-acts.test.js | 9 +- 25 files changed, 692 insertions(+), 46 deletions(-) create mode 100644 tests/leo.test.js diff --git a/.claude/skills/gameplay-rules/SKILL.md b/.claude/skills/gameplay-rules/SKILL.md index ea21c04..b971104 100644 --- a/.claude/skills/gameplay-rules/SKILL.md +++ b/.claude/skills/gameplay-rules/SKILL.md @@ -95,4 +95,5 @@ These are what the game promises, held up by `tests/gameplay-rules.test.js` (one | O4 | Through space with lasers, light travels at c in vacuum (about 1.47 times glass), up and down at the shell's height; orbit never carries traffic between cities under 3,000 km apart and only latency-routed circuits fly: IP traffic, bulk and scenic circuits stay on fiber. | Real constellations win only on long routes, and their capacity is small. | | O5 | Launches fail only with chaos on (`rule('chaos')`), and never in the first 90 days after the unlock; heavy test flights explode by design, not by chance. Orbit incidents and geopolitical spats (`pieChaos()`) follow the same rule. | Like F1: learn the thing before it punishes you. | | O7 | A fresh Tier 1 cannot afford a full Shortcrust from its first year's money: even a big network's yearly profit plus the largest loan a bank would offer (and the Ex-Im Pie Bank's most) stays below the cheapest full build (`pieFullCost('short')`). And a full lasered Shortcrust, played through the game loop on the big-network save by a sensible policy (reusable rockets, two pads, no launches past the crust's size except replacements, safe mode in storms, dishes grown with demand at well-served POPs, every orbit offer signed), pays back on its own books (`S.pie.book`: every launch, replacement, dish, licence and running cost against orbit income) in 5 to 10 years, never sooner; government money (the Rural Digital Pie Fund, Pitcairn's satellite grant) brings that forward by at most two years, never under four (`tests/pie-balance.test.js`; `PIE_BALANCE_YEARS=10` prints the long run). | Obscenely expensive is the joke and the goal; a constellation in year one would be a cheat code. | +| O8 | Rented LEO (Starblink, #83) reaches only within `SAT_ORB.leo.km` of a gateway under its shell (`SAT_ORB.leo.lat`) at a POP on your fiber (the mainland, or an island with a lit wired link or transit); once a crust of your own carries traffic it sells nothing new (no gateway, circuit or growth), while circuits already rented keep running; and every size costs more per Gbps than any subsea wave over its whole reach. | A bent pipe is regional; the rented tier must not undercut your own constellation; and a cable stays the better buy wherever one can go. | diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d8b601..16b784e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project are documented here. The project follows ## [Unreleased] +- Rent low-orbit satellite capacity from Starblink from level 5: islands near your fiber get circuits at about 30 ms round trip (#83). Host a Starblink gateway at a teleport on your fiber, then rent 5 to 50 Gbps to small islands and remote towns within 1,200 km of it. Users hardly notice the lag, and selective networks peer over it as over a cable; next to a cable it waits on standby, and a GEO or MEO circuit to the same island waits on standby beside it. Every island behind a gateway leans on that POP's routers and fiber, which its teleport section now shows, and a rare solar storm puts the circuits in safe mode for a day or two. Once your own constellation carries traffic, Starblink sells you nothing new. - A POP you mark as a micro POP, medium POP or regional hub now keeps that kind's routers when you also have a build standard (#315). Its router model and count come from its kind: "Bring everything up now" and your intern no longer swap its routers or add more to meet the build standard, while the standard's other targets still apply there. The POP's router section says so. - Send to another device now gives a multiplayer network its session link, on copies of the game you host yourself (#263). The link carries on with the network in the session on the other device, and pasting it under From another device opens it there too; the save file stays a copy that plays on alone. - Buy it and sign no longer spends money on an offer your IPv4 space cannot take (#150). The button only shows once the deal's address block fits. diff --git a/docs/plans/pie-in-the-sky.md b/docs/plans/pie-in-the-sky.md index f516eac..ec09131 100644 --- a/docs/plans/pie-in-the-sky.md +++ b/docs/plans/pie-in-the-sky.md @@ -72,6 +72,7 @@ in `pieV` saves. Remote cities (Pitcairn, Arctic) servable from orbit. Rapid Unscheduled Disassembly, booster falls over, solar storm (safe mode), food fight (debris, rare, Space Roomba fix), rain fade, backhoe at the dish, astronomers (VisorSat), Founder posts at 3 a.m., chaos monkey snips a laser link. +A solar storm also puts Starblink, the rented LEO tier at your teleports (#83), in safe mode for a day or two. ## Geopolitical spats (cartoon, even-handed, countries as data, never real leaders) @@ -112,6 +113,8 @@ open, paused when hidden, capped frame budget, fewer dots on phones. Final look O1 gate, O2 half-baked carries nothing / capacity <= dishes, O3 disconnected dish no transit, O4 vacuum latency, never beats fiber < 3000 km, O5 chaos + 90 quiet days, O6 rideshare <= demand, O7 fresh Tier 1 cannot afford a full Shortcrust in year 1; full constellation never pays back < 5 years. +O8 (the rented LEO tier, #83): Starblink sells no new gateway, circuit or growth once a crust of yours carries +traffic; circuits already rented keep running, billed with the teleports, never on `S.pie.book`. ## Every change diff --git a/scripts/lib/mp-sim-acts.js b/scripts/lib/mp-sim-acts.js index 2de29cf..d929a3c 100644 --- a/scripts/lib/mp-sim-acts.js +++ b/scripts/lib/mp-sim-acts.js @@ -174,6 +174,8 @@ const SEND = [ 'teDeploy', 'teToggle', 'teleBuild', + 'teleLeo', + 'teleLeoRm', 'teleRm', 'teleTrk', 'togglePrem', @@ -429,6 +431,7 @@ const CONFIRM = { rmScrub: 'scrub:{city}', rmSite: 'site{city}', salesFire: 'salesFire', + teleLeoRm: 'leo:{city}', teleRm: 'tele:{city}', }; // The UI.confirm key a preset act's first click writes (null for 'arg' acts and acts that do not confirm). diff --git a/site/i18n/de.js b/site/i18n/de.js index ec6e5a3..9074120 100644 --- a/site/i18n/de.js +++ b/site/i18n/de.js @@ -4778,16 +4778,33 @@ "satellites.cancel_n_circuits_first":{"one":"Kündige zuerst seine Satellitenverbindung.","other":"Kündige zuerst seine {n} Satellitenverbindungen."}, "satellites.choose":"Wählen", "satellites.circuit_ordered":{"one":"{cap} auf {bird} bestellt. {a} ⇄ {b} wird ausgerichtet und getestet: läuft in {n} Tag.","other":"{cap} auf {bird} bestellt. {a} ⇄ {b} wird ausgerichtet und getestet: läuft in {n} Tagen."}, +"satellites.close_the_leo_gateway":"LEO-Gateway schließen", "satellites.close_the_teleport":"Teleport schließen", "satellites.costs_row":"Teleports und Satelliten", "satellites.geo_dishes":"GEO-Schüsseln", "satellites.geo_dishes_and_meo_tracking":"GEO-Schüsseln und MEO-Nachführantennen", "satellites.geo_users_notice":"Aus 36.000 km Höhe dauert die Runde etwa 600 ms: Videocalls und Games ruckeln, und die Nutzer werten {p} des Service als schlecht.", "satellites.grow_to":"Auf {cap} vergrößern", +"satellites.host_leo_gateway_cost_mo":"LEO-Gateway {cost} + {mo}/Monat", "satellites.in_view_list":"In Sicht: {list}.", "satellites.it_waits_on_standby":"Zwischen den beiden hast du schon einen Link: Der Satellit wartet im Standby und trägt Traffic nur, wenn dieser Link ausfällt.", "satellites.its_blurb":"Klassische C- und Ku-Band-Strahlen, die einen ganzen Ozean abdecken. Zuverlässig, überall, und so bepreist.", "satellites.kac_blurb":"Ka-Band-Spotbeams über dem Westpazifik: das billigste Gbps im Orbit, wenn deine Insel unter einem Beam liegt.", +"satellites.leo_backhaul":"Glasfaser und Kabel aus {city} hinaus", +"satellites.leo_bottleneck":"{city} ist voll: Jede Insel hinter diesem Gateway wird mit ausgebremst. Stell hier mehr Router, eine größere Wave oder Transit hin.", +"satellites.leo_comes_at_level":"Kapazität im niedrigen Orbit (etwa 30 ms hin und zurück) kommt auf Level {lv}.", +"satellites.leo_gateway":"LEO-Gateway", +"satellites.leo_gateway_closed":"Das LEO-Gateway in {city} ist geschlossen.", +"satellites.leo_gateway_unwired":"Keine Glasfaser von dir verlässt {city} mehr: Die Inseln hinter diesem Gateway erreichen den Rest deines Netzes über einen weiteren Satelliten.", +"satellites.leo_gateway_up":"{prov}-Gateway in {city} läuft. Ihre Antennen auf deinem Dach: Miete von hier aus Kapazität im niedrigen Orbit zu Inseln im Umkreis von {km} km.", +"satellites.leo_landing":"Landet hier aus dem Orbit", +"satellites.leo_needs_fiber":"Ein LEO-Gateway muss an deiner Glasfaser hängen: {city} erreicht den Rest deines Netzes nur per Satellit. Lande dort zuerst ein Kabel oder eine Wave an, oder kauf Transit.", +"satellites.leo_no_rivals":"{prov} verkauft einer konkurrierenden Konstellation keine Kapazität, und deine fliegt schon: Stell stattdessen eine Pie-Schüssel auf die Insel.", +"satellites.leo_out_of_reach":"{prov} ist eine Bent Pipe: Ein Satellit muss dein Gateway und die Insel gleichzeitig sehen, also liegen sie höchstens {km} km auseinander. Von {a} nach {b} sind es {d} km.", +"satellites.leo_safe_mode_n_days":{"one":"Safe Mode wegen eines Sonnensturms: wieder da in {n} Tag.","other":"Safe Mode wegen eines Sonnensturms: wieder da in {n} Tagen."}, +"satellites.leo_shell_misses_city":"{prov} erreicht {city} nicht: Seine Schalen decken {lat}° beiderseits des Äquators ab.", +"satellites.leo_storm_msg":"Ein geomagnetischer Sturm: {prov} schickt seine Satelliten in den Safe Mode. Deine LEO-Verbindungen tragen nichts, bis er vorbei ist; Verbindungen im Standby und Kabel übernehmen, was sie können.", +"satellites.leo_users_notice":"Bent Pipe aus 550 km Höhe, etwa 30 ms hin und zurück: Die Nutzer merken kaum etwas ({p} des Service gilt als schlecht), und selektive Netze peeren mit dir wie über ein Kabel. Sie landet an deinem Gateway in {city}: Wenn die Router oder die Glasfaser dieses POPs voll sind, wird jede Insel dahinter langsamer.", "satellites.meo_comes_at_level":"Der MEO-Ring (etwa 130 ms hin und zurück) kommt auf Level {lv}.", "satellites.meo_ring_misses_city":"Der MEO-Ring sieht {city} nicht: Er deckt {lat}° beiderseits des Äquators ab.", "satellites.meo_users_notice":"Viel näher am Boden, etwa 130 ms hin und zurück: Die Nutzer merken kaum etwas ({p} des Service gilt als schlecht).", @@ -4796,7 +4813,9 @@ "satellites.ms_round_trip":"{ms} ms hin und zurück", "satellites.n_birds_see_both":{"one":"{n} Satellit sieht beide","other":"{n} Satelliten sehen beide"}, "satellites.n_circuits_go_on_standby":{"one":"Deine Satellitenverbindung zwischen {a} und {b} geht neben dem neuen Link in Standby: Sie trägt Traffic nur, wenn dieser Link ausfällt.","other":"Deine {n} Satellitenverbindungen zwischen {a} und {b} gehen neben dem neuen Link in Standby: Sie tragen Traffic nur, wenn dieser Link ausfällt."}, +"satellites.n_in_leo_reach":{"one":"{n} Insel oder abgelegener Ort im Umkreis von {km} km um dieses Gateway.","other":"{n} Inseln und abgelegene Orte im Umkreis von {km} km um dieses Gateway."}, "satellites.n_places_in_reach":{"one":"{n} Insel oder abgelegener Ort in Reichweite auf deinem Level.","other":"{n} Inseln und abgelegene Orte in Reichweite auf deinem Level."}, +"satellites.needs_leo_gateway":"LEO-Kapazität braucht ein Gateway an deinem Teleport in {city}.", "satellites.needs_tracking_antennas":"Der MEO-Ring braucht Nachführantennen an deinem Teleport in {city}.", "satellites.new_pop_cost":"neuer POP {cost}", "satellites.no_bird_sees_both":"Kein Satellit im Angebot sieht {a} und {b} zugleich.", @@ -4820,9 +4839,11 @@ "satellites.rent_satellite_capacity":"Satellitenkapazität mieten", "satellites.satellite_capacity":"Satellitenkapazität", "satellites.satellites":"Satelliten", +"satellites.sbk_blurb":"Tausende kleine Satelliten in 550 km Höhe, etwa 30 ms hin und zurück: der erste Satellit, über den sich deine Nutzer nicht beschweren. Alle paar Sekunden blinken sie von einem Satelliten zum nächsten; niemand merkt es.", "satellites.sea_americas":"Amerika", "satellites.sea_atlantic":"Atlantik", "satellites.sea_indian":"Indischer Ozean", +"satellites.sea_leo":"bis 56° um den Äquator, 550 km hoch", "satellites.sea_pacific":"Pazifik", "satellites.sea_tropics":"bis 50° um den Äquator", "satellites.sea_west_pacific":"Westpazifik", @@ -4835,6 +4856,7 @@ "satellites.tracking_antennas_up":"Nachführantennen in {city} laufen. Sie folgen dem MEO-Ring über den Himmel.", "satellites.up_in_n_days":{"one":"läuft in {n} Tag","other":"läuft in {n} Tagen"}, "satellites.users_notice_geo_meo":"Die Nutzer merken die Verzögerung: Breitband über GEO zählt als halber Service, über MEO fast als ganzer. Ein Kabel gewinnt immer, deine Router schicken Traffic also nur nach oben, wenn es keinen anderen Weg gibt.", +"satellites.users_notice_leo":"Über LEO, etwa 30 ms hin und zurück, merken die Nutzer kaum etwas, und selektive Netze peeren wie über ein Kabel. Neben einem Kabel wartet die Verbindung im Standby.", "satellites.users_ride_a_satellite":"Nutzer hängen am Satelliten", "satellites.via_bird":"über {bird}", "satellites.who_a_satellite_serves":"Satelliten bedienen kleine Inseln und abgelegene Orte, die derselbe Satellit sieht wie dein Teleport. Wähle das Ziel.", diff --git a/site/i18n/es.js b/site/i18n/es.js index 61576e9..5066bc5 100644 --- a/site/i18n/es.js +++ b/site/i18n/es.js @@ -4776,16 +4776,33 @@ "satellites.cancel_n_circuits_first":{"one":"Primero cancela su circuito satelital.","other":"Primero cancela sus {n} circuitos satelitales."}, "satellites.choose":"Elegir", "satellites.circuit_ordered":{"one":"{cap} en {bird} pedidos. {a} ⇄ {b} se está apuntando y probando: listo en {n} día.","other":"{cap} en {bird} pedidos. {a} ⇄ {b} se está apuntando y probando: listo en {n} días."}, +"satellites.close_the_leo_gateway":"Cerrar el gateway LEO", "satellites.close_the_teleport":"Cerrar el teleport", "satellites.costs_row":"Teleports y satélites", "satellites.geo_dishes":"Antenas GEO", "satellites.geo_dishes_and_meo_tracking":"Antenas GEO y antenas de seguimiento MEO", "satellites.geo_users_notice":"Desde 36.000 km de altura la ida y vuelta tarda unos 600 ms: las videollamadas y los juegos se traban, y los usuarios cuentan {p} del servicio como malo.", "satellites.grow_to":"Ampliar a {cap}", +"satellites.host_leo_gateway_cost_mo":"Gateway LEO {cost} + {mo}/mes", "satellites.in_view_list":"A la vista: {list}.", "satellites.it_waits_on_standby":"Ya tienes un enlace entre estas dos: el satélite espera en reserva y solo lleva tráfico cuando ese enlace cae.", "satellites.its_blurb":"Haces de banda C y Ku de toda la vida que cubren un océano entero. Fiables, en todas partes, y con precio a juego.", "satellites.kac_blurb":"Haces puntuales en banda Ka sobre el Pacífico occidental: el Gbps más barato en órbita, si tu isla queda bajo un haz.", +"satellites.leo_backhaul":"Fibra y cables que salen de {city}", +"satellites.leo_bottleneck":"{city} está lleno: cada isla detrás de este gateway se frena con él. Pon aquí más routers, una wave más grande o tránsito.", +"satellites.leo_comes_at_level":"La capacidad en órbita baja (unos 30 ms de ida y vuelta) llega en el nivel {lv}.", +"satellites.leo_gateway":"Gateway LEO", +"satellites.leo_gateway_closed":"El gateway LEO de {city} está cerrado.", +"satellites.leo_gateway_unwired":"Ya no sale ninguna fibra tuya de {city}: las islas detrás de este gateway llegan al resto de tu red por otro satélite.", +"satellites.leo_gateway_up":"Gateway de {prov} en marcha en {city}. Sus antenas en tu tejado: alquila desde aquí capacidad en órbita baja hacia islas a menos de {km} km.", +"satellites.leo_landing":"Aterriza aquí desde la órbita", +"satellites.leo_needs_fiber":"Un gateway LEO tiene que estar sobre tu fibra: {city} solo llega al resto de tu red por satélite. Primero lleva allí un cable o una wave, o compra tránsito.", +"satellites.leo_no_rivals":"{prov} no vende capacidad a una constelación rival, y la tuya ya vuela: pon una antena-tarta en la isla.", +"satellites.leo_out_of_reach":"{prov} es un bent pipe: un satélite tiene que ver tu gateway y la isla a la vez, así que pueden estar como mucho a {km} km. De {a} a {b} hay {d} km.", +"satellites.leo_safe_mode_n_days":{"one":"Modo seguro por una tormenta solar: vuelve en {n} día.","other":"Modo seguro por una tormenta solar: vuelve en {n} días."}, +"satellites.leo_shell_misses_city":"{prov} no llega a {city}: sus capas cubren {lat}° a cada lado del ecuador.", +"satellites.leo_storm_msg":"Una tormenta geomagnética: {prov} pone sus satélites en modo seguro. Tus circuitos LEO no llevan nada hasta que pase; los circuitos en reserva y los cables llevan lo que pueden.", +"satellites.leo_users_notice":"Bent pipe desde 550 km de altura, unos 30 ms de ida y vuelta: los usuarios apenas lo notan ({p} del servicio cuenta como malo), y las redes selectivas hacen peering contigo como por un cable. Aterriza en tu gateway de {city}: cuando los routers o la fibra de ese POP se llenan, cada isla detrás se frena.", "satellites.meo_comes_at_level":"El anillo MEO (unos 130 ms de ida y vuelta) llega en el nivel {lv}.", "satellites.meo_ring_misses_city":"El anillo MEO no ve {city}: cubre {lat}° a cada lado del ecuador.", "satellites.meo_users_notice":"Mucho más cerca del suelo, unos 130 ms de ida y vuelta: los usuarios apenas lo notan ({p} del servicio cuenta como malo).", @@ -4794,7 +4811,9 @@ "satellites.ms_round_trip":"{ms} ms de ida y vuelta", "satellites.n_birds_see_both":{"one":"{n} satélite ve los dos","other":"{n} satélites ven los dos"}, "satellites.n_circuits_go_on_standby":{"one":"Tu circuito satelital entre {a} y {b} pasa a reserva junto al nuevo enlace: solo lleva tráfico cuando ese enlace cae.","other":"Tus {n} circuitos satelitales entre {a} y {b} pasan a reserva junto al nuevo enlace: solo llevan tráfico cuando ese enlace cae."}, +"satellites.n_in_leo_reach":{"one":"{n} isla o pueblo remoto a menos de {km} km de este gateway.","other":"{n} islas y pueblos remotos a menos de {km} km de este gateway."}, "satellites.n_places_in_reach":{"one":"{n} isla o pueblo remoto a tu alcance en tu nivel.","other":"{n} islas y pueblos remotos a tu alcance en tu nivel."}, +"satellites.needs_leo_gateway":"La capacidad LEO necesita un gateway en tu teleport de {city}.", "satellites.needs_tracking_antennas":"El anillo MEO necesita antenas de seguimiento en tu teleport de {city}.", "satellites.new_pop_cost":"POP nuevo {cost}", "satellites.no_bird_sees_both":"Ningún satélite a la venta ve a la vez {a} y {b}.", @@ -4818,9 +4837,11 @@ "satellites.rent_satellite_capacity":"Alquilar capacidad satelital", "satellites.satellite_capacity":"Capacidad satelital", "satellites.satellites":"Satélites", +"satellites.sbk_blurb":"Miles de satélites pequeños a 550 km de altura, unos 30 ms de ida y vuelta: el primer satélite del que tus usuarios no se quejarán. Saltan de un satélite al siguiente cada pocos segundos; nadie lo nota.", "satellites.sea_americas":"Américas", "satellites.sea_atlantic":"Atlántico", "satellites.sea_indian":"Océano Índico", +"satellites.sea_leo":"hasta 56° del ecuador, a 550 km de altura", "satellites.sea_pacific":"Pacífico", "satellites.sea_tropics":"hasta 50° del ecuador", "satellites.sea_west_pacific":"Pacífico occidental", @@ -4833,6 +4854,7 @@ "satellites.tracking_antennas_up":"Antenas de seguimiento en marcha en {city}. Siguen el anillo MEO por el cielo.", "satellites.up_in_n_days":{"one":"listo en {n} día","other":"listo en {n} días"}, "satellites.users_notice_geo_meo":"Los usuarios notan el retardo: la banda ancha por GEO cuenta como medio servicio, por MEO casi como el servicio entero. Un cable siempre gana, así que tus routers solo mandan tráfico arriba cuando no hay otro camino.", +"satellites.users_notice_leo":"Por LEO, unos 30 ms de ida y vuelta, los usuarios apenas lo notan, y las redes selectivas hacen peering como por un cable. Junto a un cable espera en reserva.", "satellites.users_ride_a_satellite":"usuarios vía satélite", "satellites.via_bird":"vía {bird}", "satellites.who_a_satellite_serves":"Los satélites sirven a islas pequeñas y pueblos remotos que ve el mismo satélite que tu teleport. Elige el destino.", diff --git a/site/i18n/fr.js b/site/i18n/fr.js index 0c848b4..b598156 100644 --- a/site/i18n/fr.js +++ b/site/i18n/fr.js @@ -4776,16 +4776,33 @@ "satellites.cancel_n_circuits_first":{"one":"Résilie d’abord son circuit satellite.","other":"Résilie d’abord ses {n} circuits satellite."}, "satellites.choose":"Choisir", "satellites.circuit_ordered":{"one":"{cap} sur {bird} commandé. {a} ⇄ {b} est en cours de pointage et de test : en service dans {n} jour.","other":"{cap} sur {bird} commandé. {a} ⇄ {b} est en cours de pointage et de test : en service dans {n} jours."}, +"satellites.close_the_leo_gateway":"Fermer la passerelle LEO", "satellites.close_the_teleport":"Fermer le téléport", "satellites.costs_row":"Téléports et satellites", "satellites.geo_dishes":"Paraboles GEO", "satellites.geo_dishes_and_meo_tracking":"Paraboles GEO et antennes de poursuite MEO", "satellites.geo_users_notice":"Depuis 36 000 km d’altitude, l’aller-retour prend environ 600 ms : visios et jeux saccadent, et les utilisateurs comptent {p} du service comme mauvais.", "satellites.grow_to":"Passer à {cap}", +"satellites.host_leo_gateway_cost_mo":"Passerelle LEO {cost} + {mo}/mois", "satellites.in_view_list":"En vue : {list}.", "satellites.it_waits_on_standby":"Tu as déjà un lien entre ces deux villes : le satellite attend en réserve et ne porte du trafic que quand ce lien tombe.", "satellites.its_blurb":"De bons vieux faisceaux en bande C et Ku qui couvrent tout un océan. Fiables, partout, et facturés en conséquence.", "satellites.kac_blurb":"Des spots en bande Ka sur le Pacifique occidental : le Gbps le moins cher en orbite, si ton île est sous un spot.", +"satellites.leo_backhaul":"Fibre et câbles qui sortent de {city}", +"satellites.leo_bottleneck":"{city} est plein : chaque île derrière cette passerelle ralentit avec. Ajoute ici des routeurs, une wave plus grosse ou du transit.", +"satellites.leo_comes_at_level":"La capacité en orbite basse (environ 30 ms aller-retour) arrive au niveau {lv}.", +"satellites.leo_gateway":"Passerelle LEO", +"satellites.leo_gateway_closed":"La passerelle LEO de {city} est fermée.", +"satellites.leo_gateway_unwired":"Plus aucune fibre à toi ne sort de {city} : les îles derrière cette passerelle rejoignent le reste de ton réseau par un autre satellite.", +"satellites.leo_gateway_up":"Passerelle {prov} en service à {city}. Leurs antennes sur ton toit : loue d’ici de la capacité en orbite basse vers les îles à moins de {km} km.", +"satellites.leo_landing":"Arrive ici depuis l’orbite", +"satellites.leo_needs_fiber":"Une passerelle LEO doit être sur ta fibre : {city} ne rejoint le reste de ton réseau que par satellite. Amène-y d’abord un câble ou une wave, ou achète du transit.", +"satellites.leo_no_rivals":"{prov} ne vend pas de capacité à une constellation rivale, et la tienne vole déjà : mets plutôt une antenne-tarte sur l’île.", +"satellites.leo_out_of_reach":"{prov} est un bent pipe : un satellite doit voir ta passerelle et l’île en même temps, donc elles sont à {km} km au plus l’une de l’autre. De {a} à {b}, il y a {d} km.", +"satellites.leo_safe_mode_n_days":{"one":"Mode sans échec pendant une tempête solaire : de retour dans {n} jour.","other":"Mode sans échec pendant une tempête solaire : de retour dans {n} jours."}, +"satellites.leo_shell_misses_city":"{prov} n’atteint pas {city} : ses couches couvrent {lat}° de part et d’autre de l’équateur.", +"satellites.leo_storm_msg":"Une tempête géomagnétique : {prov} met ses satellites en mode sans échec. Tes circuits LEO ne portent rien jusqu’à ce qu’elle passe ; les circuits en réserve et les câbles prennent ce qu’ils peuvent.", +"satellites.leo_users_notice":"Bent pipe depuis 550 km d’altitude, environ 30 ms aller-retour : les utilisateurs le remarquent à peine ({p} du service compte comme mauvais), et les réseaux sélectifs font du peering avec toi comme par un câble. Il arrive à ta passerelle de {city} : quand les routeurs ou la fibre de ce POP sont pleins, chaque île derrière ralentit.", "satellites.meo_comes_at_level":"L’anneau MEO (environ 130 ms aller-retour) arrive au niveau {lv}.", "satellites.meo_ring_misses_city":"L’anneau MEO ne voit pas {city} : il couvre {lat}° de part et d’autre de l’équateur.", "satellites.meo_users_notice":"Bien plus près du sol, environ 130 ms aller-retour : les utilisateurs le remarquent à peine ({p} du service compte comme mauvais).", @@ -4794,7 +4811,9 @@ "satellites.ms_round_trip":"{ms} ms aller-retour", "satellites.n_birds_see_both":{"one":"{n} satellite voit les deux","other":"{n} satellites voient les deux"}, "satellites.n_circuits_go_on_standby":{"one":"Ton circuit satellite entre {a} et {b} passe en réserve à côté du nouveau lien : il ne porte du trafic que quand ce lien tombe.","other":"Tes {n} circuits satellite entre {a} et {b} passent en réserve à côté du nouveau lien : ils ne portent du trafic que quand ce lien tombe."}, +"satellites.n_in_leo_reach":{"one":"{n} île ou ville isolée à moins de {km} km de cette passerelle.","other":"{n} îles et villes isolées à moins de {km} km de cette passerelle."}, "satellites.n_places_in_reach":{"one":"{n} île ou ville isolée à portée à ton niveau.","other":"{n} îles et villes isolées à portée à ton niveau."}, +"satellites.needs_leo_gateway":"La capacité LEO a besoin d’une passerelle à ton téléport de {city}.", "satellites.needs_tracking_antennas":"L’anneau MEO a besoin d’antennes de poursuite à ton téléport de {city}.", "satellites.new_pop_cost":"nouveau POP {cost}", "satellites.no_bird_sees_both":"Aucun satellite en vente ne voit à la fois {a} et {b}.", @@ -4818,9 +4837,11 @@ "satellites.rent_satellite_capacity":"Louer de la capacité satellite", "satellites.satellite_capacity":"Capacité satellite", "satellites.satellites":"Satellites", +"satellites.sbk_blurb":"Des milliers de petits satellites à 550 km d’altitude, environ 30 ms aller-retour : le premier satellite dont tes utilisateurs ne se plaindront pas. Ils clignent d’un satellite au suivant toutes les quelques secondes ; personne ne le remarque.", "satellites.sea_americas":"Amériques", "satellites.sea_atlantic":"Atlantique", "satellites.sea_indian":"Océan Indien", +"satellites.sea_leo":"jusqu’à 56° de l’équateur, à 550 km d’altitude", "satellites.sea_pacific":"Pacifique", "satellites.sea_tropics":"jusqu’à 50° de l’équateur", "satellites.sea_west_pacific":"Pacifique occidental", @@ -4833,6 +4854,7 @@ "satellites.tracking_antennas_up":"Antennes de poursuite en service à {city}. Elles suivent l’anneau MEO dans le ciel.", "satellites.up_in_n_days":{"one":"en service dans {n} jour","other":"en service dans {n} jours"}, "satellites.users_notice_geo_meo":"Les utilisateurs sentent le délai : le haut débit par GEO compte pour la moitié du service, par MEO presque pour tout. Un câble gagne toujours, donc tes routeurs n’envoient du trafic là-haut que s’il n’y a pas d’autre chemin.", +"satellites.users_notice_leo":"Par LEO, environ 30 ms aller-retour, les utilisateurs le remarquent à peine, et les réseaux sélectifs font du peering comme par un câble. À côté d’un câble, il attend en réserve.", "satellites.users_ride_a_satellite":"utilisateurs sur satellite", "satellites.via_bird":"via {bird}", "satellites.who_a_satellite_serves":"Les satellites desservent les petites îles et les villes isolées que voit le même satellite que ton téléport. Choisis la destination.", diff --git a/site/i18n/it.js b/site/i18n/it.js index 42b3646..3c9e2fc 100644 --- a/site/i18n/it.js +++ b/site/i18n/it.js @@ -4776,16 +4776,33 @@ "satellites.cancel_n_circuits_first":{"one":"Prima disdici il suo circuito satellitare.","other":"Prima disdici i suoi {n} circuiti satellitari."}, "satellites.choose":"Scegli", "satellites.circuit_ordered":{"one":"{cap} su {bird} ordinati. {a} ⇄ {b} si sta puntando e testando: attivo tra {n} giorno.","other":"{cap} su {bird} ordinati. {a} ⇄ {b} si sta puntando e testando: attivo tra {n} giorni."}, +"satellites.close_the_leo_gateway":"Chiudi il gateway LEO", "satellites.close_the_teleport":"Chiudi il teleport", "satellites.costs_row":"Teleport e satelliti", "satellites.geo_dishes":"Parabole GEO", "satellites.geo_dishes_and_meo_tracking":"Parabole GEO e antenne a inseguimento MEO", "satellites.geo_users_notice":"Da 36.000 km di quota il giro dura circa 600 ms: videochiamate e giochi scattano, e gli utenti contano {p} del servizio come pessimo.", "satellites.grow_to":"Porta a {cap}", +"satellites.host_leo_gateway_cost_mo":"Gateway LEO {cost} + {mo}/mese", "satellites.in_view_list":"In vista: {list}.", "satellites.it_waits_on_standby":"Tra queste due hai già un link: il satellite aspetta in standby e porta traffico solo quando quel link cade.", "satellites.its_blurb":"I classici fasci in banda C e Ku che coprono un oceano intero. Affidabili, ovunque, e con il prezzo che ne consegue.", "satellites.kac_blurb":"Spot beam in banda Ka sul Pacifico occidentale: il Gbps più economico in orbita, se la tua isola sta sotto un fascio.", +"satellites.leo_backhaul":"Fibra e cavi in uscita da {city}", +"satellites.leo_bottleneck":"{city} è pieno: ogni isola dietro questo gateway rallenta con lui. Aggiungi qui router, una wave più grande o transit.", +"satellites.leo_comes_at_level":"La capacità in orbita bassa (circa 30 ms andata e ritorno) arriva al livello {lv}.", +"satellites.leo_gateway":"Gateway LEO", +"satellites.leo_gateway_closed":"Il gateway LEO di {city} è chiuso.", +"satellites.leo_gateway_unwired":"Nessuna tua fibra esce più da {city}: le isole dietro questo gateway raggiungono il resto della tua rete con un altro satellite.", +"satellites.leo_gateway_up":"Gateway {prov} attivo a {city}. Le loro antenne sul tuo tetto: noleggia da qui capacità in orbita bassa verso le isole entro {km} km.", +"satellites.leo_landing":"Atterra qui dall’orbita", +"satellites.leo_needs_fiber":"Un gateway LEO deve stare sulla tua fibra: {city} raggiunge il resto della tua rete solo via satellite. Prima porta lì un cavo o una wave, o compra transit.", +"satellites.leo_no_rivals":"{prov} non vende capacità a una costellazione rivale, e la tua vola già: metti piuttosto una parabola-torta sull’isola.", +"satellites.leo_out_of_reach":"{prov} è un bent pipe: un satellite deve vedere il tuo gateway e l’isola insieme, quindi possono distare al massimo {km} km. Da {a} a {b} ci sono {d} km.", +"satellites.leo_safe_mode_n_days":{"one":"Modalità sicura per una tempesta solare: torna tra {n} giorno.","other":"Modalità sicura per una tempesta solare: torna tra {n} giorni."}, +"satellites.leo_shell_misses_city":"{prov} non arriva a {city}: i suoi gusci coprono {lat}° a nord e a sud dell’equatore.", +"satellites.leo_storm_msg":"Una tempesta geomagnetica: {prov} mette i suoi satelliti in modalità sicura. I tuoi circuiti LEO non portano niente finché non passa; i circuiti in standby e i cavi prendono quello che possono.", +"satellites.leo_users_notice":"Bent pipe da 550 km di quota, circa 30 ms andata e ritorno: gli utenti se ne accorgono appena ({p} del servizio conta come pessimo), e le reti selettive fanno peering con te come su un cavo. Atterra al tuo gateway di {city}: quando i router o la fibra di quel POP si riempiono, ogni isola dietro rallenta.", "satellites.meo_comes_at_level":"L’anello MEO (circa 130 ms andata e ritorno) arriva al livello {lv}.", "satellites.meo_ring_misses_city":"L’anello MEO non vede {city}: copre {lat}° a nord e a sud dell’equatore.", "satellites.meo_users_notice":"Molto più vicino a terra, circa 130 ms andata e ritorno: gli utenti se ne accorgono appena ({p} del servizio conta come pessimo).", @@ -4794,7 +4811,9 @@ "satellites.ms_round_trip":"{ms} ms andata e ritorno", "satellites.n_birds_see_both":{"one":"{n} satellite vede entrambe","other":"{n} satelliti vedono entrambe"}, "satellites.n_circuits_go_on_standby":{"one":"Il tuo circuito satellitare tra {a} e {b} va in standby accanto al nuovo link: porta traffico solo quando quel link cade.","other":"I tuoi {n} circuiti satellitari tra {a} e {b} vanno in standby accanto al nuovo link: portano traffico solo quando quel link cade."}, +"satellites.n_in_leo_reach":{"one":"{n} isola o città remota entro {km} km da questo gateway.","other":"{n} isole e città remote entro {km} km da questo gateway."}, "satellites.n_places_in_reach":{"one":"{n} isola o città remota a portata al tuo livello.","other":"{n} isole e città remote a portata al tuo livello."}, +"satellites.needs_leo_gateway":"La capacità LEO vuole un gateway al tuo teleport di {city}.", "satellites.needs_tracking_antennas":"L’anello MEO vuole antenne a inseguimento al tuo teleport di {city}.", "satellites.new_pop_cost":"nuovo POP {cost}", "satellites.no_bird_sees_both":"Nessun satellite in vendita vede insieme {a} e {b}.", @@ -4818,9 +4837,11 @@ "satellites.rent_satellite_capacity":"Noleggia capacità satellitare", "satellites.satellite_capacity":"Capacità satellitare", "satellites.satellites":"Satelliti", +"satellites.sbk_blurb":"Migliaia di piccoli satelliti a 550 km di quota, circa 30 ms andata e ritorno: il primo satellite di cui i tuoi utenti non si lamenteranno. Saltano da un satellite all’altro ogni pochi secondi; nessuno se ne accorge.", "satellites.sea_americas":"Americhe", "satellites.sea_atlantic":"Atlantico", "satellites.sea_indian":"Oceano Indiano", +"satellites.sea_leo":"entro 56° dall’equatore, a 550 km di quota", "satellites.sea_pacific":"Pacifico", "satellites.sea_tropics":"entro 50° dall’equatore", "satellites.sea_west_pacific":"Pacifico occidentale", @@ -4833,6 +4854,7 @@ "satellites.tracking_antennas_up":"Antenne a inseguimento attive a {city}. Seguono l’anello MEO nel cielo.", "satellites.up_in_n_days":{"one":"attivo tra {n} giorno","other":"attivo tra {n} giorni"}, "satellites.users_notice_geo_meo":"Gli utenti sentono il ritardo: la banda larga via GEO conta come mezzo servizio, via MEO quasi come tutto. Un cavo vince sempre, quindi i tuoi router mandano traffico lassù solo se non c’è altra strada.", +"satellites.users_notice_leo":"Via LEO, circa 30 ms andata e ritorno, gli utenti se ne accorgono appena, e le reti selettive fanno peering come su un cavo. Accanto a un cavo aspetta in standby.", "satellites.users_ride_a_satellite":"utenti via satellite", "satellites.via_bird":"via {bird}", "satellites.who_a_satellite_serves":"I satelliti servono piccole isole e città remote che lo stesso satellite vede insieme al tuo teleport. Scegli la destinazione.", diff --git a/site/i18n/pt.js b/site/i18n/pt.js index 4d71391..4143498 100644 --- a/site/i18n/pt.js +++ b/site/i18n/pt.js @@ -4776,16 +4776,33 @@ "satellites.cancel_n_circuits_first":{"one":"Cancele primeiro o circuito de satélite dele.","other":"Cancele primeiro os {n} circuitos de satélite dele."}, "satellites.choose":"Escolher", "satellites.circuit_ordered":{"one":"{cap} no {bird} encomendados. {a} ⇄ {b} está sendo apontado e testado: no ar em {n} dia.","other":"{cap} no {bird} encomendados. {a} ⇄ {b} está sendo apontado e testado: no ar em {n} dias."}, +"satellites.close_the_leo_gateway":"Fechar o gateway LEO", "satellites.close_the_teleport":"Fechar o teleporto", "satellites.costs_row":"Teleportos e satélites", "satellites.geo_dishes":"Antenas GEO", "satellites.geo_dishes_and_meo_tracking":"Antenas GEO e antenas de rastreamento MEO", "satellites.geo_users_notice":"De 36.000 km de altura a ida e volta leva uns 600 ms: chamadas de vídeo e jogos travam, e os usuários contam {p} do serviço como ruim.", "satellites.grow_to":"Aumentar para {cap}", +"satellites.host_leo_gateway_cost_mo":"Gateway LEO {cost} + {mo}/mês", "satellites.in_view_list":"À vista: {list}.", "satellites.it_waits_on_standby":"Você já tem um link entre as duas: o satélite espera de reserva e só leva tráfego quando esse link cai.", "satellites.its_blurb":"Feixes clássicos em banda C e Ku que cobrem um oceano inteiro. Confiáveis, em todo lugar, e com preço à altura.", "satellites.kac_blurb":"Feixes pontuais em banda Ka sobre o Pacífico ocidental: o Gbps mais barato em órbita, se a sua ilha estiver debaixo de um feixe.", +"satellites.leo_backhaul":"Fibra e cabos que saem de {city}", +"satellites.leo_bottleneck":"{city} está cheio: cada ilha atrás deste gateway fica lenta junto. Ponha aqui mais roteadores, uma wave maior ou trânsito.", +"satellites.leo_comes_at_level":"A capacidade em órbita baixa (uns 30 ms de ida e volta) chega no nível {lv}.", +"satellites.leo_gateway":"Gateway LEO", +"satellites.leo_gateway_closed":"O gateway LEO em {city} foi fechado.", +"satellites.leo_gateway_unwired":"Nenhuma fibra sua sai mais de {city}: as ilhas atrás deste gateway chegam ao resto da sua rede por outro satélite.", +"satellites.leo_gateway_up":"Gateway da {prov} no ar em {city}. As antenas deles no seu telhado: alugue daqui capacidade em órbita baixa para ilhas a até {km} km.", +"satellites.leo_landing":"Pousando aqui vindo da órbita", +"satellites.leo_needs_fiber":"Um gateway LEO precisa ficar na sua fibra: {city} só chega ao resto da sua rede por satélite. Leve primeiro um cabo ou uma wave até lá, ou compre trânsito.", +"satellites.leo_no_rivals":"A {prov} não vende capacidade para uma constelação rival, e a sua já está voando: ponha uma antena-torta na ilha.", +"satellites.leo_out_of_reach":"A {prov} é um bent pipe: um satélite precisa ver o seu gateway e a ilha ao mesmo tempo, então eles podem estar a no máximo {km} km. De {a} a {b} são {d} km.", +"satellites.leo_safe_mode_n_days":{"one":"Modo seguro por uma tempestade solar: volta em {n} dia.","other":"Modo seguro por uma tempestade solar: volta em {n} dias."}, +"satellites.leo_shell_misses_city":"A {prov} não alcança {city}: as camadas dela cobrem {lat}° de cada lado do equador.", +"satellites.leo_storm_msg":"Uma tempestade geomagnética: a {prov} põe os satélites em modo seguro. Seus circuitos LEO não levam nada até ela passar; os circuitos de reserva e os cabos levam o que podem.", +"satellites.leo_users_notice":"Bent pipe a 550 km de altura, uns 30 ms de ida e volta: os usuários mal percebem ({p} do serviço conta como ruim), e as redes seletivas fazem peering com você como por um cabo. Ele pousa no seu gateway em {city}: quando os roteadores ou a fibra desse POP enchem, cada ilha atrás dele fica lenta.", "satellites.meo_comes_at_level":"O anel MEO (uns 130 ms de ida e volta) chega no nível {lv}.", "satellites.meo_ring_misses_city":"O anel MEO não vê {city}: ele cobre {lat}° de cada lado do equador.", "satellites.meo_users_notice":"Muito mais perto do chão, uns 130 ms de ida e volta: os usuários mal percebem ({p} do serviço conta como ruim).", @@ -4794,7 +4811,9 @@ "satellites.ms_round_trip":"{ms} ms de ida e volta", "satellites.n_birds_see_both":{"one":"{n} satélite vê as duas","other":"{n} satélites veem as duas"}, "satellites.n_circuits_go_on_standby":{"one":"Seu circuito de satélite entre {a} e {b} fica de reserva ao lado do novo link: só leva tráfego quando esse link cai.","other":"Seus {n} circuitos de satélite entre {a} e {b} ficam de reserva ao lado do novo link: só levam tráfego quando esse link cai."}, +"satellites.n_in_leo_reach":{"one":"{n} ilha ou cidade remota a até {km} km deste gateway.","other":"{n} ilhas e cidades remotas a até {km} km deste gateway."}, "satellites.n_places_in_reach":{"one":"{n} ilha ou cidade remota ao alcance no seu nível.","other":"{n} ilhas e cidades remotas ao alcance no seu nível."}, +"satellites.needs_leo_gateway":"A capacidade LEO precisa de um gateway no seu teleporto em {city}.", "satellites.needs_tracking_antennas":"O anel MEO precisa de antenas de rastreamento no seu teleporto em {city}.", "satellites.new_pop_cost":"POP novo {cost}", "satellites.no_bird_sees_both":"Nenhum satélite à venda vê {a} e {b} ao mesmo tempo.", @@ -4818,9 +4837,11 @@ "satellites.rent_satellite_capacity":"Alugar capacidade de satélite", "satellites.satellite_capacity":"Capacidade de satélite", "satellites.satellites":"Satélites", +"satellites.sbk_blurb":"Milhares de satélites pequenos a 550 km de altura, uns 30 ms de ida e volta: o primeiro satélite do qual seus usuários não vão reclamar. Eles piscam de um satélite para o próximo a cada poucos segundos; ninguém percebe.", "satellites.sea_americas":"Américas", "satellites.sea_atlantic":"Atlântico", "satellites.sea_indian":"Oceano Índico", +"satellites.sea_leo":"até 56° do equador, a 550 km de altura", "satellites.sea_pacific":"Pacífico", "satellites.sea_tropics":"até 50° do equador", "satellites.sea_west_pacific":"Pacífico ocidental", @@ -4833,6 +4854,7 @@ "satellites.tracking_antennas_up":"Antenas de rastreamento no ar em {city}. Elas seguem o anel MEO pelo céu.", "satellites.up_in_n_days":{"one":"no ar em {n} dia","other":"no ar em {n} dias"}, "satellites.users_notice_geo_meo":"Os usuários sentem o atraso: banda larga por GEO conta como meio serviço, por MEO quase como o serviço inteiro. Um cabo sempre ganha, então seus roteadores só mandam tráfego para cima quando não há outro caminho.", +"satellites.users_notice_leo":"Por LEO, uns 30 ms de ida e volta, os usuários mal percebem, e as redes seletivas fazem peering como por um cabo. Ao lado de um cabo, ele espera de reserva.", "satellites.users_ride_a_satellite":"usuários via satélite", "satellites.via_bird":"via {bird}", "satellites.who_a_satellite_serves":"Satélites atendem ilhas pequenas e cidades remotas que o mesmo satélite vê junto com o seu teleporto. Escolha o destino.", diff --git a/src/agent/20-commands.js b/src/agent/20-commands.js index 1c0e9fa..a94fb00 100644 --- a/src/agent/20-commands.js +++ b/src/agent/20-commands.js @@ -175,14 +175,19 @@ const API_CMD={ quote:a=>({setup:TRK_COST,monthly:TRK_MO,blocked:[teleOf(a.city)===2?'this teleport has tracking antennas already':trkWhy(a.city)].filter(Boolean)}), doc:'Add tracking antennas to a teleport, so it can work the MEO ring (about 130 ms round trip instead of GEO\'s 600). Only within 50 degrees of the equator, where the ring is in view.'}, teleRm:{args:[['city','cityId']],confirm:'double',watch:['pops.#city'], - doc:'Close a teleport. Refused while circuits still start there.'}, + doc:'Close a teleport (and its LEO gateway). Refused while circuits still start there.'}, + teleLeo:{args:[['city','cityId']],watch:['pops.#city'], + quote:a=>({setup:LEO_GW_COST,monthly:LEO_GW_MO,blocked:[leoGw(a.city)?'there is a LEO gateway here already':leoGwWhy(a.city)].filter(Boolean)}), + doc:'Host a Starblink LEO gateway at your teleport (level 5, a POP on your fiber or with transit, within 56 degrees of the equator): LEO circuits from it reach small islands and remote towns within 1,200 km, about 30 ms round trip. Refused once your own constellation carries traffic.'}, + teleLeoRm:{args:[['city','cityId']],confirm:'double',watch:['pops.#city'], + doc:'Close a LEO gateway. Refused while LEO circuits still start there.'}, buySat:{args:[['a','cityId'],['b','cityId'],['bird','satBird'],['g','satG']], quote:a=>{const ok=own(SATS,a.bird),mo=ok?satMo(a.bird,+a.g):0;return {setup:mo+(S.pops[a.b]||!CITY[a.b]?0:popCost(a.b)),monthly:mo,days:ok?leadDays(SAT_ORB[SATS[a.bird].orb].days):0,blocked:[satWhy(a.a,a.b,a.bird,+a.g)].filter(Boolean)};}, - doc:'Rent a satellite circuit from your teleport in a to b (a small island or a remote town) on a bird that sees both: GEO 1-10 Gbps, MEO 2-20 with tracking antennas. The first month up front; builds a POP at b if there is none. Next to an existing link between the two it goes on standby, as backup; a link built later between the two puts it on standby too. Cancel with rmLink.'}, + doc:'Rent a satellite circuit from your teleport in a to b (a small island or a remote town) on a bird that sees both: GEO 1-10 Gbps, MEO 2-20 with tracking antennas, LEO 5-50 from a LEO gateway within 1,200 km (about 30 ms round trip; it puts GEO and MEO circuits on the same pair on standby, and one ordered beside it waits on standby). The first month up front; builds a POP at b if there is none. Next to an existing link between the two it goes on standby, as backup; a link built later between the two puts it on standby too. Cancel with rmLink.'}, satSize:{args:[['id','entityId'],['g','satG']],watch:['links.#id'], quote:a=>{const l=S.links.find(x=>x.id===a.id&&x.kind==='sat'),g=+a.g,ok=!!l&&g!==l.g&&SAT_ORB[SATS[l.bird].orb].g.includes(g),mo=ok?satMo(l.bird,g):0; - return {setup:ok&&g>l.g?mo:0,monthly:mo,blocked:!l?['not a satellite circuit']:ok?[]:[tr('satellites.no_such_circuit')]};}, - doc:'Resize a satellite circuit on the same bird. A bigger one pays its new month up front.'}, + return {setup:ok&&g>l.g?mo:0,monthly:mo,blocked:!l?['not a satellite circuit']:ok?[g>l.g&&leoLink(l)?leoGrowWhy(l):''].filter(Boolean):[tr('satellites.no_such_circuit')]};}, + doc:'Resize a satellite circuit on the same bird. A bigger one pays its new month up front; a LEO circuit grows only while its gateway is on your fiber and your own constellation carries nothing.'}, /* ---------- dark fiber and own cable ---------- */ orderDf:{args:[['a','cityId'],['b','cityId'],['source','dfSource'],['system','systemId']], bindsUI:['pending','dfSrc','dfSys'],bind:a=>{UI.pending={a:a.a,b:a.b};UI.dfSrc=a.source;UI.dfSys=a.system;}, diff --git a/src/agent/30-docs.js b/src/agent/30-docs.js index df8b1f0..3494546 100644 --- a/src/agent/30-docs.js +++ b/src/agent/30-docs.js @@ -19,7 +19,7 @@ const API_STATE_DOC={ t1v:{type:'integer',doc:'Level at which Tier 1 transit was offered.'}, auV:{type:'integer',doc:'Australia content level gate.'}, seen:{type:'array',doc:'Network ids the deals panel has already shown. Vestigial: written by newGame, read nowhere.'}, - pops:{type:'map',doc:'Your POPs by city id: day opened, broadband (bb: d, its demand in Gbps; v6, the share of its homes that are IPv6-only behind NAT64, absent for dual stack; v6e, the day a swap to IPv6-only finishes, while it runs), ad boost, downtime, routers, generator, second site, teleport (tele: 1 GEO dishes, 2 with MEO tracking antennas).'}, + pops:{type:'map',doc:'Your POPs by city id: day opened, broadband (bb: d, its demand in Gbps; v6, the share of its homes that are IPv6-only behind NAT64, absent for dual stack; v6e, the day a swap to IPv6-only finishes, while it runs), ad boost, downtime, routers, generator, second site, teleport (tele: 1 GEO dishes, 2 with MEO tracking antennas), a Starblink LEO gateway on it (leo: 1).'}, links:{type:'array',doc:'Your links: waves, dark fiber (df), own cables, fabric circuits (vxc), express lightpaths (xp: via lists the dark fibers it rides from a, ch its optics) and rented satellite circuits (sat: bird, g Gbps, km of radio path, ready day), each with an entity id.'}, transit:{type:'array',doc:'Transit ports: city, net, tier, LAG members, port history for 95th-percentile billing.'}, ixp:{type:'map',doc:'IX ports by exchange city; tier per port (may exceed 1 with LAG members in ixn).'}, @@ -42,7 +42,7 @@ const API_STATE_DOC={ ach:{type:'map',doc:'Badges earned this game, by badge id → day.'}, inc:{type:'array',doc:'Open incidents: type, what they hit, until when, optional rush-repair price.'}, ddosStarts:{type:'array',doc:'The days the attacks of the last week started; at most 14 a week.'}, - ev:{type:'map',doc:'Live world events: the running DDoS, route leaks, fabric failures, price shocks.'}, + ev:{type:'map',doc:'Live world events: the running DDoS, route leaks, fabric failures, price shocks, a solar storm (sky: the day LEO circuits leave safe mode).'}, stats:{type:'map',doc:'Counters: incidents survived, loans taken, sharks, conferences attended, peak traffic…'}, log:{type:'array',doc:'The NOC notification feed, newest first, capped at 60; identical notices within a minute fold with a count.'}, nextFail:{type:'integer',doc:'The day the next failure fires.'}, diff --git a/src/game/10-catalog/75-satellites.js b/src/game/10-catalog/75-satellites.js index b30143a..7a9897e 100644 --- a/src/game/10-catalog/75-satellites.js +++ b/src/game/10-catalog/75-satellites.js @@ -3,21 +3,27 @@ the early answer to "no cable lands there", and the warm backup for an island hanging on one cable. Geostationary birds (GEO, 35,786 km up) see a whole ocean from one dish: no build, dear per Gbps, about 600 ms there and back. A medium-orbit ring over the equator (MEO, 8,062 km up) gets that down to about 130 ms, but a teleport needs tracking - antennas to follow its satellites across the sky. Your own constellation (LEO, Pie in the Sky) comes much later. + antennas to follow its satellites across the sky. A rented low-orbit constellation (LEO, 550 km up, from level 5) is + a bent pipe: one satellite sees a gateway at your teleport and an island at once, so it reaches only the region round + the gateway, at about 30 ms. Your own constellation (Pie in the Sky) comes later still. The providers are vendors, like the fabrics: they sell you capacity, they are not networks you route to. */ // h: km up; proc: ms of modems and error correction each way; loss: the share of a city's service its users stop counting // once their traffic rides it (half for GEO, like any haul past 50 ms; MEO feels almost like fiber); days: to point and -// commission a new circuit; lv: the level it unlocks at; g: the sizes sold (Gbps). A MEO ring covers |lat| <= lat, and a -// circuit's two ends must see the same satellite at once: at most km apart, and at least el degrees above both horizons -// (what a ground terminal needs to clear the trees; far north, two ends 7,000 km apart lose it below the horizon). +// commission a new circuit; lv: the level it unlocks at; g: the sizes sold (Gbps). A MEO ring or LEO shell covers +// |lat| <= lat (LEO's 53 degree shell reaches a few degrees past its inclination, as pieCovers does), and a circuit's two +// ends must see the same satellite at once: at most km apart (LEO: a bent pipe, no lasers on a rented tier), and at least +// el degrees above both horizons (what a ground terminal needs to clear the trees; far north, two ends 7,000 km apart lose +// a MEO satellite below the horizon). loss is also how satEdges/satAfter tell the orbits apart, so no two may share one. const SAT_ORB={ geo:{n:'GEO',h:35786,proc:25,loss:0.5,days:10,lv:2,g:[1,2,5,10]}, meo:{n:'MEO',h:8062,proc:7,loss:0.08,days:21,lv:3,g:[2,5,10,20],lat:50,km:7500,el:5}, + leo:{n:'LEO',h:550,proc:10,loss:0.03,days:14,lv:5,g:[5,10,20,50],lat:56,km:1200,el:25}, }; // pg: dollars a month for the first Gbps; bigger circuits cost less per Gbps (satMo). const SAT_PROV={ its:{n:'Intelsplat',col:'#2F8CFF',pg:2500,blurb:tr('satellites.its_blurb')}, kac:{n:'Kacophony',col:'#FF8A3D',pg:1400,blurb:tr('satellites.kac_blurb')}, + sbk:{n:'Starblink',col:'#7C5CFF',pg:1000,blurb:tr('satellites.sbk_blurb')}, sesa:{n:'SESame',col:'#16A866',pg:2000,blurb:tr('satellites.sesa_blurb')}, }; // The birds. A GEO sits over the equator at lon; r is how far its beams reach, in degrees of arc from the point under it @@ -29,9 +35,13 @@ const SATS={ kac1:{n:'Kacophony-1',p:'kac',orb:'geo',lon:150,r:50,sea:N_('satellites.sea_west_pacific')}, gx19:{n:'Intelsplat 19',p:'its',orb:'geo',lon:-97,r:72,sea:N_('satellites.sea_americas')}, o3b:{n:'O3bservant',p:'sesa',orb:'meo',sea:N_('satellites.sea_tropics')}, + sb53:{n:'Starblink Shell 53',p:'sbk',orb:'leo',sea:N_('satellites.sea_leo')}, }; // The teleport itself (dishes, a building, the licences), and the MEO tracking antennas it may add. const TPORT_COST=90000,TPORT_MO=2500,TRK_COST=250000,TRK_MO=3000; +// The rented LEO tier: its one bird, the gateway Starblink puts on your teleport's roof, and its solar storms (a weight +// among the failures, and the most days one may last). +const LEO_BIRD='sb53',LEO_GW_COST=400000,LEO_GW_MO=8000,LEO_STORM_W=1,LEO_STORM_MAX=3; // Who a satellite serves: a small island off the big continents, or a remote town anywhere, never a big city's market. const SAT_MAIN=['af','am','eu','oc','sa'],SAT_ISLE_P=150,SAT_TOWN_P=5; const SAT_RE=6371,SAT_C=300; @@ -42,16 +52,29 @@ function satSlant(arc,h){const Q=SAT_RE+h,a=arc*Math.PI/180;return Math.sqrt(SAT // How high above a dish's horizon that satellite stands, in degrees (negative: below it, behind the Earth). function satElev(arc,h){const a=arc*Math.PI/180;return Math.atan2(Math.cos(a)-SAT_RE/(SAT_RE+h),Math.sin(a))*180/Math.PI;} // The longitude the bird sits over for a circuit: a GEO's slot; a MEO ring's satellite halfway between the two ends. +// LEO does not use it: its satellite flies over the midpoint of the two ends, not over the equator. function satLon(id,a,b){const B=SATS[id];if(B.orb==='geo')return B.lon;const r=Math.PI/180,A=CITY[a],C=CITY[b]; return Math.atan2(Math.sin(A.lon*r)+Math.sin(C.lon*r),Math.cos(A.lon*r)+Math.cos(C.lon*r))/r;} // Whether bird id sees city c. -function satSees(id,c){const B=SATS[id],C=CITY[c];if(!B||!C)return false;return B.orb==='meo'?Math.abs(C.lat)<=SAT_ORB.meo.lat:satArc(0,B.lon,C.lat,C.lon)<=B.r;} -function satPairOk(id,a,b){if(a===b||!satSees(id,a)||!satSees(id,b))return false;if(SATS[id].orb!=='meo')return true;const O=SAT_ORB.meo; - if(kmBetween(a,b)>O.km)return false;const lon=satLon(id,a,b);return [a,b].every(c=>satElev(satArc(0,lon,CITY[c].lat,CITY[c].lon),O.h)>=O.el);} +function satSees(id,c){const B=SATS[id],C=CITY[c];if(!B||!C)return false;return B.orb==='geo'?satArc(0,B.lon,C.lat,C.lon)<=B.r:Math.abs(C.lat)<=SAT_ORB[B.orb].lat;} +// Whether one satellite of bird id sees both ends at once: a GEO sees them from its slot; a MEO or LEO satellite has to +// be within km of both and high enough above both horizons (LEO's flies over the midpoint). +function satPairOk(id,a,b){if(a===b||!satSees(id,a)||!satSees(id,b))return false;const B=SATS[id];if(B.orb==='geo')return true;const O=SAT_ORB[B.orb]; + if(kmBetween(a,b)>O.km)return false; + if(B.orb==='leo')return satElev(satArc(CITY[a].lat,CITY[a].lon,CITY[b].lat,CITY[b].lon)/2,O.h)>=O.el; + const lon=satLon(id,a,b);return [a,b].every(c=>satElev(satArc(0,lon,CITY[c].lat,CITY[c].lon),O.h)>=O.el);} // The radio path: up from one dish and down to the other, the km the signal really travels. It is the link's km, so the // routers' metric (pairW) sees a satellite as the long way round it is, and a cable wins whenever there is one. -function satKm(id,a,b){const h=SAT_ORB[SATS[id].orb].h,lon=satLon(id,a,b),A=CITY[a],C=CITY[b]; - return Math.round(satSlant(satArc(0,lon,A.lat,A.lon),h)+satSlant(satArc(0,lon,C.lat,C.lon),h));} +function satKm(id,a,b){const h=SAT_ORB[SATS[id].orb].h,A=CITY[a],C=CITY[b]; + if(SATS[id].orb==='leo')return Math.round(2*satSlant(satArc(A.lat,A.lon,C.lat,C.lon)/2,h)); + const lon=satLon(id,a,b);return Math.round(satSlant(satArc(0,lon,A.lat,A.lon),h)+satSlant(satArc(0,lon,C.lat,C.lon),h));} +/* LEO from a gateway to any point on the globe (a zone of islands, not a city): pure, they read only the catalog and + CITY. c: the gateway's city id; lat, lon: the far end in degrees. leoArcLL: the arc between them in degrees; leoKmLL: + the radio path in km (up to the satellite over the midpoint and down again); leoMsLL: one way in ms, the modems + included. Whether a gateway may serve that point today is leoReachLL (60-features/45-teleports.js). */ +const leoArcLL=(c,lat,lon)=>satArc(CITY[c].lat,CITY[c].lon,lat,lon); +const leoKmLL=(c,lat,lon)=>Math.round(2*satSlant(leoArcLL(c,lat,lon)/2,SAT_ORB.leo.h)); +const leoMsLL=(c,lat,lon)=>leoKmLL(c,lat,lon)/SAT_C+SAT_ORB.leo.proc; // One way: the radio path at the speed of light in vacuum, plus the modems at both ends. const satLat=l=>l.km/SAT_C+SAT_ORB[SATS[l.bird].orb].proc; const satMo=(id,g)=>Math.round(SAT_PROV[SATS[id].p].pg*Math.pow(g,0.85)/10)*10; diff --git a/src/game/40-progress/30-rules.js b/src/game/40-progress/30-rules.js index dfda734..0586a76 100644 --- a/src/game/40-progress/30-rules.js +++ b/src/game/40-progress/30-rules.js @@ -50,7 +50,7 @@ function stretchInc(i){if(rule('chaos')!=='spicy'||!i||!(i.until>S.day)||i.start else if(['crash','power','oops','cleaner','maint','shutdown'].includes(T))f(S.pops[r],'down'); else if(T==='ring')f(S.pops[r],'ringcut');else if(T==='ac')f(S.pops[r],'hot'); else if(T==='transit'||T==='prepend')f(S.transit.find(t=>t.id===r),'down'); - else if(T==='ixloop'&&E.ixdown)f(E.ixdown,r);else if(T==='fabric'&&E.fab)f(E.fab,r); + else if(T==='ixloop'&&E.ixdown)f(E.ixdown,r);else if(T==='fabric'&&E.fab)f(E.fab,r);else if(T==='leostorm')f(E,'sky'); else if(T==='lacp'){const [k,...x]=String(r).split(':'),id=x.join(':');f(k==='ix'?E.ixlacp&&E.ixlacp[id]:(k==='t'?S.transit:S.pni).find(o=>o.id===id)?.lacp,'until');} else if(T==='rpki'||T==='hijack')f(E.rpki,'until');else if(T==='leak'||T==='pmtud')f(E[T],'until');else if(T==='krroute'||T==='depeer')f(E,T); else if(T==='ddos')f(ddosAll(S,false).find(a=>a.id===i.atk),'until');} diff --git a/src/game/60-features/45-teleports.js b/src/game/60-features/45-teleports.js index ecd6a19..c9347c7 100644 --- a/src/game/60-features/45-teleports.js +++ b/src/game/60-features/45-teleports.js @@ -18,15 +18,18 @@ function trkWhy(c){const O=SAT_ORB.meo;if(lvl()SATS[id].orb==='meo'))return tr('satellites.meo_ring_misses_city',{city:CITY[c].name,lat:O.lat}); return '';} -// The birds that see both ends of a circuit: GEO first, then the cheapest. -function satBirds(a,b){return Object.keys(SATS).filter(id=>satPairOk(id,a,b)).sort((x,y)=>(SATS[x].orb>SATS[y].orb)-(SATS[x].orbsatPairOk(id,a,b)).sort((x,y)=>SAT_ORD.indexOf(SATS[x].orb)-SAT_ORD.indexOf(SATS[y].orb)||SAT_PROV[SATS[x].p].pg-SAT_PROV[SATS[y].p].pg);} // Why a circuit from teleport a to b over bird id (g Gbps, when given) cannot be ordered; '' when it can. function satWhy(a,b,id,g){const B=own(SATS,id)?SATS[id]:null;if(!B||!isCity(a)||!isCity(b)||a===b)return tr('satellites.no_such_circuit');const O=SAT_ORB[B.orb]; if(lvl()satRemote(b)?teleCities().filter(a=>a!==b&&satBirds(a,b).length // it, as one ordered next to a link does, and the player hears about it. Without this the pair's load is shared with orbit. 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 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; +/* A wired link that is built and lit: a wave, a lit fiber, a cable, a fabric circuit. What is built counts, never today's + cuts. 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). */ +const wiredLink=l=>l.kind!=='sat'&&!(l.ready>S.day)&&(l.kind!=='df'||(l.ch||[]).length>0); +/* An island or remote town that only satellites join to the rest of your network: its fastest commissioned circuit, or + its fastest one being pointed when none is up yet (null when a wired link or a pie dish reaches it too). A selective + peer judges what you built, not this week's repair (50-peering-policy.js), and a circuit still being pointed does not + change its verdict while another is up. */ +function satOnly(c){if(!satRemote(c)||!S.pops[c]||S.pie&&(S.pie.dishes||[]).some(x=>x.city===c))return null;let best=null,up=null; for(const l of S.links){if(l.a!==c&&l.b!==c)continue; - if(l.kind!=='sat'){if(!(l.ready>S.day)&&(l.kind!=='df'||(l.ch||[]).length))return null;continue;}if(!best||satLat(l)S.day)&&(!up||satLat(l)t.city===c))return true; + for(const l of S.links)if((l.a===c||l.b===c)&&wiredLink(l))return true;return false;} +// A Starblink gateway at the teleport in c (S.pops[c].leo). +const leoGw=c=>own(S.pops,c)&&S.pops[c].leo===1&&teleOf(c)>0; +// Your own constellation carries traffic (Pie in the Sky, at least 40% coverage, safe mode or not): Starblink sells a +// rival nothing new. Circuits already rented keep running. +const leoRival=()=>!!(S&&S.pie)&&Object.keys(CRUSTS).some(id=>pieCarry(id)>0); +// Why no LEO gateway can go up at c; '' when it can. +function leoGwWhy(c){const O=SAT_ORB.leo;if(!isCity(c)||!own(S.pops,c))return tr('satellites.no_pop_in_city',{city:isCity(c)?CITY[c].name:'?'}); + if(lvl()O.lat)return tr('satellites.leo_shell_misses_city',{prov:SAT_PROV.sbk.n,city:CITY[c].name,lat:O.lat}); + if(!satWired(c))return tr('satellites.leo_needs_fiber',{city:CITY[c].name}); + if(leoRival())return tr('satellites.leo_no_rivals',{prov:SAT_PROV.sbk.n}); + return '';} +// Why LEO circuit l cannot get bigger; '' when it can (shrinking always works). +function leoGrowWhy(l){const a=l.a;if(!leoGw(a))return tr('satellites.needs_leo_gateway',{city:CITY[a].name}); + if(!satWired(a))return tr('satellites.leo_needs_fiber',{city:CITY[a].name}); + if(leoRival())return tr('satellites.leo_no_rivals',{prov:SAT_PROV.sbk.n});return '';} +// A LEO circuit, and one a solar storm holds in safe mode (S.ev.sky: the day it passes). +const leoLink=l=>l.kind==='sat'&&own(SATS,l.bird)&&SATS[l.bird].orb==='leo'; +const leoStorm=()=>S.ev.sky>S.day; +const leoDown=l=>leoStorm()&&leoLink(l); +// A storm can only find circuits in the sky: a commissioned LEO circuit (failureRun, and Pie's own storms). +const leoLive=()=>S.links.some(l=>leoLink(l)&&!(l.ready>S.day)); +// A solar storm: Starblink puts its satellites in safe mode for 1 or 2 days (days: how many, when the caller knows). +function leoStormGo(days){S.ev.sky=S.day+(days||1+Math.floor(Math.random()*2)); + addInc({type:'leostorm',ref:'sbk',until:S.ev.sky,msg:tr('satellites.leo_storm_msg',{prov:SAT_PROV.sbk.n}),cost:0});} +/* WISP hook: whether the gateway at city c may carry LEO to the point lat, lon (a zone, not a city id) today. It reads S + and changes nothing: a gateway on your fiber, your level, no flying constellation of yours, both ends under the shell + and at most SAT_ORB.leo.km apart. Pair it with leoKmLL/leoMsLL (10-catalog/75-satellites.js), satMo(LEO_BIRD,g) for + the rent, SAT_ORB.leo.loss for what users notice, and leoStorm() for the storm. */ +function leoReachLL(c,lat,lon){const O=SAT_ORB.leo;if(!leoGw(c)||lvl()O.lat||!(Math.abs(lat)<=O.lat))return false;return leoArcLL(c,lat,lon)*Math.PI/180*SAT_RE<=O.km;} // What the teleports and their circuits cost a month (R.cost.sat). -function satMoAll(){let m=0;for(const c in S.pops){const t=teleOf(c);if(t)m+=TPORT_MO+(t>1?TRK_MO:0);}for(const l of S.links)if(l.kind==='sat')m+=l.mo||0;return m;} +function satMoAll(){let m=0;for(const c in S.pops){const t=teleOf(c);if(t)m+=TPORT_MO+(t>1?TRK_MO:0)+(S.pops[c].leo===1?LEO_GW_MO:0);}for(const l of S.links)if(l.kind==='sat')m+=l.mo||0;return m;} /* compute(): what users notice on the edges a satellite circuit is on. sv: the losses of the orbits there; sx: the edge's latency is the satellite's (no cable carries ahead of it), so it is no haul to transit on the ground. Returns how many edges there were, for compute() to know a satellite is in the picture at all. */ @@ -72,10 +115,12 @@ function satAfter(SE,LATP,SATU){for(const e of SE){const ld=e.ld||0;if(!e.sa||ld for(const [ci,x] of e.sa){let p=0;for(let j=0;jr&&r.satU&&r.citySrv&&r.citySrv[c]>0?Math.min(1,(r.satU[c]||0)/r.citySrv[c]):0; -// Saves: a teleport is 1 or 2; a circuit needs a known bird that sees both POPs, a teleport able to work it, a size it sells. +// Saves: a teleport is 1 or 2, a LEO gateway 1 on a teleport; a circuit needs a known bird that sees both POPs, a teleport +// able to work it (MEO: tracking antennas; LEO: the gateway), a size it sells. The storm's day stays a key once it is one. function satSanitize(s){ - for(const c of Object.keys(s.pops)){const p=s.pops[c];if(p.tele!==undefined&&p.tele!==1&&p.tele!==2)delete p.tele;} + for(const c of Object.keys(s.pops)){const p=s.pops[c];if(p.tele!==undefined&&p.tele!==1&&p.tele!==2)delete p.tele;if(p.leo!==undefined&&(p.leo!==1||!p.tele))delete p.leo;} + if(s.ev&&s.ev.sky!==undefined)s.ev.sky=int(s.ev.sky,0,s.day+LEO_STORM_MAX,0); s.links=s.links.filter(l=>{if(l.kind!=='sat')return true;const B=typeof l.bird==='string'&&own(SATS,l.bird)?SATS[l.bird]:null,p=s.pops[l.a]; - if(!B||!p||!p.tele||B.orb==='meo'&&p.tele<2||!s.pops[l.b]||!satPairOk(l.bird,l.a,l.b))return false; + if(!B||!p||!p.tele||B.orb==='meo'&&p.tele<2||B.orb==='leo'&&p.leo!==1||!s.pops[l.b]||!satPairOk(l.bird,l.a,l.b))return false; const G=SAT_ORB[B.orb].g;if(!G.includes(l.g))l.g=G.reduce((x,v)=>v<=num(l.g,0)?v:x,G[0]); l.km=satKm(l.bird,l.a,l.b);l.sub=true;l.ready=num(l.ready,0);l.day=Math.min(s.day,Math.max(0,num(l.day,s.day)));for(const k of ['tier','cable','trench','mult','border','premium','vt','prov','own','sys','ch'])delete l[k];return true;});} diff --git a/src/game/80-simulation/40-billing.js b/src/game/80-simulation/40-billing.js index afee05e..778eabc 100644 --- a/src/game/80-simulation/40-billing.js +++ b/src/game/80-simulation/40-billing.js @@ -7,7 +7,7 @@ const gulfPair=(a,b)=>!!((CITY[a].qa&&(CITY[b].gcc||CITY[b].uae))||(CITY[b].qa&& const borderShut=l=>S.ev.runet>S.day&&ruCity(l.a)!==ruCity(l.b)?'runet':S.ev.gulf>S.day&&gulfPair(l.a,l.b)?'gulf':''; // Cut, or cut off by an event between its two countries, whatever runs on it (an express asks this of each fiber it rides). function linkCut(l){return l.cut>S.day||!!borderShut(l);} -function linkDown(l){return linkCut(l)||(l.kind==='vxc'&&!!S.ev.fab&&S.ev.fab[l.prov]>S.day)||(l.kind==='df'&&!dfOn(l))||(l.kind==='xp'&&xpDown(l))||(l.kind==='sat'&&l.ready>S.day);} +function linkDown(l){return linkCut(l)||(l.kind==='vxc'&&!!S.ev.fab&&S.ev.fab[l.prov]>S.day)||(l.kind==='df'&&!dfOn(l))||(l.kind==='xp'&&xpDown(l))||(l.kind==='sat'&&(l.ready>S.day||leoDown(l)));} function remoteCities(){return [...new Set(S.links.filter(l=>l.kind==='vxc').flatMap(l=>[l.a,l.b]))].filter(c=>!S.pops[c]);} function nniUsed(c,prov){return S.links.filter(l=>l.kind==='vxc'&&l.prov===prov&&(l.a===c||l.b===c)).reduce((a,l)=>a+VXC[l.vt].g,0)+S.biz.filter(b=>BIZ_T[b.type].nni&&b.prov===prov&&b.city===c).reduce((a,b)=>a+b.bw,0);} // Monthly price of one connection; compute() sums these, the connections overview lists them. diff --git a/src/game/85-incidents/20-failures.js b/src/game/85-incidents/20-failures.js index bb87d7c..23ef52a 100644 --- a/src/game/85-incidents/20-failures.js +++ b/src/game/85-incidents/20-failures.js @@ -19,6 +19,8 @@ function* failureRun(only){ if(Object.keys(S.ixp).length)opts.push(['ixloop',2]); if(S.transit.length&&S.day>60)opts.push(['leak',2]); if(fabsUsed.length)opts.push(['fabric',1.5]); + // A geomagnetic storm: rare, and only while a LEO circuit of yours is in the sky. + if(!leoStorm()&&leoLive())opts.push(['leostorm',LEO_STORM_W]); // Amp huts and ROADMs carry every channel in the glass, the expresses' too; an optic of its own needs a channel of its own. const lit=S.links.filter(l=>l.kind==='df'&&dfCap(l)>0&&!linkDown(l)),amps=lit.concat(bare);if(amps.length)opts.push(['amp',1.5+amps.length*0.3]);if(lit.length)opts.push(['optic',1.5+lit.length*0.3]); // Two vendors' idea of the same protocol: the higher the backbone runs, the more often they disagree. @@ -121,6 +123,7 @@ function* failureRun(only){ }else if(type==='fabric'){ const f=pick(fabsUsed);S.ev.fab=S.ev.fab||{};S.ev.fab[f]=S.day+2+Math.floor(Math.random()*3); addInc({type,ref:f,until:S.ev.fab[f],msg:tr('failures.fabric_is_having_a_bad_day',{fabric:FAB[f].name}),cost:0}); + }else if(type==='leostorm'){leoStormGo(); }else if(type==='ddos'){ddosAttack(false);yield;yield* ddosNewsRun();return; } // This failure's incident, kept before the routing: the player may repair it (or another) while the worker routes. @@ -134,7 +137,7 @@ function* failureRun(only){ } const gamingCount=()=>S.biz.reduce((n,b)=>n+(BIZ_T[b.type]?.gaming?1:0),0); const FLOOD_WHO=[N_('failures.a_botnet_of_40_000_smart'),N_('failures.every_unpatched_baby_monitor_in'),N_('failures.a_gaming_clan_that_lost_one'),N_('failures.a_fridge_that_achieved_sentience_and'),N_('failures.a_crypto_bro_shorting_your_stock'),N_('failures.a_teenager_with_a_stolen_credit'),N_('failures.a_rival_isp_s_stress_test'),N_('failures.ten_thousand_smart_light_bulbs'),N_('failures.a_printer_just_one_printer_nobody'),N_('failures.a_botnet_run_from_a_cloud'),N_('failures.somebody_who_did_not_like_your'),N_('failures.the_internet_connected_kettles_of_a')]; -function incTitle(t){return {ring:tr('failures.metro_ring_cut'),site:tr('common.site_outage'),cut:tr('common.fiber_cut'),crash:tr('common.router_crash'),power:tr('common.power_outage'),transit:tr('common.upstream_outage'),ixloop:tr('common.ix_meltdown'),leak:tr('common.route_leak'),ddos:tr('common.ddos_attack'),fabric:tr('common.fabric_outage'),depeer:tr('common.peering_spat'),fatwave:tr('failures.fat_fingered_wave'),label:tr('failures.patch_panel_mishap'),interop:tr('core.interop_failure'),mtu:tr('common.mtu_mismatch'),krroute:tr('failures.rerouted_via_hong_kong'),ctrlplane:tr('failures.control_plane_meltdown'),lacp:tr('common.lacp_trouble'),loss:tr('common.packet_loss'),pmtud:tr('failures.pmtud_black_hole'),oops:tr('common.oops'),cleaner:tr('common.vacuum_incident'),prepend:tr('common.prepend_ageddon'),rpki:tr('common.rpki_invalid'),amp:tr('common.amplifier_failure'),roadmff:tr('failures.fat_fingered_roadm'),optic:tr('common.dead_optic'),maint:tr('common.maintenance_window_3a92'),ac:tr('common.cooling_failure'),hijack:tr('common.bgp_hijack'),shutdown:tr('common.government_shutdown'),redsea:tr('failures.geopolitical_cable_cut')}[t]||pieIncTitle(t)||tr('common.incident');} +function incTitle(t){return {ring:tr('failures.metro_ring_cut'),site:tr('common.site_outage'),cut:tr('common.fiber_cut'),crash:tr('common.router_crash'),power:tr('common.power_outage'),transit:tr('common.upstream_outage'),ixloop:tr('common.ix_meltdown'),leak:tr('common.route_leak'),ddos:tr('common.ddos_attack'),fabric:tr('common.fabric_outage'),depeer:tr('common.peering_spat'),fatwave:tr('failures.fat_fingered_wave'),label:tr('failures.patch_panel_mishap'),interop:tr('core.interop_failure'),mtu:tr('common.mtu_mismatch'),krroute:tr('failures.rerouted_via_hong_kong'),ctrlplane:tr('failures.control_plane_meltdown'),lacp:tr('common.lacp_trouble'),loss:tr('common.packet_loss'),pmtud:tr('failures.pmtud_black_hole'),oops:tr('common.oops'),cleaner:tr('common.vacuum_incident'),prepend:tr('common.prepend_ageddon'),rpki:tr('common.rpki_invalid'),amp:tr('common.amplifier_failure'),roadmff:tr('failures.fat_fingered_roadm'),optic:tr('common.dead_optic'),maint:tr('common.maintenance_window_3a92'),ac:tr('common.cooling_failure'),hijack:tr('common.bgp_hijack'),shutdown:tr('common.government_shutdown'),redsea:tr('failures.geopolitical_cable_cut'),leostorm:tr('pie_inc.t_storm')}[t]||pieIncTitle(t)||tr('common.incident');} const LINKCUT_TR=['cut','redsea'],LINKCUT_ID=['fatwave','label','interop'],POPDOWN=['crash','power','oops','cleaner','maint','shutdown'],IXDOWN=['ixloop'],TDOWN=['transit','prepend'],LINKEQ=['mtu','amp','roadmff','optic']; function remainUntil(pred){let u=0;for(const x of S.inc)if(pred(x))u=Math.max(u,x.until);return u;} // Remove an incident, then restore each affected thing to whatever other incidents still hold it down. @@ -149,6 +152,7 @@ function clearInc(i){ else if(T==='leak'){S.ev.leak=null;} else if(T==='ddos'){const a=ddosAll(S,false).find(a=>i.atk?a.id===i.atk:a.city===i.ref&&(a.start===undefined||a.start===i.start));if(a){ddosDone(a);ddosDrop(a);}} else if(T==='fabric'){if(S.ev.fab)S.ev.fab[i.ref]=remainUntil(x=>x.type==='fabric'&&x.ref===i.ref);} + else if(T==='leostorm'){S.ev.sky=remainUntil(x=>x.type==='leostorm');} else if(T==='mtu'){const l=S.links.find(x=>x.id===i.ref);if(l)l.deg=remainUntil(x=>x.type==='mtu'&&x.ref===i.ref);} else if(T==='loss'){const l=S.links.find(x=>x.id===i.ref);if(l&&!S.inc.some(x=>x.type==='loss'&&x.ref===i.ref))l.loss=null;} else if(T==='lacp'){if(!S.inc.some(x=>x.type==='lacp'&&x.ref===i.ref)){const [k,...r]=String(i.ref).split(':'),id=r.join(':');if(k==='ix'){if(S.ev.ixlacp)delete S.ev.ixlacp[id];}else{const o=(k==='t'?S.transit:S.pni).find(x=>x.id===id);if(o)o.lacp=null;}}} diff --git a/src/game/85-incidents/60-pie.js b/src/game/85-incidents/60-pie.js index 5407b5e..ec40211 100644 --- a/src/game/85-incidents/60-pie.js +++ b/src/game/85-incidents/60-pie.js @@ -52,6 +52,9 @@ function pieIncFire(k){const P=S.pie;if(!P||!P.co)return false;const d=S.day; const crs=f=>Object.keys(CRUSTS).filter(f); if(k==='storm'){const c=crs(id=>pieLive(id)>0&&!pieIncOf('piestorm',id));if(!c.length)return false;const cr=pick(c),f=+(PIE_HIT/5+Math.random()*PIE_HIT*4/5).toFixed(3); const i=pieAdd({type:'piestorm',ref:cr,until:d+7,f,lost:0,cost:0,msg:tr('pie_inc.storm_msg',{crust:tr(CRUSTS[cr].n),p:pct(f)})});pieFounder(N_('pie.fp_storm'),{c:cr});pieStormBite(i); + // One sun: Starblink's satellites go to safe mode in the same storm (the rented LEO circuits you still have), for a + // day or two as the storm is weak or strong, so no dice are thrown that a sky without them would not throw. + if(!leoStorm()&&leoLive()){leoStormGo(f>=PIE_HIT*0.6?2:1);const x=S.inc[S.inc.length-1];toast(`🛰️ ${incTitle('leostorm')}
${esc(x.msg)}`,'bad',[],incOpen(x));} pieIncToast(i,tr('pie_inc.storm_press'),P.safe?[]:[{l:tr('pie_inc.safe_now'),act:'pieSafe',args:{}}]);return true;} if(k==='food'){const c=crs(id=>pieLive(id)>=100&&!pieIncOf('piefood',id));if(!c.length)return false;const cr=pick(c),n=pieLose(cr,PIE_HIT/2+Math.random()*PIE_HIT/2); const i=pieAdd({type:'piefood',ref:cr,until:d+360,cost:piePrice(PIE_ROOMBA),fix:tr('pie_inc.food_fix'),msg:tr('pie_inc.food_msg',{crust:tr(CRUSTS[cr].n),n,p:pct(PIE_FOOD_MUL)})}); diff --git a/src/game/90-actions/87-teleports.js b/src/game/90-actions/87-teleports.js index bb05e14..62f0e39 100644 --- a/src/game/90-actions/87-teleports.js +++ b/src/game/90-actions/87-teleports.js @@ -1,4 +1,5 @@ // Teleports and satellite capacity (#83): build the gateway, rent circuits on its birds, resize them. Cancel is rmLink. +// A Starblink gateway on a teleport sells LEO circuits from there (teleLeo, teleLeoRm). Object.assign(ACT,{ teleBuild:({city})=>{const p=S.pops[city];if(!p||teleOf(city))return; const why=teleWhy(city);if(why){toast(why,'bad');sfx('err');return;} @@ -10,18 +11,28 @@ Object.assign(ACT,{ teleRm:({city})=>{const p=S.pops[city];if(!p||!teleOf(city))return;const n=S.links.filter(l=>l.kind==='sat'&&l.a===city).length; if(n){toast(trn('satellites.cancel_n_circuits_first',n),'bad');sfx('err');return;} if(UI.confirm!=='tele:'+city){UI.confirm='tele:'+city;renderPanel();return;} - delete p.tele;UI.confirm=null;toast(tr('satellites.teleport_closed',{city:CITY[city].name}));after();}, + delete p.tele;delete p.leo;UI.confirm=null;toast(tr('satellites.teleport_closed',{city:CITY[city].name}));after();}, + teleLeo:({city})=>{if(!own(S.pops,city)||leoGw(city))return;const why=leoGwWhy(city);if(why){toast(why,'bad');sfx('err');return;} + if(!spend(LEO_GW_COST))return;S.pops[city].leo=1;toast(tr('satellites.leo_gateway_up',{prov:SAT_PROV.sbk.n,city:CITY[city].name,km:SAT_ORB.leo.km.toLocaleString()}),'good');after();}, + // Closing the gateway asks twice, and never while LEO circuits still start there. + teleLeoRm:({city})=>{if(!leoGw(city))return;const n=S.links.filter(l=>l.a===city&&leoLink(l)).length; + if(n){toast(trn('satellites.cancel_n_circuits_first',n),'bad');sfx('err');return;} + if(UI.confirm!=='leo:'+city){UI.confirm='leo:'+city;renderPanel();return;} + delete S.pops[city].leo;UI.confirm=null;toast(tr('satellites.leo_gateway_closed',{city:CITY[city].name}));after();}, satOpen:({a,b})=>satModal(a,b), // Rent a circuit from teleport a to b: the first month up front, like a wave; a POP at b comes with it if there is none. // Next to a link you already have between the two, it goes on standby: the backup that carries only when the cable is down. buySat:({a,b,bird,g})=>{g=+g;const why=satWhy(a,b,bird,g);if(why){toast(why,'bad');sfx('err');return;} if(!portGate(a,1)||!portGate(b,1))return;const mo=satMo(bird,g),pop=!S.pops[b];if(!spend(mo+(pop?popCost(b):0)))return; if(pop){S.pops[b]={day:S.day,bb:null,boost:0,down:0,routers:1,gen:false,rgen:0};popStdApply(b);} - const sb=pairLinks(a,b).some(l=>l.kind!=='sat'),n=leadDays(SAT_ORB[SATS[bird].orb].days),id=uid(); + // One satellite a pair: LEO puts the GEO and MEO circuits there on standby, and one ordered beside LEO waits on standby. + const lo=SATS[bird].orb==='leo',sb=pairLinks(a,b).some(l=>l.kind!=='sat'||!lo&&!l.standby&&leoLink(l));if(lo&&!sb)satBeside(a,b); + const n=leadDays(SAT_ORB[SATS[bird].orb].days),id=uid(); S.links.push({id,a,b,kind:'sat',bird,g,km:satKm(bird,a,b),sub:true,mo,cut:0,day:S.day,ready:S.day+n,...(sb?{standby:true}:{})}); closeModal();UI.sel={type:'link',id}; toast(trn('satellites.circuit_ordered',n,{cap:fmtCap(g),bird:esc(SATS[bird].n),a:CITY[a].name,b:CITY[b].name})+(sb?' '+tr('satellites.on_standby_beside_your_link'):''),'good');after();}, // Bigger or smaller on the same bird: a bigger one pays its new month up front, as a wave upgrade does. satSize:({id,g})=>{g=+g;const l=S.links.find(x=>x.id===id);if(!l||l.kind!=='sat'||g===l.g||!SAT_ORB[SATS[l.bird].orb].g.includes(g))return; + if(g>l.g&&leoLink(l)){const w=leoGrowWhy(l);if(w){toast(w,'bad');sfx('err');return;}} const mo=satMo(l.bird,g);if(g>l.g&&!spend(mo))return;l.g=g;l.mo=mo;sfx('click');after();}, }); diff --git a/src/game/93-ui/72-teleport-panels.js b/src/game/93-ui/72-teleport-panels.js index 3961ab0..ee087e0 100644 --- a/src/game/93-ui/72-teleport-panels.js +++ b/src/game/93-ui/72-teleport-panels.js @@ -4,7 +4,8 @@ const satLogo=P=>`