diff --git a/site/i18n/de.js b/site/i18n/de.js index 82a1847..709264e 100644 --- a/site/i18n/de.js +++ b/site/i18n/de.js @@ -1772,7 +1772,6 @@ "fiber_and_hardware.those_optics_need_the_regen_site":"Diese Optiken brauchen den Regen-Standort.
Entferne zuerst die Langstreckenkanäle oder behalte den Standort.", "fiber_modals.a_fiber_pair_of_your_own":"Ein eigenes Faserpaar. Das Glas ist billig, die Technik nicht: Du kaufst ein Line System mit einem Verstärker alle {km} km und dann Optiken für jeden Kanal. Deine Technik kann ausfallen, und du reparierst sie.", "fiber_modals.a_fiber_pair_on_cable_km":"Ein Faserpaar auf {cable}, {km} km. Es teilt sich das Kabel mit den Waves aller anderen, Anker inklusive.", -"fiber_modals.build_your_own_level_3":"Selbst bauen Level 3", "fiber_modals.build_your_own_price_n_days":"Selbst bauen {price} · ~{n} Tage", "fiber_modals.dark_fiber_across_the_chinese_border":"Dark Fiber über die chinesische Grenze ist nicht zu haben. Kauf stattdessen eine grenzüberschreitende Wave.", "fiber_modals.dark_fiber_unlocks_at_customer_level":"Dark Fiber wird ab Kundenlevel 2 freigeschaltet. Du brauchst die Größe, damit sich eigene optische Technik lohnt.", @@ -3507,6 +3506,39 @@ "sold_out.tier_1s_never_peer_at_ixs":"Tier 1s peeren nie an IXs", "sold_out.wants_need_gbps_of_traffic_from":"Will ≥ {need} Gbps Traffic von dir (du schickst {dem})", "sold_out.wants_you_to_be_a_tier":"Will, dass du Tier 2 bist oder ≥ {need} Gbps dorthin schickst (du schickst {dem})", +"specialist.a_b_km_km_ready_in":"{a} ⇄ {b} · {km} km · etwa {ms} ms · fertig in etwa {n} Tagen", +"specialist.a_consortium_is_selling_seats_on":"Ein Konsortium verkauft Plätze auf {name}, einem neuen Kabel von {a} nach {b}. Eigene Faserpaare darauf, noch bevor du Tier 1 bist.", +"specialist.ask_for_a_demo_unit_p_n":"Demogerät: +{p} %, {n} Tage", +"specialist.charter_signed_name":"Charta unterschrieben: {name}.", +"specialist.consortium_seat":"Konsortialplatz", +"specialist.consortium_seat_name":"Konsortialplatz: {name}", +"specialist.demo_unit_ships_in_n_days":"Demogerät kommt in {n} Tagen", +"specialist.dig_your_own_as_a_pioneer":"Selbst graben als Pionier (+{p} %) · {price} · {n} Tage", +"specialist.global_backbone":"Globaler Backbone", +"specialist.includes_pops_at_the_landings_price":"Inklusive POPs an den Landestationen: {price}.", +"specialist.keep_it":"Behalten", +"specialist.low_latency_boutique":"Low-Latency-Boutique", +"specialist.n_fiber_pairs":{"one":"{n} Faserpaar","other":"{n} Faserpaare"}, +"specialist.part_owner_of_the_sea":"Miteigentümer des Meeres", +"specialist.pick":"Wählen", +"specialist.pick_a_charter":"Wähle eine Charta", +"specialist.routes_r_of_n_beat_the":"Finanzrouten, auf denen deine eigene Glasfaser schneller ist als jeder gemietete Weg: {r}/{n} · zahlende Latenzkunden: {c}/{m}", +"specialist.speed_of_light":"Lichtgeschwindigkeit", +"specialist.spotted_your_broadband_in_a_one":"Sie haben dein Breitband in {a} entdeckt, einer der großen Privatkunden-Städte.", +"specialist.spotted_your_cap_of_dark_fiber":"Sie haben deine {cap} beleuchtete Dark Fiber zwischen {a} und {b} entdeckt.", +"specialist.spotted_your_ms_ms_a_b_path":"Sie haben deinen {ms}-ms-Weg {a}–{b} entdeckt.", +"specialist.spotted_your_two_diverse_paths_a":"Sie haben deine zwei getrennten Wege zwischen {a} und {b} entdeckt.", +"specialist.take_a_seat_on_a_consortium":"Nimm einen Platz auf einem Konsortialkabel", +"specialist.the_classic_game_grow_everywhere_and":"Das klassische Spiel: überall wachsen, Kunden folgen deinem Level, Tier 1 ist der Sieg.", +"specialist.the_consortium_runs_the_cable_your":"Das Konsortium betreibt das Kabel und seine Repeater. Deine Paare beleuchtest du mit eigenen Optiken; ein Schnitt im Kabel trifft auch sie.", +"specialist.the_vendor_ships_a_demo_name":"Der Hersteller schickt in {n} Tagen ein Demo-{name}. Bis dein Level aufholt, kostet jedes Gerät {p} % mehr.", +"specialist.trading_firms_and_other_latency_customers":"Handelsfirmen und andere Latenzkunden melden sich öfter und zahlen {p} % mehr. Gewinne Lichtgeschwindigkeit: schlag die schnellste gemietete Latenz auf {r} Finanzrouten mit eigener Glasfaser, während {c} Latenzkunden zahlen. Tier 1 zählt weiterhin.", +"specialist.what_kind_of_network_are_you":"Was für ein Netz baust du? Du kannst noch {n} Tage wählen; bis dahin bist du ein Globaler Backbone.", +"specialist.win_as_a_low_latency_boutique":"Gewinne als Low-Latency-Boutique", +"specialist.won_on_date_your_own_glass":"Gewonnen am {date}: deine eigene Glasfaser schlug jeden gemieteten Weg.", +"specialist.you_own_n_fiber_pairs_on":"Unterschrieben: dir gehören {n} Faserpaare auf {name}, {a} ⇄ {b}. Die Kabelschiffe legen ab; fertig in etwa {d} Tagen.", +"specialist.your_own_fiber_pairs_on_a":"Eigene Faserpaare auf einem neuen Seekabel: zahl jetzt deinen Anteil am Bau und beleuchte sie mit eigenen Optiken, wenn es anlandet.", +"specialist.your_own_glass_beats_every_leased":"Deine eigene Glasfaser schlägt auf drei Finanzrouten jeden gemieteten Weg, und die Trader zahlen dafür. Die Boutique hat gewonnen!", "supply_chain.as_when_you_started":"wie bei deinem Start", "supply_chain.chip_shortage_every_router_vendor_is":"Chipmangel!
Jeder Router-Hersteller wartet auf dieselben Chips. Neue Router und Router-Upgrades kosten {n} Tage lang 40 % mehr. Lieferzeit: „ja“.", "supply_chain.every_cable_ship_is_booked":"Jedes Kabelschiff ist ausgebucht.
Hyperscaler haben jedes Kabelschiff und jeden Grabungstrupp der Welt angeheuert. Neue Glasfaser- und Kabelbauten kosten {n} Tage lang 30 % mehr.", diff --git a/site/i18n/es.js b/site/i18n/es.js index f9f661a..89e2892 100644 --- a/site/i18n/es.js +++ b/site/i18n/es.js @@ -1770,7 +1770,6 @@ "fiber_and_hardware.those_optics_need_the_regen_site":"Esas ópticas necesitan el sitio regenerador.
Quita primero los canales de larga distancia, o conserva el sitio.", "fiber_modals.a_fiber_pair_of_your_own":"Un par de fibra propio. El vidrio es barato, el equipo no: compras un sistema de línea con un amplificador cada {km} km, y luego ópticas para cada canal. Tu equipo puede fallar, y tú lo arreglas.", "fiber_modals.a_fiber_pair_on_cable_km":"Un par de fibra en {cable}, {km} km. Comparte cable con las ondas de todos los demás, anclas incluidas.", -"fiber_modals.build_your_own_level_3":"Construye el tuyo nivel 3", "fiber_modals.build_your_own_price_n_days":"Construye el tuyo {price} · ~{n} días", "fiber_modals.dark_fiber_across_the_chinese_border":"La fibra oscura que cruza la frontera china no está a la venta. Compra una onda transfronteriza.", "fiber_modals.dark_fiber_unlocks_at_customer_level":"La fibra oscura se desbloquea en el nivel de cliente 2. Necesitas la escala para justificar comprar tu propio equipo óptico.", @@ -3505,6 +3504,39 @@ "sold_out.tier_1s_never_peer_at_ixs":"Los Tier 1 nunca hacen peering en IX", "sold_out.wants_need_gbps_of_traffic_from":"Quiere ≥ {need} Gbps de tráfico tuyo (envías {dem})", "sold_out.wants_you_to_be_a_tier":"Quiere que seas Tier 2, o que le envíes ≥ {need} Gbps (envías {dem})", +"specialist.a_b_km_km_ready_in":"{a} ⇄ {b} · {km} km · unos {ms} ms · lista en unos {n} días", +"specialist.a_consortium_is_selling_seats_on":"Un consorcio vende plazas en {name}, un cable nuevo de {a} a {b}. Tus propios pares de fibra en él, antes de ser Tier 1.", +"specialist.ask_for_a_demo_unit_p_n":"Unidad demo: +{p}%, {n} días", +"specialist.charter_signed_name":"Carta firmada: {name}.", +"specialist.consortium_seat":"Plaza en el consorcio", +"specialist.consortium_seat_name":"Plaza en el consorcio: {name}", +"specialist.demo_unit_ships_in_n_days":"La unidad demo llega en {n} días", +"specialist.dig_your_own_as_a_pioneer":"Excava la tuya como pionero (+{p}%) · {price} · {n} días", +"specialist.global_backbone":"Backbone global", +"specialist.includes_pops_at_the_landings_price":"Incluye POPs en los aterrizajes: {price}.", +"specialist.keep_it":"Mantener", +"specialist.low_latency_boutique":"Boutique de baja latencia", +"specialist.n_fiber_pairs":{"one":"{n} par de fibra","other":"{n} pares de fibra"}, +"specialist.part_owner_of_the_sea":"Copropietario del mar", +"specialist.pick":"Elegir", +"specialist.pick_a_charter":"Elige una carta", +"specialist.routes_r_of_n_beat_the":"Rutas financieras más rápidas por tu propia fibra que por cualquier camino alquilado: {r}/{n} · clientes de latencia que pagan: {c}/{m}", +"specialist.speed_of_light":"Velocidad de la luz", +"specialist.spotted_your_broadband_in_a_one":"Vieron tu banda ancha en {a}, una de las grandes ciudades de usuarios.", +"specialist.spotted_your_cap_of_dark_fiber":"Vieron tus {cap} de fibra oscura iluminada entre {a} y {b}.", +"specialist.spotted_your_ms_ms_a_b_path":"Vieron tu camino {a}–{b} de {ms} ms.", +"specialist.spotted_your_two_diverse_paths_a":"Vieron tus dos caminos diversos entre {a} y {b}.", +"specialist.take_a_seat_on_a_consortium":"Toma una plaza en un cable de consorcio", +"specialist.the_classic_game_grow_everywhere_and":"El juego clásico: crece en todas partes, los clientes siguen tu nivel y Tier 1 es la victoria.", +"specialist.the_consortium_runs_the_cable_your":"El consorcio opera el cable y sus repetidores. Tus pares los iluminas con tus propias ópticas; un corte en el cable también los corta.", +"specialist.the_vendor_ships_a_demo_name":"El fabricante envía un {name} de demostración en {n} días. Hasta que tu nivel lo alcance, cada unidad cuesta un {p}% más.", +"specialist.trading_firms_and_other_latency_customers":"Las firmas de trading y otros clientes de latencia llaman más a menudo y pagan un {p}% más. Gana Velocidad de la luz: supera la latencia alquilada más rápida en {r} rutas financieras con tu propia fibra mientras {c} clientes de latencia te pagan. Tier 1 sigue contando.", +"specialist.what_kind_of_network_are_you":"¿Qué tipo de red estás construyendo? Puedes elegir durante {n} días más; hasta entonces eres un Backbone global.", +"specialist.win_as_a_low_latency_boutique":"Gana como boutique de baja latencia", +"specialist.won_on_date_your_own_glass":"Ganado el {date}: tu propia fibra superó todos los caminos alquilados.", +"specialist.you_own_n_fiber_pairs_on":"Firmado: tienes {n} pares de fibra en {name}, {a} ⇄ {b}. Zarpan los buques cableros; listo en unos {d} días.", +"specialist.your_own_fiber_pairs_on_a":"Tus propios pares de fibra en un cable submarino nuevo: paga ahora tu parte de la obra e ilumínalos con tus ópticas cuando llegue a tierra.", +"specialist.your_own_glass_beats_every_leased":"Tu propia fibra supera todos los caminos alquilados en tres rutas financieras, y los traders pagan por ello. ¡La boutique ha ganado!", "supply_chain.as_when_you_started":"igual que cuando empezaste", "supply_chain.chip_shortage_every_router_vendor_is":"¡Escasez de chips!
Todos los fabricantes de routers esperan los mismos chips. Los routers nuevos y sus mejoras cuestan un 40 % más durante {n} días. Plazo de entrega: «sí».", "supply_chain.every_cable_ship_is_booked":"Todos los barcos cableros están reservados.
Los hiperescaladores han contratado todos los barcos cableros y cuadrillas de zanjas del planeta. La fibra y los cables nuevos cuestan un 30 % más durante {n} días.", diff --git a/site/i18n/fr.js b/site/i18n/fr.js index f4056b9..b24feae 100644 --- a/site/i18n/fr.js +++ b/site/i18n/fr.js @@ -1770,7 +1770,6 @@ "fiber_and_hardware.those_optics_need_the_regen_site":"Ces optiques ont besoin du site de régénération.
Retire d’abord les canaux longue distance, ou garde le site.", "fiber_modals.a_fiber_pair_of_your_own":"Une paire de fibres rien qu’à toi. Le verre ne coûte pas cher, le matériel si : tu achètes un système de ligne avec un amplificateur tous les {km} km, puis des optiques pour chaque canal. Ton matériel peut tomber en panne, et c’est toi qui répares.", "fiber_modals.a_fiber_pair_on_cable_km":"Une paire de fibres sur {cable}, {km} km. Elle partage le câble avec les longueurs d’onde de tout le monde, ancres comprises.", -"fiber_modals.build_your_own_level_3":"Construire la tienne niveau 3", "fiber_modals.build_your_own_price_n_days":"Construire la tienne {price} · ~{n} jours", "fiber_modals.dark_fiber_across_the_chinese_border":"La fibre noire à travers la frontière chinoise n’est pas à vendre. Achète plutôt une longueur d’onde transfrontalière.", "fiber_modals.dark_fiber_unlocks_at_customer_level":"La fibre noire se débloque au niveau clients 2. Il te faut la taille critique pour justifier l’achat de ton propre matériel optique.", @@ -3505,6 +3504,39 @@ "sold_out.tier_1s_never_peer_at_ixs":"Les Tier 1 ne font jamais de peering sur les IX", "sold_out.wants_need_gbps_of_traffic_from":"Veut ≥ {need} Gbps de trafic de ta part (tu en envoies {dem})", "sold_out.wants_you_to_be_a_tier":"Veut que tu sois Tier 2, ou que tu lui envoies ≥ {need} Gbps (tu en envoies {dem})", +"specialist.a_b_km_km_ready_in":"{a} ⇄ {b} · {km} km · environ {ms} ms · prêt dans environ {n} jours", +"specialist.a_consortium_is_selling_seats_on":"Un consortium vend des places sur {name}, un nouveau câble de {a} à {b}. Tes propres paires de fibre dessus, avant d'être Tier 1.", +"specialist.ask_for_a_demo_unit_p_n":"Unité de démo : +{p} %, {n} jours", +"specialist.charter_signed_name":"Charte signée : {name}.", +"specialist.consortium_seat":"Place au consortium", +"specialist.consortium_seat_name":"Place au consortium : {name}", +"specialist.demo_unit_ships_in_n_days":"L'unité de démo arrive dans {n} jours", +"specialist.dig_your_own_as_a_pioneer":"Creuse la tienne en pionnier (+{p} %) · {price} · {n} jours", +"specialist.global_backbone":"Backbone mondial", +"specialist.includes_pops_at_the_landings_price":"POPs aux atterrissements compris : {price}.", +"specialist.keep_it":"Garder", +"specialist.low_latency_boutique":"Boutique basse latence", +"specialist.n_fiber_pairs":{"one":"{n} paire de fibre","other":"{n} paires de fibre"}, +"specialist.part_owner_of_the_sea":"Copropriétaire de la mer", +"specialist.pick":"Choisir", +"specialist.pick_a_charter":"Choisis une charte", +"specialist.routes_r_of_n_beat_the":"Routes financières plus rapides sur ta propre fibre que tout chemin loué : {r}/{n} · clients latence qui paient : {c}/{m}", +"specialist.speed_of_light":"Vitesse de la lumière", +"specialist.spotted_your_broadband_in_a_one":"Ils ont repéré ton haut débit à {a}, une des grandes villes d'abonnés.", +"specialist.spotted_your_cap_of_dark_fiber":"Ils ont repéré tes {cap} de fibre noire allumée entre {a} et {b}.", +"specialist.spotted_your_ms_ms_a_b_path":"Ils ont repéré ton chemin {a}–{b} à {ms} ms.", +"specialist.spotted_your_two_diverse_paths_a":"Ils ont repéré tes deux chemins diversifiés entre {a} et {b}.", +"specialist.take_a_seat_on_a_consortium":"Prends une place sur un câble de consortium", +"specialist.the_classic_game_grow_everywhere_and":"Le jeu classique : grandis partout, les clients suivent ton niveau, et Tier 1 est la victoire.", +"specialist.the_consortium_runs_the_cable_your":"Le consortium exploite le câble et ses répéteurs. Tes paires, tu les allumes avec tes propres optiques ; une coupure du câble les coupe aussi.", +"specialist.the_vendor_ships_a_demo_name":"Le constructeur envoie un {name} de démo dans {n} jours. Tant que ton niveau ne l'a pas rattrapé, chaque unité coûte {p} % de plus.", +"specialist.trading_firms_and_other_latency_customers":"Les sociétés de trading et autres clients latence appellent plus souvent et paient {p} % de plus. Gagne Vitesse de la lumière : bats la latence louée la plus rapide sur {r} routes financières avec ta propre fibre pendant que {c} clients latence te paient. Tier 1 compte toujours.", +"specialist.what_kind_of_network_are_you":"Quel genre de réseau construis-tu ? Tu peux choisir encore {n} jours ; d'ici là tu es un Backbone mondial.", +"specialist.win_as_a_low_latency_boutique":"Gagne en boutique basse latence", +"specialist.won_on_date_your_own_glass":"Gagné le {date} : ta propre fibre a battu tous les chemins loués.", +"specialist.you_own_n_fiber_pairs_on":"Signé : tu possèdes {n} paires de fibre sur {name}, {a} ⇄ {b}. Les câbliers appareillent ; prêt dans environ {d} jours.", +"specialist.your_own_fiber_pairs_on_a":"Tes propres paires de fibre sur un nouveau câble sous-marin : paie ta part du chantier maintenant, allume-les avec tes optiques quand il atterrit.", +"specialist.your_own_glass_beats_every_leased":"Ta propre fibre bat tous les chemins loués sur trois routes financières, et les traders paient pour ça. La boutique a gagné !", "supply_chain.as_when_you_started":"comme à vos débuts", "supply_chain.chip_shortage_every_router_vendor_is":"Pénurie de puces !
Tous les fabricants de routeurs attendent les mêmes puces. Les routeurs neufs et les mises à niveau coûtent 40 % de plus pendant {n} jours. Délai de livraison : « oui ».", "supply_chain.every_cable_ship_is_booked":"Tous les câbliers sont réservés.
Les hyperscalers ont loué chaque câblier et chaque équipe de tranchée de la planète. Les nouvelles fibres et les nouveaux câbles coûtent 30 % de plus pendant {n} jours.", diff --git a/site/i18n/it.js b/site/i18n/it.js index fe99435..7f68acb 100644 --- a/site/i18n/it.js +++ b/site/i18n/it.js @@ -1770,7 +1770,6 @@ "fiber_and_hardware.those_optics_need_the_regen_site":"Quelle ottiche hanno bisogno del sito di rigenerazione.
Rimuovi prima i canali long-haul, oppure tieni il sito.", "fiber_modals.a_fiber_pair_of_your_own":"Una coppia di fibre tutta tua. Il vetro costa poco, l’hardware no: compri un sistema di linea con un amplificatore ogni {km} km, poi le ottiche per ogni canale. Il tuo hardware può guastarsi, e lo ripari tu.", "fiber_modals.a_fiber_pair_on_cable_km":"Una coppia di fibre su {cable}, {km} km. Condivide il cavo con le wave di tutti gli altri, ancore comprese.", -"fiber_modals.build_your_own_level_3":"Costruiscila tu livello 3", "fiber_modals.build_your_own_price_n_days":"Costruiscila tu {price} · ~{n} giorni", "fiber_modals.dark_fiber_across_the_chinese_border":"La dark fiber attraverso il confine cinese non è in vendita. Compra piuttosto una wave transfrontaliera.", "fiber_modals.dark_fiber_unlocks_at_customer_level":"La dark fiber si sblocca al livello clienti 2. Ti serve la scala per giustificare l’acquisto di hardware ottico tutto tuo.", @@ -3505,6 +3504,39 @@ "sold_out.tier_1s_never_peer_at_ixs":"I Tier 1 non fanno mai peering agli IX", "sold_out.wants_need_gbps_of_traffic_from":"Vuole ≥ {need} Gbps di traffico da te (ne mandi {dem})", "sold_out.wants_you_to_be_a_tier":"Vuole che tu sia un Tier 2, o che gli mandi ≥ {need} Gbps (ne mandi {dem})", +"specialist.a_b_km_km_ready_in":"{a} ⇄ {b} · {km} km · circa {ms} ms · pronto tra circa {n} giorni", +"specialist.a_consortium_is_selling_seats_on":"Un consorzio vende posti su {name}, un nuovo cavo da {a} a {b}. Coppie di fibra tue, prima di essere Tier 1.", +"specialist.ask_for_a_demo_unit_p_n":"Unità demo: +{p}%, {n} giorni", +"specialist.charter_signed_name":"Statuto firmato: {name}.", +"specialist.consortium_seat":"Posto nel consorzio", +"specialist.consortium_seat_name":"Posto nel consorzio: {name}", +"specialist.demo_unit_ships_in_n_days":"L'unità demo arriva tra {n} giorni", +"specialist.dig_your_own_as_a_pioneer":"Scava la tua da pioniere (+{p}%) · {price} · {n} giorni", +"specialist.global_backbone":"Backbone globale", +"specialist.includes_pops_at_the_landings_price":"POP agli approdi inclusi: {price}.", +"specialist.keep_it":"Tienilo", +"specialist.low_latency_boutique":"Boutique a bassa latenza", +"specialist.n_fiber_pairs":{"one":"{n} coppia di fibra","other":"{n} coppie di fibra"}, +"specialist.part_owner_of_the_sea":"Comproprietario del mare", +"specialist.pick":"Scegli", +"specialist.pick_a_charter":"Scegli uno statuto", +"specialist.routes_r_of_n_beat_the":"Rotte finanziarie più veloci sulla tua fibra che su qualsiasi percorso in affitto: {r}/{n} · clienti latenza paganti: {c}/{m}", +"specialist.speed_of_light":"Velocità della luce", +"specialist.spotted_your_broadband_in_a_one":"Hanno notato la tua banda larga a {a}, una delle grandi città di utenti.", +"specialist.spotted_your_cap_of_dark_fiber":"Hanno notato i tuoi {cap} di dark fiber accesa tra {a} e {b}.", +"specialist.spotted_your_ms_ms_a_b_path":"Hanno notato il tuo percorso {a}–{b} da {ms} ms.", +"specialist.spotted_your_two_diverse_paths_a":"Hanno notato i tuoi due percorsi diversi tra {a} e {b}.", +"specialist.take_a_seat_on_a_consortium":"Prendi un posto su un cavo di consorzio", +"specialist.the_classic_game_grow_everywhere_and":"Il gioco classico: cresci ovunque, i clienti seguono il tuo livello e Tier 1 è la vittoria.", +"specialist.the_consortium_runs_the_cable_your":"Il consorzio gestisce il cavo e i suoi ripetitori. Le tue coppie le accendi con le tue ottiche; un taglio del cavo taglia anche loro.", +"specialist.the_vendor_ships_a_demo_name":"Il vendor spedisce un {name} demo tra {n} giorni. Finché il tuo livello non lo raggiunge, ogni unità costa il {p}% in più.", +"specialist.trading_firms_and_other_latency_customers":"Le società di trading e gli altri clienti latenza chiamano più spesso e pagano il {p}% in più. Vinci Velocità della luce: batti la latenza in affitto più veloce su {r} rotte finanziarie con la tua fibra mentre {c} clienti latenza ti pagano. Tier 1 conta ancora.", +"specialist.what_kind_of_network_are_you":"Che rete stai costruendo? Puoi scegliere ancora per {n} giorni; fino ad allora sei un Backbone globale.", +"specialist.win_as_a_low_latency_boutique":"Vinci come boutique a bassa latenza", +"specialist.won_on_date_your_own_glass":"Vinto il {date}: la tua fibra ha battuto ogni percorso in affitto.", +"specialist.you_own_n_fiber_pairs_on":"Firmato: hai {n} coppie di fibra su {name}, {a} ⇄ {b}. Le navi posacavi salpano; pronto tra circa {d} giorni.", +"specialist.your_own_fiber_pairs_on_a":"Coppie di fibra tue su un nuovo cavo sottomarino: paga ora la tua quota della posa e accendile con le tue ottiche quando approda.", +"specialist.your_own_glass_beats_every_leased":"La tua fibra batte ogni percorso in affitto su tre rotte finanziarie, e i trader pagano per questo. La boutique ha vinto!", "supply_chain.as_when_you_started":"come quando hai iniziato", "supply_chain.chip_shortage_every_router_vendor_is":"Carenza di chip!
Tutti i produttori di router aspettano gli stessi chip. Router nuovi e upgrade costano il 40% in più per {n} giorni. Tempi di consegna: “sì”.", "supply_chain.every_cable_ship_is_booked":"Tutte le navi posacavi sono prenotate.
Gli hyperscaler hanno noleggiato ogni nave posacavi e ogni squadra di scavo del pianeta. Nuove fibre e nuovi cavi costano il 30% in più per {n} giorni.", diff --git a/site/i18n/pt.js b/site/i18n/pt.js index 1eadf43..d24c0e8 100644 --- a/site/i18n/pt.js +++ b/site/i18n/pt.js @@ -1770,7 +1770,6 @@ "fiber_and_hardware.those_optics_need_the_regen_site":"Essas ópticas precisam do site de regeneração.
Remova primeiro os canais long-haul, ou mantenha o site.", "fiber_modals.a_fiber_pair_of_your_own":"Um par de fibra só seu. O vidro é barato, o equipamento não: você compra um line system com um amplificador a cada {km} km, depois a óptica de cada canal. Seu equipamento pode falhar, e quem conserta é você.", "fiber_modals.a_fiber_pair_on_cable_km":"Um par de fibra no {cable}, {km} km. Divide o cabo com as waves de todo mundo, âncoras incluídas.", -"fiber_modals.build_your_own_level_3":"Construir a sua nível 3", "fiber_modals.build_your_own_price_n_days":"Construir a sua {price} · ~{n} dias", "fiber_modals.dark_fiber_across_the_chinese_border":"Dark fiber atravessando a fronteira chinesa não está à venda. Compre uma wave transfronteiriça.", "fiber_modals.dark_fiber_unlocks_at_customer_level":"Dark fiber desbloqueia no nível de clientes 2. Você precisa de escala para justificar comprar seu próprio equipamento óptico.", @@ -3505,6 +3504,39 @@ "sold_out.tier_1s_never_peer_at_ixs":"Tier 1 nunca faz peering em IX", "sold_out.wants_need_gbps_of_traffic_from":"Quer ≥ {need} Gbps de tráfego seu (você manda {dem})", "sold_out.wants_you_to_be_a_tier":"Quer que você seja Tier 2, ou que mande ≥ {need} Gbps para ele (você manda {dem})", +"specialist.a_b_km_km_ready_in":"{a} ⇄ {b} · {km} km · cerca de {ms} ms · pronto em cerca de {n} dias", +"specialist.a_consortium_is_selling_seats_on":"Um consórcio está vendendo lugares no {name}, um cabo novo de {a} a {b}. Seus próprios pares de fibra nele, antes de ser Tier 1.", +"specialist.ask_for_a_demo_unit_p_n":"Unidade demo: +{p}%, {n} dias", +"specialist.charter_signed_name":"Carta assinada: {name}.", +"specialist.consortium_seat":"Lugar no consórcio", +"specialist.consortium_seat_name":"Lugar no consórcio: {name}", +"specialist.demo_unit_ships_in_n_days":"A unidade demo chega em {n} dias", +"specialist.dig_your_own_as_a_pioneer":"Cave a sua como pioneiro (+{p}%) · {price} · {n} dias", +"specialist.global_backbone":"Backbone global", +"specialist.includes_pops_at_the_landings_price":"Inclui POPs nas estações de ancoragem: {price}.", +"specialist.keep_it":"Manter", +"specialist.low_latency_boutique":"Boutique de baixa latência", +"specialist.n_fiber_pairs":{"one":"{n} par de fibra","other":"{n} pares de fibra"}, +"specialist.part_owner_of_the_sea":"Coproprietário do mar", +"specialist.pick":"Escolher", +"specialist.pick_a_charter":"Escolha uma carta", +"specialist.routes_r_of_n_beat_the":"Rotas financeiras mais rápidas na sua fibra do que em qualquer caminho alugado: {r}/{n} · clientes de latência pagando: {c}/{m}", +"specialist.speed_of_light":"Velocidade da luz", +"specialist.spotted_your_broadband_in_a_one":"Eles viram sua banda larga em {a}, uma das grandes cidades de usuários.", +"specialist.spotted_your_cap_of_dark_fiber":"Eles viram seus {cap} de dark fiber acesa entre {a} e {b}.", +"specialist.spotted_your_ms_ms_a_b_path":"Eles viram seu caminho {a}–{b} de {ms} ms.", +"specialist.spotted_your_two_diverse_paths_a":"Eles viram seus dois caminhos diversos entre {a} e {b}.", +"specialist.take_a_seat_on_a_consortium":"Pegue um lugar num cabo de consórcio", +"specialist.the_classic_game_grow_everywhere_and":"O jogo clássico: cresça em todo lugar, os clientes seguem seu nível e Tier 1 é a vitória.", +"specialist.the_consortium_runs_the_cable_your":"O consórcio opera o cabo e seus repetidores. Seus pares você acende com suas próprias ópticas; um corte no cabo corta eles também.", +"specialist.the_vendor_ships_a_demo_name":"O fabricante envia um {name} de demonstração em {n} dias. Até seu nível alcançar, cada unidade custa {p}% a mais.", +"specialist.trading_firms_and_other_latency_customers":"Firmas de trading e outros clientes de latência ligam mais vezes e pagam {p}% a mais. Vença Velocidade da luz: supere a latência alugada mais rápida em {r} rotas financeiras com sua própria fibra enquanto {c} clientes de latência pagam você. Tier 1 continua valendo.", +"specialist.what_kind_of_network_are_you":"Que tipo de rede você está construindo? Você pode escolher por mais {n} dias; até lá você é um Backbone global.", +"specialist.win_as_a_low_latency_boutique":"Vença como boutique de baixa latência", +"specialist.won_on_date_your_own_glass":"Vencido em {date}: sua própria fibra superou todos os caminhos alugados.", +"specialist.you_own_n_fiber_pairs_on":"Assinado: você tem {n} pares de fibra no {name}, {a} ⇄ {b}. Os navios lançadores zarpam; pronto em cerca de {d} dias.", +"specialist.your_own_fiber_pairs_on_a":"Seus próprios pares de fibra num cabo submarino novo: pague agora sua parte da obra e acenda com suas ópticas quando ele chegar.", +"specialist.your_own_glass_beats_every_leased":"Sua própria fibra supera todos os caminhos alugados em três rotas financeiras, e os traders pagam por isso. A boutique venceu!", "supply_chain.as_when_you_started":"como no começo", "supply_chain.chip_shortage_every_router_vendor_is":"Falta de chips!
Todo fabricante de roteador está esperando os mesmos chips. Roteadores novos e upgrades custam 40% a mais por {n} dias. Prazo de entrega: “sim”.", "supply_chain.every_cable_ship_is_booked":"Todos os navios lançadores de cabo estão reservados.
Os hyperscalers contrataram todos os navios e todas as equipes de escavação do planeta. Novas fibras e novos cabos custam 30% a mais por {n} dias.", diff --git a/src/game/10-catalog/30-supply-chain.js b/src/game/10-catalog/30-supply-chain.js index 07f79e7..8fc363b 100644 --- a/src/game/10-catalog/30-supply-chain.js +++ b/src/game/10-catalog/30-supply-chain.js @@ -22,10 +22,10 @@ function hwCard(){if(!S||!rule('market')||(S.day<=HW_FREE&&!hwShock()&&!hwLock() :`

${tr('supply_chain.routers_optics_and_new_builds_at')}

${btn(tr('supply_chain.lock_prices_for_a_year_cost',{cost:fmt$(hwLockCost())}),'hwLock',{},'sm',S.cash`}
`;} // Routers past the standard cage (#157) need a cage extension: pricier to install, and rent on top. const RCAGE=6,CAGE_MUL=1.5,CAGE_MO=2000; -const routerCost=(g,rt)=>Math.round((ROUTER_COST+RG[g].cost*0.8)*((rt||1)>=RCAGE?CAGE_MUL:1)*hwMul('rt')); +const routerCost=(g,rt)=>Math.round((ROUTER_COST+RG[g].cost*0.8)*((rt||1)>=RCAGE?CAGE_MUL:1)*hwMul('rt')*techMul(RG[g].lvl)); const routerMo=g=>ROUTER_MO+RG[g].mo,cageMo=rt=>Math.max(0,(rt||1)-RCAGE)*CAGE_MO; // Old routers go on eBuy when you swap models or remove one (#82), like spare optics (#45). Chassis age faster. -const ROUTER_RESALE=0.3,tradeIn=(g,n)=>Math.round(RG[g].cost*n*ROUTER_RESALE),swapCost=(c,g)=>{const p=S.pops[c],rt=p.routers||1;return Math.max(0,Math.round(RG[g].cost*rt*hwMul('rt'))-tradeIn(p.rgen||0,rt));}; +const ROUTER_RESALE=0.3,tradeIn=(g,n)=>Math.round(RG[g].cost*n*ROUTER_RESALE),swapCost=(c,g)=>{const p=S.pops[c],rt=p.routers||1;return Math.max(0,Math.round(RG[g].cost*rt*hwMul('rt')*techMul(RG[g].lvl))-tradeIn(p.rgen||0,rt));}; const RMAX=16; // The plain, badge-less model of each class is the default upgrade path; the others are side-grades. const mainRG=k=>RG.findIndex(r=>r.cls===k&&!r.badge); diff --git a/src/game/10-catalog/50-dark-fiber.js b/src/game/10-catalog/50-dark-fiber.js index 246000f..f6286a9 100644 --- a/src/game/10-catalog/50-dark-fiber.js +++ b/src/game/10-catalog/50-dark-fiber.js @@ -8,7 +8,7 @@ const AMP_EVERY=100, AMP_COST=8000, AMP_MO=300; /* Your own trench holds more than one fiber pair (#35). Once a ROADMaster is full you can light the next pair: another ROADMaster and another chain of amplifiers, 64 more channels. Regen huts are shared. */ const isRdm=y=>y==='roadm'||y==='cl'; -const PAIRS_MAX=4,PAIRS_BIG=8,PAIRS_LV=12,SUB_PAIRS_MAX=8,SUB_PAIR_UP=1500000,pairsMax=l=>l.sub?SUB_PAIRS_MAX:lvl()>=PAIRS_LV?PAIRS_BIG:PAIRS_MAX,chMax=l=>DF_SYS[l.sys].max*(isRdm(l.sys)&&l.own?Math.max(1,l.pairs|0):1), +const PAIRS_MAX=4,PAIRS_BIG=8,PAIRS_LV=12,SUB_PAIRS_MAX=8,SUB_PAIR_UP=1500000,pairsMax=l=>l.seat?Math.max(1,l.pairs|0):l.sub?SUB_PAIRS_MAX:lvl()>=PAIRS_LV?PAIRS_BIG:PAIRS_MAX,chMax=l=>DF_SYS[l.sys].max*(isRdm(l.sys)&&l.own?Math.max(1,l.pairs|0):1), pairCost=l=>DF_SYS[isRdm(l.sys)?l.sys:'roadm'].cost+(l.sub?SUB_PAIR_UP:ampCount(l.km)*AMP_COST); const OPT={ zr4:{n:'Ackackia 400ZR+',g:400,cost:12000,reach:1500,modes:[[400,1500],[200,3000]],rg:1,lvl:2,sys:'lite',blurb:tr('dark_fiber.coherent_pluggable_in_the_router_no')}, diff --git a/src/game/60-features/35-capacity-deals.js b/src/game/60-features/35-capacity-deals.js index 68049f6..bdb5c51 100644 --- a/src/game/60-features/35-capacity-deals.js +++ b/src/game/60-features/35-capacity-deals.js @@ -26,7 +26,7 @@ function capOffer(a,b,t,nm){const T=BIZ_T[t],km=kmBetween(a,b),n=pick(T.opts),o= if(t==='capfib'){o.bw=1;o.slots=n;o.rate=Math.round(dfLeaseMo(km)*n*1.5);o.win=dfBuildDays(km)+150;} else{o.bw=t==='capw'?n*400:n;o.rate=Math.round((150+km*0.08)*T.km);o.win=t==='capsub'?300+Math.floor(Math.random()*121):180+Math.floor(Math.random()*91);} return o;} -function capDealTick(d){const q=S.capDeal;if(!q||q.at!==d)return;S.capDeal=null;const pool=(CAP_ROUTES[q.c]||[]).filter(r=>isCity(r[0])&&isCity(r[1])).slice(),out=[]; +function capDealTick(d){const q=S.capDeal;if(!q||q.at!==d)return;S.capDeal=null;seatConf(q.c);const pool=(CAP_ROUTES[q.c]||[]).filter(r=>isCity(r[0])&&isCity(r[1])).slice(),out=[]; while(out.length<3&&pool.length){const [a,b,t]=pool.splice(Math.floor(Math.random()*pool.length),1)[0],T=BIZ_T[t]; const nm=()=>{const list=T.names.filter(n=>!S.usedNames.includes(n)),n=list.length?pick(list):pick(T.names);useName(n);return n;};out.push(capOffer(a,b,t,nm));} if(!out.length)return;S.offers.push(...out); diff --git a/src/game/60-features/36-specialist.js b/src/game/60-features/36-specialist.js new file mode 100644 index 0000000..855834f --- /dev/null +++ b/src/game/60-features/36-specialist.js @@ -0,0 +1,96 @@ +/* ---------- Specialist play (#187, #173) ---------- + You do not have to grow everywhere to grow up. Customers call when your network can already serve them, not only + when your level says so; gear one level ahead comes early as a vendor demo unit at a premium; a seat on a + consortium cable is the way onto your own subsea glass before Tier 1; and a charter picks what you set out to be. */ +const FIN=['nyc','chi','lon','fra','tok','sin','hkg','ams','ash']; +// What a capability brings in, and why the offer says it came. +const SPOT_W={lat:N_('specialist.spotted_your_ms_ms_a_b_path'),df:N_('specialist.spotted_your_cap_of_dark_fiber'),div:N_('specialist.spotted_your_two_diverse_paths_a'),eye:N_('specialist.spotted_your_broadband_in_a_one')}; +const SPOT_BIG=12,SPOT_DF=0.75; +const latMaxOf=(a,b)=>+(kmBetween(a,b)/200*1.35).toFixed(1); +let BIGEYE=null;const bigEye=()=>BIGEYE||(BIGEYE=CITIES.slice().sort((x,y)=>y.P-x.P).slice(0,SPOT_BIG).map(c=>c.id)); +// Worked out at most once a day (and again when the network changes shape): offers spawn far less often than that. +let SPOTC=null; +function spots(){const lv=lvl(),k=S.day+'|'+lv+'|'+S.links.length+'|'+Object.keys(S.pops).length+'|'+charter();if(SPOTC&&SPOTC.s===S&&SPOTC.k===k)return SPOTC.v;const v=spots0(lv);SPOTC={s:S,k,v};return v;} +function spots0(lv){const out=[];if(gatesOpen()||S.scn)return out;const up=t=>BIZ_T[t].lv>lv,mine=Object.keys(S.pops); + if(up('hft')){const f=FIN.filter(c=>S.pops[c]);for(let i=0;iS.day||linkDown(l))continue;const g=dfCap(l); + for(const t of dci){const T=BIZ_T[t];if(g>=T.opts[0]*SPOT_DF&&(!T.div||reqCan('diverse',{city:l.a,city2:l.b})))out.push({t,a:l.a,b:l.b,k:'df',n:g});}} + if(up('sov')){const by={};for(const c of mine)(by[CITY[c].cc]=by[CITY[c].cc]||[]).push(c); + for(const cs of Object.values(by))for(let i=0;i=0.95)out.push({t:'cgame',a:c,b:null,k:'eye',n:0}); + return out;} +// A spotted customer starts at the smallest size its type comes in; your level makes them bigger and more frequent. +function spawnSpot(t,s){const T=BIZ_T[t],list=T.names.filter(n=>!S.usedNames.includes(n)),name=list.length?pick(list):pick(T.names);useName(name); + const o={id:uid(),city:s.a,city2:s.b,name,type:t,bw:T.opts[0],reqs:[],exp:S.day+40,spot:{k:s.k,n:s.n}}; + o.rate=T.l2?Math.round((150+kmBetween(s.a,s.b)*0.08)*T.km*(T.lat?latPay():1)*(T.div?1+REQS.diverse.bonus:1)):T.rate; + if(T.lat){o.reqs=['lat'];o.latMax=latMaxOf(s.a,s.b);}else if(T.div)o.reqs=['diverse']; + S.offers.push(o);} +function spotWhy(o){const s=o&&o.spot;if(!s||!own(SPOT_W,s.k))return ''; + return `
🔭 ${tr(SPOT_W[s.k],{ms:s.n,cap:fmtCap(s.n),a:CITY[o.city].name,b:o.city2?CITY[o.city2].name:''})}
`;} + +/* Vendor demo units: gear one level above yours, early, at a markup and after a short wait. Never two levels ahead. */ +const DEMO_MUL=1.6,DEMO_DAYS=14; +function demoItem(k,id){return k==='rg'?RG[+id]||null:k==='sys'?(own(DF_SYS,id)?DF_SYS[id]:null):k==='opt'?(own(OPT,id)?OPT[id]:null):null;} +const demoAt=(k,id)=>{const d=S&&S.demo&&S.demo[k+':'+id];return d===undefined?null:d;}; +const demoCan=L=>!gatesOpen()&&L===lvl()+1; +function techOk(k,id,L){if(L<=lvl())return true;const d=demoAt(k,id);return demoCan(L)&&d!==null&&d<=S.day;} +const techMul=L=>L>lvl()?DEMO_MUL:1; +function demoBtn(k,id,L,lock,cls){const d=demoAt(k,id);if(!demoCan(L))return btn(lock,'demoAsk',{k,id},cls,true); + if(d!==null&&d>S.day)return btn(tr('specialist.demo_unit_ships_in_n_days',{n:d-S.day}),'demoAsk',{k,id},cls,true); + return btn(tr('specialist.ask_for_a_demo_unit_p_n',{p:Math.round((DEMO_MUL-1)*100),n:leadDays(DEMO_DAYS)}),'demoAsk',{k,id},cls);} +const sysCost=k=>Math.round(DF_SYS[k].cost*techMul(DF_SYS[k].lvl)); +// Digging your own fiber before level 3: the pioneer pays for the permits nobody has asked for yet. +const PIONEER=1.6; +const digMul=()=>lvl()>=3?1:PIONEER,digCost=km=>Math.round(dfBuildCost(km)*digMul()); + +/* A seat on a consortium cable (#173): pay your share of the build, wait for the ship, and own fiber pairs on it, + lit with your own optics like your own cable. Capacity conferences offer them, and now and then a consortium calls. */ +const SEAT_ROUTES={ + lon:[['nyc','bde','Amity Ville'],['lis','for','Ella Fitz-Link'],['mrs','sin','Sea, Me, We, Us, Them'],['lon','lag','Equi-Not']], + hnl:[['syd','lax','Southern Double-Cross'],['tok','sea','Kuro-Show'],['sin','hkg','Dim Sum Express'],['syd','akl','Tasman Devil']], +}; +const SEAT_N=[1,2,4],SEAT_SHARE=10,SEAT_LV=2,SEAT_ODDS=240,SEAT_EXP=30; +const seatKm=(a,b)=>Math.round(kmBetween(a,b)*1.2),seatCost=(km,n)=>Math.round(ownCabCost(km)*n/SEAT_SHARE),seatMo=(km,n)=>Math.round(ownCabMo(km)*n/SEAT_SHARE),seatDays=km=>Math.max(1,Math.round(ownCabDays(km)*0.6)); +const seatRoute=name=>Object.values(SEAT_ROUTES).flat().find(r=>r[2]===name); +// A conference names its own routes; a cold call is about a route with one of your POPs at an end. Picked by a hash, not +// by the dice, so the rest of the game rolls exactly as before. +function seatOffer(c,d){const rs=(c?SEAT_ROUTES[c]||[]:Object.values(SEAT_ROUTES).flat()).filter(r=>isCity(r[0])&&isCity(r[1])&&(c||S.pops[r[0]]||S.pops[r[1]])&&!S.links.some(l=>l.seat&&l.cname===r[2])); + if(!rs.length)return null;const r=rs[hstr(S.asn+'|seat|'+d)%rs.length];return {a:r[0],b:r[1],name:r[2],km:seatKm(r[0],r[1]),exp:d+SEAT_EXP};} +function seatConf(c){if(S.seatOff||lvl()!S.pops[c]).reduce((x,c)=>x+popCost(c),0); + return `
🚢 ${tr('specialist.consortium_seat_name',{name:esc(o.name)})}
${tr('specialist.a_b_km_km_ready_in',{a:CITY[o.a].name,b:CITY[o.b].name,km:o.km.toLocaleString(),n:seatDays(o.km),ms:linkLat({kind:'df',own:true,sub:true,km:o.km,seaDesign:'standard'}).toFixed(1)})} · ${tr('ui.n_d_left',{n:o.exp-S.day})}
+
${tr('specialist.your_own_fiber_pairs_on_a')}${pop?' '+tr('specialist.includes_pops_at_the_landings_price',{price:fmt$(pop)}):''}
+
${SEAT_N.map(n=>{const c=seatCost(o.km,n)+pop;return btn(`${trn('specialist.n_fiber_pairs',n)} ${fmt$(c)} · ${tr('common.price_mo',{price:fmt$(seatMo(o.km,n))})}`,'seatBuy',{n},'sm',S.cash
`;} +function seatPanel(l){if(!l.seat)return '';return `
${tr('specialist.consortium_seat')}${esc(l.cname||'')} · ${trn('specialist.n_fiber_pairs',Math.max(1,l.pairs|0))}

${tr('specialist.the_consortium_runs_the_cable_your')}

`;} + +/* Charters: what the network sets out to be, picked once at the start of a Normal game. Global backbone is the game as + it always was; the Low-latency boutique sells speed to traders and has its own win, Speed of Light. */ +const CHARTERS={global:{i:'🌐',n:N_('specialist.global_backbone'),d:N_('specialist.the_classic_game_grow_everywhere_and')},boutique:{i:'⚡',n:N_('specialist.low_latency_boutique'),d:N_('specialist.trading_firms_and_other_latency_customers')}}; +const CHARTER_DAYS=30,LAT_PAY=1.4,SOL_ROUTES=3,SOL_CUST=2; +const charter=()=>S&&!S.scn&&S.mode==='normal'&&S.charter==='boutique'?'boutique':'global'; +const latPay=()=>charter()==='boutique'?LAT_PAY:1; +// The fastest a leased wave or fiber gets between two cities: overland, or the quickest cable on the route. +function leasedLat(a,b){let best=isSub(a,b)?Infinity:kmBetween(a,b)*1.25/200;for(const c of cablesFor(a,b))best=Math.min(best,c.km*Math.min(CAB[c.cid].lat||1,1.25)/200);return best;} +const ownGlass=l=>l.kind==='df'&&l.own&&l.ready<=S.day&&dfCap(l)>0; +let SOLC=null; +function solRoutes(){const k=S.day+'|'+S.links.length+'|'+S.links.reduce((n,l)=>n+(l.ch||[]).length,0);if(SOLC&&SOLC.s===S&&SOLC.k===k)return SOLC.v; + const f=FIN.filter(c=>S.pops[c]),v=[];if(S.links.some(ownGlass))for(let i=0;iS.biz.filter(b=>BIZ_T[b.type]&&BIZ_T[b.type].lat&&b.mood>=50&&reqOk(b)).length; +function charterCard(){if(S.scn||S.mode!=='normal')return ''; + if(!S.chartSet&&S.day<=CHARTER_DAYS)return `
${tr('specialist.pick_a_charter')}
${tr('specialist.what_kind_of_network_are_you',{n:CHARTER_DAYS-S.day})}
${Object.entries(CHARTERS).map(([k,C])=>`
${C.i} ${tr(C.n)}
${tr(C.d,{p:Math.round((LAT_PAY-1)*100),r:SOL_ROUTES,c:SOL_CUST})}
${btn(charter()===k?tr('specialist.keep_it'):tr('specialist.pick'),'charter',{k},k==='global'?'ghost sm':'pink sm')}
`).join('')}
`; + if(charter()!=='boutique')return ''; + if(S.solWon)return `
⚡ ${tr('specialist.speed_of_light')}
${tr('specialist.won_on_date_your_own_glass',{date:dateStr(S.solWon)})}
`; + const r=solRoutes();return `
⚡ ${tr('specialist.speed_of_light')}
${tr('specialist.routes_r_of_n_beat_the',{r:Math.min(r.length,SOL_ROUTES),n:SOL_ROUTES,c:Math.min(solCust(),SOL_CUST),m:SOL_CUST})}
${r.slice(0,SOL_ROUTES).map(x=>`
✓ ${CITY[x.a].name} ⇄ ${CITY[x.b].name}: ${tr('common.ms_ms_one_way',{ms:x.o.toFixed(1)})} < ${x.l.toFixed(1)}
`).join('')}
`;} +// Once a day: seats expire or call, and the boutique checks its win. +function specDay(d){if(S.seatOff&&S.seatOff.exp<=d)S.seatOff=null; + if(!S.seatOff&&!S.scn&&S.mode!=='puzzle'&&lvl()>=SEAT_LV&&hstr(S.asn+'|seatcall|'+d)%SEAT_ODDS===0)seatConf(null); + if(charter()==='boutique'&&!S.solWon&&solRoutes().length>=SOL_ROUTES&&solCust()>=SOL_CUST){S.solWon=Math.max(1,d);track('win_sol');toast(`⚡ ${tr('specialist.speed_of_light')}
${tr('specialist.your_own_glass_beats_every_leased')}`,'goal');sfx('coin');checkBadges();}} +// Saves: the charter, demo orders, a seat on offer and the boutique's win. Old saves are Global backbone, picked. +function specSanitize(s){s.charter=s.charter==='boutique'&&s.mode==='normal'&&!s.scn?'boutique':'global';s.chartSet=s.chartSet===false&&s.day<=CHARTER_DAYS?false:true; + const dm={};if(s.demo&&typeof s.demo==='object'&&!Array.isArray(s.demo))for(const key of Object.keys(s.demo).slice(0,64)){const [k,id]=key.split(':');if(demoItem(k,id)&&Number.isFinite(+s.demo[key]))dm[key]=Math.round(+s.demo[key]);}s.demo=dm; + const o=s.seatOff;s.seatOff=o&&typeof o==='object'&&typeof o.name==='string'&&seatRoute(o.name)&&seatRoute(o.name)[0]===o.a&&seatRoute(o.name)[1]===o.b?{a:o.a,b:o.b,name:o.name,km:seatKm(o.a,o.b),exp:num(o.exp,0)}:null; + s.solWon=Number.isFinite(+s.solWon)&&+s.solWon>0?Math.round(+s.solWon):0; + for(const l of s.links)if(l.seat!==undefined){if(l.seat===true&&l.kind==='df'&&l.own&&l.sub)l.pairs=Math.max(1,Math.min(Math.max(...SEAT_N),l.pairs|0));else delete l.seat;} + for(const b of [...s.biz,...s.offers])if(b.spot!==undefined){const x=b.spot;if(x&&typeof x==='object'&&own(SPOT_W,x.k))b.spot={k:x.k,n:num(x.n,0)};else delete b.spot;}} diff --git a/src/game/60-features/60-share-card.js b/src/game/60-features/60-share-card.js index 9f01726..1b86351 100644 --- a/src/game/60-features/60-share-card.js +++ b/src/game/60-features/60-share-card.js @@ -17,6 +17,7 @@ function shareCanvas(){const Wc=1200,Hc=630,cv=document.createElement('canvas'); // stats const got=BADGES.filter(b=>S.ach&&S.ach[b.id]!==undefined),rk={l:0,e:1,r:2,c:3},lv=b=>bvar(S.achP&&S.achP[b.id]).lv,top=got.slice().sort((a,b)=>rk[a.r]-rk[b.r]||lv(b)-lv(a)).slice(0,8); const rows=[[tr('common.peak_traffic'),fmtG(S.stats.peak||0)],[tr('common.peered'),pct(R.peerShare||0)],[tr('common.pops'),tr('share_card.n_in_r_regions',{n:Object.keys(S.pops).length,r:regionsCount()})],[tr('common.links'),String(S.links.length)],[tr('common.customers'),String(S.biz.length)],[tr('common.incidents_survived'),String(S.stats.survived||0)],[tr('common.shark_bites'),String(S.stats.sharks||0)],[tr('common.badges'),`${got.length}/${BADGES.length}`]]; + if(S.solWon)rows.unshift(['⚡ '+tr('specialist.speed_of_light'),dateStr(S.solWon)]); if(S.scn)rows.unshift([scnName(),S.scn.done?(S.scn.id==='weekly'?tr('share_card.score_v',{v:fmtG(S.scn.score||S.stats.peak||0)}):tr('features.done_in_d_days',{d:S.scn.done})):S.scn.failed?tr('share_card.not_this_time'):tr('common.in_progress')]); let y=150;for(const [k,v] of rows.slice(0,9)){g.fillStyle='#fff';g.strokeStyle='#1E2640';g.lineWidth=3;g.beginPath();g.roundRect?g.roundRect(770,y,390,42,12):g.rect(770,y,390,42);g.fill();g.stroke();g.fillStyle='#5A6280';g.font='800 18px Nunito, sans-serif';g.fillText(k,786,y+11);g.fillStyle='#1E2640';g.font='900 22px Nunito, sans-serif';const tw=g.measureText(v).width;g.fillText(v,1146-tw,y+9);y+=48;} // Badge variants show as a ring: frosted for Change Freeze, fiery for BGP at 3 a.m. diff --git a/src/game/60-features/80-new-game.js b/src/game/60-features/80-new-game.js index 9b4230a..a625c42 100644 --- a/src/game/60-features/80-new-game.js +++ b/src/game/60-features/80-new-game.js @@ -1,6 +1,6 @@ function newGame(name,home){ S={v:1,name,asn:200000+Math.floor(_rand()*15000),home,day:0,cash:START_CASH, ltv:2,t1v:3,auV:1,ops:opsNew(),achP:{},seen:NETS.map(n=>n.id),spares:{},pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{},pairMet:{}, - done:{},inc:[],ev:{ddosMore:[]},ddosStarts:[],priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubs:[],scrubMode:'always',capDeal:null,won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,inbox:{items:[],down:{},tiny:{},rep:0,bot:false,log:[],seq:0},hw:{},rules:makeRules('oncall')}; + done:{},inc:[],ev:{ddosMore:[]},ddosStarts:[],priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubs:[],scrubMode:'always',capDeal:null,won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,inbox:{items:[],down:{},tiny:{},rep:0,bot:false,log:[],seq:0},hw:{},rules:makeRules('oncall'),charter:'global',chartSet:false,demo:{},seatOff:null,solWon:0}; } diff --git a/src/game/80-simulation/50-sanitize.js b/src/game/80-simulation/50-sanitize.js index d83a3a8..434d745 100644 --- a/src/game/80-simulation/50-sanitize.js +++ b/src/game/80-simulation/50-sanitize.js @@ -83,6 +83,7 @@ function sanitize(s){ three Normal presets, unchanged (its validated mods kept). So an edited or imported save cannot stop the clock or print money. */ {const r=s.rules&&typeof s.rules==='object'&&!Array.isArray(s.rules)?s.rules:{}; const m={mods:r.mods};s.rules=s.scn&&typeof s.scn==='object'?makeRules('oncall',m):s.mode==='sandbox'?makeRules('sandbox',{...m,chaos:r.chaos}):makeRules(NORMAL_PRESETS.includes(r.preset)?r.preset:'oncall',m);} + specSanitize(s); if(s.te){if(typeof s.te!=='object')s.te=null;else{s.te.on=!!s.te.on;s.te.script=typeof s.te.script==='string'?s.te.script.slice(0,4000):'';}} return s;} function migrate(s){sanitize(s); diff --git a/src/game/80-simulation/80-geography-and-latency.js b/src/game/80-simulation/80-geography-and-latency.js index e98bdaa..db11458 100644 --- a/src/game/80-simulation/80-geography-and-latency.js +++ b/src/game/80-simulation/80-geography-and-latency.js @@ -45,4 +45,4 @@ function waveRoute(a,b,mult,border){const cabs=cablesOk(a,b),sub=isSub(a,b);let function viaSeg(a,b){const cabs=cablesOk(a,b),sub=isSub(a,b);if(!cabs.length)return landMult(a,b)>1?`

${landWhy(a,b)}

`:'';const wr=waveRoute(a,b,1,false); const opts=(sub?[]:[{v:'land',l:`${tr('common.overland')} ${landMult(a,b)>1?landMult(a,b)+'× · ':''}${(kmBetween(a,b)*1.3/200).toFixed(1)} ms`}]).concat(cabs.map(c=>({v:c.cid,l:`${esc(CAB[c.cid].name)} ${CAB[c.cid].price}× · ${(c.km*(CAB[c.cid].lat||1)/200).toFixed(1)} ms${CAB[c.cid].age==='old'?' · '+tr('geography_and_latency.old_cuts_often'):''}`}))); return `

${tr('common.route')}

${opts.map(o=>btn(o.l,'via',{v:o.v},wr&&wr.via===o.v?'pink':'ghost')).join('')}
${wr&&wr.cab?`

${esc(CAB[wr.cab].blurb)} ${tr('geography_and_latency.all_your_waves_on_one_cable')}

`:''}`;} -function bestLat(a,b){const ls=S.links.filter(l=>!linkDown(l));const dist={[a]:0},done=new Set();for(;;){let u=null,ud=Infinity;for(const k in dist)if(!done.has(k)&&dist[k]!linkDown(l)&&(!f||f(l)));const dist={[a]:0},done=new Set();for(;;){let u=null,ud=Infinity;for(const k in dist)if(!done.has(k)&&dist[k]i<=RG[S.pops[c]?(S.pops[c].rgen||0):0].maxLT);} function waveNeed(i){const g=RG.find(r=>r.maxLT>=i);return g?tr('sites_and_service.pn_routers',{pn:g.pn}):'?';} function routerModels(c){const p=S.pops[c],g=p.rgen||0,rt=p.routers||1; - return `
${RG.map((M,i)=>{if(i===g)return '';const why=modelFits(c,i),lk=M.lvl>lvl(); - return `
${esc(M.n)} ${M.pn} · ${tr('sites_and_service.n_ports',{n:M.ports})} · ${fmtG(M.cap)} · ${tr('sites_and_service.boots_in_n_min',{n:M.boot})}${M.flaky?' · '+tr('common.crashes_more'):''}
${esc(M.blurb)}
${why?`
${esc(why)}
`:''}
${btn(lk?tr('sites_and_service.level_n',{n:M.lvl}):tr('sites_and_service.swap_cost_mo_mo',{cost:fmt$(swapCost(c,i)),mo:fmt$(M.mo*rt)}),'upRouter',{city:c,g:i},'sm',lk||!!why||S.cash`;}).join('')}
`;} + return `
${RG.map((M,i)=>{if(i===g)return '';const why=modelFits(c,i),lk=!techOk('rg',i,M.lvl); + return `
${esc(M.n)} ${M.pn} · ${tr('sites_and_service.n_ports',{n:M.ports})} · ${fmtG(M.cap)} · ${tr('sites_and_service.boots_in_n_min',{n:M.boot})}${M.flaky?' · '+tr('common.crashes_more'):''}
${esc(M.blurb)}
${why?`
${esc(why)}
`:''}
${lk?demoBtn('rg',i,M.lvl,tr('sites_and_service.level_n',{n:M.lvl}),'sm'):btn(tr('sites_and_service.swap_cost_mo_mo',{cost:fmt$(swapCost(c,i)),mo:fmt$(M.mo*rt)}),'upRouter',{city:c,g:i},'sm',!!why||S.cash`;}).join('')}
`;} function portNote(c){const p=S.pops[c];if(!p)return '';const g=p.rgen||0;return RG[g].maxP${tr('sites_and_service.your_model_here_tops_out_at',{model:esc(RG[g].n),pn:RG[g].pn})}

`:'';} // Service: what you deliver, times how it feels. Traffic backhauled far to transit is slow, and users notice. const latSlow=c=>!!(R&&R.latF&&R.latF[c]<0.97&&R.latFar[c]); diff --git a/src/game/88-days/10-day-tick.js b/src/game/88-days/10-day-tick.js index 3aab042..eb2c34c 100644 --- a/src/game/88-days/10-day-tick.js +++ b/src/game/88-days/10-day-tick.js @@ -71,6 +71,7 @@ function dayTick(){ checkGoals(); scnTick(d); confTick(d); + specDay(d); // money trouble if(S.cash<0){S.neg++;if(S.neg===1)toast(tr('day_tick.you_are_in_the_red_cancel'),'bad');} else S.neg=0; @@ -89,7 +90,10 @@ function spawnOffer(){ // Countries with thousands of ASNs (Brazil's provedores, US regionals) are full of small ISPs shopping for transit. const dense=mine.filter(c=>(CITY_PDB[c]||[])[2]>=2000);if(lv>=2&&dense.length)types.push('isp'); const fabC=mine.filter(c=>FABS.some(f=>f.cities.includes(c)));if(lv>=2&&fabC.length){types.push('fabip','fabip');if(mine.length>=2)types.push('fabl2');} + // What your network can already serve calls too, at a lower weight and the smallest size (#187). + const sp=spots(),spT=[...new Set(sp.map(s=>s.t))],bq=charter()==='boutique';for(const x of spT){types.push(x);if(x==='hft'&&bq)types.push(x,x);}if(bq&&lv>=2)types.push('hft','hft'); const t=pick(types),T=BIZ_T[t]; + if(T.lv>lv&&spT.includes(t)){spawnSpot(t,pick(sp.filter(s=>s.t===t)));return;} if(T.event||T.sdwan||T.fiber||T.mega){spawnSpecial(t);return;} if(T.nni){const city=pick(fabC),prov=pick(FABS.filter(f=>f.cities.includes(city))).id,bw=pick(T.opts),others=mine.filter(c=>c!==city),city2=T.l2&&others.length?pick(others):null;if(T.l2&&!city2)return; const base=pick(BIZ_N.filter(n=>!S.usedNames.includes(n)).concat(BIZ_N)).replace(/ (Inc\.|Co\.|Ltd)$/,'');const name=tr('day_tick.name_via_fab',{name:base,fab:FAB[prov].name});useName(base); @@ -104,7 +108,7 @@ function spawnOffer(){ if(t==='provedor')city=pick(br); if(t==='isp'&&dense.length&&Math.random()<0.5)city=pick(dense); if(t==='hft'){const fin=['nyc','chi','lon','fra','tok','sin','hkg','ams','ash'],mf=mine.filter(c=>fin.includes(c));city=mf.length?pick(mf):pick(mine);city2=pick(fin.filter(c=>c!==city));} - let rate=T.l2?Math.round((150+kmBetween(city,city2)*0.08)*T.km):T.rate; + let rate=T.l2?Math.round((150+kmBetween(city,city2)*0.08)*T.km*(T.lat?latPay():1)):T.rate; if(CITY[city].au&&!T.l2&&!T.fiber&&!T.event){rate=Math.round(rate*AU_ARPU);bw=Math.min(bw,pick(T.opts.slice(0,2)));} if(T.div&&!reqCan('diverse',{city,city2}))return; const reqs=T.div?['diverse']:T.lat?['lat']:[];if((t==='hyper'||t==='ai'||t==='gpu')&&Math.random()<0.4)reqs.push('metro');const pool=Object.keys(REQS).filter(k=>!reqs.includes(k)&&!REQS[k].only&&(!REQS[k].l2||T.l2)&&(!REQS[k].ip||!T.l2)&&reqCan(k,{city,city2})); diff --git a/src/game/88-days/20-badges.js b/src/game/88-days/20-badges.js index 0de9fa4..0492fe1 100644 --- a/src/game/88-days/20-badges.js +++ b/src/game/88-days/20-badges.js @@ -26,6 +26,8 @@ const BADGES=[ {id:'giants',i:'🏭',t:tr('badges.friend_of_giants'),d:tr('badges.hold_deals_at_3_different_ai'),r:'e',ok:()=>new Set(S.biz.filter(b=>BIZ_T[b.type]&&BIZ_T[b.type].mega).flatMap(b=>bCities(b))).size>=3}, {id:'landlord',i:'🧵',t:tr('common.trench_landlord'),d:tr('badges.lease_hundreds_of_fiber_pairs_to'),r:'e',ok:()=>S.biz.some(b=>b.type==='pairs')}, {id:'t1',i:'👑',t:tr('common.tier_1'),d:tr('badges.go_transit_free'),r:'e',ok:()=>!!S.won}, + {id:'sol',i:'⚡',t:tr('specialist.speed_of_light'),d:tr('specialist.win_as_a_low_latency_boutique'),r:'e',ok:()=>!!S.solWon}, + {id:'seat',i:'🚢',t:tr('specialist.part_owner_of_the_sea'),d:tr('specialist.take_a_seat_on_a_consortium'),r:'r',ok:()=>S.links.some(l=>l.seat)}, {id:'bait',i:'🎣',t:tr('common.shark_bait'),d:tr('badges.get_bitten_by_sharks_3_times'),r:'l',ok:()=>(st().sharks||0)>=3}, {id:'nines',i:'💎',t:tr('common.five_nines'),d:tr('badges.serve_99_5_of_demand_every'),r:'l',ok:()=>(st().clean||0)>=365}, {id:'fifty',i:'🗺️',t:tr('badges.everywhere_at_once'),d:tr('badges.have_pops_in_50_cities'),r:'l',ok:()=>Object.keys(S.pops).length>=50}, diff --git a/src/game/90-actions/85-routing-and-routers.js b/src/game/90-actions/85-routing-and-routers.js index 8883dac..f0a8041 100644 --- a/src/game/90-actions/85-routing-and-routers.js +++ b/src/game/90-actions/85-routing-and-routers.js @@ -6,7 +6,7 @@ Object.assign(ACT,{ addRouter:({city})=>{const p=S.pops[city];if(!p||(p.routers||1)>=RMAX)return;if(!spend(routerCost(p.rgen||0,p.routers||1)))return;p.routers=(p.routers||1)+1;floater(CITY[city].x,CITY[city].y-30,tr('common.router_added'),'#FF4F9A');after();}, models:()=>{UI.models=!UI.models;renderPanel();}, rmRouter:({city})=>{const p=S.pops[city];if(!p||(p.routers||1)<=1)return;if(portsUsed(city)>portsMax(city,undefined,p.routers-1)){toast(tr('routing_and_routers.unplug_something_first_used_ports',{used:fmtPorts(portsUsed(city)),max:portsMax(city,undefined,p.routers-1)}),'bad');sfx('err');return;}p.routers--;{const back=tradeIn(p.rgen||0,1);if(back>0){S.cash+=back;toast(tr('routing_and_routers.sold_a_model_on_ebuy_price',{model:esc(RG[p.rgen||0].n),price:fmt$(back)}),'good');}}after();}, - upRouter:({city,g})=>{const p=S.pops[city];if(!p)return;g=g===undefined?mainRG(RG[p.rgen||0].cls+1):+g;if(!RG[g]||g===(p.rgen||0))return;{const why=modelFits(city,g);if(why){toast(tr('routing_and_routers.the_model_won_t_fit_why',{model:esc(RG[g].n),why:esc(why)}),'bad');sfx('err');return;}}if(RG[g].lvl>lvl()){toast(tr('routing_and_routers.model_unlocks_at_customer_level_lv',{model:esc(RG[g].n),lv:RG[g].lvl}),'bad');sfx('err');return;} + upRouter:({city,g})=>{const p=S.pops[city];if(!p)return;g=g===undefined?mainRG(RG[p.rgen||0].cls+1):+g;if(!RG[g]||g===(p.rgen||0))return;{const why=modelFits(city,g);if(why){toast(tr('routing_and_routers.the_model_won_t_fit_why',{model:esc(RG[g].n),why:esc(why)}),'bad');sfx('err');return;}}if(!techOk('rg',g,RG[g].lvl)){toast(tr('routing_and_routers.model_unlocks_at_customer_level_lv',{model:esc(RG[g].n),lv:RG[g].lvl}),'bad');sfx('err');return;} const rt=p.routers||1,old=p.rgen||0;if(p.rupDay===S.day){toast(tr('routing_and_routers.the_new_routers_in_city_are',{city:CITY[city].name}),'bad');sfx('err');return;}const back=tradeIn(old,rt);if(!spend(swapCost(city,g)))return;p.rgen=g;p.rupDay=S.day;if(back>0)toast(tr('routing_and_routers.sold_the_old_model_on_ebuy',{model:esc(RG[old].n),price:fmt$(back)}),'good'); if(rt===1&&popIdle(city))toast(tr('routing_and_routers.new_router_in_city_swapped_before',{city:CITY[city].name}),'good'); else if(rt===1){const sl=slowBoot(city),dd=sl?3:1;p.down=Math.max(p.down||0,S.day+dd);addInc({type:'maint',ref:city,until:S.day+dd,msg:sl?tr('routing_and_routers.swapping_the_only_router_in_city',{city:CITY[city].name,model:RG[g].n,how:pick(SLOW_BOOT),n:dd}):tr('routing_and_routers.swapping_the_only_router_in_city_d5b5',{city:CITY[city].name,model:RG[g].n}),cost:0});toast(`${tr('routing_and_routers.maintenance_window_in_city',{city:CITY[city].name})}
${sl?tr('routing_and_routers.one_router_and_this_one_takes',{n:dd}):tr('routing_and_routers.one_router_means_downtime_during_the')}`,'bad');} diff --git a/src/game/90-actions/86-specialist.js b/src/game/90-actions/86-specialist.js new file mode 100644 index 0000000..9737a11 --- /dev/null +++ b/src/game/90-actions/86-specialist.js @@ -0,0 +1,11 @@ +Object.assign(ACT,{ + demoAsk:({k,id})=>{const it=demoItem(k,id);if(!it||!demoCan(it.lvl)||demoAt(k,id)!==null)return;S.demo=S.demo||{};const at=S.day+leadDays(DEMO_DAYS);S.demo[k+':'+id]=at; + toast(tr('specialist.the_vendor_ships_a_demo_name',{name:esc(it.n),n:at-S.day,p:Math.round((DEMO_MUL-1)*100)}),'good');after();}, + seatBuy:({n})=>{const o=S.seatOff;n=+n;if(!o||o.exp<=S.day||!SEAT_N.includes(n))return;const miss=[o.a,o.b].filter(c=>!S.pops[c]),cost=seatCost(o.km,n)+miss.reduce((x,c)=>x+popCost(c),0);if(!spend(cost))return; + for(const c of miss)S.pops[c]={day:S.day,bb:null,boost:0,down:0,routers:1,gen:false,rgen:0}; + const id=uid(),days=seatDays(o.km);S.links.push({id,a:o.a,b:o.b,kind:'df',own:true,sub:true,seat:true,seaDesign:'standard',sys:'roadm',ch:[],km:o.km,cable:null,cname:o.name,mo:seatMo(o.km,n),trench:'seat:'+id,cut:0,day:S.day,ready:S.day+days,spares:false,pairs:n,paid:seatCost(o.km,n)}); + S.seatOff=null;S.stats.seats=(S.stats.seats||0)+1;UI.sel={type:'link',id}; + toast(tr('specialist.you_own_n_fiber_pairs_on',{n,name:esc(o.name),a:CITY[o.a].name,b:CITY[o.b].name,d:days}),'goal');sfx('build');after();}, + seatNo:()=>{S.seatOff=null;after();}, + charter:({k})=>{if(!own(CHARTERS,k)||S.chartSet||S.scn||S.mode!=='normal')return;S.charter=k;S.chartSet=true;toast(tr('specialist.charter_signed_name',{name:tr(CHARTERS[k].n)}),'good');after();}, +}); diff --git a/src/game/90-actions/87-fiber-and-hardware.js b/src/game/90-actions/87-fiber-and-hardware.js index d51e5ce..46e3bad 100644 --- a/src/game/90-actions/87-fiber-and-hardware.js +++ b/src/game/90-actions/87-fiber-and-hardware.js @@ -1,7 +1,7 @@ Object.assign(ACT,{ dfMode:({m})=>{UI.lmode=m;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, seaPackage:({k})=>{if(!own(SUB_UPGRADES,k))return;UI['sea'+k]=!UI['sea'+k];if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, - subUpgrade:({id,k})=>{const l=S.links.find(l=>l.id===id);if(!l||l.kind!=='df'||!l.own||!l.sub||!own(SUB_UPGRADES,k)||lvl()<4||l['sub'+k]!==undefined)return;if(!spend(subUpgradeCost(l,k)))return;l.paid=(l.paid>0?l.paid:ownCabCost(l.km))+subUpgradeCost(l,k);l['sub'+k]=Math.max(S.day,l.ready||0)+leadDays(SUB_UPGRADES[k].days);after();}, + subUpgrade:({id,k})=>{const l=S.links.find(l=>l.id===id);if(!l||l.kind!=='df'||!l.own||!l.sub||l.seat||!own(SUB_UPGRADES,k)||lvl()<4||l['sub'+k]!==undefined)return;if(!spend(subUpgradeCost(l,k)))return;l.paid=(l.paid>0?l.paid:ownCabCost(l.km))+subUpgradeCost(l,k);l['sub'+k]=Math.max(S.day,l.ready||0)+leadDays(SUB_UPGRADES[k].days);after();}, seaDesign:({v})=>{if(!own(SEA_DESIGNS,v))return;UI.seaDesign=v;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, ownCab:()=>{UI.lmode='df';UI.dfSrc='cable';UI.seaDesign='standard';UI.seaterminal=UI.seaengineering=false;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, dfSrc:({v})=>{UI.dfSrc=v;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, @@ -14,8 +14,8 @@ Object.assign(ACT,{ S.stats.ownCab=(S.stats.ownCab||0)+1;UI.dfSrc='lease';closeModal();UI.sel={type:'link',id}; toast(tr('fiber_and_hardware.the_ship_sets_sail_name_your',{ship,name:cname,km:km.toLocaleString(),a:CITY[a].name,b:CITY[b].name,n:days}),'goal');sfx('build');after();}, orderDf:()=>{const p=UI.pending;if(!p)return;const {a,b}=p;if(!dfAllowed(a,b))return;const sc=isSub(a,b)?subDfCable(a,b):null,km=sc?sc.km:kmBetween(a,b); - const own=UI.dfSrc==='build'&&lvl()>=3&&!sc,sys=DF_SYS[UI.dfSys]&&DF_SYS[UI.dfSys].lvl<=lvl()?UI.dfSys:'lite';if(lvl()<2)return; - const up=(own?dfBuildCost(km):0)+DF_SYS[sys].cost+ampCount(km)*AMP_COST+(S.pops[b]?0:popCost(b));if(!spend(up))return; + const own=UI.dfSrc==='build'&&!sc,sys=DF_SYS[UI.dfSys]&&techOk('sys',UI.dfSys,DF_SYS[UI.dfSys].lvl)?UI.dfSys:'lite';if(lvl()<2)return; + const up=(own?digCost(km):0)+sysCost(sys)+ampCount(km)*AMP_COST+(S.pops[b]?0:popCost(b));if(!spend(up))return; if(!S.pops[b])S.pops[b]={day:S.day,bb:null,boost:0,down:0,routers:1,gen:false,rgen:0}; const sib=pairLinks(a,b).filter(l=>l.kind!=='vxc'),id=uid(); const l={id,a,b,kind:'df',own,sys,ch:[],km,sub:!!sc,cable:sc?sc.cid:null,mo:own?Math.round(km*0.15):dfLeaseMo(km),trench:sc?'cab:'+sc.cid:id,cut:0,day:S.day,ready:S.day+(own?dfBuildDays(km):leadDays(IRU_DAYS)),spares:false}; @@ -27,10 +27,10 @@ Object.assign(ACT,{ addCh:({id,o})=>{const l=S.links.find(x=>x.id===id),O=OPT[o];if(!l||!O||l.kind!=='df')return;const why=chWhy(l,o);if(why){toast(tr('fiber_and_hardware.can_t_add_optic_why',{optic:O.n,why:esc(why)}),'bad');sfx('err');return;}if(!portGate(l.a,1)||!portGate(l.b,1))return;const sp=spareN(o)>0;if(!spend(chCost(l,o)))return;if(sp)S.spares[o]--;(l.ch=l.ch||[]).push(o);floater((CITY[l.a].x+CITY[l.b].x)/2,(CITY[l.a].y+CITY[l.b].y)/2-20,`+${O.n}`,'#FF4F9A');after();}, rmCh:({id,o})=>{const l=S.links.find(x=>x.id===id);if(!l||!OPT[o])return;const i=(l.ch||[]).lastIndexOf(o);if(i<0)return;l.ch.splice(i,1);S.spares=S.spares||{};S.spares[o]=(S.spares[o]||0)+1;floater((CITY[l.a].x+CITY[l.b].x)/2,(CITY[l.a].y+CITY[l.b].y)/2-20,tr('fiber_and_hardware.optic_to_spares',{optic:OPT[o].n}),'#7B61FF');after();}, hwLock:()=>{if(hwLock())return;const c=hwLockCost();if(!spend(c))return;S.hw=S.hw||{};S.hw.lock={until:S.day+HW_LOCK_DAYS,mul:hwTrend(S.day)};toast(tr('fiber_and_hardware.prices_locked_until_date_your_vendor',{date:dateStr(S.hw.lock.until)}),'good');after();}, - buySpare:({o})=>{if(!OPT[o]||OPT[o].lvl>lvl()||spareN(o)>=64)return;if(!spend(optCost(o)))return;S.spares=S.spares||{};S.spares[o]=(S.spares[o]||0)+1;sfx('build');after();}, + buySpare:({o})=>{if(!OPT[o]||!techOk('opt',o,OPT[o].lvl)||spareN(o)>=64)return;if(!spend(optCost(o)))return;S.spares=S.spares||{};S.spares[o]=(S.spares[o]||0)+1;sfx('build');after();}, sellSpare:({o})=>{if(!OPT[o]||spareN(o)<1)return;S.spares[o]--;const v=spareValue(o);S.cash+=v;toast(tr('fiber_and_hardware.sold_a_spare_optic_on_ebuy',{optic:OPT[o].n,price:fmt$(v),p:pct(SPARE_RESALE)}),'good');sfx('coin');after();}, addPair:({id})=>{const l=S.links.find(x=>x.id===id);if(!l||l.kind!=='df'||!l.own||!isRdm(l.sys)||l.ready>S.day)return;const n=Math.max(1,l.pairs|0);if(n>=pairsMax(l))return;if((l.ch||[]).length+soldSlots(l){const l=S.links.find(x=>x.id===id),to=l&&sysNext(l);if(!to||DF_SYS[to].lvl>lvl())return;if(!spend(sysUpCost(l)))return;l.sys=to;if(l.ready<=S.day){l.eqDown=S.day+1;toast(tr('fiber_and_hardware.line_system_swap_all_channels_are'),'bad');}after();}, + upSys:({id})=>{const l=S.links.find(x=>x.id===id),to=l&&sysNext(l);if(!to||!techOk('sys',to,DF_SYS[to].lvl))return;if(!spend(sysUpCost(l)))return;l.sys=to;if(l.ready<=S.day){l.eqDown=S.day+1;toast(tr('fiber_and_hardware.line_system_swap_all_channels_are'),'bad');}after();}, spares:({id})=>{const l=S.links.find(x=>x.id===id);if(!l)return;l.spares=!l.spares;sfx('click');after();}, crews:({id,all})=>{const l=S.links.find(x=>x.id===id);if(!l||l.kind!=='df'||!l.own||l.ready<=S.day+1)return;const n=all?crewSteps(l):1,c=n*crewCost(l);if(!spend(c))return;const ready=Math.max(S.day+1,l.ready-30*n),saved=l.ready-ready;setCableReady(l,ready);toast(trn('fiber_and_hardware.more_crews_on_site_construction_is',saved,{n:saved}),'good');after();}, addGen:({city})=>{const p=S.pops[city];if(!p||p.gen)return;if(!spend(GEN_COST))return;p.gen=true;floater(CITY[city].x,CITY[city].y-30,tr('common.generator'),'#FF8A3D');after();}, diff --git a/src/game/90-actions/90-action-helpers.js b/src/game/90-actions/90-action-helpers.js index 32e9458..c92ff51 100644 --- a/src/game/90-actions/90-action-helpers.js +++ b/src/game/90-actions/90-action-helpers.js @@ -13,12 +13,12 @@ function dfAllowed(a,b){if(isSub(a,b))return !!subDfCable(a,b);return cnCity(a)= for free (only the regen sites' transponders are new), or you sell it on eBuy for part of the price. */ const SPARE_RESALE=0.4,spareN=o=>(S&&S.spares&&S.spares[o])|0,spareValue=o=>Math.round(optCost(o)*SPARE_RESALE); function chCost(l,o){const r=REGEN_CH*(l.regen|0);return Math.round(optCost(o)*(spareN(o)>0?r:1+r));} -function optCost(o){return Math.round(OPT[o].cost*hwMul('opt')*(S&&S.ev&&S.ev.tariff>S.day?1.4:1));} +function optCost(o){return Math.round(OPT[o].cost*techMul(OPT[o].lvl)*hwMul('opt')*(S&&S.ev&&S.ev.tariff>S.day?1.4:1));} // Line systems upgrade in place: Rainbow → ROADMaster → C+L. Every lit pair gets the new gear. -const sysNext=l=>l.sys==='lite'?'roadm':l.sys==='roadm'?'cl':null,sysUpCost=l=>{const t=sysNext(l);return t?DF_SYS[t].cost*(t==='cl'&&l.own?Math.max(1,l.pairs|0):1):0;}; +const sysNext=l=>l.sys==='lite'?'roadm':l.sys==='roadm'?'cl':null,sysUpCost=l=>{const t=sysNext(l);return t?sysCost(t)*(t==='cl'&&l.own?Math.max(1,l.pairs|0):1):0;}; function pairBtn(l){if(!l.own||!isRdm(l.sys)||l.ready>S.day)return '';const n=Math.max(1,l.pairs|0);if(n>=pairsMax(l))return `${tr('action_helpers.n_fiber_pairs_lit_the_trench',{n})}`; const full=(l.ch||[]).length+soldSlots(l)>=chMax(l),c=pairCost(l);return btn(l.sub?tr('action_helpers.light_fiber_pair_n_price',{n:n+1,price:fmt$(c)}):tr('action_helpers.light_fiber_pair_n_price_mo',{n:n+1,price:fmt$(c),mo:fmt$(ampCount(l.km)*AMP_MO)}),'addPair',{id:l.id},full?'pink sm':'ghost sm',!full||S.cashlvl())return tr('action_helpers.unlocks_at_customer_level_n',{n:O.lvl});if(O.sys==='roadm'&&!isRdm(l.sys))return tr('action_helpers.needs_a_roadmaster_9000_line_system');if(!optMode(o,l)){const mx=optModes(o,l).at(-1)[1];if(l.sub&&l.own)return tr('action_helpers.this_channel_reaches_max_km_on',{max:mx.toLocaleString(),span:spanKm(l).toLocaleString()});return tr('action_helpers.too_far_even_at_its_slowest',{span:spanKm(l).toLocaleString(),max:mx.toLocaleString()});} +function chWhy(l,o){const O=OPT[o];if(!techOk('opt',o,O.lvl))return tr('action_helpers.unlocks_at_customer_level_n',{n:O.lvl});if(O.sys==='roadm'&&!isRdm(l.sys))return tr('action_helpers.needs_a_roadmaster_9000_line_system');if(!optMode(o,l)){const mx=optModes(o,l).at(-1)[1];if(l.sub&&l.own)return tr('action_helpers.this_channel_reaches_max_km_on',{max:mx.toLocaleString(),span:spanKm(l).toLocaleString()});return tr('action_helpers.too_far_even_at_its_slowest',{span:spanKm(l).toLocaleString(),max:mx.toLocaleString()});} if((l.ch||[]).length+soldSlots(l)>=chMax(l))return soldSlots(l)?tr('action_helpers.sys_is_full_max_channels_sold',{sys:DF_SYS[l.sys].n,max:chMax(l),sold:soldSlots(l)}):tr('action_helpers.sys_is_full_max_channels',{sys:DF_SYS[l.sys].n,max:chMax(l)}); for(const c of [l.a,l.b]){const p=S.pops[c];if(p&&RG[p.rgen||0].cls``).join('')+(innerWidth<760?``:''); let h=''; if(UI.left==='goals'){ - h+=scnCard()+lvlCard()+t1Card(); + h+=charterCard()+scnCard()+lvlCard()+t1Card(); const cur=GOALS.find(g=>S.done[g.id]===undefined); h+=GOALS.map(g=>{const d=S.done[g.id]!==undefined,c=g===cur;return `
${d?'✓':''}
${esc(g.t)}
${c||!d?`
${esc(g.d)}
`:''}${!d&&g.r?`
${tr('hud_and_panels.reward_cash',{cash:fmt$(g.r)})}
`:''}
`;}).join(''); h+=badgeGrid(); }else if(UI.left==='deals'){ {const st=custStats();if(st.n)h+=`
${tr('common.your_customers')} ${st.n} · ${tr('hud_and_panels.happiness_p',{p:Math.round(st.avg)})}
${st.unhappy?`
${trn('hud_and_panels.n_unhappy_customer_price_mo_at',st.unhappy,{price:fmt$(st.risk)})}
`:''}
${btn(st.unhappy?tr('common.see_who'):tr('common.all_customers'),'custOpen',{sad:st.unhappy?1:0},st.unhappy?'pink sm':'ghost sm')}
`;} - h+=confSection(); + h+=confSection()+seatSection(); {const lv=S.lvl||1,nx=LEVELS[lv];h+=`
${tr('hud_and_panels.customer_level_lv_name',{lv,name:LEVELS[lv-1].n})}
${nx?tr('hud_and_panels.next_req_unlocks_what',{req:nx.req,what:lc1(nx.unlock)}):tr('common.every_customer_type_is_unlocked_go')}
`;} if(!S.offers.length)h+=`

${tr('hud_and_panels.no_open_offers_right_now_businesses')}

`; for(const o of S.offers.slice().sort((a,b)=>a.exp-b.exp)){const has=bHas(o); - h+=`
${esc(o.name)}
${esc(BIZ_T[o.type].l)} · ${CITY[o.city].name}${o.city2?' ⇄ '+CITY[o.city2].name:''} · ${bTerms(o)} · ${tr('ui.n_d_left',{n:o.exp-S.day})}${(o.reqs||[]).length?` · ${trn('hud_and_panels.n_special_requirement',o.reqs.length)}`:''}
${bRisk(o)}${reqList(o)} + h+=`
${esc(o.name)}
${esc(BIZ_T[o.type].l)} · ${CITY[o.city].name}${o.city2?' ⇄ '+CITY[o.city2].name:''} · ${bTerms(o)} · ${tr('ui.n_d_left',{n:o.exp-S.day})}${(o.reqs||[]).length?` · ${trn('hud_and_panels.n_special_requirement',o.reqs.length)}`:''}
${spotWhy(o)}${bRisk(o)}${reqList(o)}
${has?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):btn(tr('common.go_there'),'focusCity',{city:bCities(o).find(c=>!S.pops[c])},'ghost sm')}${btn(tr('common.decline'),'decline',{id:o.id},'ghost sm')}
${has?'':`
${tr('hud_and_panels.needs_a_pop_in_cities',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}
`}
`;} }else if(UI.left==='noc'){ h+=`
${btn(tr('hud_and_panels.open_noc_dashboard'),'dash',{},'pink')}${btn(tr('common.connections'),'connOpen',{},'')}${btn(tr('common.traceroute'),'trace',{},'')}
`; diff --git a/src/game/93-ui/50-city-panel.js b/src/game/93-ui/50-city-panel.js index b816232..3450c4c 100644 --- a/src/game/93-ui/50-city-panel.js +++ b/src/game/93-ui/50-city-panel.js @@ -76,7 +76,7 @@ function cityPanel(c){
${tr('common.forwarding_chip')}${esc(G.chip)}
${tr('common.boot_time')}${slowBoot(c)?`${tr('city_panel.n_min_a_slow_one',{n:bootMin(c)})}`:tr('city_panel.n_min',{n:bootMin(c)})}
${slowBoot(c)?`

${tr('city_panel.this_chassis_takes_forever_to_boot')}

`:''}
${tr('common.forwarding_load')}${fmtG(nl)} / ${fmtG(nc)}
${nl>=nc*0.95?`

${tr('city_panel.maxed_out_traffic_here_is_being')}

`:''} -
${N?btn(N.lvl>lvl()?tr('city_panel.model_level_lv',{model:esc(N.n),lv:N.lvl}):tr('city_panel.upgrade_to_model_cost_mo_mo',{model:esc(N.n),cost:fmt$(swapCost(c,Ni)),mo:fmt$(N.mo*rt)}),'upRouter',{city:c,g:Ni},'pink',N.lvl>lvl()||S.cash=RCAGE?CAGE_MO:0))}),'addRouter',{city:c},'',S.cash1?btn(tr('common.remove_one'),'rmRouter',{city:c},'ghost sm'):''}
+
${N?(!techOk('rg',Ni,N.lvl)?demoBtn('rg',Ni,N.lvl,tr('city_panel.model_level_lv',{model:esc(N.n),lv:N.lvl}),'pink'):btn(tr('city_panel.upgrade_to_model_cost_mo_mo',{model:esc(N.n),cost:fmt$(swapCost(c,Ni)),mo:fmt$(N.mo*rt)}),'upRouter',{city:c,g:Ni},'pink',S.cash=RCAGE?CAGE_MO:0))}),'addRouter',{city:c},'',S.cash1?btn(tr('common.remove_one'),'rmRouter',{city:c},'ghost sm'):''}
${rt>=RCAGE&&rt${tr('city_panel.the_standard_cage_holds_n_routers',{n:RCAGE,mo:fmt$(CAGE_MO)})}

`:''}${rt>=RMAX?`

${tr('city_panel.this_pop_has_the_most_routers',{n:RMAX})}

`:''}${rt>RCAGE?`
${tr('city_panel.cage_extension')}${fmt$(cageMo(rt))}/mo
`:''} ${UI.models?routerModels(c):''} ${N||UI.models?`

${(p.rgen||0)>0?tr('city_panel.prices_include_p_back_for_the',{p:fmt$(tradeIn(p.rgen||0,rt))})+' ':''}${p.rupDay===S.day?tr('city_panel.new_routers_went_in_today_the')+' ':''}${rt>1?tr('city_panel.rolling_upgrade_one_router_at_a'):tr('city_panel.with_one_router_the_upgrade_needs')}

`:''} diff --git a/src/game/93-ui/70-link-panels.js b/src/game/93-ui/70-link-panels.js index e95310b..47c95d0 100644 --- a/src/game/93-ui/70-link-panels.js +++ b/src/game/93-ui/70-link-panels.js @@ -102,29 +102,29 @@ function dfPanel(l){ h+=`

${l.own?tr('common.under_construction'):tr('common.being_spliced')}

${l.own?tr('link_panels.permits_trenching_splicing'):tr('common.iru_handover')}${tr('common.n_days_left',{n:l.ready-S.day})}
${l.own?`
${btn(tr('link_panels.hire_extra_crews_price_30_days',{price:fmt$(crewCost(l))}),'crews',{id:l.id},'sm',l.ready<=S.day+1||S.cash`:''}

${tr('link_panels.you_can_pre_install_optics_now')}

`;} else if(inc&&linkDown(l))h+=`

${tr('common.dark_6bf5')}

${esc(inc.msg)}

${inc.cost?btn(`${esc(inc.fix||tr('common.rush_repair'))} ${fmt$(inc.cost)}`,'fixInc',{id:inc.id},'red',S.cash`; h+=`

${tr('common.capacity')}

${tr('link_panels.n_of_max_channels_lit',{n:(l.ch||[]).length,max:chMax(l)})}${soldSlots(l)?` · ${tr('link_panels.n_sold_as_alien_waves',{n:soldSlots(l)})}`:''}${fmtG(load)} / ${fmtG(cap)}
- ${l.own&&l.sub?`
${tr('common.cable_design')}${tr((SEA_DESIGNS[l.seaDesign]||SEA_DESIGNS.standard).n)}
`:''} + ${seatPanel(l)}${l.own&&l.sub?`
${tr('common.cable_design')}${tr((SEA_DESIGNS[l.seaDesign]||SEA_DESIGNS.standard).n)}
`:''}
${tr('common.latency')}${tr('common.ms_ms_one_way',{ms:linkLat(l).toFixed(1)})}
${l.own?tr('link_panels.right_of_way_upkeep'):tr('common.iru_lease')}${tr('common.price_mo',{price:fmt$(l.mo)})}
${tr('link_panels.n_amp_huts',{n:amps})}${tr('common.price_mo',{price:fmt$(amps*AMP_MO)})}
${!bld&&!(l.ch||[]).length?`

${tr('link_panels.this_fiber_is_dark_add_optics')}

`:''}
`; if(!bld){const sold=S.biz.filter(b=>b.link===l.id&&(b.type==='wwave'||b.type==='dfpair'||b.type==='pairs')),off=S.offers.find(o=>o.link===l.id),fc=freeCh(l); h+=`

${tr('link_panels.selling_spare_capacity')}

${tr('link_panels.other_carriers_rent_what_you_do')}

${tr('common.free_channels')}${fc} / ${chMax(l)}
${sold.map(b=>`
${esc(b.name)}
${esc(b.what||BIZ_T[b.type].l)} · ${tr('common.price_mo',{price:fmt$(b.rate)})}
`).join('')} ${off?`
${esc(off.name)}
${esc(off.what)} · ${tr('common.price_mo',{price:fmt$(off.rate)})} · ${tr('ui.n_d_left',{n:off.exp-S.day})}${off.broker?' · '+tr('link_panels.via_a_capacity_broker'):''}
${btn(tr('common.accept'),'accept',{id:off.id},'pink sm')}
`:fc>=1||pairFree(l)?`
${btn(tr('link_panels.list_it_with_a_capacity_broker'),'advertise',{id:l.id},'sm')}
`:`

${tr('link_panels.nothing_spare_to_sell_on_this')}

`}
`;} h+=`

${tr('common.optics')}

${tr('link_panels.each_channel_is_a_pair_of')}

`; - if(l.own&&l.sub)h+=subUpgradePanel(l); + if(l.own&&l.sub&&!l.seat)h+=subUpgradePanel(l); for(const k of Object.keys(OPT)){const O=OPT[k],n=(l.ch||[]).filter(x=>x===k).length,why=chWhy(l,k); const md=optMode(k,l),cc=chCost(l,k),sp=spareN(k); - h+=`
${O.n} ${optModes(k,l).map(([g,r])=>tr('link_panels.g_to_km_km',{g:fmtG(g),km:r.toLocaleString()})).join(' · ')}
${esc(O.blurb)}${n?` · ${tr('link_panels.n_lit',{n})}`:''}${sp?` · ${trn('link_panels.n_spare_on_the_shelf',sp)}`:''}
${md&&!md.full?`
⚠️ ${tr('link_panels.runs_at_g_per_channel_on',{g:fmtG(md.g)})} ${!l.sub&®enNeed(k,l)>(l.regen|0)?trn('link_panels.n_regen_site_would_bring_it',regenNeed(k,l),{g:fmtG(O.g)}):''}
`:''}${why?`
${esc(why)}
`:''}${opticCountControl(l,k,n)}
${n?btn('−','rmCh',{id:l.id,o:k},'ghost sm'):''}${btn(sp?`+ ${cc?tr('link_panels.spare_price',{price:fmt$(cc)}):tr('common.spare')}`:`+ ${fmt$(cc)}`,'addCh',{id:l.id,o:k},'sm',!!why||S.cash`;} + h+=`
${O.n} ${optModes(k,l).map(([g,r])=>tr('link_panels.g_to_km_km',{g:fmtG(g),km:r.toLocaleString()})).join(' · ')}
${esc(O.blurb)}${n?` · ${tr('link_panels.n_lit',{n})}`:''}${sp?` · ${trn('link_panels.n_spare_on_the_shelf',sp)}`:''}
${md&&!md.full?`
⚠️ ${tr('link_panels.runs_at_g_per_channel_on',{g:fmtG(md.g)})} ${!l.sub&®enNeed(k,l)>(l.regen|0)?trn('link_panels.n_regen_site_would_bring_it',regenNeed(k,l),{g:fmtG(O.g)}):''}
`:''}${why?`
${esc(why)}
`:''}${!techOk('opt',k,O.lvl)&&demoCan(O.lvl)?`
${demoBtn('opt',k,O.lvl,'','ghost sm')}
`:''}${opticCountControl(l,k,n)}
${n?btn('−','rmCh',{id:l.id,o:k},'ghost sm'):''}${btn(sp?`+ ${cc?tr('link_panels.spare_price',{price:fmt$(cc)}):tr('common.spare')}`:`+ ${fmt$(cc)}`,'addCh',{id:l.id,o:k},'sm',!!why||S.cash`;} {const st=Object.keys(OPT).filter(k=>spareN(k)>0);h+=`

${tr('link_panels.unplugged_optics_go_on_the_spares')}

`; {const used=[...new Set(l.ch||[])].filter(k=>OPT[k]&&OPT[k].lvl<=lvl());if(used.length)h+=`
${used.map(k=>btn(tr('link_panels.stock_a_spare_optic_price',{optic:OPT[k].n,price:fmt$(optCost(k))}),'buySpare',{o:k},'ghost sm',S.cash=64)).join('')}

${tr('link_panels.spares_bought_now_are_already_paid')}

`;}if(st.length)h+=`

${tr('common.spares_shelf')}

`+st.map(k=>`
${spareN(k)} × ${OPT[k].n}
${btn(tr('link_panels.sell_one_price',{price:fmt$(spareValue(k))}),'sellSpare',{o:k},'ghost sm')}
`).join('');} const rg=l.regen|0,rgAdd=REGEN_COST+Math.round((l.ch||[]).reduce((a,c)=>a+optCost(c),0)*REGEN_CH); h+=`

${tr('common.line_system')}

${esc(sysD.n)}${tr('link_panels.n_amplifiers',{n:amps})}
-
${tr('common.regen_sites')}${rg?tr('link_panels.n_optical_spans_of_km_km',{n:rg,km:spanKm(l).toLocaleString()}):tr('common.none')}

${tr('link_panels.a_regen_site_turns_the_light',{price:fmt$(REGEN_MO)})}

${l.sub&&l.own?`

${tr('link_panels.no_regen_sites_in_the_middle')}

`:`
${rg`}

${esc(sysD.blurb)}

${(()=>{const t=sysNext(l);if(!t)return '';const T=DF_SYS[t],c=sysUpCost(l);return T.lvl>lvl()?btn(tr('link_panels.sys_level_n',{sys:T.n,n:T.lvl}),'upSys',{id:l.id},'sm',true):btn(tr('link_panels.upgrade_to_sys_price',{sys:T.n,price:fmt$(c)}),'upSys',{id:l.id},'sm',S.cash

${tr('link_panels.spare_optics_and_amplifier_cards_on')}

`; +
${tr('common.regen_sites')}${rg?tr('link_panels.n_optical_spans_of_km_km',{n:rg,km:spanKm(l).toLocaleString()}):tr('common.none')}

${tr('link_panels.a_regen_site_turns_the_light',{price:fmt$(REGEN_MO)})}

${l.sub&&l.own?`

${tr('link_panels.no_regen_sites_in_the_middle')}

`:`
${rg`}

${esc(sysD.blurb)}

${(()=>{const t=sysNext(l);if(!t)return '';const T=DF_SYS[t],c=sysUpCost(l);return !techOk('sys',t,T.lvl)?demoBtn('sys',t,T.lvl,tr('link_panels.sys_level_n',{sys:T.n,n:T.lvl}),'sm'):btn(tr('link_panels.upgrade_to_sys_price',{sys:T.n,price:fmt$(c)}),'upSys',{id:l.id},'sm',S.cash

${tr('link_panels.spare_optics_and_amplifier_cards_on')}

`; {const sib=pairLinks(l.a,l.b).filter(x=>x!==l&&x.kind!=='vxc');h+=`

${tr('common.redundancy')}

${sib.length?tr('link_panels.other_links_between_these_cities'):tr('link_panels.this_is_the_only_link_between')}

${sib.map(x=>`
${esc(capName(x))} ${linkDown(x)?''+tr('common.cut')+'':''}${x.standby?' '+tr('common.standby')+'':''}
${(x.trench||x.id)===(l.trench||l.id)?tr('common.same_trench'):tr('common.diverse_route')}
${btn(tr('common.open'),'selLink',{id:x.id},'ghost sm')}
`).join('')}
${btn(tr('link_panels.add_parallel_link'),'addParallel',{id:l.id},'pink sm')}
`;} h+=`${trafficSection(l)}${metricSection(l)}
${btn(UI.confirm===l.id?tr('link_panels.really_give_it_up'):(l.own?tr('link_panels.abandon_the_fiber'):tr('link_panels.cancel_the_iru')),'rmLink',{id:l.id},'ghost sm')}${cabBack(l)>0?`

${tr('link_panels.giving_it_up_now_returns_price',{price:fmt$(cabBack(l))})}

`:''}
`; return h; } function offersHere(c){ const os=S.offers.filter(o=>bCities(o).includes(c));if(!os.length)return ''; - return `

${tr('common.offers_here')}

${os.map(o=>`
${esc(o.name)}
${esc(BIZ_T[o.type].l)}${o.city2?` ${CITY[o.city].name} ⇄ ${CITY[o.city2].name}`:''} · ${bTerms(o)} · ${tr('ui.n_d_left',{n:o.exp-S.day})}
${R.reach<0.99&&!BIZ_T[o.type].l2?`
${tr('link_panels.they_need_the_full_internet_your',{pct:pct(R.reach)})}
`:''}${o.type==='scrub'&&!hasScrub()?`
${tr('link_panels.needs_your_own_scrubbing_center')}
`:''}${bRisk(o)}${reqList(o)}${bHas(o)?'':`
${tr('link_panels.needs_a_pop_in_cities_too',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}
`}
${bHas(o)?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):''}${btn(tr('common.no'),'decline',{id:o.id},'ghost sm')}
`).join('')}
`; + return `

${tr('common.offers_here')}

${os.map(o=>`
${esc(o.name)}
${esc(BIZ_T[o.type].l)}${o.city2?` ${CITY[o.city].name} ⇄ ${CITY[o.city2].name}`:''} · ${bTerms(o)} · ${tr('ui.n_d_left',{n:o.exp-S.day})}
${spotWhy(o)}${R.reach<0.99&&!BIZ_T[o.type].l2?`
${tr('link_panels.they_need_the_full_internet_your',{pct:pct(R.reach)})}
`:''}${o.type==='scrub'&&!hasScrub()?`
${tr('link_panels.needs_your_own_scrubbing_center')}
`:''}${bRisk(o)}${reqList(o)}${bHas(o)?'':`
${tr('link_panels.needs_a_pop_in_cities_too',{cities:bCities(o).filter(x=>!S.pops[x]).map(x=>CITY[x].name).join(', ')})}
`}
${bHas(o)?btn(tr('common.accept'),'accept',{id:o.id},'green sm'):''}${btn(tr('common.no'),'decline',{id:o.id},'ghost sm')}
`).join('')}
`; } function linkPanel(id){ const l=S.links.find(x=>x.id===id);if(!l){UI.sel=null;return '';} diff --git a/src/game/94-dashboard/50-lease-swaps.js b/src/game/94-dashboard/50-lease-swaps.js index 155489b..d56dcee 100644 --- a/src/game/94-dashboard/50-lease-swaps.js +++ b/src/game/94-dashboard/50-lease-swaps.js @@ -20,10 +20,10 @@ function leaseSwaps(){const by={}; if(op&&op.n<=DF_SYS[sys].max)x.opts.push(swapOpt('iru',DF_SYS[sys].cost+ampCount(km)*AMP_COST+op.up,dfLeaseMo(km)+ampCount(km)*AMP_MO+op.mo,leadDays(IRU_DAYS),wmo));} // Dig on land, lay a cable between landing stations (even ones that share a landmass), or both. const whys=[];for(const cab of [false,true]){if(cab?!seaCab(a,b):sub)continue; - const why=cab?ownCabWhy(a,b):!dfAllowed(a,b)?tr('lease_swaps.nobody_lets_you_dig_on_this'):lvl()<3?tr('lease_swaps.digging_your_own_fiber_unlocks_at'):''; + const why=cab?ownCabWhy(a,b):!dfAllowed(a,b)?tr('lease_swaps.nobody_lets_you_dig_on_this'):lvl()<2?tr('lease_swaps.digging_your_own_fiber_unlocks_at'):''; if(why){whys.push(why);continue;}const km=cab?ownCabKm(a,b):kmBetween(a,b),op=swapOptics(km,cap,cab,'roadm'); if(!op){whys.push(tr('lease_swaps.no_optic_you_can_buy_reaches',{km:km.toLocaleString()}));continue;} - x.opts.push(swapOpt(cab?'cab':'own',(cab?ownCabCost(km):dfBuildCost(km)+DF_SYS.roadm.cost+ampCount(km)*AMP_COST)+op.up,(cab?ownCabMo(km):Math.round(km*0.15)+ampCount(km)*AMP_MO)+op.mo,cab?ownCabDays(km):dfBuildDays(km),mo));} + x.opts.push(swapOpt(cab?'cab':'own',(cab?ownCabCost(km):digCost(km)+DF_SYS.roadm.cost+ampCount(km)*AMP_COST)+op.up,(cab?ownCabMo(km):Math.round(km*0.15)+ampCount(km)*AMP_MO)+op.mo,cab?ownCabDays(km):dfBuildDays(km),mo));} x.why=x.opts.some(o=>o.k!=='iru')?'':whys.join(' '); const sv=[...x.opts.map(o=>o.save),x.lit].filter(v=>v!==undefined);if(sv.length)x.best=Math.max(...sv);return x;}) .sort((p,q)=>((p.best===undefined)-(q.best===undefined))||(q.best||0)-(p.best||0)||q.mo-p.mo);} diff --git a/src/game/95-modals/90-fiber-modals.js b/src/game/95-modals/90-fiber-modals.js index bfeed30..9e66fc7 100644 --- a/src/game/95-modals/90-fiber-modals.js +++ b/src/game/95-modals/90-fiber-modals.js @@ -7,13 +7,13 @@ function dfModalBody(a,b,km,pop){ if(landX(a,b)&&cnCity(a)===cnCity(b))return `

${tr('fiber_modals.nobody_sells_one_fiber_pair_across')}

`+sea; if(!dfAllowed(a,b))return `

${tr('fiber_modals.dark_fiber_across_the_chinese_border')}

`+sea; if(lvl()<2)return `

${tr('fiber_modals.dark_fiber_unlocks_at_customer_level')}

`+sea; - const src=UI.dfSrc==='build'&&lvl()>=3&&!sc?'build':'lease',sys=DF_SYS[UI.dfSys]&&DF_SYS[UI.dfSys].lvl<=lvl()?UI.dfSys:'lite',amps=ampCount(km); - const up=(src==='build'?dfBuildCost(km):0)+DF_SYS[sys].cost+amps*AMP_COST+pop,mo=(src==='build'?Math.round(km*0.15):dfLeaseMo(km))+amps*AMP_MO; + const src=UI.dfSrc==='build'&&!sc?'build':'lease',sys=DF_SYS[UI.dfSys]&&techOk('sys',UI.dfSys,DF_SYS[UI.dfSys].lvl)?UI.dfSys:'lite',amps=ampCount(km); + const up=(src==='build'?digCost(km):0)+sysCost(sys)+amps*AMP_COST+pop,mo=(src==='build'?Math.round(km*0.15):dfLeaseMo(km))+amps*AMP_MO; const w=Math.round(waveMo(km,false,4)); return `

${tr('fiber_modals.a_fiber_pair_of_your_own',{km:AMP_EVERY})}

-

${tr('common.the_glass')}

${btn(tr('fiber_modals.lease_an_iru_price_mo_ready_n',{price:fmt$(dfLeaseMo(km)),n:leadDays(IRU_DAYS)}),'dfSrc',{v:'lease'},src==='lease'?'pink':'ghost')}${sc?btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):btn(lvl()>=3?tr('fiber_modals.build_your_own_price_n_days',{price:fmt$(dfBuildCost(km)),n:dfBuildDays(km)}):tr('fiber_modals.build_your_own_level_3'),'dfSrc',{v:'build'},src==='build'?'pink':'ghost',lvl()<3)}${sea?btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):''}
${sc?`

${tr('fiber_modals.a_fiber_pair_on_cable_km',{cable:esc(CAB[sc.cid].name),km:sc.km.toLocaleString()})}

`:''} +

${tr('common.the_glass')}

${btn(tr('fiber_modals.lease_an_iru_price_mo_ready_n',{price:fmt$(dfLeaseMo(km)),n:leadDays(IRU_DAYS)}),'dfSrc',{v:'lease'},src==='lease'?'pink':'ghost')}${sc?btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):btn(lvl()>=3?tr('fiber_modals.build_your_own_price_n_days',{price:fmt$(dfBuildCost(km)),n:dfBuildDays(km)}):tr('specialist.dig_your_own_as_a_pioneer',{price:fmt$(digCost(km)),n:dfBuildDays(km),p:Math.round((PIONEER-1)*100)}),'dfSrc',{v:'build'},src==='build'?'pink':'ghost')}${sea?btn(cabOpen()?tr('modals.lay_your_own_subsea_cable'):tr('modals.your_own_subsea_cable_tier_1'),'ownCab',{},'ghost',!!ownCabWhy(a,b)):''}
${sc?`

${tr('fiber_modals.a_fiber_pair_on_cable_km',{cable:esc(CAB[sc.cid].name),km:sc.km.toLocaleString()})}

`:''} ${src==='build'?`

${tr('fiber_modals.your_own_trench_almost_no_rent')}

`:''} -

${tr('common.line_system')}

${Object.keys(DF_SYS).map(k=>btn(`${DF_SYS[k].n} ${DF_SYS[k].lvl>lvl()?tr('fiber_modals.level_n',{n:DF_SYS[k].lvl}):fmt$(DF_SYS[k].cost)}`,'dfSys',{v:k},sys===k?'pink':'ghost',DF_SYS[k].lvl>lvl())).join('')}
+

${tr('common.line_system')}

${Object.keys(DF_SYS).map(k=>btn(`${DF_SYS[k].n} ${!techOk('sys',k,DF_SYS[k].lvl)?tr('fiber_modals.level_n',{n:DF_SYS[k].lvl}):fmt$(sysCost(k))}`,'dfSys',{v:k},sys===k?'pink':'ghost',!techOk('sys',k,DF_SYS[k].lvl))).join('')}
${Object.keys(DF_SYS).filter(k=>!techOk('sys',k,DF_SYS[k].lvl)&&demoCan(DF_SYS[k].lvl)).map(k=>`
${demoBtn('sys',k,DF_SYS[k].lvl,'','ghost sm')} ${DF_SYS[k].n}
`).join('')}

${esc(DF_SYS[sys].blurb)} ${trn('fiber_modals.plus_n_in_line_amplifier_price',amps,{price:fmt$(AMP_COST),mo:fmt$(AMP_MO)})}

${km>reachOn(OPT.tp16.reach,!!sc)?`

${tr('fiber_modals.km_km_is_longer_than_any',{km:km.toLocaleString()})}

`:''}
${tr('common.due_now')}${fmt$(up)}
${tr('common.monthly')}${tr('common.price_mo',{price:fmt$(mo)})}

${tr('fiber_modals.for_comparison_a_leased_1_6t',{price:fmt$(w)})}

diff --git a/src/i18n/en.js b/src/i18n/en.js index cf18cc8..ae7d65d 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -1771,7 +1771,6 @@ "fiber_and_hardware.those_optics_need_the_regen_site":"Those optics need the regen site.
Remove the long-haul channels first, or keep the site.", "fiber_modals.a_fiber_pair_of_your_own":"A fiber pair of your own. The glass is cheap, the gear is not: you buy a line system with an amplifier every {km} km, then optics for each channel. Your gear can fail, and you fix it.", "fiber_modals.a_fiber_pair_on_cable_km":"A fiber pair on {cable}, {km} km. It shares the cable with everyone else's waves, anchors included.", -"fiber_modals.build_your_own_level_3":"Build your own level 3", "fiber_modals.build_your_own_price_n_days":"Build your own {price} · ~{n} days", "fiber_modals.dark_fiber_across_the_chinese_border":"Dark fiber across the Chinese border is not for sale. Buy a cross-border wave instead.", "fiber_modals.dark_fiber_unlocks_at_customer_level":"Dark fiber unlocks at customer level 2. You need the scale to justify buying your own optical gear.", @@ -3506,6 +3505,39 @@ "sold_out.tier_1s_never_peer_at_ixs":"Tier 1s never peer at IXs", "sold_out.wants_need_gbps_of_traffic_from":"Wants ≥ {need} Gbps of traffic from you (you send {dem})", "sold_out.wants_you_to_be_a_tier":"Wants you to be a Tier 2, or send ≥ {need} Gbps to it (you send {dem})", +"specialist.a_b_km_km_ready_in":"{a} ⇄ {b} · {km} km · about {ms} ms · ready in about {n} days", +"specialist.a_consortium_is_selling_seats_on":"A consortium is selling seats on {name}, a new cable from {a} to {b}. Your own fiber pairs on it, before you are Tier 1.", +"specialist.ask_for_a_demo_unit_p_n":"Demo unit: +{p}%, {n} days", +"specialist.charter_signed_name":"Charter signed: {name}.", +"specialist.consortium_seat":"Consortium seat", +"specialist.consortium_seat_name":"Consortium seat: {name}", +"specialist.demo_unit_ships_in_n_days":"Demo unit ships in {n} days", +"specialist.dig_your_own_as_a_pioneer":"Dig your own as a pioneer (+{p}%) · {price} · {n} days", +"specialist.global_backbone":"Global backbone", +"specialist.includes_pops_at_the_landings_price":"Includes POPs at the landings: {price}.", +"specialist.keep_it":"Keep it", +"specialist.low_latency_boutique":"Low-latency boutique", +"specialist.n_fiber_pairs":{"one":"{n} fiber pair","other":"{n} fiber pairs"}, +"specialist.part_owner_of_the_sea":"Part-owner of the sea", +"specialist.pick":"Pick", +"specialist.pick_a_charter":"Pick a charter", +"specialist.routes_r_of_n_beat_the":"Finance routes faster on your own glass than any leased path: {r}/{n} · paying latency customers: {c}/{m}", +"specialist.speed_of_light":"Speed of Light", +"specialist.spotted_your_broadband_in_a_one":"They spotted your broadband in {a}, one of the big eyeball cities.", +"specialist.spotted_your_cap_of_dark_fiber":"They spotted your {cap} of lit dark fiber between {a} and {b}.", +"specialist.spotted_your_ms_ms_a_b_path":"They spotted your {ms} ms {a}–{b} path.", +"specialist.spotted_your_two_diverse_paths_a":"They spotted your two diverse paths between {a} and {b}.", +"specialist.take_a_seat_on_a_consortium":"Take a seat on a consortium cable", +"specialist.the_classic_game_grow_everywhere_and":"The classic game: grow everywhere, customers follow your level, and Tier 1 is the win.", +"specialist.the_consortium_runs_the_cable_your":"The consortium runs the cable and its repeaters. Your pairs are yours to light with your own optics; a cut on the cable cuts them too.", +"specialist.the_vendor_ships_a_demo_name":"The vendor ships a demo {name} in {n} days. Until your level catches up, every unit costs {p}% more.", +"specialist.trading_firms_and_other_latency_customers":"Trading firms and other latency customers call more often and pay {p}% more. Win Speed of Light: beat the fastest leased latency on {r} finance routes with your own glass while {c} latency customers pay you. Tier 1 still counts.", +"specialist.what_kind_of_network_are_you":"What kind of network are you building? You can pick for {n} more days; until then you are a Global backbone.", +"specialist.win_as_a_low_latency_boutique":"Win as a low-latency boutique", +"specialist.won_on_date_your_own_glass":"Won on {date}: your own glass beat every leased path.", +"specialist.you_own_n_fiber_pairs_on":"Signed: you own {n} fiber pairs on {name}, {a} ⇄ {b}. The cable ships sail; it is ready in about {d} days.", +"specialist.your_own_fiber_pairs_on_a":"Your own fiber pairs on a new subsea cable: pay your share of the build now, light them with your own optics when it lands.", +"specialist.your_own_glass_beats_every_leased":"Your own glass beats every leased path on three finance routes, and the traders pay for it. The boutique has won!", "supply_chain.as_when_you_started":"as when you started", "supply_chain.chip_shortage_every_router_vendor_is":"Chip shortage!
Every router vendor is waiting for the same chips. New routers and router upgrades cost 40% more for {n} days. Lead time: “yes”.", "supply_chain.every_cable_ship_is_booked":"Every cable ship is booked.
Hyperscalers have hired every cable ship and trenching crew on the planet. New fiber and cable builds cost 30% more for {n} days.",