diff --git a/CHANGELOG.md b/CHANGELOG.md index fb39718..f13ceb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ All notable changes to this project are documented here. The project follows - A new start screen with four doors: Puzzles, Sandbox, Normal, and Scenarios & weekly. Every network now picks its rules when it starts, and they stay locked for that network; your saved games carry on exactly as before. - Normal comes in three flavours. Change Freeze has a third of the outages and no DDoS floods, delivers PNIs, cross-connects and builds in days instead of months (#151), and skips the peering inbox, hardware shortages and sold-out routes. On-call is the classic game. BGP at 3 a.m. brings almost twice the outages, lasting half as long again, and twice the DDoS. The HUD and the share card show which one you picked. - Sandbox is a real sandbox now (#188): everything is unlocked from day one, your own subsea cable included, money never runs out, deliveries are quick, and you pick how much chaos you want, from none to spicy. +- Puzzles: small, calm network builds you can finish in a coffee break (#190). Connect a few cities on the real map with POPs and leased waves, with no clock, no bills and nothing breaking, and earn up to three stars: one for the goal, one for staying under budget, and one if the network survives any single cut. Eighteen puzzles in four packs (more stars open the next pack), some with a twist like a latency target, no subsea cables or a ring, plus a weekly puzzle that is the same for everyone, with a streak and a result to share. Puzzles never touch your saved network; only your stars are kept. +- Tier 1 now works like the real thing: peer with the Tier 1 club and their customers come along for free (#85). A PNI or an exchange session reaches the networks you peer with and everyone who buys transit from them, so you no longer chase every tiny ISP for the win; only networks that buy transit from nobody, like the content giants and the big incumbents, still need peering of their own. Small networks and more real eyeball ISPs now buy transit from real-world upstreams, a peer's customers are tried after your direct peers and before transit (so peering widely still pays), the traceroute shows the hand-off, and the Road to Tier 1 card counts who already comes along. Games already won stay won. +- Badges now come in variants: games under the Change Freeze rules earn frosted Freeze-dried badges, and games under BGP at 3 a.m. earn fiery ones worth bragging about. Earning a badge again under harder rules upgrades its look, and the badge list counts your collection of each kind on this device. On-call games earn the standard badges; Sandbox and puzzles earn none. - China Telecomet now sells its CN-Too premium crossing in Moscow too, at the same price as in Hong Kong (#195). Haul your European traffic to Moscow and it reaches China with about 3% loss; nothing else of theirs is on offer there. - Series of Tubes now speaks German. The game follows your browser's language the first time, and you can switch to German under Settings or on the title screen. Networking terms like Peering and Transit stay in English, the way network engineers say them. - Glowball Sakura Lager joins the map: a Tier 2 carrier in the big hubs of the US, Europe and Asia-Pacific that sells transit, takes PNIs and peers openly wherever it is. It is not a Tier 1, so it buys its own transit from three of them, while 13 smaller networks in its regions buy theirs from it, and one PNI with it reaches about 3% of all traffic. Far from home, in Asia and New Zealand, it charges more than the locals, and it sells no transit in Australia. diff --git a/site/i18n/de.js b/site/i18n/de.js index 70c16fd..c6b6e91 100644 --- a/site/i18n/de.js +++ b/site/i18n/de.js @@ -19,6 +19,7 @@ "badges.attend_a_conference":"Besuche eine Konferenz.", "badges.attend_six_conferences_in_one_game":"Besuche sechs Konferenzen in einem Spiel.", "badges.badge_unlocked_name":"Abzeichen freigeschaltet: {name}", +"badges.badge_upgraded_name":"Abzeichen aufgewertet: {name}", "badges.blackhole_one_of_your_own_cities":"Blackhole eine deiner eigenen Städte, um einen DDoS zu stoppen.", "badges.bring_up_your_first_peering_session":"Bring deine erste Peering-Session hoch.", "badges.build_fiber_across_the_andes":"Verlege Glasfaser über die Anden.", @@ -100,9 +101,14 @@ "badges.take_a_de_kicks_retention_offer":"Nimm ein Halteangebot von DE-KICKS an.", "badges.take_out_a_loan":"Nimm einen Kredit auf.", "badges.the_long_way_round":"Der lange Weg außenrum", +"badges.this_game_earns_fiery_badges":"Dieses Spiel läuft auf BGP um 3 Uhr nachts: Jedes Abzeichen hier wird im Feuer geschmiedet und wertet eins auf, das du schon hast.", +"badges.this_game_earns_frosted_badges":"Dieses Spiel läuft im Change Freeze: Abzeichen von hier gibt es gefriergetrocknet.", "badges.through_the_wall":"Durch die Mauer", "badges.turn_on_a_transit_clean_pipe":"Schalte bei einem Transit eine Clean-Pipe-Option dazu.", "badges.two_buildings_three_cities":"Zwei Gebäude, drei Städte", +"badges.variant_forged_at_3_a_m":"Um 3 Uhr geschmiedet", +"badges.variant_freeze_dried":"Gefriergetrocknet", +"badges.variant_on_call":"Rufbereitschaft", "badges.weather_a_ddos_with_your_defences":"Überstehe einen DDoS mit einsatzbereiter Abwehr.", "badges.weather_a_multi_terabit_ddos":"Überstehe einen DDoS im Multi-Terabit-Bereich.", "badges.win_without_ever_taking_a_loan":"Gewinne, ohne je einen Kredit aufzunehmen.", @@ -1844,7 +1850,7 @@ "goals.make_5_peering_friends":"Finde 5 Peering-Freunde", "goals.on_the_peering_tab_request_sessions":"Frag im Tab Peering Sessions an oder tritt dem Route Server bei, um mit jedem offenen Netz auf einmal zu peeren.", "goals.open_your_home_city_and_press":"Öffne deine Heimatstadt und drück auf „Breitband starten“. Privatkunden sind Leute zu Hause, die Katzenvideos schauen. Sie zahlen dir jeden Monat.", -"goals.peer_with_every_tier_1_over":"Peere mit jedem Tier 1 über PNIs und kündige jeden Transit-Port. Dann verlangt niemand mehr Geld dafür, dass du das Internet erreichst.", +"goals.peer_with_every_tier_1_their_customers":"Peere mit jedem Tier 1 über PNIs und kündige jeden Transit-Port. Ihre Kunden kommen gratis mit, du jagst also nur Netze, denen niemand Transit verkauft.", "goals.pops_in_five_of_the_six":"POPs in fünf der sechs Regionen der Karte.", "goals.reach_the_whole_internet":"Erreiche das ganze Internet", "goals.serve_10_tbps":"Liefere 10 Tbps aus", @@ -1906,7 +1912,7 @@ "help.the_chart_button_at_the_top":"Der Diagramm-Knopf oben öffnet Traffic-Graphen nach Ausgang (Caches, PNIs, IX, Transit), Geld über die Zeit, Traffic pro ASN, wie er dich erreicht und was sein Transit kostet, sowie deine meistgenutzten Links und Router.", "help.the_group_behind_several_big":"Die Gruppe hinter mehreren großen Exchanges (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) behandelt Preislisten wie ein Staatsgeheimnis. Ports werden pro Kunde angeboten und werden teurer, je größer du aussiehst. Feilschen kann klappen, nach hinten losgehen oder eine Woche hängen. Einmal im Jahr werden die Preise nach oben „harmonisiert“, Zusatzleistungen landen auf deiner Rechnung, bis du sie abbestellst, und wer gehen will, bekommt einen Halterabatt, der mit einer Gebühr endet.", "help.things_break_all_the_time_fiber":"Ständig geht was kaputt: Faserbrüche, Router-Abstürze, Stromausfälle, IX-Schleifen, Fabric-Ausfälle, Route Leaks, DDoS, Vertipper, Kühlungsausfälle und Geopolitik: Sanktionen, Zölle, BGP-Hijacks, Streit um Anlandegenehmigungen, Shutdowns an Prüfungstagen und Kabelschnitte im Roten Meer. Traffic wird automatisch über andere Pfade und Upstreams umgeleitet. Parallele Links auf redundanten Routen, ein zweiter Router und ein Notstromgenerator helfen alle. Oder bezahl für Express-Reparaturen.", -"help.tier_1s_reach_the_whole_internet":"Tier 1s erreichen das ganze Internet, ohne jemanden zu bezahlen, weil sie alle miteinander peeren. Tier 2s peeren viel, kaufen aber noch etwas Transit.", +"help.tier_1s_reach_the_whole_internet_cones":"Tier 1s erreichen das ganze Internet, ohne jemanden zu bezahlen: Sie peeren alle miteinander, und jeder bringt seinen Customer Cone mit, alle, die bei ihm Transit kaufen. Tier 2s peeren viel, kaufen aber noch etwas Transit.", "help.traffic_follows_the_shortest_path_by":"Traffic folgt dem kürzesten Pfad nach Entfernung und Link-Metrik und wird von selbst umgeleitet, wenn Links ausfallen. Ist ein Pfad nur voll, wird der Überlauf verworfen, genau wie bei einem echten IGP. Ab Kundenlevel 3 kannst du im Tab NOC Auto-TE installieren: Es leitet den Überlauf auf bis zu zwei Ausweichpfade mit freier Kapazität um, solange sie höchstens doppelt so lang sind.", "help.transit_bills_sample_your_usage":"Transit-Rechnungen messen deine Nutzung jeden Tag und berechnen das 95. Perzentil der letzten 30 Tage, also werden kurze Spitzen verziehen, lange aber nicht.", "help.users_feel_the_round_trip_to":"Nutzer spüren die Round-Trip-Zeit bis dorthin, wo ihr Traffic dein Netz in Richtung Transit verlässt. Bis 20 ms (etwa 1.500 km) ist okay; über 50 ms zählen Breitband und Internetdienste als schlechter Service, was Umsatz und Kunden kostet. Traffic über dein eigenes Peering, PNIs und Caches wird nicht bestraft.", @@ -1931,12 +1937,13 @@ "hot_ports_and_rank.upgrade_the_ix_port_or_add":"Rüste den IX-Port auf oder füg ein LAG-Mitglied hinzu.", "hot_ports_and_rank.upgrade_the_router_or_add_a":"Rüste den Router auf oder füg im Tab Infra einen zweiten hinzu.", "hot_ports_and_rank.you_buy_transit_again":"du kaufst wieder Transit", -"hot_ports_and_rank.you_cannot_reach_list":"du erreichst {list} nicht", +"hot_ports_and_rank.you_cannot_reach_list_outside_cones":"du erreichst {list} nicht, und keiner deiner Peers verkauft dorthin Transit", "hot_ports_and_rank.your_reach_is_p_not_100":"deine Erreichbarkeit ist {p}, nicht 100 %", "hud_and_panels.all_connections_n":"Alle Verbindungen {n}", "hud_and_panels.all_systems_green_enjoy_it_while":"Alle Systeme grün. Genieß es, solange es anhält.", "hud_and_panels.auto_fix_in_n_day":{"one":"Auto-Fix in {n} Tag","other":"Auto-Fix in {n} Tagen"}, "hud_and_panels.blackholing_g":"Blackholing {g}", +"hud_and_panels.buys_transit_from_net_peer_with":"Kauft Transit bei {net}. Peere mit {net}, dann kommt es mit.", "hud_and_panels.customer_level_lv_name":"Kundenlevel {lv}: {name}", "hud_and_panels.dropping_or_overflowing":"verwirft oder läuft über", "hud_and_panels.every_network_on_the_map_traffic":"Jedes Netz auf der Karte. Der Traffic-Anteil ist, wie viel vom Traffic deiner Nutzer zu ihnen geht. Tippe auf eine Verbindung, um zu ihrem POP zu springen.", @@ -1973,6 +1980,7 @@ "hud_and_panels.p_of_traffic_between_them_scattered":"{p} % des Traffics zusammen, verstreut über die Exchanges. Du peerst mit {n}.", "hud_and_panels.ports_caches_and_routers_running_hot":"Ports, Caches und Router, die heißlaufen", "hud_and_panels.raise_a_full_link_s_metric":"Erhöhe die Metrik eines vollen Links, damit der Traffic einen anderen Pfad bevorzugt, rüste ihn auf oder installiere Auto-TE.", +"hud_and_panels.reached_through_the_customer_cone_of":"Erreicht über den Customer Cone von {net}: Es kauft dort Transit.", "hud_and_panels.reaches_networks_from_the_last":"Erreicht kostenlos Netze aus dem letzten Update, zu denen du keinen anderen Pfad hast. Verbinde dich mit ihnen, bevor es endet.", "hud_and_panels.reward_cash":"Belohnung {cash}", "hud_and_panels.survived_with_no_impact":"Ohne Auswirkungen überstanden", @@ -2383,6 +2391,8 @@ "loop.welcome_back_name_your_network_is":"Willkommen zurück, {name}.
Dein Netz ist genau da, wo du es gelassen hast: {date}.", "loop.your_saved_game_could_not_be":"Dein Spielstand konnte nicht geladen werden.
Er war beschädigt, also wurde ein Backup aufbewahrt, und du kannst neu anfangen.", "meet_a_network.all_n_out_of_reach":{"one":"Alle {n} außer Reichweite","other":"Alle {n} außer Reichweite"}, +"meet_a_network.peer_with_the_tier_1_club":"Peere mit dem Tier-1-Club: Ihre Kunden kommen gratis mit. Nur Netze, die in niemandes Customer Cone sind, brauchen eigenes Peering.", +"meet_a_network.peer_with_the_tier_1_club_n":{"one":"Peere mit dem Tier-1-Club: Ihre Kunden kommen gratis mit. {n} Netz kommt schon mit einem Peer mit.","other":"Peere mit dem Tier-1-Club: Ihre Kunden kommen gratis mit. {n} Netze kommen schon mit einem Peer mit."}, "meet_a_network.pnis_with_every_tier_1":"PNIs mit jedem Tier 1", "meet_a_network.reach_without_transit":"Erreichbarkeit ohne Transit", "meet_a_network.road_to_tier_1":"Weg zu Tier 1", @@ -2821,6 +2831,122 @@ "progress.under_attack_now":"Gerade unter Beschuss", "progress.your_score_peak_traffic":"Dein Ergebnis: Spitzen-Traffic", "progress.your_traffic_to_and_from_asia":"Dein Traffic von und nach Asien", +"puzzles.a_backhoe_walks_into_your_network":"Kommt ein Bagger in dein Netz. Nichts passiert.", +"puzzles.a_pop_costs_setup_plus_a_year":"Ein POP kostet {setup} Einrichtung, dann {mo}/Monat. Puzzles rechnen die Einrichtung und ein Jahr Miete.", +"puzzles.a_tiny_island_where_half_the":"Eine winzige Insel, auf der die halbe Pazifik-Verkabelung Kaffeepause macht.", +"puzzles.a_to_b_under_ms":"{a} → {b} unter {ms} ms", +"puzzles.a_to_b_under_ms_now":"{a} → {b} unter {ms} ms (jetzt {now} ms)", +"puzzles.aloha_latency":"Aloha Latenz", +"puzzles.avoid_list":"ohne {list}", +"puzzles.back_to_my_network":"Zurück zu meinem Netz", +"puzzles.back_to_the_title":"Zurück zum Startbildschirm", +"puzzles.beat_the_clock_light_in_glass":"Licht in Glasfaser schafft 200 km pro Millisekunde. Wähl deine Kabel, als ob es darauf ankäme.", +"puzzles.belt_and_braces":"Gürtel und Hosenträger", +"puzzles.best_x":"Bestwert {x}", +"puzzles.budget":"Budget", +"puzzles.budget_x":"Budget {x}", +"puzzles.connect_list":"Verbinde {list}.", +"puzzles.connected":"Verbunden", +"puzzles.copied_paste_it_anywhere":"Kopiert! Füg es irgendwo ein:
{t}", +"puzzles.de_kicks_sales_has_your_number":"Der DE-KICKS-Vertrieb hat deine Nummer. Verbinde Deutschland ohne Frankfurt.", +"puzzles.diverse_route_40_survives_a_backhoe":"Getrennte Trasse (+40 %, übersteht einen Bagger)", +"puzzles.down_under_up_and_running":"Down Under, up and running", +"puzzles.drag_from_a_pink_pop_to":"Zieh von einem pinken POP zu einer anderen Stadt, um eine Wave zu mieten", +"puzzles.drag_from_this_pop_onto_another":"Zieh von diesem POP auf eine andere Puzzle-Stadt oder wähl eine hier.", +"puzzles.euro_trip":"Euro-Trip", +"puzzles.every_internet_starts_with_one_tube":"Jedes Internet beginnt mit einer Röhre.", +"puzzles.every_link_n_g_or_more":"Jeder Link {n}G oder mehr", +"puzzles.fat_pipes_only":"Nur dicke Rohre", +"puzzles.flash_boys":"Flash Boys", +"puzzles.for_architects_who_sleep_through_backhoes":"Für Architekten, die die Baggersaison verschlafen.", +"puzzles.four_capitals_one_very_long_winter":"Vier Hauptstädte, ein sehr langer Winter, null Ausreden für Ausfälle.", +"puzzles.four_cities_four_cables_one_ring":"Vier Städte, ein Ring. Tolkien wäre begeistert, dein NOC sowieso.", +"puzzles.four_cities_one_continent_and_a":"Vier Städte, ein Kontinent und dazwischen sehr viel Mais.", +"puzzles.frankfurt_to_singapore_the_short_way":"Frankfurt nach Singapur auf dem kurzen Weg. Der lange führt über Land, und das merkt man.", +"puzzles.free":"Gratis", +"puzzles.goal":"Ziel", +"puzzles.goal_city":"Zielstadt", +"puzzles.guam_slam":"Guam Slam", +"puzzles.hello_world":"Hallo, Welt", +"puzzles.honolulu_the_world_s_most_scenic":"Honolulu: der malerischste Regenerator-Standort der Welt.", +"puzzles.includes_a_new_pop_in_city":"Mit neuem POP in {city} ({price} für ein Jahr).", +"puzzles.it_works_finance_and_the_backhoe":"Läuft! Die Buchhaltung und der Bagger hätten da noch Fragen.", +"puzzles.keep_building":"Weiterbauen", +"puzzles.kiwi_fruit_salad":"Kiwi-Obstsalat", +"puzzles.lease_a_wave_to":"Wave mieten nach", +"puzzles.more_puzzles":"Mehr Puzzles", +"puzzles.n_1_club":"N-1-Club", +"puzzles.n_1_connect_everything_first":"N-1: erst alles verbinden", +"puzzles.n_g_links":"{n}G-Links", +"puzzles.n_week_streak":{"one":"{n} Woche in Folge","other":"{n} Wochen in Folge"}, +"puzzles.new_zealand_is_far_from_everything":"Neuseeland ist weit weg von allem. Genau das ist der Witz, und das Problem.", +"puzzles.next_pack_unlocks_at_n":"Nächstes Paket, {pack}, ab {n}⭐", +"puzzles.next_puzzle":"Nächstes Puzzle", +"puzzles.no_budget":"kein Budget", +"puzzles.no_budget_star_on_the_house":"kein Budget: ⭐ geht aufs Haus", +"puzzles.no_cable_lands_in_both_try":"Kein Kabel landet in {a} und {b}. Versuch es mit einem Trittstein dazwischen.", +"puzzles.no_clock_no_bills_nothing_breaks":"Keine Uhr, keine Rechnungen, nichts geht kaputt. Verbinde die Städte und hol dir drei Sterne: unter Budget, und noch verbunden, wenn irgendein Link durchtrennt wird.", +"puzzles.no_pop_in_list":"Kein POP in {list}", +"puzzles.no_subsea":"kein Seekabel", +"puzzles.no_subsea_cables":"Keine Seekabel", +"puzzles.nobody_ever_got_fired_for_buying":"Für 100G ist noch nie jemand gefeuert worden.", +"puzzles.not_this_one_find_a_way_around":"Die nicht. Such dir einen Weg drumherum.", +"puzzles.not_through_frankfurt":"Nicht über Frankfurt", +"puzzles.off_limits":"Tabu", +"puzzles.on_the_house":"Aufs Haus", +"puzzles.one_backhoe_away_from_a_very":"Ein Bagger trennt dich von einer sehr langen Nacht. Ein zweiter Weg gibt ⭐⭐⭐.", +"puzzles.one_cut_splits_it":"Ein Schnitt trennt es", +"puzzles.one_cut_splits_it_where":"Ein Schnitt trennt es: {where}", +"puzzles.one_ring_through_every_pop":"Ein Ring durch jeden POP", +"puzzles.one_very_big_island_and_a":"Eine sehr große Insel und sehr viel sehr leere Glasfaser.", +"puzzles.open_a_pop_cost":"POP eröffnen · {cost}", +"puzzles.pacific_rim_shot":"Pacific Rim Shot", +"puzzles.ping_pong_to_tokyo":"Ping-Pong nach Tokio", +"puzzles.price_per_year":"{price}/Jahr", +"puzzles.puzzle":"Puzzle", +"puzzles.puzzle_solved":"Puzzle gelöst", +"puzzles.puzzles":"Puzzles", +"puzzles.remove_this_link":"Diesen Link entfernen", +"puzzles.remove_this_pop":"Diesen POP entfernen", +"puzzles.reset":"Zurücksetzen", +"puzzles.retry_for_3_stars":"Nochmal für ⭐⭐⭐", +"puzzles.ring":"Ring", +"puzzles.ring_of_fire":"Ring of Fire", +"puzzles.rock_solid_and_gold_plated_the":"Felsenfest und vergoldet. Der CFO hat Fragen.", +"puzzles.samba_sprint":"Samba-Sprint", +"puzzles.same_puzzle_for_everyone_this_week":"Diese Woche für alle dasselbe Puzzle", +"puzzles.same_trench_cheaper_one_backhoe_cuts":"Gleicher Graben (billiger, ein Bagger kappt beide)", +"puzzles.sao_paulo_to_miami_before_the":"São Paulo nach Miami, bevor der Caipirinha warm wird.", +"puzzles.sea_to_shining_sea":"Von Küste zu Küste", +"puzzles.seattle_to_singapore_with_a_stop":"Seattle nach Singapur, mit Zwischenstopp für Sushi und Dim Sum.", +"puzzles.share_line":"Series of Tubes Puzzle {what} {stars} {spend} · seriesoftub.es", +"puzzles.size":"Größe", +"puzzles.small_calm_network_builds":"Kleine, entspannte Netzbauten", +"puzzles.smorgasbord":"Smörgåsbord", +"puzzles.speed_runs":"Speedruns", +"puzzles.spent_x":"Ausgegeben {x}", +"puzzles.spent_x_of_y":"Ausgegeben {x} / {y}", +"puzzles.stepping_stone_optional":"Trittstein (optional)", +"puzzles.suez_you_later":"Suez bald", +"puzzles.survives_any_single_cut":"Übersteht jeden einzelnen Schnitt", +"puzzles.tap_a_goal_city_to_open":"Tipp auf eine leuchtende Stadt für deinen ersten POP", +"puzzles.that_city_is_not_part_of":"Diese Stadt gehört nicht zu diesem Puzzle.", +"puzzles.the_pacific_is_big_light_is":"Der Pazifik ist groß. Licht ist schnell. Dein Budget ist beides nicht.", +"puzzles.the_pacific_rim_where_every_hop":"Der Pazifikrand, wo jeder Hop ein Ozean ist.", +"puzzles.the_shark_tank":"Das Haifischbecken", +"puzzles.the_sharks_have_been_biting_again":"Die Haie haben wieder zugebissen. Bleib auf dem Trockenen.", +"puzzles.the_sharks_say_no":"Die Haie sagen nein.", +"puzzles.three_cities_two_currencies_one_very":"Drei Städte, zwei Währungen, ein sehr kurzer Tunnel unter dem Meer.", +"puzzles.traders_paid_millions_to_shave_milliseconds":"Trader haben Millionen bezahlt, um hier Millisekunden zu sparen. Du schaffst es billiger.", +"puzzles.two_cables_across_the_atlantic_because":"Zwei Kabel über den Atlantik, denn eins ist eine Hoffnung, kein Plan.", +"puzzles.under_n_ms":"unter {n} ms", +"puzzles.undo":"Rückgängig", +"puzzles.unlocks_at_n_stars":"Ab {n}⭐", +"puzzles.weekly_puzzle":"Wochenpuzzle", +"puzzles.weekly_puzzle_key":"Wochenpuzzle {key}", +"puzzles.with_the_pop_price":"mit POP: {price}", +"puzzles.your_first_tubes_no_pressure":"Deine ersten Röhren. Kein Druck, kein Budget.", +"puzzles.your_stars":"Deine Sterne", "reach_and_subsea.premium_submarine_terminals":"Premium-Seekabel-Terminals", "release_notes.and_n_more_change":{"one":"… und {n} weitere Änderung","other":"… und {n} weitere Änderungen"}, "release_notes.read_the_full_notes_on_github":"Alle Hinweise auf GitHub lesen", @@ -3230,6 +3356,7 @@ "title.source_on_github":"Quellcode auf GitHub", "title.the_real_game_climb_from_tier":"Das echte Spiel: von Tier 3 hoch zu Tier 1.", "title.your_network_name_was_saved_and":"Dein Netz {name} wurde gespeichert und wartet auf dich.", +"traceroute.a_peer_s_customers_come_after":"die Kunden eines Peers kommen nach direkten Peers und vor Transit", "traceroute.across_the_ix_switch":"über den Switch des {ix}", "traceroute.as_path_path":"AS-Pfad: {path}", "traceroute.caches_beat_pnis":"Caches schlagen PNIs", @@ -3245,6 +3372,7 @@ "traceroute.n_network_unreachable":"!N Netz nicht erreichbar", "traceroute.name_transit":"Transit von {name}", "traceroute.net_carries_it_to_city":"{net} bringt es nach {city}", +"traceroute.net_hands_it_to_its_customer":"{net} übergibt es an seinen Kunden {to}", "traceroute.net_hands_it_to_to":"{net} übergibt es an {to}", "traceroute.no_path_every_route_between_these":"Kein Pfad: Jede Route zwischen diesen Städten ist ausgefallen oder fehlt.", "traceroute.no_working_path_between_these_pops":"kein funktionierender Pfad zwischen diesen POPs", diff --git a/site/i18n/es.js b/site/i18n/es.js index 9ded3e0..4ab93d8 100644 --- a/site/i18n/es.js +++ b/site/i18n/es.js @@ -17,6 +17,7 @@ "badges.attend_a_conference":"Asiste a una conferencia.", "badges.attend_six_conferences_in_one_game":"Asiste a seis conferencias en una partida.", "badges.badge_unlocked_name":"Insignia desbloqueada: {name}", +"badges.badge_upgraded_name":"Insignia mejorada: {name}", "badges.blackhole_one_of_your_own_cities":"Haz un blackhole a una de tus propias ciudades para frenar un DDoS.", "badges.bring_up_your_first_peering_session":"Levanta tu primera sesión de peering.", "badges.build_fiber_across_the_andes":"Tiende fibra a través de los Andes.", @@ -98,9 +99,14 @@ "badges.take_a_de_kicks_retention_offer":"Acepta una oferta de retención de DE-KICKS.", "badges.take_out_a_loan":"Pide un préstamo.", "badges.the_long_way_round":"El camino largo", +"badges.this_game_earns_fiery_badges":"Esta partida va de BGP a las 3 de la mañana: cada insignia que ganes aquí sale forjada en fuego y mejora la que ya tengas.", +"badges.this_game_earns_frosted_badges":"Esta partida está en Change Freeze: las insignias de aquí salen liofilizadas.", "badges.through_the_wall":"A través del muro", "badges.turn_on_a_transit_clean_pipe":"Activa un complemento de tubería limpia de tránsito.", "badges.two_buildings_three_cities":"Dos edificios, tres ciudades", +"badges.variant_forged_at_3_a_m":"Forjada a las 3 a. m.", +"badges.variant_freeze_dried":"Liofilizada", +"badges.variant_on_call":"De guardia", "badges.weather_a_ddos_with_your_defences":"Aguanta un DDoS con tus defensas listas.", "badges.weather_a_multi_terabit_ddos":"Aguanta un DDoS de varios terabits.", "badges.win_without_ever_taking_a_loan":"Gana sin pedir nunca un préstamo.", @@ -1842,7 +1848,7 @@ "goals.make_5_peering_friends":"Haz 5 amigos de peering", "goals.on_the_peering_tab_request_sessions":"En la pestaña Peering, solicita sesiones, o únete al route server para hacer peering con todas las redes abiertas a la vez.", "goals.open_your_home_city_and_press":"Abre tu ciudad natal y pulsa «Lanzar banda ancha». Los eyeballs son personas en casa viendo vídeos de gatos. Te pagan cada mes.", -"goals.peer_with_every_tier_1_over":"Haz peering con todos los Tier 1 por PNI y cancela todos los puertos de tránsito. Así nadie te cobra por llegar a internet.", +"goals.peer_with_every_tier_1_their_customers":"Haz peering con todos los Tier 1 por PNI y cancela todos los puertos de tránsito. Sus clientes vienen gratis, así que solo persigues las redes a las que nadie vende tránsito.", "goals.pops_in_five_of_the_six":"POPs en cinco de las seis regiones del mapa.", "goals.reach_the_whole_internet":"Llega a todo internet", "goals.serve_10_tbps":"Sirve 10 Tbps", @@ -1904,7 +1910,7 @@ "help.the_chart_button_at_the_top":"El botón de gráficas de arriba abre gráficas de tráfico por salida (cachés, PNIs, IX, tránsito), dinero en el tiempo, tráfico por ASN con cómo te llega y cuánto cuesta su tránsito, además de tus enlaces y routers más ocupados.", "help.the_group_behind_several_big":"El grupo detrás de varios grandes intercambios (Fráncfort, Madrid, Marsella, Dubái, Bombay, Nueva York) trata las listas de precios como secreto de Estado. Los puertos se cotizan por cliente y suben cuanto más grande pareces. Regatear puede funcionar, salir mal o quedarse parado una semana. Los precios se «armonizan» al alza una vez al año, los complementos aparecen en tu factura hasta que te das de baja, y intentar irte te gana un descuento de retención que acaba con una tarifa.", "help.things_break_all_the_time_fiber":"Las cosas se rompen todo el tiempo: cortes de fibra, caídas de router, cortes de luz, bucles en IX, caídas de fabric, fugas de rutas, DDoS, dedazos, fallos de refrigeración y geopolítica: sanciones, aranceles, secuestros de BGP, disputas de permisos de aterrizaje, apagones por exámenes y cortes de cables del Mar Rojo. El tráfico se reencamina solo por otras rutas y upstreams. Los enlaces paralelos por rutas diversas, un segundo router y un generador de respaldo ayudan. O paga por reparaciones urgentes.", -"help.tier_1s_reach_the_whole_internet":"Los Tier 1 llegan a todo internet sin pagar a nadie, porque todos hacen peering entre sí. Los Tier 2 hacen mucho peering pero aún compran algo de tránsito.", +"help.tier_1s_reach_the_whole_internet_cones":"Los Tier 1 llegan a todo internet sin pagar a nadie: todos hacen peering entre sí y cada uno trae su cono de clientes, todos los que le compran tránsito. Los Tier 2 hacen mucho peering pero aún compran algo de tránsito.", "help.traffic_follows_the_shortest_path_by":"El tráfico sigue la ruta más corta por distancia y métrica de enlace, y se reencamina solo cuando fallan enlaces. Cuando una ruta simplemente está llena, el exceso se descarta, igual que en un IGP real. Desde el nivel de cliente 3 puedes instalar Auto-TE en la pestaña NOC: desborda el exceso hacia hasta dos rutas alternativas con capacidad libre, siempre que no sean más del doble de largas.", "help.transit_bills_sample_your_usage":"Las facturas de tránsito muestrean tu uso cada día y cobran el percentil 95 de los últimos 30 días, así que los picos cortos se perdonan pero los largos no.", "help.users_feel_the_round_trip_to":"Los usuarios sienten el viaje de ida y vuelta hasta donde su tráfico sale de tu red hacia el tránsito. Hasta 20 ms (unos 1500 km) está bien; pasados 50 ms la banda ancha y los servicios de internet cuentan como mal servicio, lo que cuesta ingresos y clientes. El tráfico por tu propio peering, PNIs y cachés no se penaliza.", @@ -1929,12 +1935,13 @@ "hot_ports_and_rank.upgrade_the_ix_port_or_add":"Mejora el puerto IX o añade un miembro LAG.", "hot_ports_and_rank.upgrade_the_router_or_add_a":"Mejora el router o añade uno segundo en la pestaña Infra.", "hot_ports_and_rank.you_buy_transit_again":"vuelves a comprar tránsito", -"hot_ports_and_rank.you_cannot_reach_list":"no llegas a {list}", +"hot_ports_and_rank.you_cannot_reach_list_outside_cones":"no llegas a {list}, y ninguno de tus peers les vende tránsito", "hot_ports_and_rank.your_reach_is_p_not_100":"tu alcance es del {p}, no del 100 %", "hud_and_panels.all_connections_n":"Todas las conexiones {n}", "hud_and_panels.all_systems_green_enjoy_it_while":"Todos los sistemas en verde. Disfrútalo mientras dure.", "hud_and_panels.auto_fix_in_n_day":{"one":"Autorreparación en {n} día","other":"Autorreparación en {n} días"}, "hud_and_panels.blackholing_g":"blackhole de {g}", +"hud_and_panels.buys_transit_from_net_peer_with":"Compra tránsito a {net}. Haz peering con {net} y viene con ella.", "hud_and_panels.customer_level_lv_name":"Nivel de cliente {lv}: {name}", "hud_and_panels.dropping_or_overflowing":"descartando o desbordando", "hud_and_panels.every_network_on_the_map_traffic":"Todas las redes del mapa. La cuota de tráfico es cuánto del tráfico de tus usuarios va hacia ellas. Toca una conexión para saltar a su POP.", @@ -1971,6 +1978,7 @@ "hud_and_panels.p_of_traffic_between_them_scattered":"{p} % del tráfico entre ellas, repartido entre intercambios. Haces peering con {n}.", "hud_and_panels.ports_caches_and_routers_running_hot":"Puertos, cachés y routers al rojo vivo", "hud_and_panels.raise_a_full_link_s_metric":"Sube la métrica de un enlace lleno para que el tráfico prefiera otra ruta, mejóralo o instala Auto-TE.", +"hud_and_panels.reached_through_the_customer_cone_of":"Alcanzada por el cono de clientes de {net}: le compra tránsito.", "hud_and_panels.reaches_networks_from_the_last":"Llega gratis a redes de la última actualización a las que no tienes otra ruta. Conéctate a ellas antes de que termine.", "hud_and_panels.reward_cash":"Recompensa {cash}", "hud_and_panels.survived_with_no_impact":"Superado sin impacto", @@ -2381,6 +2389,8 @@ "loop.welcome_back_name_your_network_is":"Bienvenido de nuevo, {name}.
Tu red está justo donde la dejaste: {date}.", "loop.your_saved_game_could_not_be":"No se pudo cargar tu partida guardada.
Estaba dañada, así que se guardó una copia y puedes empezar de cero.", "meet_a_network.all_n_out_of_reach":{"one":"{n} fuera de alcance","other":"Las {n} fuera de alcance"}, +"meet_a_network.peer_with_the_tier_1_club":"Haz peering con el club de los Tier 1: sus clientes vienen gratis. Solo las redes que no están en el cono de nadie necesitan peering propio.", +"meet_a_network.peer_with_the_tier_1_club_n":{"one":"Haz peering con el club de los Tier 1: sus clientes vienen gratis. {n} red ya viene con un peer.","other":"Haz peering con el club de los Tier 1: sus clientes vienen gratis. {n} redes ya vienen con un peer."}, "meet_a_network.pnis_with_every_tier_1":"PNIs con todos los Tier 1", "meet_a_network.reach_without_transit":"Alcance sin tránsito", "meet_a_network.road_to_tier_1":"Camino al Tier 1", @@ -2819,6 +2829,122 @@ "progress.under_attack_now":"Bajo ataque ahora", "progress.your_score_peak_traffic":"Tu puntuación: tráfico pico", "progress.your_traffic_to_and_from_asia":"Tu tráfico desde y hacia Asia", +"puzzles.a_backhoe_walks_into_your_network":"Una retroexcavadora entra en tu red. No pasa nada.", +"puzzles.a_pop_costs_setup_plus_a_year":"Un POP cuesta {setup} de instalación y luego {mo}/mes. Los puzles cuentan la instalación y un año de alquiler.", +"puzzles.a_tiny_island_where_half_the":"Una isla diminuta donde medio Pacífico de cables para a tomar café.", +"puzzles.a_to_b_under_ms":"{a} → {b} en menos de {ms} ms", +"puzzles.a_to_b_under_ms_now":"{a} → {b} en menos de {ms} ms (ahora {now} ms)", +"puzzles.aloha_latency":"Aloha, latencia", +"puzzles.avoid_list":"sin {list}", +"puzzles.back_to_my_network":"Volver a mi red", +"puzzles.back_to_the_title":"Volver a la pantalla de inicio", +"puzzles.beat_the_clock_light_in_glass":"La luz en la fibra hace 200 km por milisegundo. Elige tus cables como si importara.", +"puzzles.belt_and_braces":"Cinturón y tirantes", +"puzzles.best_x":"mejor {x}", +"puzzles.budget":"Presupuesto", +"puzzles.budget_x":"presupuesto {x}", +"puzzles.connect_list":"Conecta {list}.", +"puzzles.connected":"Conectado", +"puzzles.copied_paste_it_anywhere":"¡Copiado! Pégalo donde quieras:
{t}", +"puzzles.de_kicks_sales_has_your_number":"Ventas de DE-KICKS tiene tu número. Conecta Alemania sin pasar por Fráncfort.", +"puzzles.diverse_route_40_survives_a_backhoe":"Ruta diversa (+40 %, sobrevive a una retroexcavadora)", +"puzzles.down_under_up_and_running":"Down Under, en marcha", +"puzzles.drag_from_a_pink_pop_to":"Arrastra desde un POP rosa a otra ciudad para alquilar una onda", +"puzzles.drag_from_this_pop_onto_another":"Arrastra desde este POP a otra ciudad del puzle, o elige una aquí.", +"puzzles.euro_trip":"Euro Trip", +"puzzles.every_internet_starts_with_one_tube":"Todo internet empieza con un tubo.", +"puzzles.every_link_n_g_or_more":"Cada enlace de {n}G o más", +"puzzles.fat_pipes_only":"Solo tuberías gordas", +"puzzles.flash_boys":"Flash Boys", +"puzzles.for_architects_who_sleep_through_backhoes":"Para arquitectos que duermen tranquilos en temporada de retroexcavadoras.", +"puzzles.four_capitals_one_very_long_winter":"Cuatro capitales, un invierno larguísimo y cero excusas para caerse.", +"puzzles.four_cities_four_cables_one_ring":"Cuatro ciudades, un anillo. Tolkien lo aprobaría; tu NOC, seguro.", +"puzzles.four_cities_one_continent_and_a":"Cuatro ciudades, un continente y mucho maíz entre medias.", +"puzzles.frankfurt_to_singapore_the_short_way":"De Fráncfort a Singapur por el camino corto. El largo va por tierra, y se nota.", +"puzzles.free":"Gratis", +"puzzles.goal":"Objetivo", +"puzzles.goal_city":"Ciudad objetivo", +"puzzles.guam_slam":"Guam Slam", +"puzzles.hello_world":"Hola, mundo", +"puzzles.honolulu_the_world_s_most_scenic":"Honolulu: el sitio de regeneración más bonito del mundo.", +"puzzles.includes_a_new_pop_in_city":"Incluye un POP nuevo en {city} ({price} por un año).", +"puzzles.it_works_finance_and_the_backhoe":"¡Funciona! Finanzas y la retroexcavadora quieren hablar contigo.", +"puzzles.keep_building":"Seguir construyendo", +"puzzles.kiwi_fruit_salad":"Macedonia de kiwi", +"puzzles.lease_a_wave_to":"Alquilar una onda hasta", +"puzzles.more_puzzles":"Más puzles", +"puzzles.n_1_club":"Club N-1", +"puzzles.n_1_connect_everything_first":"N-1: primero conéctalo todo", +"puzzles.n_g_links":"enlaces de {n}G", +"puzzles.n_week_streak":{"one":"{n} semana seguida","other":"{n} semanas seguidas"}, +"puzzles.new_zealand_is_far_from_everything":"Nueva Zelanda está lejos de todo. Esa es la gracia, y el problema.", +"puzzles.next_pack_unlocks_at_n":"El siguiente pack, {pack}, se desbloquea con {n}⭐", +"puzzles.next_puzzle":"Siguiente puzle", +"puzzles.no_budget":"sin presupuesto", +"puzzles.no_budget_star_on_the_house":"sin presupuesto: ⭐ invita la casa", +"puzzles.no_cable_lands_in_both_try":"Ningún cable llega a {a} y a {b}. Prueba con una escala entre medias.", +"puzzles.no_clock_no_bills_nothing_breaks":"Sin reloj, sin facturas, nada se rompe. Conecta las ciudades y ve a por tres estrellas: bajo presupuesto, y aún conectado si se corta cualquier enlace.", +"puzzles.no_pop_in_list":"Ningún POP en {list}", +"puzzles.no_subsea":"sin submarinos", +"puzzles.no_subsea_cables":"Sin cables submarinos", +"puzzles.nobody_ever_got_fired_for_buying":"A nadie lo han despedido nunca por comprar 100G.", +"puzzles.not_this_one_find_a_way_around":"Esta no. Busca otro camino.", +"puzzles.not_through_frankfurt":"Sin pasar por Fráncfort", +"puzzles.off_limits":"Prohibida", +"puzzles.on_the_house":"Invita la casa", +"puzzles.one_backhoe_away_from_a_very":"A una retroexcavadora de una noche muy larga. Añade un segundo camino para ⭐⭐⭐.", +"puzzles.one_cut_splits_it":"Un corte la parte en dos", +"puzzles.one_cut_splits_it_where":"Un corte la parte en dos: {where}", +"puzzles.one_ring_through_every_pop":"Un anillo por todos los POP", +"puzzles.one_very_big_island_and_a":"Una isla enorme y muchísima fibra vacía.", +"puzzles.open_a_pop_cost":"Abrir un POP · {cost}", +"puzzles.pacific_rim_shot":"Pacific Rim Shot", +"puzzles.ping_pong_to_tokyo":"Ping-pong a Tokio", +"puzzles.price_per_year":"{price}/año", +"puzzles.puzzle":"Puzle", +"puzzles.puzzle_solved":"Puzle resuelto", +"puzzles.puzzles":"Puzles", +"puzzles.remove_this_link":"Quitar este enlace", +"puzzles.remove_this_pop":"Quitar este POP", +"puzzles.reset":"Reiniciar", +"puzzles.retry_for_3_stars":"Reintentar para ⭐⭐⭐", +"puzzles.ring":"anillo", +"puzzles.ring_of_fire":"Anillo de fuego", +"puzzles.rock_solid_and_gold_plated_the":"A prueba de bombas, y bañado en oro. El director financiero tiene preguntas.", +"puzzles.samba_sprint":"Sprint de samba", +"puzzles.same_puzzle_for_everyone_this_week":"El mismo puzle para todos esta semana", +"puzzles.same_trench_cheaper_one_backhoe_cuts":"Misma zanja (más barata, una retroexcavadora corta las dos)", +"puzzles.sao_paulo_to_miami_before_the":"De São Paulo a Miami antes de que se caliente la caipiriña.", +"puzzles.sea_to_shining_sea":"De costa a costa", +"puzzles.seattle_to_singapore_with_a_stop":"De Seattle a Singapur, con parada para sushi y dim sum.", +"puzzles.share_line":"Series of Tubes puzle {what} {stars} {spend} · seriesoftub.es", +"puzzles.size":"Tamaño", +"puzzles.small_calm_network_builds":"Redes pequeñas y tranquilas", +"puzzles.smorgasbord":"Smörgåsbord", +"puzzles.speed_runs":"Contrarreloj", +"puzzles.spent_x":"Gastado {x}", +"puzzles.spent_x_of_y":"Gastado {x} / {y}", +"puzzles.stepping_stone_optional":"Escala (opcional)", +"puzzles.suez_you_later":"Suez luego", +"puzzles.survives_any_single_cut":"Sobrevive a cualquier corte", +"puzzles.tap_a_goal_city_to_open":"Toca una ciudad brillante para abrir tu primer POP", +"puzzles.that_city_is_not_part_of":"Esa ciudad no forma parte de este puzle.", +"puzzles.the_pacific_is_big_light_is":"El Pacífico es grande. La luz es rápida. Tu presupuesto no es ninguna de las dos cosas.", +"puzzles.the_pacific_rim_where_every_hop":"El borde del Pacífico, donde cada salto es un océano.", +"puzzles.the_shark_tank":"La pecera de tiburones", +"puzzles.the_sharks_have_been_biting_again":"Los tiburones vuelven a morder. Quédate en tierra firme.", +"puzzles.the_sharks_say_no":"Los tiburones dicen que no.", +"puzzles.three_cities_two_currencies_one_very":"Tres ciudades, dos monedas y un túnel muy corto bajo el mar.", +"puzzles.traders_paid_millions_to_shave_milliseconds":"Los traders pagaron millones por arañar milisegundos a esta ruta. Tú lo harás por menos.", +"puzzles.two_cables_across_the_atlantic_because":"Dos cables cruzando el Atlántico, porque uno es una esperanza, no un plan.", +"puzzles.under_n_ms":"menos de {n} ms", +"puzzles.undo":"Deshacer", +"puzzles.unlocks_at_n_stars":"Se desbloquea con {n}⭐", +"puzzles.weekly_puzzle":"Puzle semanal", +"puzzles.weekly_puzzle_key":"Puzle semanal {key}", +"puzzles.with_the_pop_price":"con el POP: {price}", +"puzzles.your_first_tubes_no_pressure":"Tus primeros tubos. Sin presión, sin presupuesto.", +"puzzles.your_stars":"Tus estrellas", "reach_and_subsea.premium_submarine_terminals":"Terminales submarinas premium", "release_notes.and_n_more_change":{"one":"…y {n} cambio más","other":"…y {n} cambios más"}, "release_notes.read_the_full_notes_on_github":"Lee las notas completas en GitHub", @@ -3228,6 +3354,7 @@ "title.source_on_github":"Código en GitHub", "title.the_real_game_climb_from_tier":"El juego de verdad: sube de Tier 3 a Tier 1.", "title.your_network_name_was_saved_and":"Tu red {name} se guardó y te está esperando.", +"traceroute.a_peer_s_customers_come_after":"los clientes de un peer van después de los peers directos y antes del tránsito", "traceroute.across_the_ix_switch":"a través del switch de {ix}", "traceroute.as_path_path":"AS path: {path}", "traceroute.caches_beat_pnis":"las cachés ganan a los PNIs", @@ -3243,6 +3370,7 @@ "traceroute.n_network_unreachable":"!N red inalcanzable", "traceroute.name_transit":"Tránsito de {name}", "traceroute.net_carries_it_to_city":"{net} lo lleva hasta {city}", +"traceroute.net_hands_it_to_its_customer":"{net} lo entrega a su cliente {to}", "traceroute.net_hands_it_to_to":"{net} lo entrega a {to}", "traceroute.no_path_every_route_between_these":"Sin ruta: todas las rutas entre estas ciudades están caídas o no existen.", "traceroute.no_working_path_between_these_pops":"sin ruta operativa entre estos POPs", diff --git a/site/i18n/fr.js b/site/i18n/fr.js index 7fc2ed1..26a6ad8 100644 --- a/site/i18n/fr.js +++ b/site/i18n/fr.js @@ -17,6 +17,7 @@ "badges.attend_a_conference":"Participe à une conférence.", "badges.attend_six_conferences_in_one_game":"Participe à six conférences dans une même partie.", "badges.badge_unlocked_name":"Badge débloqué : {name}", +"badges.badge_upgraded_name":"Badge amélioré : {name}", "badges.blackhole_one_of_your_own_cities":"Blackhole une de tes propres villes pour stopper un DDoS.", "badges.bring_up_your_first_peering_session":"Monte ta première session de peering.", "badges.build_fiber_across_the_andes":"Pose de la fibre à travers les Andes.", @@ -98,9 +99,14 @@ "badges.take_a_de_kicks_retention_offer":"Accepte une offre de fidélisation DE-KICKS.", "badges.take_out_a_loan":"Contracte un prêt.", "badges.the_long_way_round":"Le grand détour", +"badges.this_game_earns_fiery_badges":"Cette partie tourne en BGP à 3 h du matin : chaque badge gagné ici est forgé dans le feu et améliore celui que tu as déjà.", +"badges.this_game_earns_frosted_badges":"Cette partie est en Change Freeze : les badges gagnés ici sont lyophilisés.", "badges.through_the_wall":"Derrière la Muraille", "badges.turn_on_a_transit_clean_pipe":"Active une option clean-pipe sur un transit.", "badges.two_buildings_three_cities":"Deux bâtiments, trois villes", +"badges.variant_forged_at_3_a_m":"Forgé à 3 h du matin", +"badges.variant_freeze_dried":"Lyophilisé", +"badges.variant_on_call":"D’astreinte", "badges.weather_a_ddos_with_your_defences":"Encaisse un DDoS avec tes défenses prêtes.", "badges.weather_a_multi_terabit_ddos":"Encaisse un DDoS de plusieurs térabits.", "badges.win_without_ever_taking_a_loan":"Gagne sans jamais contracter de prêt.", @@ -1842,7 +1848,7 @@ "goals.make_5_peering_friends":"Fais-toi 5 amis de peering", "goals.on_the_peering_tab_request_sessions":"Dans l’onglet Peering, demande des sessions, ou rejoins le route server pour peerer d’un coup avec tous les réseaux à politique ouverte.", "goals.open_your_home_city_and_press":"Ouvre ta ville de départ et appuie sur « Lancer le haut débit ». Les eyeballs, ce sont les gens chez eux qui regardent des vidéos de chats. Ils te paient tous les mois.", -"goals.peer_with_every_tier_1_over":"Peere avec chaque Tier 1 via des PNI et résilie tous tes ports de transit. Plus personne ne te fait alors payer pour atteindre Internet.", +"goals.peer_with_every_tier_1_their_customers":"Peere avec chaque Tier 1 via des PNI et résilie tous tes ports de transit. Leurs clients viennent gratuitement avec, tu ne cours donc qu’après les réseaux à qui personne ne vend de transit.", "goals.pops_in_five_of_the_six":"Des POP dans cinq des six régions de la carte.", "goals.reach_the_whole_internet":"Atteins tout Internet", "goals.serve_10_tbps":"Sers 10 Tbps", @@ -1904,7 +1910,7 @@ "help.the_chart_button_at_the_top":"Le bouton graphique en haut ouvre les courbes de trafic par sortie (caches, PNI, IX, transit), l’argent dans le temps, le trafic par ASN avec son mode d’arrivée et son coût en transit, plus tes liens et routeurs les plus chargés.", "help.the_group_behind_several_big":"Le groupe derrière plusieurs grands IX (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) traite ses grilles tarifaires comme un secret d’État. Les ports sont chiffrés client par client et grimpent d’autant plus que tu as l’air gros. Négocier peut marcher, se retourner contre toi ou s’enliser une semaine. Une fois par an, les prix sont « harmonisés » à la hausse, des options apparaissent sur ta facture tant que tu ne les refuses pas, et tenter de partir te vaut une remise de fidélité qui se termine par des frais.", "help.things_break_all_the_time_fiber":"Ça casse tout le temps : coupures de fibre, crashs de routeurs, coupures de courant, boucles sur les IX, pannes de fabric, fuites de routes, DDoS, erreurs de manip, pannes de refroidissement, et géopolitique : sanctions, droits de douane, détournements BGP, litiges sur les permis d’atterrissement, coupures les jours d’examen et câbles sectionnés en mer Rouge. Le trafic se reroute automatiquement via d’autres chemins et upstreams. Des liens parallèles sur des chemins diversifiés, un second routeur et un groupe électrogène de secours aident tous. Ou paie pour accélérer les réparations.", -"help.tier_1s_reach_the_whole_internet":"Les Tier 1 atteignent tout Internet sans payer personne, parce qu’ils font tous du peering entre eux. Les Tier 2 font beaucoup de peering mais achètent encore un peu de transit.", +"help.tier_1s_reach_the_whole_internet_cones":"Les Tier 1 atteignent tout Internet sans payer personne : ils font tous du peering entre eux, et chacun apporte son cône de clients, tous ceux qui lui achètent du transit. Les Tier 2 font beaucoup de peering mais achètent encore un peu de transit.", "help.traffic_follows_the_shortest_path_by":"Le trafic suit le chemin le plus court selon la distance et la métrique des liens, et se reroute tout seul quand des liens tombent. Quand un chemin est simplement plein, l’excédent est jeté, comme dans un vrai IGP. Dès le niveau clients 3, tu peux installer Auto-TE dans l’onglet NOC : il déverse l’excédent sur jusqu’à deux chemins alternatifs avec de la capacité libre, tant qu’ils ne sont pas plus de deux fois plus longs.", "help.transit_bills_sample_your_usage":"Les factures de transit échantillonnent ta conso chaque jour et facturent le 95e percentile des 30 derniers jours : les pics courts sont pardonnés, les longs non.", "help.users_feel_the_round_trip_to":"Les utilisateurs sentent l’aller-retour jusqu’à l’endroit où leur trafic quitte votre réseau pour le transit. Jusqu’à 20 ms (environ 1 500 km), ça va ; au-delà de 50 ms, le haut débit et les services internet comptent comme un mauvais service, ce qui coûte revenus et clients. Le trafic qui passe par votre peering, vos PNI et vos caches n’est pas pénalisé.", @@ -1929,12 +1935,13 @@ "hot_ports_and_rank.upgrade_the_ix_port_or_add":"Mets à niveau le port IX ou ajoute un membre au LAG.", "hot_ports_and_rank.upgrade_the_router_or_add_a":"Mets à niveau le routeur ou ajoutes-en un second dans l’onglet Infra.", "hot_ports_and_rank.you_buy_transit_again":"tu rachètes du transit", -"hot_ports_and_rank.you_cannot_reach_list":"tu n’atteins pas {list}", +"hot_ports_and_rank.you_cannot_reach_list_outside_cones":"tu n’atteins pas {list}, et aucun de tes peers ne leur vend de transit", "hot_ports_and_rank.your_reach_is_p_not_100":"ta couverture est de {p}, pas 100 %", "hud_and_panels.all_connections_n":"Toutes les connexions {n}", "hud_and_panels.all_systems_green_enjoy_it_while":"Tout est au vert. Profites-en, ça ne durera pas.", "hud_and_panels.auto_fix_in_n_day":{"one":"Réparation auto dans {n} jour","other":"Réparation auto dans {n} jours"}, "hud_and_panels.blackholing_g":"{g} en blackhole", +"hud_and_panels.buys_transit_from_net_peer_with":"Achète du transit à {net}. Peere avec {net} et il vient avec.", "hud_and_panels.customer_level_lv_name":"Niveau client {lv} : {name}", "hud_and_panels.dropping_or_overflowing":"pertes ou débordement", "hud_and_panels.every_network_on_the_map_traffic":"Tous les réseaux de la carte. La part de trafic, c’est la portion du trafic de tes utilisateurs qui va vers eux. Touche une connexion pour sauter à son POP.", @@ -1971,6 +1978,7 @@ "hud_and_panels.p_of_traffic_between_them_scattered":"{p} % du trafic à eux tous, éparpillé sur les IX. Tu es en peering avec {n}.", "hud_and_panels.ports_caches_and_routers_running_hot":"Ports, caches et routeurs en surchauffe", "hud_and_panels.raise_a_full_link_s_metric":"Augmente la métrique d’un lien plein pour que le trafic préfère un autre chemin, mets-le à niveau ou installe Auto-TE.", +"hud_and_panels.reached_through_the_customer_cone_of":"Atteint via le cône de clients de {net} : il lui achète du transit.", "hud_and_panels.reaches_networks_from_the_last":"Atteint gratuitement les réseaux de la dernière mise à jour vers lesquels tu n’as aucun autre chemin. Connecte-toi à eux avant la fin.", "hud_and_panels.reward_cash":"Récompense {cash}", "hud_and_panels.survived_with_no_impact":"Encaissés sans impact", @@ -2381,6 +2389,8 @@ "loop.welcome_back_name_your_network_is":"Re-bonjour, {name}.
Ton réseau est exactement là où tu l’as laissé : {date}.", "loop.your_saved_game_could_not_be":"Impossible de charger ta sauvegarde.
Elle était endommagée : une copie a été conservée et tu peux repartir de zéro.", "meet_a_network.all_n_out_of_reach":{"one":"Les {n} hors couverture","other":"Les {n} hors couverture"}, +"meet_a_network.peer_with_the_tier_1_club":"Peere avec le club des Tier 1 : leurs clients viennent gratuitement avec. Seuls les réseaux qui ne sont dans le cône de personne demandent leur propre peering.", +"meet_a_network.peer_with_the_tier_1_club_n":{"one":"Peere avec le club des Tier 1 : leurs clients viennent gratuitement avec. {n} réseau vient déjà avec un peer.","other":"Peere avec le club des Tier 1 : leurs clients viennent gratuitement avec. {n} réseaux viennent déjà avec un peer."}, "meet_a_network.pnis_with_every_tier_1":"PNI avec chaque Tier 1", "meet_a_network.reach_without_transit":"Couverture sans transit", "meet_a_network.road_to_tier_1":"En route vers le Tier 1", @@ -2819,6 +2829,122 @@ "progress.under_attack_now":"Sous attaque", "progress.your_score_peak_traffic":"Ton score : pic de trafic", "progress.your_traffic_to_and_from_asia":"Ton trafic vers et depuis l’Asie", +"puzzles.a_backhoe_walks_into_your_network":"C’est une pelleteuse qui entre dans ton réseau. Il ne se passe rien.", +"puzzles.a_pop_costs_setup_plus_a_year":"Un POP coûte {setup} à installer, puis {mo}/mois. Les puzzles comptent l’installation et un an de loyer.", +"puzzles.a_tiny_island_where_half_the":"Une île minuscule où la moitié des câbles du Pacifique s’arrêtent pour un café.", +"puzzles.a_to_b_under_ms":"{a} → {b} en moins de {ms} ms", +"puzzles.a_to_b_under_ms_now":"{a} → {b} en moins de {ms} ms (actuellement {now} ms)", +"puzzles.aloha_latency":"Aloha la latence", +"puzzles.avoid_list":"sans {list}", +"puzzles.back_to_my_network":"Retour à mon réseau", +"puzzles.back_to_the_title":"Retour à l’écran titre", +"puzzles.beat_the_clock_light_in_glass":"La lumière dans la fibre fait 200 km par milliseconde. Choisis tes câbles comme si ça comptait.", +"puzzles.belt_and_braces":"Ceinture et bretelles", +"puzzles.best_x":"record {x}", +"puzzles.budget":"Budget", +"puzzles.budget_x":"budget {x}", +"puzzles.connect_list":"Relie {list}.", +"puzzles.connected":"Relié", +"puzzles.copied_paste_it_anywhere":"Copié ! Colle-le où tu veux :
{t}", +"puzzles.de_kicks_sales_has_your_number":"Les commerciaux de DE-KICKS ont ton numéro. Relie l’Allemagne sans passer par Francfort.", +"puzzles.diverse_route_40_survives_a_backhoe":"Route diverse (+40 %, survit à une pelleteuse)", +"puzzles.down_under_up_and_running":"Down Under, ça tourne", +"puzzles.drag_from_a_pink_pop_to":"Glisse depuis un POP rose vers une autre ville pour louer une longueur d’onde", +"puzzles.drag_from_this_pop_onto_another":"Glisse depuis ce POP vers une autre ville du puzzle, ou choisis-en une ici.", +"puzzles.euro_trip":"Euro Trip", +"puzzles.every_internet_starts_with_one_tube":"Tout internet commence par un tube.", +"puzzles.every_link_n_g_or_more":"Chaque lien à {n}G ou plus", +"puzzles.fat_pipes_only":"Gros tuyaux uniquement", +"puzzles.flash_boys":"Flash Boys", +"puzzles.for_architects_who_sleep_through_backhoes":"Pour les architectes qui dorment pendant la saison des pelleteuses.", +"puzzles.four_capitals_one_very_long_winter":"Quatre capitales, un très long hiver, zéro excuse pour une panne.", +"puzzles.four_cities_four_cables_one_ring":"Quatre villes, un anneau. Tolkien approuverait ; ton NOC, à coup sûr.", +"puzzles.four_cities_one_continent_and_a":"Quatre villes, un continent et beaucoup de maïs entre les deux.", +"puzzles.frankfurt_to_singapore_the_short_way":"Francfort–Singapour par le chemin court. Le long passe par la terre, et ça se voit.", +"puzzles.free":"Gratuit", +"puzzles.goal":"Objectif", +"puzzles.goal_city":"Ville objectif", +"puzzles.guam_slam":"Guam Slam", +"puzzles.hello_world":"Hello, World", +"puzzles.honolulu_the_world_s_most_scenic":"Honolulu : le site de régénération le plus pittoresque du monde.", +"puzzles.includes_a_new_pop_in_city":"Inclut un nouveau POP à {city} ({price} pour un an).", +"puzzles.it_works_finance_and_the_backhoe":"Ça marche ! La compta et la pelleteuse aimeraient te dire un mot.", +"puzzles.keep_building":"Continuer à construire", +"puzzles.kiwi_fruit_salad":"Salade de kiwis", +"puzzles.lease_a_wave_to":"Louer une longueur d’onde vers", +"puzzles.more_puzzles":"Plus de puzzles", +"puzzles.n_1_club":"Club N-1", +"puzzles.n_1_connect_everything_first":"N-1 : relie d’abord tout", +"puzzles.n_g_links":"liens {n}G", +"puzzles.n_week_streak":{"one":"{n} semaine d’affilée","other":"{n} semaines d’affilée"}, +"puzzles.new_zealand_is_far_from_everything":"La Nouvelle-Zélande est loin de tout. C’est tout l’intérêt, et tout le problème.", +"puzzles.next_pack_unlocks_at_n":"Prochain pack, {pack}, à {n}⭐", +"puzzles.next_puzzle":"Puzzle suivant", +"puzzles.no_budget":"sans budget", +"puzzles.no_budget_star_on_the_house":"sans budget : ⭐ offerte par la maison", +"puzzles.no_cable_lands_in_both_try":"Aucun câble n’atterrit à la fois à {a} et à {b}. Essaie une escale entre les deux.", +"puzzles.no_clock_no_bills_nothing_breaks":"Pas d’horloge, pas de factures, rien ne casse. Relie les villes, puis vise trois étoiles : sous le budget, et toujours relié si n’importe quel lien est coupé.", +"puzzles.no_pop_in_list":"Aucun POP à {list}", +"puzzles.no_subsea":"pas de sous-marin", +"puzzles.no_subsea_cables":"Pas de câbles sous-marins", +"puzzles.nobody_ever_got_fired_for_buying":"Personne ne s’est jamais fait virer pour avoir acheté du 100G.", +"puzzles.not_this_one_find_a_way_around":"Pas celle-là. Trouve un détour.", +"puzzles.not_through_frankfurt":"Pas par Francfort", +"puzzles.off_limits":"Interdite", +"puzzles.on_the_house":"Offert par la maison", +"puzzles.one_backhoe_away_from_a_very":"À une pelleteuse d’une très longue nuit. Ajoute un deuxième chemin pour ⭐⭐⭐.", +"puzzles.one_cut_splits_it":"Une coupure le divise", +"puzzles.one_cut_splits_it_where":"Une coupure le divise : {where}", +"puzzles.one_ring_through_every_pop":"Un anneau qui passe par chaque POP", +"puzzles.one_very_big_island_and_a":"Une très grande île, et beaucoup de fibre très vide.", +"puzzles.open_a_pop_cost":"Ouvrir un POP · {cost}", +"puzzles.pacific_rim_shot":"Pacific Rim Shot", +"puzzles.ping_pong_to_tokyo":"Ping-pong jusqu’à Tokyo", +"puzzles.price_per_year":"{price}/an", +"puzzles.puzzle":"Puzzle", +"puzzles.puzzle_solved":"Puzzle résolu", +"puzzles.puzzles":"Puzzles", +"puzzles.remove_this_link":"Supprimer ce lien", +"puzzles.remove_this_pop":"Supprimer ce POP", +"puzzles.reset":"Recommencer", +"puzzles.retry_for_3_stars":"Réessayer pour ⭐⭐⭐", +"puzzles.ring":"anneau", +"puzzles.ring_of_fire":"Ceinture de feu", +"puzzles.rock_solid_and_gold_plated_the":"Solide comme un roc, et plaqué or. Le DAF a des questions.", +"puzzles.samba_sprint":"Sprint samba", +"puzzles.same_puzzle_for_everyone_this_week":"Le même puzzle pour tout le monde cette semaine", +"puzzles.same_trench_cheaper_one_backhoe_cuts":"Même tranchée (moins cher, une pelleteuse coupe les deux)", +"puzzles.sao_paulo_to_miami_before_the":"São Paulo–Miami avant que la caïpirinha ne tiédisse.", +"puzzles.sea_to_shining_sea":"D’une côte à l’autre", +"puzzles.seattle_to_singapore_with_a_stop":"Seattle–Singapour, avec une escale sushis et dim sum.", +"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es", +"puzzles.size":"Taille", +"puzzles.small_calm_network_builds":"Petits réseaux, tranquillement", +"puzzles.smorgasbord":"Smörgåsbord", +"puzzles.speed_runs":"Contre la montre", +"puzzles.spent_x":"Dépensé {x}", +"puzzles.spent_x_of_y":"Dépensé {x} / {y}", +"puzzles.stepping_stone_optional":"Escale (facultative)", +"puzzles.suez_you_later":"Suez la prochaine", +"puzzles.survives_any_single_cut":"Survit à n’importe quelle coupure", +"puzzles.tap_a_goal_city_to_open":"Touche une ville lumineuse pour ouvrir ton premier POP", +"puzzles.that_city_is_not_part_of":"Cette ville ne fait pas partie de ce puzzle.", +"puzzles.the_pacific_is_big_light_is":"Le Pacifique est grand. La lumière est rapide. Ton budget n’est ni l’un ni l’autre.", +"puzzles.the_pacific_rim_where_every_hop":"Le pourtour du Pacifique, où chaque saut est un océan.", +"puzzles.the_shark_tank":"L’aquarium à requins", +"puzzles.the_sharks_have_been_biting_again":"Les requins ont encore mordu. Reste sur la terre ferme.", +"puzzles.the_sharks_say_no":"Les requins disent non.", +"puzzles.three_cities_two_currencies_one_very":"Trois villes, deux monnaies, un tout petit tunnel sous la mer.", +"puzzles.traders_paid_millions_to_shave_milliseconds":"Des traders ont payé des millions pour gratter des millisecondes sur cette route. Toi, tu le fais pour moins cher.", +"puzzles.two_cables_across_the_atlantic_because":"Deux câbles à travers l’Atlantique, parce qu’un seul, c’est un espoir, pas un plan.", +"puzzles.under_n_ms":"moins de {n} ms", +"puzzles.undo":"Annuler", +"puzzles.unlocks_at_n_stars":"À partir de {n}⭐", +"puzzles.weekly_puzzle":"Puzzle de la semaine", +"puzzles.weekly_puzzle_key":"Puzzle de la semaine {key}", +"puzzles.with_the_pop_price":"avec le POP : {price}", +"puzzles.your_first_tubes_no_pressure":"Tes premiers tubes. Pas de pression, pas de budget.", +"puzzles.your_stars":"Tes étoiles", "reach_and_subsea.premium_submarine_terminals":"Terminaux sous-marins premium", "release_notes.and_n_more_change":{"one":"…et {n} autre changement","other":"…et {n} autres changements"}, "release_notes.read_the_full_notes_on_github":"Lire les notes complètes sur GitHub", @@ -3228,6 +3354,7 @@ "title.source_on_github":"Code source sur GitHub", "title.the_real_game_climb_from_tier":"Le vrai jeu : grimpe de Tier 3 à Tier 1.", "title.your_network_name_was_saved_and":"Ton réseau {name} a été sauvegardé et t’attend.", +"traceroute.a_peer_s_customers_come_after":"les clients d’un peer passent après les peers directs, avant le transit", "traceroute.across_the_ix_switch":"via le switch de {ix}", "traceroute.as_path_path":"AS path : {path}", "traceroute.caches_beat_pnis":"les caches battent les PNI", @@ -3243,6 +3370,7 @@ "traceroute.n_network_unreachable":"!N réseau injoignable", "traceroute.name_transit":"Transit {name}", "traceroute.net_carries_it_to_city":"{net} l’achemine jusqu’à {city}", +"traceroute.net_hands_it_to_its_customer":"{net} le passe à son client {to}", "traceroute.net_hands_it_to_to":"{net} le passe à {to}", "traceroute.no_path_every_route_between_these":"Aucun chemin : toutes les routes entre ces villes sont coupées ou inexistantes.", "traceroute.no_working_path_between_these_pops":"aucun chemin fonctionnel entre ces POP", diff --git a/site/i18n/it.js b/site/i18n/it.js index d6752e3..b2547d1 100644 --- a/site/i18n/it.js +++ b/site/i18n/it.js @@ -17,6 +17,7 @@ "badges.attend_a_conference":"Partecipa a una conferenza.", "badges.attend_six_conferences_in_one_game":"Partecipa a sei conferenze in una partita.", "badges.badge_unlocked_name":"Badge sbloccato: {name}", +"badges.badge_upgraded_name":"Badge migliorato: {name}", "badges.blackhole_one_of_your_own_cities":"Metti in buco nero una tua città per fermare un DDoS.", "badges.bring_up_your_first_peering_session":"Attiva la tua prima sessione di peering.", "badges.build_fiber_across_the_andes":"Posa fibra attraverso le Ande.", @@ -98,9 +99,14 @@ "badges.take_a_de_kicks_retention_offer":"Accetta un’offerta di fidelizzazione DE-KICKS.", "badges.take_out_a_loan":"Chiedi un prestito.", "badges.the_long_way_round":"Il giro lungo", +"badges.this_game_earns_fiery_badges":"Questa partita gira con BGP alle 3 di notte: ogni badge che guadagni qui è forgiato nel fuoco e migliora quello che hai già.", +"badges.this_game_earns_frosted_badges":"Questa partita è in Change Freeze: i badge che guadagni qui arrivano liofilizzati.", "badges.through_the_wall":"Oltre la Muraglia", "badges.turn_on_a_transit_clean_pipe":"Attiva un add-on clean-pipe su un transit.", "badges.two_buildings_three_cities":"Due edifici, tre città", +"badges.variant_forged_at_3_a_m":"Forgiato alle 3 di notte", +"badges.variant_freeze_dried":"Liofilizzato", +"badges.variant_on_call":"Reperibile", "badges.weather_a_ddos_with_your_defences":"Reggi un DDoS con le difese pronte.", "badges.weather_a_multi_terabit_ddos":"Reggi un DDoS da più terabit.", "badges.win_without_ever_taking_a_loan":"Vinci senza mai chiedere un prestito.", @@ -1842,7 +1848,7 @@ "goals.make_5_peering_friends":"Fatti 5 amici di peering", "goals.on_the_peering_tab_request_sessions":"Nella scheda Peering richiedi delle sessioni, oppure entra nel route server per fare peering con tutte le reti open in un colpo solo.", "goals.open_your_home_city_and_press":"Apri la tua città di partenza e premi “Lancia la banda larga”. Gli eyeball sono persone a casa che guardano video di gatti. Ti pagano ogni mese.", -"goals.peer_with_every_tier_1_over":"Fai peering con ogni Tier 1 via PNI e disdici ogni porta di transit. Così nessuno ti fa pagare per raggiungere internet.", +"goals.peer_with_every_tier_1_their_customers":"Fai peering con ogni Tier 1 via PNI e disdici ogni porta di transit. I loro clienti arrivano gratis, quindi rincorri solo le reti a cui nessuno vende transit.", "goals.pops_in_five_of_the_six":"POP in cinque delle sei regioni della mappa.", "goals.reach_the_whole_internet":"Raggiungi tutta internet", "goals.serve_10_tbps":"Servi 10 Tbps", @@ -1904,7 +1910,7 @@ "help.the_chart_button_at_the_top":"Il pulsante del grafico in alto apre i grafici del traffico per uscita (cache, PNI, IX, transit), i soldi nel tempo, il traffico per ASN con come ti raggiunge e quanto costa in transit, più i tuoi link e router più carichi.", "help.the_group_behind_several_big":"Il gruppo dietro diversi grandi exchange (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) tratta i listini come un segreto di Stato. Le porte vengono quotate cliente per cliente e salgono quanto più sembri grande. Contrattare può funzionare, ritorcertisi contro o arenarsi per una settimana. Una volta l’anno i prezzi vengono “armonizzati” verso l’alto, in fattura spuntano servizi aggiuntivi finché non li disdici, e provare ad andartene ti frutta uno sconto fedeltà che finisce con una penale.", "help.things_break_all_the_time_fiber":"Le cose si rompono di continuo: tagli di fibra, crash dei router, blackout, loop sugli IX, disservizi dei fabric, route leak, DDoS, dita grosse, guasti al raffreddamento, e poi la geopolitica: sanzioni, dazi, hijack BGP, dispute sui permessi di approdo, shutdown nei giorni d’esame e cavi tranciati nel Mar Rosso. Il traffico si reinstrada da solo su altri percorsi e upstream. Link paralleli su percorsi diversi, un secondo router e un generatore di backup aiutano tutti. Oppure paga per accelerare le riparazioni.", -"help.tier_1s_reach_the_whole_internet":"I Tier 1 raggiungono tutto internet senza pagare nessuno, perché fanno tutti peering tra loro. I Tier 2 fanno molto peering ma comprano ancora un po’ di transit.", +"help.tier_1s_reach_the_whole_internet_cones":"I Tier 1 raggiungono tutto internet senza pagare nessuno: fanno tutti peering tra loro e ognuno si porta dietro il suo cono di clienti, tutti quelli che gli comprano transit. I Tier 2 fanno molto peering ma comprano ancora un po’ di transit.", "help.traffic_follows_the_shortest_path_by":"Il traffico segue il percorso più corto per distanza e metrica dei link, e si reinstrada da solo quando i link si guastano. Quando un percorso è semplicemente pieno, l’eccesso viene scartato, proprio come in un vero IGP. Dal livello clienti 3 puoi installare Auto-TE nella scheda NOC: riversa l’eccesso su un massimo di due percorsi alternativi con capacità libera, purché non siano lunghi più del doppio.", "help.transit_bills_sample_your_usage":"Le bollette del transit campionano il tuo consumo ogni giorno e addebitano il 95° percentile degli ultimi 30 giorni: i picchi brevi vengono perdonati, quelli lunghi no.", "help.users_feel_the_round_trip_to":"Gli utenti sentono l’andata e ritorno fino al punto in cui il loro traffico lascia la tua rete per il transito. Fino a 20 ms (circa 1.500 km) va bene; oltre i 50 ms banda larga e servizi internet contano come servizio scadente, e costa ricavi e clienti. Il traffico sul tuo peering, sulle PNI e sulle cache non viene penalizzato.", @@ -1929,12 +1935,13 @@ "hot_ports_and_rank.upgrade_the_ix_port_or_add":"Fai l’upgrade della porta IX o aggiungi un membro al LAG.", "hot_ports_and_rank.upgrade_the_router_or_add_a":"Fai l’upgrade del router o aggiungine un secondo nella scheda Infra.", "hot_ports_and_rank.you_buy_transit_again":"compri di nuovo transit", -"hot_ports_and_rank.you_cannot_reach_list":"non raggiungi {list}", +"hot_ports_and_rank.you_cannot_reach_list_outside_cones":"non raggiungi {list}, e nessuno dei tuoi peer gli vende transit", "hot_ports_and_rank.your_reach_is_p_not_100":"la tua raggiungibilità è {p}, non 100%", "hud_and_panels.all_connections_n":"Tutte le connessioni {n}", "hud_and_panels.all_systems_green_enjoy_it_while":"Tutto verde. Goditela finché dura.", "hud_and_panels.auto_fix_in_n_day":{"one":"Si risolve da solo tra {n} giorno","other":"Si risolve da solo tra {n} giorni"}, "hud_and_panels.blackholing_g":"{g} in blackhole", +"hud_and_panels.buys_transit_from_net_peer_with":"Compra transit da {net}. Fai peering con {net} e arriva con lei.", "hud_and_panels.customer_level_lv_name":"Livello cliente {lv}: {name}", "hud_and_panels.dropping_or_overflowing":"scarta o trabocca", "hud_and_panels.every_network_on_the_map_traffic":"Tutte le reti sulla mappa. La quota di traffico è quanto del traffico dei tuoi utenti va verso di loro. Tocca una connessione per andare al suo POP.", @@ -1971,6 +1978,7 @@ "hud_and_panels.p_of_traffic_between_them_scattered":"{p}% del traffico in tutto, sparse tra vari exchange. Sei in peering con {n}.", "hud_and_panels.ports_caches_and_routers_running_hot":"Porte, cache e router sotto sforzo", "hud_and_panels.raise_a_full_link_s_metric":"Alza la metrica di un link pieno così il traffico preferisce un altro percorso, potenzialo, oppure installa Auto-TE.", +"hud_and_panels.reached_through_the_customer_cone_of":"Raggiunta tramite il cono di clienti di {net}: compra transit lì.", "hud_and_panels.reaches_networks_from_the_last":"Raggiunge gratis le reti dell’ultimo aggiornamento che non hai altro modo di raggiungere. Collegati a loro prima che finisca.", "hud_and_panels.reward_cash":"Premio {cash}", "hud_and_panels.survived_with_no_impact":"Superati senza danni", @@ -2381,6 +2389,8 @@ "loop.welcome_back_name_your_network_is":"Bentornato, {name}.
La tua rete è proprio dove l’avevi lasciata: {date}.", "loop.your_saved_game_could_not_be":"Impossibile caricare la partita salvata.
Era danneggiata: ne abbiamo tenuto una copia di backup e puoi ricominciare da zero.", "meet_a_network.all_n_out_of_reach":{"one":"Tutte le {n} fuori copertura","other":"Tutte le {n} fuori copertura"}, +"meet_a_network.peer_with_the_tier_1_club":"Fai peering con il club dei Tier 1: i loro clienti arrivano gratis. Solo le reti che non stanno nel cono di nessuno vogliono un peering tutto loro.", +"meet_a_network.peer_with_the_tier_1_club_n":{"one":"Fai peering con il club dei Tier 1: i loro clienti arrivano gratis. {n} rete arriva già con un peer.","other":"Fai peering con il club dei Tier 1: i loro clienti arrivano gratis. {n} reti arrivano già con un peer."}, "meet_a_network.pnis_with_every_tier_1":"PNI con ogni Tier 1", "meet_a_network.reach_without_transit":"Copertura senza transit", "meet_a_network.road_to_tier_1":"Verso il Tier 1", @@ -2819,6 +2829,122 @@ "progress.under_attack_now":"Sotto attacco ora", "progress.your_score_peak_traffic":"Il tuo punteggio: picco di traffico", "progress.your_traffic_to_and_from_asia":"Il tuo traffico da e per l’Asia", +"puzzles.a_backhoe_walks_into_your_network":"Una ruspa entra nella tua rete. Non succede niente.", +"puzzles.a_pop_costs_setup_plus_a_year":"Un POP costa {setup} di attivazione, poi {mo}/mese. I puzzle contano l’attivazione e un anno di canone.", +"puzzles.a_tiny_island_where_half_the":"Un’isoletta dove metà dei cavi del Pacifico si ferma per un caffè.", +"puzzles.a_to_b_under_ms":"{a} → {b} sotto i {ms} ms", +"puzzles.a_to_b_under_ms_now":"{a} → {b} sotto i {ms} ms (ora {now} ms)", +"puzzles.aloha_latency":"Aloha latenza", +"puzzles.avoid_list":"senza {list}", +"puzzles.back_to_my_network":"Torna alla mia rete", +"puzzles.back_to_the_title":"Torna alla schermata iniziale", +"puzzles.beat_the_clock_light_in_glass":"La luce nella fibra fa 200 km al millisecondo. Scegli i cavi come se contasse.", +"puzzles.belt_and_braces":"Cintura e bretelle", +"puzzles.best_x":"record {x}", +"puzzles.budget":"Budget", +"puzzles.budget_x":"budget {x}", +"puzzles.connect_list":"Collega {list}.", +"puzzles.connected":"Collegato", +"puzzles.copied_paste_it_anywhere":"Copiato! Incollalo dove vuoi:
{t}", +"puzzles.de_kicks_sales_has_your_number":"Il commerciale di DE-KICKS ha il tuo numero. Collega la Germania senza passare da Francoforte.", +"puzzles.diverse_route_40_survives_a_backhoe":"Percorso diverso (+40%, sopravvive a una ruspa)", +"puzzles.down_under_up_and_running":"Down Under, operativi", +"puzzles.drag_from_a_pink_pop_to":"Trascina da un POP rosa a un’altra città per noleggiare una wave", +"puzzles.drag_from_this_pop_onto_another":"Trascina da questo POP su un’altra città del puzzle, o scegline una qui.", +"puzzles.euro_trip":"Euro Trip", +"puzzles.every_internet_starts_with_one_tube":"Ogni internet comincia con un tubo.", +"puzzles.every_link_n_g_or_more":"Ogni link da {n}G o più", +"puzzles.fat_pipes_only":"Solo tubi grossi", +"puzzles.flash_boys":"Flash Boys", +"puzzles.for_architects_who_sleep_through_backhoes":"Per architetti che dormono sonni tranquilli nella stagione delle ruspe.", +"puzzles.four_capitals_one_very_long_winter":"Quattro capitali, un inverno lunghissimo, zero scuse per i disservizi.", +"puzzles.four_cities_four_cables_one_ring":"Quattro città, un anello. Tolkien approverebbe; il tuo NOC di sicuro.", +"puzzles.four_cities_one_continent_and_a":"Quattro città, un continente e tantissimo mais in mezzo.", +"puzzles.frankfurt_to_singapore_the_short_way":"Da Francoforte a Singapore per la via corta. Quella lunga è via terra, e si vede.", +"puzzles.free":"Gratis", +"puzzles.goal":"Obiettivo", +"puzzles.goal_city":"Città obiettivo", +"puzzles.guam_slam":"Guam Slam", +"puzzles.hello_world":"Ciao, mondo", +"puzzles.honolulu_the_world_s_most_scenic":"Honolulu: il sito di rigenerazione più panoramico del mondo.", +"puzzles.includes_a_new_pop_in_city":"Include un nuovo POP a {city} ({price} per un anno).", +"puzzles.it_works_finance_and_the_backhoe":"Funziona! L’amministrazione e la ruspa vorrebbero parlarti.", +"puzzles.keep_building":"Continua a costruire", +"puzzles.kiwi_fruit_salad":"Macedonia di kiwi", +"puzzles.lease_a_wave_to":"Noleggia una wave verso", +"puzzles.more_puzzles":"Altri puzzle", +"puzzles.n_1_club":"Club N-1", +"puzzles.n_1_connect_everything_first":"N-1: prima collega tutto", +"puzzles.n_g_links":"link da {n}G", +"puzzles.n_week_streak":{"one":"{n} settimana di fila","other":"{n} settimane di fila"}, +"puzzles.new_zealand_is_far_from_everything":"La Nuova Zelanda è lontana da tutto. È proprio questo il bello, e il problema.", +"puzzles.next_pack_unlocks_at_n":"Il prossimo pacchetto, {pack}, si sblocca a {n}⭐", +"puzzles.next_puzzle":"Prossimo puzzle", +"puzzles.no_budget":"senza budget", +"puzzles.no_budget_star_on_the_house":"senza budget: ⭐ offerta dalla casa", +"puzzles.no_cable_lands_in_both_try":"Nessun cavo approda sia a {a} che a {b}. Prova con una tappa in mezzo.", +"puzzles.no_clock_no_bills_nothing_breaks":"Niente orologio, niente bollette, non si rompe niente. Collega le città, poi punta alle tre stelle: sotto budget, e ancora collegato se si taglia un link qualsiasi.", +"puzzles.no_pop_in_list":"Nessun POP a {list}", +"puzzles.no_subsea":"niente sottomarini", +"puzzles.no_subsea_cables":"Niente cavi sottomarini", +"puzzles.nobody_ever_got_fired_for_buying":"Nessuno è mai stato licenziato per aver comprato 100G.", +"puzzles.not_this_one_find_a_way_around":"Questa no. Trova un altro giro.", +"puzzles.not_through_frankfurt":"Non da Francoforte", +"puzzles.off_limits":"Vietata", +"puzzles.on_the_house":"Offre la casa", +"puzzles.one_backhoe_away_from_a_very":"A una ruspa da una nottata lunghissima. Aggiungi un secondo percorso per ⭐⭐⭐.", +"puzzles.one_cut_splits_it":"Un taglio la divide", +"puzzles.one_cut_splits_it_where":"Un taglio la divide: {where}", +"puzzles.one_ring_through_every_pop":"Un anello che passa per ogni POP", +"puzzles.one_very_big_island_and_a":"Un’isola enorme e tantissima fibra vuota.", +"puzzles.open_a_pop_cost":"Apri un POP · {cost}", +"puzzles.pacific_rim_shot":"Pacific Rim Shot", +"puzzles.ping_pong_to_tokyo":"Ping pong fino a Tokyo", +"puzzles.price_per_year":"{price}/anno", +"puzzles.puzzle":"Puzzle", +"puzzles.puzzle_solved":"Puzzle risolto", +"puzzles.puzzles":"Puzzle", +"puzzles.remove_this_link":"Rimuovi questo link", +"puzzles.remove_this_pop":"Rimuovi questo POP", +"puzzles.reset":"Ricomincia", +"puzzles.retry_for_3_stars":"Riprova per ⭐⭐⭐", +"puzzles.ring":"anello", +"puzzles.ring_of_fire":"Cintura di fuoco", +"puzzles.rock_solid_and_gold_plated_the":"Solida come una roccia, e placcata d’oro. Il CFO ha delle domande.", +"puzzles.samba_sprint":"Sprint di samba", +"puzzles.same_puzzle_for_everyone_this_week":"Lo stesso puzzle per tutti questa settimana", +"puzzles.same_trench_cheaper_one_backhoe_cuts":"Stesso scavo (più economico, una ruspa li taglia tutti e due)", +"puzzles.sao_paulo_to_miami_before_the":"Da São Paulo a Miami prima che la caipirinha si scaldi.", +"puzzles.sea_to_shining_sea":"Da costa a costa", +"puzzles.seattle_to_singapore_with_a_stop":"Da Seattle a Singapore, con una sosta per sushi e dim sum.", +"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es", +"puzzles.size":"Taglia", +"puzzles.small_calm_network_builds":"Piccole reti, con calma", +"puzzles.smorgasbord":"Smörgåsbord", +"puzzles.speed_runs":"Corse contro il tempo", +"puzzles.spent_x":"Speso {x}", +"puzzles.spent_x_of_y":"Speso {x} / {y}", +"puzzles.stepping_stone_optional":"Tappa (facoltativa)", +"puzzles.suez_you_later":"Suez la prossima", +"puzzles.survives_any_single_cut":"Sopravvive a qualsiasi taglio", +"puzzles.tap_a_goal_city_to_open":"Tocca una città illuminata per aprire il tuo primo POP", +"puzzles.that_city_is_not_part_of":"Quella città non fa parte di questo puzzle.", +"puzzles.the_pacific_is_big_light_is":"Il Pacifico è grande. La luce è veloce. Il tuo budget non è né l’uno né l’altro.", +"puzzles.the_pacific_rim_where_every_hop":"Il bordo del Pacifico, dove ogni hop è un oceano.", +"puzzles.the_shark_tank":"La vasca degli squali", +"puzzles.the_sharks_have_been_biting_again":"Gli squali hanno ricominciato a mordere. Resta sulla terraferma.", +"puzzles.the_sharks_say_no":"Gli squali dicono di no.", +"puzzles.three_cities_two_currencies_one_very":"Tre città, due valute, un tunnel cortissimo sotto il mare.", +"puzzles.traders_paid_millions_to_shave_milliseconds":"I trader hanno pagato milioni per limare millisecondi su questa rotta. Tu ci riesci spendendo meno.", +"puzzles.two_cables_across_the_atlantic_because":"Due cavi attraverso l’Atlantico, perché uno solo è una speranza, non un piano.", +"puzzles.under_n_ms":"sotto i {n} ms", +"puzzles.undo":"Annulla", +"puzzles.unlocks_at_n_stars":"Si sblocca a {n}⭐", +"puzzles.weekly_puzzle":"Puzzle della settimana", +"puzzles.weekly_puzzle_key":"Puzzle della settimana {key}", +"puzzles.with_the_pop_price":"con il POP: {price}", +"puzzles.your_first_tubes_no_pressure":"I tuoi primi tubi. Niente pressione, niente budget.", +"puzzles.your_stars":"Le tue stelle", "reach_and_subsea.premium_submarine_terminals":"Terminali sottomarini avanzati", "release_notes.and_n_more_change":{"one":"…e {n} altra modifica","other":"…e altre {n} modifiche"}, "release_notes.read_the_full_notes_on_github":"Leggi le note complete su GitHub", @@ -3228,6 +3354,7 @@ "title.source_on_github":"Codice su GitHub", "title.the_real_game_climb_from_tier":"Il gioco vero: sali da Tier 3 a Tier 1.", "title.your_network_name_was_saved_and":"La tua rete {name} è stata salvata e ti sta aspettando.", +"traceroute.a_peer_s_customers_come_after":"i clienti di un peer vengono dopo i peer diretti e prima del transit", "traceroute.across_the_ix_switch":"attraverso lo switch di {ix}", "traceroute.as_path_path":"AS path: {path}", "traceroute.caches_beat_pnis":"le cache battono i PNI", @@ -3243,6 +3370,7 @@ "traceroute.n_network_unreachable":"!N rete irraggiungibile", "traceroute.name_transit":"Transit {name}", "traceroute.net_carries_it_to_city":"{net} lo porta fino a {city}", +"traceroute.net_hands_it_to_its_customer":"{net} lo passa al suo cliente {to}", "traceroute.net_hands_it_to_to":"{net} lo passa a {to}", "traceroute.no_path_every_route_between_these":"Nessun percorso: ogni strada tra queste città è giù o non esiste.", "traceroute.no_working_path_between_these_pops":"nessun percorso funzionante tra questi POP", diff --git a/site/i18n/pt.js b/site/i18n/pt.js index b7acb7a..a05f651 100644 --- a/site/i18n/pt.js +++ b/site/i18n/pt.js @@ -17,6 +17,7 @@ "badges.attend_a_conference":"Participe de uma conferência.", "badges.attend_six_conferences_in_one_game":"Participe de seis conferências numa partida.", "badges.badge_unlocked_name":"Badge desbloqueado: {name}", +"badges.badge_upgraded_name":"Badge melhorado: {name}", "badges.blackhole_one_of_your_own_cities":"Mande uma das suas próprias cidades para o blackhole para parar um DDoS.", "badges.bring_up_your_first_peering_session":"Suba sua primeira sessão de peering.", "badges.build_fiber_across_the_andes":"Construa fibra cruzando os Andes.", @@ -98,9 +99,14 @@ "badges.take_a_de_kicks_retention_offer":"Aceite uma oferta de retenção da DE-KICKS.", "badges.take_out_a_loan":"Pegue um empréstimo.", "badges.the_long_way_round":"A volta longa", +"badges.this_game_earns_fiery_badges":"Este jogo roda BGP às 3 da manhã: cada badge que você ganha aqui é forjado no fogo e melhora o que você já tem.", +"badges.this_game_earns_frosted_badges":"Este jogo está em Change Freeze: os badges daqui vêm liofilizados.", "badges.through_the_wall":"Através da Muralha", "badges.turn_on_a_transit_clean_pipe":"Ative um add-on clean-pipe num transit.", "badges.two_buildings_three_cities":"Dois prédios, três cidades", +"badges.variant_forged_at_3_a_m":"Forjado às 3 da manhã", +"badges.variant_freeze_dried":"Liofilizado", +"badges.variant_on_call":"De plantão", "badges.weather_a_ddos_with_your_defences":"Aguente um DDoS com as defesas prontas.", "badges.weather_a_multi_terabit_ddos":"Aguente um DDoS de vários terabits.", "badges.win_without_ever_taking_a_loan":"Vença sem nunca pegar um empréstimo.", @@ -1842,7 +1848,7 @@ "goals.make_5_peering_friends":"Faça 5 amigos de peering", "goals.on_the_peering_tab_request_sessions":"Na aba Peering, peça sessões ou entre no route server para fazer peering com todas as redes abertas de uma vez.", "goals.open_your_home_city_and_press":"Abra sua cidade natal e aperte “Lançar banda larga”. Eyeballs são pessoas em casa vendo vídeo de gatinho. Elas te pagam todo mês.", -"goals.peer_with_every_tier_1_over":"Faça peering com todas as Tier 1 via PNI e cancele todas as portas de transit. Aí ninguém te cobra para chegar à internet.", +"goals.peer_with_every_tier_1_their_customers":"Faça peering com todas as Tier 1 via PNI e cancele todas as portas de transit. Os clientes delas vêm de graça, então você só corre atrás das redes a quem ninguém vende transit.", "goals.pops_in_five_of_the_six":"POPs em cinco das seis regiões do mapa.", "goals.reach_the_whole_internet":"Alcance a internet inteira", "goals.serve_10_tbps":"Sirva 10 Tbps", @@ -1904,7 +1910,7 @@ "help.the_chart_button_at_the_top":"O botão de gráfico no topo abre gráficos de tráfego por saída (caches, PNIs, IX, transit), dinheiro ao longo do tempo, tráfego por ASN com como ele chega até você e quanto custa o transit dele, além dos seus links e routers mais ocupados.", "help.the_group_behind_several_big":"O grupo por trás de vários grandes exchanges (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) trata tabela de preços como segredo de Estado. As portas são cotadas cliente a cliente e sobem quanto maior você parece. Pechinchar pode funcionar, sair pela culatra ou travar por uma semana. Uma vez por ano os preços são \"harmonizados\" para cima, serviços extras aparecem na sua fatura até você cancelar, e tentar sair te rende um desconto de retenção que termina em multa.", "help.things_break_all_the_time_fiber":"As coisas quebram o tempo todo: cortes de fibra, crashes de router, quedas de energia, loops no IX, quedas de fabric, route leaks, DDoS, dedo gordo, falhas de refrigeração e geopolítica: sanções, tarifas, sequestros de BGP, disputas de licença de desembarque, apagões em dia de prova e cortes de cabo no Mar Vermelho. O tráfego se reroteia sozinho por outros caminhos e upstreams. Links paralelos em rotas diversas, um segundo router e um gerador de backup, tudo ajuda. Ou pague para acelerar os reparos.", -"help.tier_1s_reach_the_whole_internet":"Os Tier 1 alcançam a internet toda sem pagar ninguém, porque todos fazem peering entre si. Os Tier 2 fazem muito peering, mas ainda compram algum transit.", +"help.tier_1s_reach_the_whole_internet_cones":"Os Tier 1 alcançam a internet toda sem pagar ninguém: todos fazem peering entre si, e cada um traz o seu cone de clientes, todos que compram transit dele. Os Tier 2 fazem muito peering, mas ainda compram algum transit.", "help.traffic_follows_the_shortest_path_by":"O tráfego segue o caminho mais curto por distância e métrica de link, e se reroteia sozinho quando links caem. Quando um caminho só está cheio, o excesso é descartado, igualzinho a um IGP de verdade. A partir do nível de clientes 3 você pode instalar o Auto-TE na aba NOC: ele joga o excesso em até dois caminhos alternativos com capacidade livre, desde que não sejam mais que o dobro do comprimento.", "help.transit_bills_sample_your_usage":"A conta do transit mede seu uso todo dia e cobra o percentil 95 dos últimos 30 dias, então picos curtos são perdoados, mas os longos não.", "help.users_feel_the_round_trip_to":"Os usuários sentem a ida e volta até onde o tráfego deles sai da sua rede para o trânsito. Até 20 ms (cerca de 1.500 km) está tudo bem; acima de 50 ms banda larga e serviços de internet contam como serviço ruim, o que custa receita e clientes. O tráfego pelo seu próprio peering, PNIs e caches não é penalizado.", @@ -1929,12 +1935,13 @@ "hot_ports_and_rank.upgrade_the_ix_port_or_add":"Faça upgrade da porta do IX ou adicione um membro ao LAG.", "hot_ports_and_rank.upgrade_the_router_or_add_a":"Faça upgrade do router ou adicione um segundo na aba Infra.", "hot_ports_and_rank.you_buy_transit_again":"você volta a comprar transit", -"hot_ports_and_rank.you_cannot_reach_list":"você não alcança {list}", +"hot_ports_and_rank.you_cannot_reach_list_outside_cones":"você não alcança {list}, e nenhum dos seus peers vende transit para eles", "hot_ports_and_rank.your_reach_is_p_not_100":"seu alcance é {p}, não 100%", "hud_and_panels.all_connections_n":"Todas as conexões {n}", "hud_and_panels.all_systems_green_enjoy_it_while":"Tudo verde. Aproveite enquanto dura.", "hud_and_panels.auto_fix_in_n_day":{"one":"Se resolve sozinho em {n} dia","other":"Se resolve sozinho em {n} dias"}, "hud_and_panels.blackholing_g":"{g} em blackhole", +"hud_and_panels.buys_transit_from_net_peer_with":"Compra transit de {net}. Faça peering com {net} e ela vem junto.", "hud_and_panels.customer_level_lv_name":"Nível de cliente {lv}: {name}", "hud_and_panels.dropping_or_overflowing":"descartando ou transbordando", "hud_and_panels.every_network_on_the_map_traffic":"Todas as redes do mapa. A fatia de tráfego é quanto do tráfego dos seus usuários vai para elas. Toque numa conexão para ir ao POP dela.", @@ -1971,6 +1978,7 @@ "hud_and_panels.p_of_traffic_between_them_scattered":"{p}% do tráfego somadas, espalhadas pelos exchanges. Você faz peering com {n}.", "hud_and_panels.ports_caches_and_routers_running_hot":"Portas, caches e routers no talo", "hud_and_panels.raise_a_full_link_s_metric":"Aumente a métrica de um link cheio para o tráfego preferir outra rota, faça upgrade nele ou instale o Auto-TE.", +"hud_and_panels.reached_through_the_customer_cone_of":"Alcançada pelo cone de clientes de {net}: compra transit dela.", "hud_and_panels.reaches_networks_from_the_last":"Alcança de graça as redes da última atualização que você não tem outro caminho para alcançar. Conecte-se a elas antes que acabe.", "hud_and_panels.reward_cash":"Prêmio {cash}", "hud_and_panels.survived_with_no_impact":"Sobreviveu sem impacto", @@ -2381,6 +2389,8 @@ "loop.welcome_back_name_your_network_is":"Bem-vindo de volta, {name}.
Sua rede está do jeitinho que você deixou: {date}.", "loop.your_saved_game_could_not_be":"Não deu para carregar seu jogo salvo.
Ele estava corrompido, então guardamos um backup e você pode começar do zero.", "meet_a_network.all_n_out_of_reach":{"one":"Todas as {n} fora de alcance","other":"Todas as {n} fora de alcance"}, +"meet_a_network.peer_with_the_tier_1_club":"Faça peering com o clube dos Tier 1: os clientes deles vêm de graça. Só as redes que não estão no cone de ninguém precisam de peering próprio.", +"meet_a_network.peer_with_the_tier_1_club_n":{"one":"Faça peering com o clube dos Tier 1: os clientes deles vêm de graça. {n} rede já vem junto com um peer.","other":"Faça peering com o clube dos Tier 1: os clientes deles vêm de graça. {n} redes já vêm junto com um peer."}, "meet_a_network.pnis_with_every_tier_1":"PNIs com cada Tier 1", "meet_a_network.reach_without_transit":"Alcance sem transit", "meet_a_network.road_to_tier_1":"Rumo ao Tier 1", @@ -2819,6 +2829,122 @@ "progress.under_attack_now":"Sob ataque agora", "progress.your_score_peak_traffic":"Sua pontuação: pico de tráfego", "progress.your_traffic_to_and_from_asia":"Seu tráfego de e para a Ásia", +"puzzles.a_backhoe_walks_into_your_network":"Uma retroescavadeira entra na sua rede. Nada acontece.", +"puzzles.a_pop_costs_setup_plus_a_year":"Um POP custa {setup} de instalação e depois {mo}/mês. Os puzzles contam a instalação e um ano de aluguel.", +"puzzles.a_tiny_island_where_half_the":"Uma ilhota onde metade dos cabos do Pacífico para pra tomar um café.", +"puzzles.a_to_b_under_ms":"{a} → {b} abaixo de {ms} ms", +"puzzles.a_to_b_under_ms_now":"{a} → {b} abaixo de {ms} ms (agora {now} ms)", +"puzzles.aloha_latency":"Aloha, latência", +"puzzles.avoid_list":"sem {list}", +"puzzles.back_to_my_network":"Voltar à minha rede", +"puzzles.back_to_the_title":"Voltar à tela inicial", +"puzzles.beat_the_clock_light_in_glass":"A luz na fibra faz 200 km por milissegundo. Escolha seus cabos como se isso importasse.", +"puzzles.belt_and_braces":"Cinto e suspensórios", +"puzzles.best_x":"recorde {x}", +"puzzles.budget":"Orçamento", +"puzzles.budget_x":"orçamento {x}", +"puzzles.connect_list":"Conecte {list}.", +"puzzles.connected":"Conectado", +"puzzles.copied_paste_it_anywhere":"Copiado! Cole onde quiser:
{t}", +"puzzles.de_kicks_sales_has_your_number":"O comercial da DE-KICKS tem seu número. Conecte a Alemanha sem passar por Frankfurt.", +"puzzles.diverse_route_40_survives_a_backhoe":"Rota diversa (+40%, sobrevive a uma retroescavadeira)", +"puzzles.down_under_up_and_running":"Down Under, no ar", +"puzzles.drag_from_a_pink_pop_to":"Arraste de um POP rosa até outra cidade para alugar uma wave", +"puzzles.drag_from_this_pop_onto_another":"Arraste deste POP até outra cidade do puzzle, ou escolha uma aqui.", +"puzzles.euro_trip":"Euro Trip", +"puzzles.every_internet_starts_with_one_tube":"Toda internet começa com um tubo.", +"puzzles.every_link_n_g_or_more":"Todo link com {n}G ou mais", +"puzzles.fat_pipes_only":"Só tubos grossos", +"puzzles.flash_boys":"Flash Boys", +"puzzles.for_architects_who_sleep_through_backhoes":"Para arquitetos que dormem tranquilos na temporada das retroescavadeiras.", +"puzzles.four_capitals_one_very_long_winter":"Quatro capitais, um inverno longuíssimo, zero desculpas para cair.", +"puzzles.four_cities_four_cables_one_ring":"Quatro cidades, um anel. Tolkien aprovaria; seu NOC, com certeza.", +"puzzles.four_cities_one_continent_and_a":"Quatro cidades, um continente e muito milho no meio.", +"puzzles.frankfurt_to_singapore_the_short_way":"De Frankfurt a Singapura pelo caminho curto. O longo vai por terra, e dá pra notar.", +"puzzles.free":"Grátis", +"puzzles.goal":"Objetivo", +"puzzles.goal_city":"Cidade objetivo", +"puzzles.guam_slam":"Guam Slam", +"puzzles.hello_world":"Olá, mundo", +"puzzles.honolulu_the_world_s_most_scenic":"Honolulu: o ponto de regeneração mais bonito do mundo.", +"puzzles.includes_a_new_pop_in_city":"Inclui um POP novo em {city} ({price} por um ano).", +"puzzles.it_works_finance_and_the_backhoe":"Funciona! O financeiro e a retroescavadeira querem uma palavrinha.", +"puzzles.keep_building":"Continuar construindo", +"puzzles.kiwi_fruit_salad":"Salada de kiwi", +"puzzles.lease_a_wave_to":"Alugar uma wave até", +"puzzles.more_puzzles":"Mais puzzles", +"puzzles.n_1_club":"Clube N-1", +"puzzles.n_1_connect_everything_first":"N-1: conecte tudo primeiro", +"puzzles.n_g_links":"links de {n}G", +"puzzles.n_week_streak":{"one":"{n} semana seguida","other":"{n} semanas seguidas"}, +"puzzles.new_zealand_is_far_from_everything":"A Nova Zelândia fica longe de tudo. Essa é a graça, e o problema.", +"puzzles.next_pack_unlocks_at_n":"O próximo pacote, {pack}, abre com {n}⭐", +"puzzles.next_puzzle":"Próximo puzzle", +"puzzles.no_budget":"sem orçamento", +"puzzles.no_budget_star_on_the_house":"sem orçamento: ⭐ por conta da casa", +"puzzles.no_cable_lands_in_both_try":"Nenhum cabo chega a {a} e a {b}. Tente uma escala no meio.", +"puzzles.no_clock_no_bills_nothing_breaks":"Sem relógio, sem contas, nada quebra. Conecte as cidades e busque três estrelas: dentro do orçamento, e ainda conectado se qualquer link for cortado.", +"puzzles.no_pop_in_list":"Nenhum POP em {list}", +"puzzles.no_subsea":"sem submarino", +"puzzles.no_subsea_cables":"Sem cabos submarinos", +"puzzles.nobody_ever_got_fired_for_buying":"Ninguém nunca foi demitido por comprar 100G.", +"puzzles.not_this_one_find_a_way_around":"Essa não. Dê a volta.", +"puzzles.not_through_frankfurt":"Sem passar por Frankfurt", +"puzzles.off_limits":"Proibida", +"puzzles.on_the_house":"Por conta da casa", +"puzzles.one_backhoe_away_from_a_very":"A uma retroescavadeira de uma noite muito longa. Adicione um segundo caminho para ⭐⭐⭐.", +"puzzles.one_cut_splits_it":"Um corte divide a rede", +"puzzles.one_cut_splits_it_where":"Um corte divide a rede: {where}", +"puzzles.one_ring_through_every_pop":"Um anel passando por todos os POPs", +"puzzles.one_very_big_island_and_a":"Uma ilha enorme e muita fibra vazia.", +"puzzles.open_a_pop_cost":"Abrir um POP · {cost}", +"puzzles.pacific_rim_shot":"Pacific Rim Shot", +"puzzles.ping_pong_to_tokyo":"Pingue-pongue até Tóquio", +"puzzles.price_per_year":"{price}/ano", +"puzzles.puzzle":"Puzzle", +"puzzles.puzzle_solved":"Puzzle resolvido", +"puzzles.puzzles":"Puzzles", +"puzzles.remove_this_link":"Remover este link", +"puzzles.remove_this_pop":"Remover este POP", +"puzzles.reset":"Recomeçar", +"puzzles.retry_for_3_stars":"Tentar de novo por ⭐⭐⭐", +"puzzles.ring":"anel", +"puzzles.ring_of_fire":"Anel de Fogo", +"puzzles.rock_solid_and_gold_plated_the":"Sólida como rocha, e banhada a ouro. O CFO tem perguntas.", +"puzzles.samba_sprint":"Corrida de samba", +"puzzles.same_puzzle_for_everyone_this_week":"O mesmo puzzle para todo mundo nesta semana", +"puzzles.same_trench_cheaper_one_backhoe_cuts":"Mesma vala (mais barata, uma retroescavadeira corta as duas)", +"puzzles.sao_paulo_to_miami_before_the":"De São Paulo a Miami antes que a caipirinha esquente.", +"puzzles.sea_to_shining_sea":"De costa a costa", +"puzzles.seattle_to_singapore_with_a_stop":"De Seattle a Singapura, com parada para sushi e dim sum.", +"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es", +"puzzles.size":"Tamanho", +"puzzles.small_calm_network_builds":"Redes pequenas, com calma", +"puzzles.smorgasbord":"Smörgåsbord", +"puzzles.speed_runs":"Contra o relógio", +"puzzles.spent_x":"Gasto {x}", +"puzzles.spent_x_of_y":"Gasto {x} / {y}", +"puzzles.stepping_stone_optional":"Escala (opcional)", +"puzzles.suez_you_later":"Suez mais tarde", +"puzzles.survives_any_single_cut":"Sobrevive a qualquer corte", +"puzzles.tap_a_goal_city_to_open":"Toque numa cidade brilhante para abrir seu primeiro POP", +"puzzles.that_city_is_not_part_of":"Essa cidade não faz parte deste puzzle.", +"puzzles.the_pacific_is_big_light_is":"O Pacífico é grande. A luz é rápida. Seu orçamento não é nenhum dos dois.", +"puzzles.the_pacific_rim_where_every_hop":"A borda do Pacífico, onde cada salto é um oceano.", +"puzzles.the_shark_tank":"O aquário dos tubarões", +"puzzles.the_sharks_have_been_biting_again":"Os tubarões voltaram a morder. Fique em terra firme.", +"puzzles.the_sharks_say_no":"Os tubarões dizem não.", +"puzzles.three_cities_two_currencies_one_very":"Três cidades, duas moedas e um túnel bem curtinho debaixo do mar.", +"puzzles.traders_paid_millions_to_shave_milliseconds":"Traders pagaram milhões para tirar milissegundos desta rota. Você faz por menos.", +"puzzles.two_cables_across_the_atlantic_because":"Dois cabos atravessando o Atlântico, porque um só é esperança, não plano.", +"puzzles.under_n_ms":"abaixo de {n} ms", +"puzzles.undo":"Desfazer", +"puzzles.unlocks_at_n_stars":"Abre com {n}⭐", +"puzzles.weekly_puzzle":"Puzzle da semana", +"puzzles.weekly_puzzle_key":"Puzzle da semana {key}", +"puzzles.with_the_pop_price":"com o POP: {price}", +"puzzles.your_first_tubes_no_pressure":"Seus primeiros tubos. Sem pressão, sem orçamento.", +"puzzles.your_stars":"Suas estrelas", "reach_and_subsea.premium_submarine_terminals":"Terminais submarinos premium", "release_notes.and_n_more_change":{"one":"…e mais {n} mudança","other":"…e mais {n} mudanças"}, "release_notes.read_the_full_notes_on_github":"Leia as notas completas no GitHub", @@ -3228,6 +3354,7 @@ "title.source_on_github":"Código no GitHub", "title.the_real_game_climb_from_tier":"O jogo de verdade: suba de Tier 3 a Tier 1.", "title.your_network_name_was_saved_and":"Sua rede {name} foi salva e está te esperando.", +"traceroute.a_peer_s_customers_come_after":"os clientes de um peer vêm depois dos peers diretos e antes do transit", "traceroute.across_the_ix_switch":"pelo switch do {ix}", "traceroute.as_path_path":"AS path: {path}", "traceroute.caches_beat_pnis":"caches vencem PNIs", @@ -3243,6 +3370,7 @@ "traceroute.n_network_unreachable":"!N rede inalcançável", "traceroute.name_transit":"Transit {name}", "traceroute.net_carries_it_to_city":"{net} leva até {city}", +"traceroute.net_hands_it_to_its_customer":"{net} passa para o seu cliente {to}", "traceroute.net_hands_it_to_to":"{net} passa para {to}", "traceroute.no_path_every_route_between_these":"Sem caminho: todas as rotas entre essas cidades estão fora do ar ou não existem.", "traceroute.no_working_path_between_these_pops":"nenhum caminho funcionando entre esses POPs", diff --git a/src/game/30-networks/10-networks.js b/src/game/30-networks/10-networks.js index d7cad9b..722e735 100644 --- a/src/game/30-networks/10-networks.js +++ b/src/game/30-networks/10-networks.js @@ -37,7 +37,7 @@ NETS.push( {id:'bcd',name:'Bell Canad-eh',asn:577,type:'eye',pol:'selective',minIx:10,minPni:30,share:.01,col:'#00549A',pops:['hfx','tor','mtl','nyc','chi','ott','cal','van'],ix:['tor','mtl','ott'],blurb:tr('networks.polite_enormous_and_sorry_about_the')}); NETS.push( {id:'tsf',name:'Telkom-selfie',asn:7713,type:'eye',pol:'selective',minIx:10,minPni:30,share:.01,col:'#E4002B',pops:['jkt','sin'],ix:['jkt','sin'],blurb:tr('networks.indonesia_s_mobile_giant_every')}, - {id:'pld',name:'PLDTea Time',asn:9299,type:'eye',pol:'selective',minIx:10,minPni:30,share:.008,col:'#D62027',pops:['mnl','hkg','sin'],ix:['hkg'],blurb:tr('networks.philippine_giant_peering_requests')}, + {id:'pld',name:'PLDTea Time',asn:9299,type:'eye',pol:'selective',minIx:10,minPni:30,share:.008,up:['ntt','tat'],col:'#D62027',pops:['mnl','hkg','sin'],ix:['hkg'],blurb:tr('networks.philippine_giant_peering_requests')}, {id:'spk',name:'Spark-le',asn:4771,type:'eye',pol:'open',share:.005,col:'#6A2C91',pops:['akl','syd','chc','ivc'],ix:['akl','syd','chc'],blurb:tr('networks.new_zealand_s_shiniest_isp')}, {id:'tsy',name:'Telstraya',asn:1221,type:'t2',pol:'selective',minIx:15,minPni:40,share:.01,price:9,col:'#0099F8',pops:['hnl','gum','suv','pom','nou','hir','syd','per','sin','hkg','lax','tpe','mel','bne','drw','adl','cbr','hba'],ix:['gum','sin','hkg'],blurb:tr('networks.australia_s_big_one_g_day')}); NETS.push( @@ -49,7 +49,7 @@ NETS.push( {id:'art',name:'Air-Tell Africa',asn:36928,type:'eye',pol:'selective',up:['tat','tly'],minIx:4,minPni:18,share:.006,col:'#ED1C24',pops:['lag','kla','kgl','dar','lun','fih','nbo','tnr','sez'],ix:['lag','kla','kgl','dar','lun','fih','nbo'],blurb:tr('networks.mobile_money_and_prepaid_data_in')}, {id:'eth',name:'Ethio-Tele-Calm',asn:24759,type:'eye',pol:'selective',up:['tat'],minIx:2,minPni:12,share:.005,col:'#8DC63F',pops:['add'],ix:['add'],blurb:tr('networks.ethiopia_s_state_telco_a_hundred')}, {id:'mrc',name:'Atlas Shrugged Telecom',asn:36905,type:'eye',pol:'selective',up:['lvl','tly'],minIx:3,minPni:15,share:.004,col:'#F28C00',pops:['cas','abj','dkr'],ix:['cas'],blurb:tr('networks.morocco_s_incumbent_with_sister')}, - {id:'sfc',name:'Safari-Comic',asn:33771,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,col:'#4CB848',pops:['nbo','mba','add'],ix:['nbo','mba','add'],blurb:tr('networks.kenya_s_mobile_giant_pays_you')}, + {id:'sfc',name:'Safari-Comic',asn:33771,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,up:['cog','lvl','scm'],col:'#4CB848',pops:['nbo','mba','add'],ix:['nbo','mba','add'],blurb:tr('networks.kenya_s_mobile_giant_pays_you')}, {id:'teg',name:'Tele-Comet Egypt',asn:8452,type:'t2',pol:'selective',minIx:15,minPni:40,share:.006,price:8,col:'#5B2D8E',pops:['cai','mrs','fra','lon'],ix:['cai','mrs'],blurb:tr('networks.owns_the_land_crossing_every_red')}); NETS.push( {id:'clr',name:'Clarovision',asn:28537,type:'t2',pol:'selective',minIx:10,minPni:30,share:.012,price:5,col:'#DA291C',pops:['sao','rio','for','bsb','bhz','cwb','poa','aju','bel','bvb','cac','cpv','cpq','cgr','cau','cgb','cxj','fec','fln','igu','gyn','jpa','ljd','ldb','mcp','mcz','mao','mgf','nat','pmw','pvh','rao','rec','rbr','ssa','ria','sjp','slz','the','vix','mvd','asu','cor','uio','mde','gua','sjo','qro','mty','gdl','bue','scl','lim','bog','pan','mex','mia','sju','sdq'],ix:['sao','rio','for','bsb','bhz','cwb','poa','aju','bel','bvb','cac','cpv','cpq','cgr','cau','cgb','cxj','fec','fln','igu','gyn','jpa','ljd','ldb','mcp','mcz','mao','mgf','nat','pmw','pvh','rao','rec','rbr','ssa','ria','sjp','slz','the','vix','mvd','asu','cor','uio','mde','gua','sjo','qro','mty','gdl','bue','scl','lim','bog'],blurb:tr('networks.the_big_regional_carrier_sees')}, @@ -65,10 +65,10 @@ NETS.push( {id:'jio',name:'Jio-graphy',asn:55863,type:'eye',pol:'selective',minIx:10,minPni:30,share:.02,col:'#0F3CC9',pops:['bom','del','maa','blr','hyd'],ix:['bom','del','maa','blr','hyd'],blurb:tr('networks.gave_a_billion_people_cheap_data')}, {id:'atl',name:'Airtel-tale',asn:9849,type:'t2',pol:'selective',minIx:15,minPni:40,share:.01,price:7,col:'#E40000',pops:['bom','del','maa','blr','hyd','sin','lon','dxb','dac','cbo'],ix:['bom','del','maa','blr'],blurb:tr('networks.india_s_other_giant_every_outage')}, {id:'cht',name:'Chunghwa Tele-calm',asn:3426,type:'t2',pol:'selective',minIx:10,minPni:30,share:.008,price:7,col:'#00A0E9',pops:['tpe','hkg','tok','lax','sin'],ix:['tpe','hkg'],blurb:tr('networks.taiwan_s_incumbent_stays_calm_while')}, - {id:'duu',name:'Du-opoly',asn:15820,type:'eye',pol:'paid',freeLv:11,paidFee:6000,share:.004,col:'#00A9CE',pops:['dxb','auh','fuj'],ix:[],blurb:tr('networks.the_other_half_of_the_uae')}); + {id:'duu',name:'Du-opoly',asn:15820,type:'eye',pol:'paid',freeLv:11,paidFee:6000,share:.004,up:['tat','tly'],col:'#00A9CE',pops:['dxb','auh','fuj'],ix:[],blurb:tr('networks.the_other_half_of_the_uae')}); NETS.push( {id:'kdi',name:'KD-DIY',asn:2561,type:'t2',pol:'selective',minIx:10,minPni:30,share:.008,price:6,col:'#E85D04',pops:['tok','osa','lax','sin','hkg','fuk'],ix:['tok','osa','fuk'],blurb:tr('networks.japanese_carrier_that_builds')}, - {id:'opt',name:'Floptus',asn:4804,type:'eye',pol:'selective',minIx:8,minPni:25,share:.006,col:'#00837E',pops:['syd','mel','bne','per'],ix:[],blurb:tr('networks.australia_s_number_two_once_took')}, + {id:'opt',name:'Floptus',asn:4804,type:'eye',pol:'selective',minIx:8,minPni:25,share:.006,up:['sgt'],col:'#00837E',pops:['syd','mel','bne','per'],ix:[],blurb:tr('networks.australia_s_number_two_once_took')}, {id:'tpr',name:'Toilet Paper Group',asn:7545,type:'eye',pol:'selective',minIx:8,minPni:25,share:.0035,col:'#4E2A84',pops:['syd','mel','bne','per','adl','cbr'],ix:[],blurb:tr('networks.stockpiled_bandwidth_in_2020_and')}, {id:'abb',name:'Aussie Boyband',asn:4764,type:'eye',pol:'open',share:.002,col:'#00B140',pops:['syd','mel','bne','per','adl','cbr','drw','hba'],ix:['syd','mel','bne','per','adl','drw'],blurb:tr('networks.matching_outfits_perfect_harmonies')}, {id:'voc',name:'Hocus Pocus',asn:4826,type:'t2',pol:'open',up:['ntt','tly'],share:.002,price:7,col:'#E4002B',pops:['syd','mel','bne','per','adl','cbr','drw','hba','sin'],ix:['syd','mel','bne','per','adl','hba','drw','sin'],blurb:tr('networks.now_you_see_the_fibre_now')}, @@ -96,11 +96,11 @@ NETS.push( {id:'cit',name:'Citrus Belgium',asn:47377,type:'eye',pol:'selective',minIx:10,minPni:30,share:.005,up:['lvl'],col:'#FF7900',pops:['bru','par'],ix:['bru'],blurb:tr('networks.tangerine_s_belgian_daughter_mobile')}, {id:'pst',name:'Poste Restante',asn:6663,type:'eye',pol:'selective',minIx:4,minPni:15,share:.001,up:['lvl','tly'],col:'#FFCC00',pops:['bet','fra','ams'],ix:['bet','fra'],blurb:tr('networks.luxembourg_s_post_office_which_also')}, {id:'cms',name:'CityMess',asn:199095,type:'eye',pol:'open',share:.002,up:['cog'],col:'#00B2A9',pops:['oos','bru'],ix:['bru'],blurb:tr('networks.private_5g_and_business_fiber_from')}); -NETS.push({id:'kys',name:'Kyiv Superstar',asn:15859,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,col:'#0055B8',pops:['kyv','waw','fra'],ix:['kyv'],blurb:tr('networks.ukraine_s_biggest_mobile_network_has')}); +NETS.push({id:'kys',name:'Kyiv Superstar',asn:15859,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,up:['cog','tly'],col:'#0055B8',pops:['kyv','waw','fra'],ix:['kyv'],blurb:tr('networks.ukraine_s_biggest_mobile_network_has')}); NETS.push({id:'stc',name:'Sticky Telecom',asn:39368,type:'t2',pol:'selective',minIx:10,minPni:30,share:.01,price:8,col:'#4F008C',pops:['ruh','jed','dxb','fra','lon','cai'],ix:['ruh'],blurb:tr('networks.the_kingdom_s_incumbent_once_you')}, - {id:'ord',name:'Ooh-redoo',asn:8871,type:'eye',pol:'paid',freeLv:11,paidFee:5000,share:.004,col:'#ED1C24',pops:['doh','dxb','jkt','mct'],ix:[],blurb:tr('networks.qatar_s_big_operator_paid_peering')}); + {id:'ord',name:'Ooh-redoo',asn:8871,type:'eye',pol:'paid',freeLv:11,paidFee:5000,share:.004,up:['tat','tly'],col:'#ED1C24',pops:['doh','dxb','jkt','mct'],ix:[],blurb:tr('networks.qatar_s_big_operator_paid_peering')}); NETS.push( - {id:'tim',name:'TIM-Tam Italia',asn:3269,type:'eye',pol:'selective',minIx:8,minPni:25,share:.008,col:'#004691',pops:['mil','rom','pmo'],ix:['mil','rom'],blurb:tr('networks.italy_s_incumbent_sweet_on_the')}, + {id:'tim',name:'TIM-Tam Italia',asn:3269,type:'eye',pol:'selective',minIx:8,minPni:25,share:.008,up:['skl'],col:'#004691',pops:['mil','rom','pmo'],ix:['mil','rom'],blurb:tr('networks.italy_s_incumbent_sweet_on_the')}, {id:'skl',name:'Sparkly Seabone',asn:6762,type:'t1',pol:'restrictive',share:.04,price:6,col:'#5B2C83',pops:['pmo','mil','rom','ath','mrs','bcn','mad','lis','par','lon','ams','fra','zrh','vie','bud','prg','waw','buh','sof','ist','ber','sto','nyc','ash','mia','atn','dal','chi','lax','sjc','tor','mex','pan','bog','lim','scl','bue','sao','rio','for','cai','jed','dxb','bom','sin','hkg','tok','hav'],ix:[],blurb:tr('networks.the_tier_1_that_grew_up')}, {id:'fwb',name:'Fast-Webby',asn:12874,type:'eye',pol:'open',share:.004,col:'#FDC300',pops:['mil','rom'],ix:['mil','rom'],blurb:tr('networks.fiber_to_the_italian_home_with')}, {id:'meo',name:'MEO-w Portugal',asn:3243,type:'eye',pol:'selective',minIx:5,minPni:20,share:.004,col:'#00A3E0',pops:['pdl','lis','mad'],ix:['lis'],blurb:tr('networks.portugal_s_incumbent_purrs_when_you')}, diff --git a/src/game/30-networks/30-long-tail.js b/src/game/30-networks/30-long-tail.js index e47a68c..321f35f 100644 --- a/src/game/30-networks/30-long-tail.js +++ b/src/game/30-networks/30-long-tail.js @@ -61,20 +61,27 @@ const TAIL=[ ['Peach State Hosting','cdn',['atn'],tr('long_tail.sweet_fuzzy_and_surprisingly')], ['Chowder Hosting','cdn',['bos'],tr('long_tail.thick_comforting_and_very_new')], ]; +/* Who the long tail buys transit from (#85): small networks almost always buy it from a big carrier where they sit, + usually the cheapest Tier 1 in town or two of them. One or two of the founding five Tier 1s with a PoP in their home + cities, picked by name so it never changes; where none sits (Auckland), a carrier there that buys from them. */ +const TAIL_UP=['cog','lvl','tly','ntt','tat']; +function tailUp(name,home){const h=hstr(name+'|up'),t1=TAIL_UP.filter(id=>{const n=NETS.find(x=>x.id===id);return home.some(c=>n.pops.includes(c));}); + if(!t1.length)return NETS.filter(n=>n.price&&n.up&&n.up.some(u=>TAIL_UP.includes(u))&&home.some(c=>n.pops.includes(c))).map(n=>n.id).slice(0,1); + const a=t1[h%t1.length],b=t1[(h>>>8)%t1.length];return t1.length>1&&(h>>>16)%100<50&&b!==a?[a,b]:[a];} function ixStatic(c){const o=[];if(CITY[c]&&CITY[c].ix)o.push(c);for(const x of XIX)if(x.c===c)o.push(x.id);return o;} TAIL.forEach(([name,type,home,blurb,sh],i)=>{const h=hstr(name),cand=home.flatMap(ixStatic),ix=[]; if(cand.length){ix.push(cand[h%cand.length]);if(cand.length>1&&(h>>>8)%100<40){const o=cand[(h>>>12)%cand.length];if(!ix.includes(o))ix.push(o);}} const sel=(h>>>4)%10>=8; - NETS.push({id:'tail'+i,name,asn:200000+(h%190000),type,tail:true,pol:sel?'selective':'open',...(sel?{minIx:1+(h>>>16)%3,minPni:6+(h>>>18)%8}:{}),share:sh||+(0.0006+((h>>>20)%15)*0.0001).toFixed(4),col:`hsl(${h%360} 55% 46%)`,pops:home.slice(),ix,blurb});}); + NETS.push({id:'tail'+i,name,asn:200000+(h%190000),type,tail:true,up:tailUp(name,home),pol:sel?'selective':'open',...(sel?{minIx:1+(h>>>16)%3,minPni:6+(h>>>18)%8}:{}),share:sh||+(0.0006+((h>>>20)%15)*0.0001).toFixed(4),col:`hsl(${h%360} 55% 46%)`,pops:home.slice(),ix,blurb});}); NETS.push( {id:'ktt',name:'Kay-Tea',asn:4766,type:'eye',pol:'paid',paidFee:5000,perG:90,kr:true,share:.012,col:'#E4002B',pops:['icn','hkg','tok','lax'],ix:[],blurb:tr('long_tail.korea_s_incumbent_sender_pays_every')}, {id:'skb',name:'SK Broadbandit',asn:9318,type:'eye',pol:'paid',paidFee:4000,perG:110,kr:true,share:.01,col:'#EA002C',pops:['icn','hkg','sjc'],ix:[],blurb:tr('long_tail.took_a_streaming_giant_to_court')}, {id:'lgu',name:'LG You-Pay-Plus',asn:3786,type:'eye',pol:'paid',paidFee:3000,perG:80,kr:true,share:.008,col:'#E6007E',pops:['icn','tok'],ix:[],blurb:tr('long_tail.the_plus_is_a_usage_fee')}); NETS.push( {id:'btt',name:'Bee-Tee',asn:2856,type:'eye',pol:'selective',minIx:10,minPni:30,share:.012,col:'#5514B4',pops:['lon','man','edi','bde'],ix:['lon','man'],blurb:tr('long_tail.the_uk_s_incumbent_buzzes_politely')}, - {id:'sky',name:'Sky-High Broadband',asn:5607,type:'eye',pol:'selective',minIx:6,minPni:25,share:.008,col:'#0072C9',pops:['lon','man','edi','dub'],ix:['lon','man','edi'],blurb:tr('long_tail.football_films_and_a_router_that')}, - {id:'vmo',name:'Virgin Mediocre',asn:5089,type:'eye',pol:'selective',minIx:6,minPni:25,share:.007,col:'#E10A0A',pops:['lon','man','edi'],ix:['lon','man'],blurb:tr('long_tail.cable_broadband_for_half_of_britain')}, - {id:'tnr',name:'Tele-Nor-Way',asn:2119,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,col:'#00A9E0',pops:['osl','svg','sto','cph','krs'],ix:['osl','svg'],blurb:tr('long_tail.norway_s_incumbent_neither_yes_nor')}); + {id:'sky',name:'Sky-High Broadband',asn:5607,type:'eye',pol:'selective',minIx:6,minPni:25,share:.008,up:['tly','lvl'],col:'#0072C9',pops:['lon','man','edi','dub'],ix:['lon','man','edi'],blurb:tr('long_tail.football_films_and_a_router_that')}, + {id:'vmo',name:'Virgin Mediocre',asn:5089,type:'eye',pol:'selective',minIx:6,minPni:25,share:.007,up:['lvl','ntt'],col:'#E10A0A',pops:['lon','man','edi'],ix:['lon','man'],blurb:tr('long_tail.cable_broadband_for_half_of_britain')}, + {id:'tnr',name:'Tele-Nor-Way',asn:2119,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,up:['tly','lvl'],col:'#00A9E0',pops:['osl','svg','sto','cph','krs'],ix:['osl','svg'],blurb:tr('long_tail.norway_s_incumbent_neither_yes_nor')}); NETS.push( {id:'hwt',name:'Hawaiian Telecombo',asn:36149,type:'eye',pol:'selective',minIx:3,minPni:15,share:.004,up:['ntt','lvl'],col:'#5B2A86',pops:['hnl'],ix:['hnl'],blurb:tr('long_tail.hawaii_s_incumbent_every_plan_comes')}, {id:'gtg',name:'Grand Theft Teleguam',asn:9246,type:'t2',pol:'open',share:.002,price:8,up:['ntt','tat'],col:'#0072CE',pops:['gum','ror','maj','hnl','tok'],ix:['gum','hnl'],blurb:tr('long_tail.guam_s_incumbent_and_the_way')}, diff --git a/src/game/30-networks/40-traffic-shares.js b/src/game/30-networks/40-traffic-shares.js index 539bf5e..67a0c3b 100644 --- a/src/game/30-networks/40-traffic-shares.js +++ b/src/game/30-networks/40-traffic-shares.js @@ -1,6 +1,22 @@ const NET=Object.fromEntries(NETS.map(n=>[n.id,n])),NET_IDS=NETS.map(n=>n.id); -// The networks a PNI with each upstream reaches: the upstream itself plus everyone who buys transit from it. -const PNI_NETS={};for(const n of NETS)PNI_NETS[n.id]=[n.id].concat(NETS.filter(x=>x.up&&x.up.includes(n.id)).map(x=>x.id)); +/* Customer cones (#85): a network announces to its peers itself and everyone who buys transit from it, and their + customers in turn. So a PNI or a session with a network reaches its whole cone, and peering with every Tier 1 brings + their customers along. Built once at load: CONE[id] lists the network first, then its cone; CONE_S is the same as a + Set, and DOWN[id] holds the cone without the network itself (empty for most). */ +/* Who buys from whom follows the real networks' upstreams (bgp.he.net, CAIDA AS Rank, Oct 2026). Added in 2.0: Kyiv + Superstar (Cogentle, Tell-Ya), Ooh-redoo and Du-opoly (Ta-Ta, Tell-Ya), Safari-Comic (Cogentle, Level Tree, Sea-Comedy), + PLDTea Time (Not That, Ta-Ta), TIM-Tam (its sibling Sparkly Seabone), Floptus (its parent SingTell), Sky-High and + Tele-Nor-Way (Tell-Ya, Level Tree), Virgin Mediocre (Level Tree, Not That), and the long tail (tailUp()). The rest stay + islands because they are too: the content giants, the transit-free incumbents (Doitsche, Comecast, Jio-graphy, Bee-Tee), + China and Korea, and Australians, who buy only from Australian carriers. */ +const CONE={},CONE_S={},DOWN={}; +{const dn={};for(const n of NETS)for(const u of n.up||[])(dn[u]||(dn[u]=[])).push(n.id); + for(const n of NETS){const s=new Set([n.id]),q=[n.id];while(q.length){for(const y of dn[q.pop()]||[])if(!s.has(y)){s.add(y);q.push(y);}} + CONE[n.id]=[...s];CONE_S[n.id]=s;DOWN[n.id]=CONE[n.id].slice(1);}} +// ANC[id]: every network whose cone holds it, nearest upstream first (who brings it along, for the panels). +const ANC={};for(const n of NETS){const o=[],q=(n.up||[]).slice();while(q.length){const u=q.shift();if(o.includes(u)||!NETS.some(x=>x.id===u))continue;o.push(u);q.push(...(NETS.find(x=>x.id===u).up||[]));}ANC[n.id]=o;} +// The networks a PNI with each network reaches: its customer cone. CONE_RANK: where routing tries a peer's cone. +const PNI_NETS=CONE,CONE_RANK=2.5; for(const X of XIX){X.members=NETS.filter(n=>Array.isArray(n.ix)&&n.ix.includes(X.id)||!n.tail&&(X.core?X.core.includes(n.id):(n.ix==='ALL'||Array.isArray(n.ix)&&n.ix.includes(X.c))&&hstr(n.id+'|'+X.id)%100<(n.ix==='ALL'?72:X.take*100))).map(n=>n.id);} const NSH={}; {const t=NETS.reduce((a,n)=>a+n.share,0); NETS.forEach(n=>NSH[n.id]=n.share/t);} // After Glitch leaves Korea, Seoul viewers watch half as much of it and the rest moves to everyone else. diff --git a/src/game/40-progress/20-goals.js b/src/game/40-progress/20-goals.js index 1d37014..9e4eaf3 100644 --- a/src/game/40-progress/20-goals.js +++ b/src/game/40-progress/20-goals.js @@ -18,6 +18,6 @@ const GOALS=[ {id:'c5',t:tr('common.five_continents'),d:tr('goals.pops_in_five_of_the_six'),r:100000,ok:()=>regionsCount()>=5}, {id:'gi',t:tr('goals.sign_a_giant'),d:tr('goals.land_an_ai_wan_a_multi'),r:150000,ok:()=>S.biz.some(b=>BIZ_T[b.type]&&BIZ_T[b.type].mega&&!BIZ_T[b.type].event)}, {id:'t10',t:tr('goals.serve_10_tbps'),d:tr('goals.ten_terabits_per_second_of_happy'),r:250000,ok:()=>R.served>=10000}, - {id:'t1',t:tr('common.go_transit_free_tier_1'),d:tr('goals.peer_with_every_tier_1_over'),r:0,win:true,ok:()=>isTier1()}, + {id:'t1',t:tr('common.go_transit_free_tier_1'),d:tr('goals.peer_with_every_tier_1_their_customers'),r:0,win:true,ok:()=>isTier1()}, ]; diff --git a/src/game/50-state.js b/src/game/50-state.js index 41e2b01..35dd8f6 100644 --- a/src/game/50-state.js +++ b/src/game/50-state.js @@ -2,4 +2,4 @@ let S=null, R=emptyR(); const UI={sel:null,tab:'cust',left:'goals',speed:1,hover:null,drag:null,snap:null,pending:null,confirm:null,leftOpen:false,muted:false,startCity:'fra',hintOff:false}; let uidN=1; const uid=()=>'i'+(Date.now()%1e7).toString(36)+(uidN++); -function emptyR(){return {nt:{},reachNT:0,teBlack:0,tNet:{},egT:{},netEg:{},l2lat:{},nodeLoad:{},nodeCap:{},div:{},l2:{},gfwLost:0,gfwCross:0,ef:{},egDesc:{},p95:{},peered:0,peerShare:0,load:{},useT:{},useIx:{},usePni:{},useCache:{},cityDem:{},citySrv:{},cityEye:{},latF:{},latFar:{},demTo:{},served:0,demand:0,reach:0,sessions:0,revMo:0,costMo:0,cost:{},rev:{},reachable:{}};} +function emptyR(){return {nt:{},cone:{},reachNT:0,teBlack:0,tNet:{},egT:{},netEg:{},l2lat:{},nodeLoad:{},nodeCap:{},div:{},l2:{},gfwLost:0,gfwCross:0,ef:{},egDesc:{},p95:{},peered:0,peerShare:0,load:{},useT:{},useIx:{},usePni:{},useCache:{},cityDem:{},citySrv:{},cityEye:{},latF:{},latFar:{},demTo:{},served:0,demand:0,reach:0,sessions:0,revMo:0,costMo:0,cost:{},rev:{},reachable:{}};} diff --git a/src/game/60-features/50-traceroute.js b/src/game/60-features/50-traceroute.js index 4cd5988..250e9b5 100644 --- a/src/game/60-features/50-traceroute.js +++ b/src/game/60-features/50-traceroute.js @@ -8,8 +8,9 @@ function trPaths(src){const live=S.links.filter(l=>!linkDown(l)),rem=remoteCitie const path=dst=>{if(dist[dst]===undefined)return null;const out=[];let v=dst;while(v!==src){const l=prev[v];out.unshift({l,from:l.a===v?l.b:l.a,to:v});v=l.a===v?l.b:l.a;}return out;};return {dist,path};} function trExits(net){const day=S.day,ev=S.ev,leak=ev.leak&&ev.leak.until>day?ev.leak.net:null,out=[]; for(const x of S.caches)if(x.net===net&&popUp(x.city)&&!siteDown(x.city,'a'))out.push({k:'c',rank:0,city:x.city,pref:'normal',lab:tr('common.name_cache',{name:NET[net].cache.name}),used:R.useCache[x.id]||0,cap:CACHE_CAP}); - for(const p of S.pni)if(p.net===net&&pniOn(p)&&popUp(p.city)&&liveN(p.city,p.site,p.n))out.push({k:'p',rank:1,city:p.city,pref:p.pref||'normal',lab:tr('common.pni_with_net',{net:NET[net].name}),used:R.usePni[p.id]||0,cap:liveCap(pniG(p),p.city,p.site,p.n)}); - for(const c in S.ixp)if(ixSessions(c).has(net)&&(popUp(ixCity(c))||remoteCities().includes(ixCity(c)))&&!(ev.ixdown&&ev.ixdown[c]>day))out.push({k:'ix',rank:2,city:ixCity(c),id:c,pref:(S.ixPref&&S.ixPref[c])||'normal',lab:tr('common.ix_peering',{ix:ixName(c)}),used:R.useIx[c]||0,cap:ixCap(c)}); + // A peer's customer cone (#85): one AS hop more, so tried after direct peering and before transit, as in compute(). + for(const p of S.pni)if(CONE_S[p.net].has(net)&&pniOn(p)&&popUp(p.city)&&liveN(p.city,p.site,p.n))out.push({k:'p',rank:p.net===net?1:CONE_RANK,via:p.net===net?null:p.net,city:p.city,pref:p.pref||'normal',lab:tr('common.pni_with_net',{net:NET[p.net].name}),used:R.usePni[p.id]||0,cap:liveCap(pniG(p),p.city,p.site,p.n)}); + for(const c in S.ixp){const ses=ixSessions(c),via=ses.has(net)?null:[...ses].find(id=>CONE_S[id].has(net));if((ses.has(net)||via)&&(popUp(ixCity(c))||remoteCities().includes(ixCity(c)))&&!(ev.ixdown&&ev.ixdown[c]>day))out.push({k:'ix',rank:via?CONE_RANK:2,via,city:ixCity(c),id:c,pref:(S.ixPref&&S.ixPref[c])||'normal',lab:tr('common.ix_peering',{ix:ixName(c)}),used:R.useIx[c]||0,cap:ixCap(c)});} for(const t of S.transit)if(popUp(t.city)&&!(t.down>day)&&liveN(t.city,t.site,t.n)&&net!==leak&&!((ev.depeer>day||scnRule('spat'))&&t.net==='cog'&&net==='ggl'))out.push({k:'t',rank:3,city:t.city,pref:t.pref||'normal',lab:tr('traceroute.name_transit',{name:NET[t.net].name}),tnet:t.net,used:R.useT[t.id]||0,cap:liveCap(PORT[t.tier].g,t.city,t.site,t.n)}); return out;} function traceroute(src,to){const P=trPaths(src),me=slug(S.name)+'.net',lines=[],ip=(a,b)=>`100.64.${a%250}.${b%250}`;let rtt=0.3,n=1; @@ -28,10 +29,11 @@ function traceroute(src,to){const P=trPaths(src),me=slug(S.name)+'.net',lines=[] hop(`ae-2.core.${far}.${slug(T.name)}.net`,`203.0.113.${(hstr(far)+7)%250}`,km*1.3/100+0.3,CITY[far]?tr('traceroute.net_carries_it_to_city',{net:T.name,city:CITY[far].name}):''); hop(`${slug(N.name)}-peer.${far}.${slug(T.name)}.net`,`198.51.100.${hstr(N.id)%250}`,0.4,tr('traceroute.net_hands_it_to_to',{net:T.name,to:N.name}));}} else if(e.k==='ix'){hop(`${slug(ixName(e.city))}.peering.${e.city}`,`185.0.${hstr(e.city)%250}.${hstr(N.id)%250}`,0.3,tr('traceroute.across_the_ix_switch',{ix:ixName(e.city)}));} - else if(e.k==='p'){hop(`pni-${slug(N.name)}.${e.city}.${me}`,ip(hstr(N.id),3),0.2,tr('traceroute.private_cross_connect'));} + else if(e.k==='p'){hop(`pni-${slug(NET[e.via||N.id].name)}.${e.city}.${me}`,ip(hstr(N.id),3),0.2,tr('traceroute.private_cross_connect'));} + if(e.via){const V=NET[e.via];asPath.push(V.asn);hop(`${slug(N.name)}-cust.${e.city}.${slug(V.name)}.net`,`198.51.100.${(hstr(V.id)+3)%250}`,1.2,tr('traceroute.net_hands_it_to_its_customer',{net:V.name,to:N.name}));} else{hop(`cache-${slug(N.name)}.${e.city}.${me}`,ip(hstr(N.id),4),0.1,tr('traceroute.embedded_cache_in_your_rack'));} asPath.push(N.asn);if(e.k!=='c')hop(`www.${slug(N.name)}.example`,`198.51.100.${(hstr(N.id)+1)%250}`,0.5+(e.k==='t'?1:0.2),`${N.name}`); - const order={c:tr('traceroute.caches_beat_pnis'),p:tr('traceroute.pnis_beat_ix_peering'),ix:tr('traceroute.ix_peering_beats_transit'),t:tr('traceroute.transit_is_the_last_resort')}[e.k]; + const order=e.via?tr('traceroute.a_peer_s_customers_come_after'):{c:tr('traceroute.caches_beat_pnis'),p:tr('traceroute.pnis_beat_ix_peering'),ix:tr('traceroute.ix_peering_beats_transit'),t:tr('traceroute.transit_is_the_last_resort')}[e.k]; const cn=cnCity(src)!==!!N.cn?' '+tr('traceroute.crossing_the_great_firewall_here',{p:S.ev.gfw>S.day?35:20}):''; return {text:lines.join('\n'),why:`${tr('traceroute.exit_exit_in_city',{exit:e.lab,city:CITY[e.city].name})} ${tr('traceroute.rule_and_closer_exits_win_ties',{rule:order[0].toUpperCase()+order.slice(1)})}${e.pref!=='normal'?tr('traceroute.this_one_is_set_to_mode',{mode:e.pref==='high'?tr('common.prefer'):tr('common.backup_only')}):''}.${e.used>=e.cap*0.999?' '+tr('traceroute.it_is_full_so_some_traffic'):''}${cn}`,asPath};} function traceModal(src,to){const pops=Object.keys(S.pops).sort((a,b)=>CITY[a].name.localeCompare(CITY[b].name));src=src&&S.pops[src]?src:UI.trFrom&&S.pops[UI.trFrom]?UI.trFrom:S.home&&S.pops[S.home]?S.home:pops[0]; diff --git a/src/game/60-features/60-share-card.js b/src/game/60-features/60-share-card.js index bb94a3e..d545a29 100644 --- a/src/game/60-features/60-share-card.js +++ b/src/game/60-features/60-share-card.js @@ -15,11 +15,14 @@ function shareCanvas(){const Wc=1200,Hc=630,cv=document.createElement('canvas'); g.fillStyle='#1E2640';g.font='900 54px "Baloo 2", sans-serif';g.textBaseline='top';g.fillText(S.name,40,28); g.font='800 26px Nunito, sans-serif';g.fillText(`AS${S.asn} · ${tierLabel()} · ${dateStr(S.day)}${ruleTag()?' · '+ruleTag():''}`,42,92); // stats - const got=BADGES.filter(b=>S.ach&&S.ach[b.id]!==undefined),rk={l:0,e:1,r:2,c:3},top=got.slice().sort((a,b)=>rk[a.r]-rk[b.r]).slice(0,8); + 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.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. + top.forEach((b,i)=>{const v=S.achP&&S.achP[b.id];if(v&&v!=='oncall'&&BVAR[v]){g.strokeStyle=BVAR[v].col;g.lineWidth=4;g.beginPath();g.arc(60+i*48,537,22,0,7);g.stroke();}}); g.font='34px sans-serif';top.forEach((b,i)=>g.fillText(b.i,40+i*48,520)); + {const n=v=>got.filter(b=>(S.achP&&S.achP[b.id]||'oncall')===v).length,f=n('freeze'),h=n('bgp');if(f||h){g.fillStyle='#1E2640';g.font='800 18px Nunito, sans-serif';g.fillText([h?`🔥 ${h}`:'',f?`🧊 ${f}`:''].filter(Boolean).join(' '),40+Math.max(1,top.length)*48+8,526);}} g.fillStyle='#1E2640';g.font='900 30px "Baloo 2", sans-serif';g.fillText('seriesoftub.es',40,572);g.font='700 20px Nunito, sans-serif';g.fillText(tr('share_card.build_the_internet_one_tube_at'),300,580); return cv;} function shareModal(){const cv=shareCanvas();if(!cv){toast(tr('share_card.your_browser_cannot_draw_the_card'),'bad');return;}let url='';try{url=cv.toDataURL('image/png');}catch(e){} diff --git a/src/game/60-features/80-new-game.js b/src/game/60-features/80-new-game.js index e4c178c..9b4230a 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(),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:{}, + 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')}; } diff --git a/src/game/60-features/90-puzzles-data.js b/src/game/60-features/90-puzzles-data.js new file mode 100644 index 0000000..1d7ede6 --- /dev/null +++ b/src/game/60-features/90-puzzles-data.js @@ -0,0 +1,39 @@ +/* Puzzles: one entry per line, in play order. A puzzle is data: + id, pack, n (name), j (one-line joke), cities (all must end up connected), via (optional stepping stones), + budget (setup + a year of monthly, 0 = no budget star to chase: it is given), and at most a twist or two: + noSub (no subsea cables), ring (one ring through every POP), lat:[a,b,ms] (best path under ms), minG (every link at + least this many Gbps), avoid (cities shown on the map that you may not build in). */ +const PZ_PACKS=[ + {id:'hello',n:tr('puzzles.hello_world'),d:tr('puzzles.your_first_tubes_no_pressure'),need:0}, + {id:'fire',n:tr('puzzles.ring_of_fire'),d:tr('puzzles.the_pacific_rim_where_every_hop'),need:6}, + {id:'speed',n:tr('puzzles.speed_runs'),d:tr('puzzles.beat_the_clock_light_in_glass'),need:14}, + {id:'n1',n:tr('puzzles.n_1_club'),d:tr('puzzles.for_architects_who_sleep_through_backhoes'),need:22}, +]; +const PZ=[ + {id:'hello',pack:'hello',n:tr('puzzles.hello_world'),j:tr('puzzles.every_internet_starts_with_one_tube'),cities:['lon','nyc'],budget:0}, + {id:'eurotrip',pack:'hello',n:tr('puzzles.euro_trip'),j:tr('puzzles.three_cities_two_currencies_one_very'),cities:['lon','ams','fra'],budget:0}, + {id:'shining',pack:'hello',n:tr('puzzles.sea_to_shining_sea'),j:tr('puzzles.four_cities_one_continent_and_a'),cities:['nyc','chi','dal','sjc'],budget:300000}, + {id:'smorgas',pack:'hello',n:tr('puzzles.smorgasbord'),j:tr('puzzles.four_capitals_one_very_long_winter'),cities:['osl','sto','cph','hel'],budget:190000}, + {id:'downunder',pack:'hello',n:tr('puzzles.down_under_up_and_running'),j:tr('puzzles.one_very_big_island_and_a'),cities:['syd','mel','bne','adl'],budget:300000}, + {id:'aloha',pack:'fire',n:tr('puzzles.aloha_latency'),j:tr('puzzles.honolulu_the_world_s_most_scenic'),cities:['sjc','hnl','syd'],budget:1750000}, + {id:'rimshot',pack:'fire',n:tr('puzzles.pacific_rim_shot'),j:tr('puzzles.seattle_to_singapore_with_a_stop'),cities:['sea','tok','hkg','sin'],budget:1200000}, + {id:'fire',pack:'fire',n:tr('puzzles.ring_of_fire'),j:tr('puzzles.four_cities_four_cables_one_ring'),cities:['tok','hkg','sin','syd'],ring:true,budget:1600000}, + {id:'kiwi',pack:'fire',n:tr('puzzles.kiwi_fruit_salad'),j:tr('puzzles.new_zealand_is_far_from_everything'),cities:['akl','syd','sea'],via:['hnl','suv'],budget:1400000}, + {id:'guam',pack:'fire',n:tr('puzzles.guam_slam'),j:tr('puzzles.a_tiny_island_where_half_the'),cities:['tok','mnl','syd'],via:['gum'],budget:1600000}, + {id:'flash',pack:'speed',n:tr('puzzles.flash_boys'),j:tr('puzzles.traders_paid_millions_to_shave_milliseconds'),cities:['nyc','lon'],lat:['nyc','lon',27],budget:450000}, + {id:'pingpong',pack:'speed',n:tr('puzzles.ping_pong_to_tokyo'),j:tr('puzzles.the_pacific_is_big_light_is'),cities:['lax','tok'],via:['sea','sjc'],lat:['lax','tok',47],budget:850000}, + {id:'suez',pack:'speed',n:tr('puzzles.suez_you_later'),j:tr('puzzles.frankfurt_to_singapore_the_short_way'),cities:['fra','sin'],via:['mrs','bom'],lat:['fra','sin',68],budget:1000000}, + {id:'samba',pack:'speed',n:tr('puzzles.samba_sprint'),j:tr('puzzles.sao_paulo_to_miami_before_the'),cities:['sao','mia'],via:['for','rio'],lat:['sao','mia',45],budget:950000}, + {id:'sharks',pack:'n1',n:tr('puzzles.the_shark_tank'),j:tr('puzzles.the_sharks_have_been_biting_again'),cities:['lis','mad','par','mil'],via:['bcn','mrs'],noSub:true,budget:210000}, + {id:'braces',pack:'n1',n:tr('puzzles.belt_and_braces'),j:tr('puzzles.two_cables_across_the_atlantic_because'),cities:['nyc','lon','dub'],budget:380000}, + {id:'nofra',pack:'n1',n:tr('puzzles.not_through_frankfurt'),j:tr('puzzles.de_kicks_sales_has_your_number'),cities:['ams','ber','muc','zrh'],via:['ham','dus'],avoid:['fra'],budget:200000}, + {id:'fatpipes',pack:'n1',n:tr('puzzles.fat_pipes_only'),j:tr('puzzles.nobody_ever_got_fired_for_buying'),cities:['par','mrs','mil','zrh'],minG:100,budget:240000}, +]; +// Weekly puzzle pools: each is one landmass and one region, so every pair has an overland route. +const PZ_WEEK_POOLS=[ + ['fra','ams','par','mad','mil','ber','waw','vie','sto','cph','prg','zrh','bcn','mrs','muc','bud'], + ['nyc','chi','dal','sea','sjc','lax','mia','ash','atn','den','bos','hou','phx','tor','mtl'], + ['sao','rio','bsb','bhz','cwb','poa','ssa','rec','for','cpq'], + ['syd','mel','bne','adl','cbr','per'], + ['bom','del','maa','blr','hyd'], +]; diff --git a/src/game/60-features/92-puzzles.js b/src/game/60-features/92-puzzles.js new file mode 100644 index 0000000..b0ca38e --- /dev/null +++ b/src/game/60-features/92-puzzles.js @@ -0,0 +1,104 @@ +/* ================= PUZZLES (#190) ================= + Small, calm builds: connect a few cities, earn up to three stars. A puzzle runs as its own S (S.mode='puzzle'): + no clock, no bills, no incidents, links up at once. That S is never saved. Only progress (stars and best spend per + puzzle, weekly results and the weekly streak) is kept, under its own key, so the main save is never touched. */ +const PZ_KEY='sot-puzzles',PZ_YEAR=12; +const pzOn=()=>!!(S&&S.mode==='puzzle'&&S.pz); +const pzDef=id=>PZ.find(p=>p.id===id)||null; +const pzKind=c=>!pzOn()?null:S.pz.cities.includes(c)?'goal':S.pz.via.includes(c)?'via':S.pz.avoid.includes(c)?'avoid':null; +const pzName=d=>d.id==='weekly'?tr('puzzles.weekly_puzzle_key',{key:d.key}):d.n; +const pzStarStr=n=>'⭐'.repeat(n)+'⬜'.repeat(3-n); +// ---------- progress (localStorage, never trusted) ---------- +function pzClean(j){const o={s:{},wk:{},streak:{last:null,n:0,best:0}};if(!j||typeof j!=='object')return o; + const rec=r=>r&&typeof r==='object'?{st:int(r.st,0,3,0),sp:r.sp==null||!isFinite(+r.sp)||+r.sp<0?null:Math.round(+r.sp)}:null; + if(j.s&&typeof j.s==='object')for(const k of Object.keys(j.s)){const r=rec(j.s[k]);if(pzDef(k)&&r)o.s[k]=r;} + if(j.wk&&typeof j.wk==='object')for(const k of Object.keys(j.wk)){const r=rec(j.wk[k]);if(/^\d{4}-W\d{2}$/.test(k)&&r)o.wk[k]=r;} + const st=j.streak;if(st&&typeof st==='object'){o.streak.last=typeof st.last==='string'&&/^\d{4}-W\d{2}$/.test(st.last)?st.last:null;o.streak.n=int(st.n,0,9999,0);o.streak.best=int(st.best,0,9999,0);} + return o;} +function pzLoad(){try{return pzClean(JSON.parse(localStorage.getItem(PZ_KEY)||'{}'));}catch(e){return pzClean(null);}} +function pzStore(p){try{localStorage.setItem(PZ_KEY,JSON.stringify(p));}catch(e){}} +const pzStarsTotal=p=>PZ.reduce((a,x)=>a+((p.s[x.id]||{}).st|0),0); +const pzPackOpen=(k,p)=>{const P=PZ_PACKS.find(x=>x.id===k);return !!P&&pzStarsTotal(p||pzLoad())>=P.need;}; +// ---------- prices: the real game's waves, on day 0, for a year ---------- +const pzMood=(a,b,sub)=>{const k=waveMarket(a,b,sub);return k.m/k.ero;}; +// Overland (when the two cities share a landmass) and every cable between them, each with its price factor and latency. +function pzRoutes(a,b){const out=[],sub=isSub(a,b); + if(!sub){const km=kmBetween(a,b);out.push({via:'land',cab:null,km,sub:false,f:landMult(a,b)*pzMood(a,b,false),ms:km*1.3/200});} + for(const c of cablesFor(a,b))if(!out.some(r=>r.via===c.cid))out.push({via:c.cid,cab:c.cid,km:c.km,sub:true,f:CAB[c.cid].price*pzMood(a,b,true),ms:c.km*(CAB[c.cid].lat||1)/200}); + return out;} +const pzMo=(r,tier,div)=>Math.round(waveMo(r.km,r.sub,tier)*r.f*(div?DIVERSE:1)); +const pzLinkCost=(r,tier,div)=>pzMo(r,tier,div)*PZ_YEAR;// leased waves have no setup fee: a year of rent +const pzPopCost=c=>popCost(c)+PZ_YEAR*POP_MO; +const PZ_TIERS=[0,1,2]; +function pzSpend(){let s=0;for(const c in S.pops)s+=pzPopCost(c);for(const l of S.links)s+=l.mo*PZ_YEAR;return s;} +// What one backhoe or one anchor takes out: waves in the same trench, or on the same cable between the same cities. +const pzUnit=l=>l.cable?'cab:'+l.cable+':'+edgeKey(l):String(l.trench||l.id); +// ---------- checks ---------- +function pzComp(ls,skip,from){const adj={};for(const l of ls){if(skip&&pzUnit(l)===skip)continue;(adj[l.a]=adj[l.a]||[]).push(l.b);(adj[l.b]=adj[l.b]||[]).push(l.a);} + const seen=new Set([from]),q=[from];while(q.length){const u=q.pop();for(const v of adj[u]||[])if(!seen.has(v)){seen.add(v);q.push(v);}}return seen;} +function pzRingOk(ls){const nb={};for(const l of ls){(nb[l.a]=nb[l.a]||new Set()).add(l.b);(nb[l.b]=nb[l.b]||new Set()).add(l.a);} + const ns=Object.keys(nb);if(ns.length<3||!S.pz.cities.every(c=>nb[c])||!Object.keys(S.pops).every(c=>nb[c])||!ns.every(c=>nb[c].size===2))return false; + let prev=null,cur=ns[0],n=0;do{const nx=[...nb[cur]].find(x=>x!==prev);prev=cur;cur=nx;n++;}while(cur!==ns[0]&&n<=ns.length);return cur===ns[0]&&n===ns.length;} +function pzEval(){const P=S.pz,ls=S.links,cs=P.cities,spend=pzSpend(); + // The checklist ticks the goal cities that are already joined up: the group holding the most of them. + let best=new Set();for(const c of cs){if(!S.pops[c]||best.has(c))continue;const g=pzComp(ls,null,c);if(cs.filter(x=>g.has(x)).length>cs.filter(x=>best.has(x)).length)best=g;} + const joined=cs.filter(c=>best.has(c)).length>=2?best:new Set(); + const marks=cs.map(c=>({c,st:joined.has(c)?2:S.pops[c]?1:0})); + const conn=cs.every(c=>joined.has(c)); + const tw=[];if(P.noSub)tw.push({k:'sub',ok:!S.links.some(l=>l.sub)}); + if(P.ring)tw.push({k:'ring',ok:pzRingOk(ls)}); + if(P.lat){const ms=S.pops[P.lat[0]]&&S.pops[P.lat[1]]?bestLat(P.lat[0],P.lat[1]):Infinity;tw.push({k:'lat',ok:ms<=P.lat[2],ms});} + if(P.minG)tw.push({k:'g',ok:ls.every(l=>LT[l.tier].g>=P.minG)}); + if(P.avoid.length)tw.push({k:'avoid',ok:P.avoid.every(c=>!S.pops[c])}); + const goal=conn&&tw.every(t=>t.ok),units=[...new Set(ls.map(pzUnit))]; + // N-1: the goal cities stay joined whichever single trench or cable segment is cut. + const weak=conn?units.filter(u=>{const g=pzComp(ls,u,cs[0]);return !cs.every(c=>g.has(c));}):[]; + const n1=conn&&units.length>0&&!weak.length,cheap=!P.budget||spend<=P.budget; + return {marks,conn,tw,goal,spend,cheap,n1,weak,stars:goal?1+(cheap?1:0)+(n1?1:0):0};} +// ---------- the weekly puzzle: the same for everyone, seeded by the ISO week like the weekly challenge ---------- +function pzWeekKey(dt){const {y,w}=isoWeek(dt);return `${y}-W${String(w).padStart(2,'0')}`;} +function pzPrevKey(key){const m=/^(\d{4})-W(\d{2})$/.exec(key);if(!m)return null;return pzWeekKey(new Date(+m[1],0,4+(+m[2]-2)*7));} +function pzWeekly(dt){const key=pzWeekKey(dt||new Date());let r=hstr('puzzle|'+key)||1;const nx=()=>{r=(Math.imul(r,1103515245)+12345)>>>0;return r/4294967296;}; + const pool=PZ_WEEK_POOLS[Math.floor(nx()*PZ_WEEK_POOLS.length)].slice(),n=4+Math.floor(nx()*2),cities=[]; + while(cities.lengthkmBetween(u,a)-kmBetween(u,b));ring.push(left.shift());} + let cost=cities.reduce((a,c)=>a+pzPopCost(c),0);for(let i=0;ipzLinkCost(x,0,false))); + return {id:'weekly',key,cities,via:[],budget:Math.ceil(cost*1.1/10000)*10000,ref:ring};} +function pzStreak(p,key){const st=p.streak;if(st.last===key)return;st.n=st.last&&st.last===pzPrevKey(key)?st.n+1:1;st.last=key;st.best=Math.max(st.best,st.n);} +function pzShareText(e){const P=S.pz;return tr('puzzles.share_line',{what:P.id==='weekly'?P.key:pzName(pzDef(P.id)),stars:pzStarStr(e.stars),spend:fmt$(e.spend)});} +// ---------- entering and leaving ---------- +// The running game gets its usual save first, so leaving the puzzle can load it back exactly as booting does. A huge +// save is compressed in the background and may not have landed yet, so the game object is kept in memory too. +function pzFlush(){save(true);UI.pzKeep=UI.gzBusy||saveFailing()?S:null;} +function pzBegin(def){if(!def)return; + const go=()=>{newGame(pzName(def),def.cities[0]);S.pops={};S.mode='puzzle';S.rules=makeRules('puzzle');S.nextFail=S.nextEvent=1e9;S.tut=null; + S.pz={id:def.id,key:def.key||null,cities:def.cities.slice(),via:(def.via||[]).slice(),avoid:(def.avoid||[]).slice(),budget:def.budget||0,noSub:!!def.noSub,ring:!!def.ring,minG:def.minG||0,lat:def.lat?def.lat.slice():null}; + UI.pzHist=[];UI.pzTop=0;UI.speed=0;UI.resumeSpeed=null;UI.started=true;UI.sel=null;UI.leftOpen=false;UI.confirm=null;UI._pzh=null; + $('dash').hidden=true;$('bankBox').hidden=true;closeModal();document.body.classList.add('pz'); + compute();pzCam();renderAll();track('puzzle_'+def.id); + toast(`${esc(pzName(def))}
${tr('puzzles.connect_list',{list:def.cities.map(c=>CITY[c].name).join(', ')})}`,'goal');}; + if(pzOn()){go();return;} + const live=!!(S&&UI.started&&!S.lost);UI.pzFrom=live?'game':'title'; + if(live)pzFlush();go();} +function pzLeave(){const from=UI.pzFrom;document.body.classList.remove('pz');UI.sel=null;UI.pzHist=null;UI.pzFrom=null;closeModal();$('panel').hidden=true;$('pzBox').hidden=true;S=null;R=emptyR();UI.started=false; + if(from==='game'){const sv=UI.pzKeep||loadSave();UI.pzKeep=null; + if(sv){try{S=migrate(sv);compute();UI.started=true;UI.speed=[0,0.5,1,2,4,8].includes(S.uiSpeed)?S.uiSpeed:1;if(S.cam&&isFinite(S.cam.x))Object.assign(cam,S.cam);renderAll();return;}catch(e){S=null;UI.started=false;}}} + renderAll();showTitle();} +// The camera frames the puzzle's cities beside the puzzle card: left on wide screens, right on phones on their side, a bottom sheet on phones. +function pzCam(){const cs=[...S.pz.cities,...S.pz.via].map(c=>CITY[c]),x0=cs[0].x;let a=Infinity,b=-Infinity,c=Infinity,d=-Infinity; + for(const C of cs){const x=x0+wrapDx(x0,C.x);a=Math.min(a,x);b=Math.max(b,x);c=Math.min(c,C.y);d=Math.max(d,C.y);} + const ph=isPhone(),side=ph&&CW>CH,pl=side?-Math.min(360,CW*0.52):ph?0:330,pb=ph&&!side?Math.min(230,CH*0.4):0,aw=Math.max(120,CW-Math.abs(pl)-90),ah=Math.max(120,CH-pb-150); + cam.z=clamp(Math.min(aw/Math.max(40,b-a),ah/Math.max(40,d-c)),0.5,4);cam.x=(a+b)/2-pl/2/cam.z;cam.y=(c+d)/2+(pb/2-30)/cam.z;wrapCam();} +// ---------- building ---------- +function pzSnap(){const h=UI.pzHist||(UI.pzHist=[]);h.push(JSON.stringify({p:S.pops,l:S.links}));if(h.length>60)h.shift();} +const pzNewPop=()=>({day:0,bb:null,boost:0,down:0,routers:1,gen:false}); +function pzAfter(){if(UI.sel&&((UI.sel.type==='link'&&!S.links.some(l=>l.id===UI.sel.id))||(UI.sel.type==='city'&&!pzKind(UI.sel.id))))UI.sel=null; + compute();renderAll();pzCheck();} +// Stars count the moment they are earned: a better result than this attempt has had opens the results card. +function pzCheck(){const e=pzEval();if(e.stars<=(UI.pzTop||0))return e;const prev=UI.pzTop||0;UI.pzTop=e.stars;pzRecord(e);pzResults(e,prev);return e;} +function pzRecord(e){const p=pzLoad(),P=S.pz,bag=P.id==='weekly'?p.wk:p.s,k=P.id==='weekly'?P.key:P.id,r=bag[k]||{st:0,sp:null}; + r.st=Math.max(r.st,e.stars);r.sp=r.sp==null?e.spend:Math.min(r.sp,e.spend);bag[k]=r;if(P.id==='weekly')pzStreak(p,P.key);pzStore(p);} +// The next puzzle in the list whose pack is open. +function pzNextDef(){const p=pzLoad(),i=PZ.findIndex(x=>x.id===S.pz.id);for(let j=i+1;j=5&&Object.keys(S.ixp).leng // Sparkly Seabone joined the Tier 1s in 1.12. Older saves keep the five they were playing for. // Tier 1s added later only count for games started after them, so old saves keep their win (#155). const t1Need=()=>NETS.filter(n=>n.type==='t1'&&(n.id!=='skl'||(S&&S.t1v>=2))&&(n.id!=='att'||(S&&S.t1v>=3))); +/* Reach is counted through customer cones (#85): a PNI with a Tier 1 reaches everyone who buys transit from it, and + their customers. That only ever adds reach, so the rule is easier for every save, old ones included, and needs no + version: what was Tier 1 stays Tier 1. Networks in nobody's cone still need peering of their own. */ function isTier1(){return t1Need().every(n=>S.pni.some(p=>p.net===n.id&&pniOn(p)))&&S.transit.length===0&&R.reach>0.999;} // What you are now, not what you once were (#46): buying transit again or losing reach drops the label. function tierLabel(){return S.won&&isTier1()?'Tier 1':isTier2()?'Tier 2':'Tier 3';} -function t1Why(){if(S.transit.length)return tr('hot_ports_and_rank.you_buy_transit_again');const miss=t1Need().filter(n=>!S.pni.some(p=>p.net===n.id&&pniOn(p)));if(miss.length)return tr('hot_ports_and_rank.no_pni_with_list',{list:miss.map(n=>n.name).join(', ')});{const lost=NETS.filter(n=>!R.reachable[n.id]).sort((a,b)=>NSH[b.id]-NSH[a.id]);if(lost.length)return tr('hot_ports_and_rank.you_cannot_reach_list',{list:lost.slice(0,3).map(n=>n.name).join(', ')+(lost.length>3?' '+tr('hot_ports_and_rank.and_n_more',{n:lost.length-3}):'')});}return tr('hot_ports_and_rank.your_reach_is_p_not_100',{p:reachPct(R.reach)});} +function t1Why(){if(S.transit.length)return tr('hot_ports_and_rank.you_buy_transit_again');const miss=t1Need().filter(n=>!S.pni.some(p=>p.net===n.id&&pniOn(p)));if(miss.length)return tr('hot_ports_and_rank.no_pni_with_list',{list:miss.map(n=>n.name).join(', ')});{const lost=NETS.filter(n=>!R.reachable[n.id]).sort((a,b)=>NSH[b.id]-NSH[a.id]);if(lost.length)return tr('hot_ports_and_rank.you_cannot_reach_list_outside_cones',{list:lost.slice(0,3).map(n=>n.name).join(', ')+(lost.length>3?' '+tr('hot_ports_and_rank.and_n_more',{n:lost.length-3}):'')});}return tr('hot_ports_and_rank.your_reach_is_p_not_100',{p:reachPct(R.reach)});} diff --git a/src/game/80-simulation/30-compute.js b/src/game/80-simulation/30-compute.js index 0429a59..9b35c84 100644 --- a/src/game/80-simulation/30-compute.js +++ b/src/game/80-simulation/30-compute.js @@ -23,20 +23,26 @@ function compute(){ E.push(ex);if(pf)E.push({...ex,cap:cap*pf,prep:true});} // `nets`: every network ok() can say yes to, so it need not be asked about the other hundred. for(const c in S.ixp){const ct=ixCity(c);if(!(popUp(ct)||remote.includes(ct))||(S.ev.ixdown&&S.ev.ixdown[c]>day)||!(S.myIx[c]?myIxLive(c):liveN(ct,(S.ixSite||{})[c],(S.ixn||{})[c])))continue;const set=ixSessions(c);R2.sessions+=set.size; - E.push({k:'ix',pref:(S.ixPref&&S.ixPref[c])||'normal',lab:labOf(N_('common.ix_peering'),'ix',ixName(c)),id:c,city:ct,cap:ixCap(c),used:0,rank:2,ok:n=>set.has(n),nets:set});} - for(const p of S.pni){if(!pniOn(p)||!popUp(p.city)||!liveN(p.city,p.site,p.n))continue;R2.sessions++;E.push({k:'p',pnc:!!NET[p.net].cn,pref:p.pref||'normal',lab:labOf(N_('common.pni_with_net'),'net',NET[p.net].name),id:p.id,city:p.city,cap:liveCap(pniG(p),p.city,p.site,p.n)*lagF(p)*(p.sacrif?0.5:1),used:0,rank:1,ok:n=>n===p.net||!!(NET[n].up&&NET[n].up.includes(p.net)),nets:PNI_NETS[p.net]});} + // A peer announces its customers too (#85): the session reaches its cone, after the networks peering directly. + let all=set;for(const id of set)if(DOWN[id].length){if(all===set)all=new Set(set);for(const x of DOWN[id])all.add(x);} + E.push({k:'ix',pref:(S.ixPref&&S.ixPref[c])||'normal',lab:labOf(N_('common.ix_peering'),'ix',ixName(c)),id:c,city:ct,cap:ixCap(c),used:0,rank:2,ok:n=>all.has(n),nets:all,dir:all===set?null:set});} + for(const p of S.pni){if(!pniOn(p)||!popUp(p.city)||!liveN(p.city,p.site,p.n))continue;R2.sessions++;E.push({k:'p',pnc:!!NET[p.net].cn,pref:p.pref||'normal',lab:labOf(N_('common.pni_with_net'),'net',NET[p.net].name),id:p.id,city:p.city,cap:liveCap(pniG(p),p.city,p.site,p.n)*lagF(p)*(p.sacrif?0.5:1),used:0,rank:1,net:p.net,ok:n=>CONE_S[p.net].has(n),nets:CONE[p.net]});} for(const c of S.caches){if(!popUp(c.city)||siteDown(c.city,c.site==='b'?'b':'a'))continue;E.push({k:'c',pref:'normal',lab:labOf(N_('common.name_cache'),'name',NET[c.net].cache.name),id:c.id,city:c.city,cap:CACHE_CAP,used:0,rank:0,ok:n=>n===c.net,nets:[c.net]});} // After an update adds networks, a free courtesy route reaches the new ones you have no other way to (#46). R2.graceNets=0;if(S.grace&&S.grace.until>day){const gs=new Set(S.grace.nets.filter(n=>NET[n]&&!E.some(e=>e.k!=='c'&&e.ok(n)))),hc=popUp(S.home)?S.home:pops.find(popUp); R2.graceNets=gs.size;if(gs.size&&hc)E.push({k:'ix',pref:'normal',lab:tr('compute.courtesy_route_to_new_networks'),id:'~grace',city:hc,cap:1e9,used:0,rank:2,ok:n=>gs.has(n),nets:gs});} {const rp=ev.rpki&&ev.rpki.until>day?new Set(ev.rpki.nets):null;if(rp)for(const e of E){if(e.k==='c')continue;const o=e.ok;e.ok=n=>!rp.has(n)&&o(n);}} + // coneOf: does exit e reach network n only through a peer's customer cone (#85)? + const coneOf=(e,n)=>e.k==='p'?e.net!==n:!!e.dir&&!e.dir.has(n); // ok() cannot change during one compute, so ask each exit once per network, not once per flow and rank. // okBy[net] lists the exits that reach it in E's order, like E.filter(e=>e.ok(net)). const okBy={};for(const id of NET_IDS)okBy[id]=[]; R2.ingressPorts={};const ekN={};for(const e of E){e.ek=e.k+':'+e.id;if(e.k!=='c'){const p=R2.ingressPorts[e.ek]||(R2.ingressPorts[e.ek]={k:e.k,id:e.id,city:e.city,lab:e.lab,cap:0,traffic:0});p.cap+=e.cap;}ekN[e.ek]=(ekN[e.ek]||0)+1;} // dup: shares its key with another exit (a hand-edited save), so R.egDesc shows whichever pushed last. for(const e of E){e.desc={lab:e.lab,city:e.city,k:e.k};e.dup=ekN[e.ek]>1;e.told=false;e.hp=e.pref==='high'?0:1;e.ci=CIDX[e.city];e.cn=cnCity(e.city);e.vis=0;for(const n of e.nets||NET_IDS){const L=okBy[n];if(L&&L[L.length-1]!==e&&e.ok(n))L.push(e);}} - for(const n of NETS){R2.reachable[n.id]=okBy[n.id].some(e=>e.rank>0);if(R2.reachable[n.id])R2.reach+=NSH[n.id];if(okBy[n.id].some(e=>e.rank>0&&e.k!=='t')){R2.nt[n.id]=1;R2.reachNT+=NSH[n.id];}} + for(const n of NETS){R2.reachable[n.id]=okBy[n.id].some(e=>e.rank>0);if(R2.reachable[n.id])R2.reach+=NSH[n.id];if(okBy[n.id].some(e=>e.rank>0&&e.k!=='t')){R2.nt[n.id]=1;R2.reachNT+=NSH[n.id]; + // Reached without transit only through the customers of networks you peer with (#85). + if(!okBy[n.id].some(e=>(e.k==='p'||e.k==='ix')&&!coneOf(e,n.id)))R2.cone[n.id]=1;}} const cacheNets=new Set(S.caches.filter(c=>popUp(c.city)).map(c=>c.net)); const viral=(ev.viral>day?1.25:1)*(ev.php&&ev.php>day?0.7:1); // Every flow has the same shape and carries what routing asks about it again and again (nj: its network's index). @@ -149,15 +155,17 @@ function compute(){ if(D[dst]===Infinity||D[dst]>2*base+60){teCache.set(key,false);return null;} const Q=walkI(P,src,dst);teCache.set(key,Q);return Q;}; const ingressE={};for(const e of E)(ingressE[e.ek]||(ingressE[e.ek]=[])).push(e); - const base=e=>e.pref==='low'?4:e.rank; + /* A network in a peer's customer cone, reached through that peer (#85): after every network you peer with directly + (its AS path is one hop longer) and before transit. */ + const base=(e,n)=>e.pref==='low'?4:e.rank>0&&e.rank<3&&coneOf(e,n)?CONE_RANK:e.rank; // LOCAL_PREF on an upstream moves it ahead of or behind the other transits, never ahead of peering (#96). - const eff=(e,n)=>{let r=base(e);if(TR){if(e.k==='t'&&TR.up[e.net])r=TR.up[e.net]==='prefer'?2.9:3.5;if(e.prep)r=4.4;if(e.k!=='c'&&TR.drain.has(e.city))r=4.6;const o=TR.net[n];if(o){if(o.prefer===e.k)r=0.5;else if(o.avoid===e.k)r=4.5;}}return r;}; - const RANKS=TR?[0,0.5,1,2,2.9,3,3.5,4,4.4,4.5,4.6]:[0,1,2,3,4]; + const eff=(e,n)=>{let r=base(e,n);if(TR){if(e.k==='t'&&TR.up[e.net])r=TR.up[e.net]==='prefer'?2.9:3.5;if(e.prep)r=4.4;if(e.k!=='c'&&TR.drain.has(e.city))r=4.6;const o=TR.net[n];if(o){if(o.prefer===e.k)r=0.5;else if(o.avoid===e.k)r=4.5;}}return r;}; + const RANKS=TR?[0,0.5,1,2,CONE_RANK,2.9,3,3.5,4,4.4,4.5,4.6]:[0,1,2,CONE_RANK,3,4]; // With `protect customers`, business flows take every rank first; home users get what is left. const PASSES=TR&&TR.protect?[x=>x.bz,x=>!x.bz]:null; // Each network's exits by the rank they route at (RouteScript can move an exit per network), in E's order. // Each list also knows whether it holds a preferred exit (hi) and its exits by city (at), in list order. - const byRank={};for(const id of NET_IDS){const m=byRank[id]={};for(const e of okBy[id]){const r=TR?eff(e,id):base(e);(m[r]||(m[r]=[])).push(e);} + const byRank={},RSET=new Set();for(const id of NET_IDS){const m=byRank[id]={};for(const e of okBy[id]){const r=TR?eff(e,id):base(e,id);RSET.add(r);(m[r]||(m[r]=[])).push(e);} for(const r in m){const L=m[r];L.hi=L.some(e=>e.hp===0);L.at=new Map();for(const e of L){const h=L.at.get(e.ci);if(h)h.push(e);else L.at.set(e.ci,[e]);}}} // The flow being routed, and from its POP: distances, arriving edges and the paths walked so far, by city index. let f=null,Dv=null,Pv=null,PP=null,vis=0;const walked=[],G=[],REST=[],NEG=[]; @@ -202,7 +210,7 @@ function compute(){ // same comparison, so the order is the same either way. const sortD=a=>{const n=a.length;if(n>24){a.sort(byDist);return;}for(let i=1;i=0&&byDist(a[j],x)>0){a[j+1]=a[j];j--;}a[j+1]=x;}}; for(const pass of PASSES||[null])for(const rank of RANKS){ - if(TR?!E.length:!E.some(e=>base(e)===rank))continue; + if(!RSET.has(rank))continue; // Index loops in here: plain for…of allocates an iterator per loop until V8 has optimised compute(). for(let fi=0,FN=flows.length;fi{v=+v;return Number.isFinite(v)?v:d;},int=(v,lo,hi,d)=>{v=Mat /* Saves come from localStorage or from imported files, so treat them as untrusted: fill in anything missing, drop references to cities, networks or types that do not exist, and force numbers to be numbers. */ function sanitize(s){ + // A puzzle is never saved; a save that says otherwise is played as a normal game. + if(s.mode==='puzzle')s.mode='normal';delete s.pz; const arr=k=>{if(!Array.isArray(s[k]))s[k]=[];},obj=k=>{if(!s[k]||typeof s[k]!=='object'||Array.isArray(s[k]))s[k]={};}; ['links','nni','transit','pni','caches','biz','offers','inc','usedNames','loans','loanOffers','hist','log'].forEach(arr); ['pops','ixp','rs','peers','myIx','done','ev','stats','ixn','ixPref','ixSite','confReg','ach','pairMet'].forEach(obj); @@ -71,6 +73,9 @@ function sanitize(s){ if(attacks.length)s.ev.ddos=attacks[0];else delete s.ev.ddos;s.ev.ddosMore=attacks.slice(1); s.ddosStarts=(Array.isArray(s.ddosStarts)?s.ddosStarts:attacks.map(a=>a.start)).filter(d=>typeof d==='number'||typeof d==='string').map(Number).filter(d=>Number.isFinite(d)&&d>s.day-7&&d<=s.day).sort((a,b)=>a-b).slice(-14); s.auV=s.auV===1?1:0;if(s.auNews!==true)delete s.auNews; + // Badges: S.ach[id] is the day it was earned (any save); S.achP[id] the variant (2.0). A missing variant is the standard one. + for(const k of Object.keys(s.ach))s.ach[k]=num(s.ach[k],0); + {const p=s.achP&&typeof s.achP==='object'&&!Array.isArray(s.achP)?s.achP:{};s.achP={};for(const k of Object.keys(s.ach))s.achP[k]=BVAR[p[k]]?p[k]:'oncall';} if(s.merged){const o={};if(typeof s.merged==='object')for(const m of MERGERS)if(isFinite(s.merged[m.id]))o[m.id]=+s.merged[m.id];s.merged=Object.keys(o).length?o:undefined;} // The rules (2.0): a save without them is the classic game, On-call (or a sandbox or puzzle, if it was one). Locked after the start. {const r=s.rules&&typeof s.rules==='object'&&!Array.isArray(s.rules)?s.rules:{},p=s.mode==='sandbox'?'sandbox':s.mode==='puzzle'?'puzzle':own(PRESETS,r.preset)?r.preset:'oncall';s.rules=makeRules(p,own(PRESETS,r.preset)?r:{});} diff --git a/src/game/88-days/20-badges.js b/src/game/88-days/20-badges.js index ca65535..39cd21a 100644 --- a/src/game/88-days/20-badges.js +++ b/src/game/88-days/20-badges.js @@ -70,16 +70,33 @@ const BADGES=[ {id:'skynot',i:'🤖',t:tr('common.skynot_smiles'),d:tr('badges.land_a_hackback_3000tm_that_actually'),r:'e',secret:true,ok:()=>(st().hackWin||0)>=1}, {id:'zero',i:'🕳️',t:tr('badges.zero_peers_given'),d:tr('badges.reach_tier_2_with_every_single'),r:'l',secret:true,ok:()=>isTier2()&&!Object.keys(S.peers).length&&!S.pni.length}, ]; -function hof(){try{return JSON.parse(localStorage.getItem('sot-badges')||'{}')||{};}catch(e){return {};}} -function checkBadges(){S.ach=S.ach||{};if(S.mode==='sandbox')return;let h=null; - for(const b of BADGES){if(S.ach[b.id]!==undefined)continue;let ok=false;try{ok=b.ok();}catch(e){} - if(!ok)continue;S.ach[b.id]=S.day;const R0=RARITY[b.r]; - if(!h)h=hof();if(!h[b.id])h[b.id]={d:new Date().toISOString().slice(0,10),n:S.name}; - toast(`${b.i} ${tr('badges.badge_unlocked_name',{name:esc(b.t)})}
${R0.n} · ${esc(b.d)}`,'goal',[],{a:'tab',v:'goals'});sfx('coin');track('badge_'+b.id);} +/* Badge variants by ruleset (2.0): On-call earns the standard badge, Change Freeze a frosted one and BGP at 3 a.m. a + fiery one; Sandbox and the puzzles earn none (puzzles have stars). Earning a badge again under a harder preset + upgrades its look, here and in the hall of fame. S.ach[id] stays the day it was earned; S.achP[id] is its variant. */ +const BVAR={freeze:{k:'freeze',lv:1,i:'🧊',n:N_('badges.variant_freeze_dried'),col:'#5BC0EB'},oncall:{k:'oncall',lv:2,i:'⭐',n:N_('badges.variant_on_call'),col:'#FFD23F'},bgp:{k:'bgp',lv:3,i:'🔥',n:N_('badges.variant_forged_at_3_a_m'),col:'#FF5A1F'}}; +const BVAR_IDS=['freeze','oncall','bgp'],bvar=k=>BVAR[k]||BVAR.oncall; +// The preset this save plays under ('oncall' for every save from before rulesets), and the variant it earns (null: none). +const rulePre=()=>(typeof rulePreset==='function'?rulePreset():(S&&S.rules&&S.rules.preset))||'oncall'; +function badgeVar(){if(!S||S.mode==='sandbox')return null;const p=rulePre();return p==='sandbox'||p==='puzzle'?null:BVAR[p]?p:'oncall';} +// The hall of fame is this device's localStorage, so it is checked like a save: unknown variants count as standard. +function hof(){let h;try{h=JSON.parse(localStorage.getItem('sot-badges')||'{}');}catch(e){h=null;}if(!h||typeof h!=='object'||Array.isArray(h))return {}; + for(const k of Object.keys(h)){const x=h[k];if(!x||typeof x!=='object'){delete h[k];continue;}const vs=x.vs&&typeof x.vs==='object'&&!Array.isArray(x.vs)?x.vs:{}; + x.vs={};for(const v of BVAR_IDS)if(typeof vs[v]==='string')x.vs[v]=vs[v];if(!Object.keys(x.vs).length)x.vs.oncall=typeof x.d==='string'?x.d:''; + x.v=BVAR_IDS.filter(v=>x.vs[v]!==undefined).pop();} + return h;} +function checkBadges(){S.ach=S.ach||{};S.achP=S.achP||{};const v=badgeVar();if(!v)return;let h=null;const V=BVAR[v]; + for(const b of BADGES){const had=S.ach[b.id]!==undefined;if(had&&bvar(S.achP[b.id]).lv>=V.lv)continue;let ok=false;try{ok=b.ok();}catch(e){} + if(!ok)continue;if(!had)S.ach[b.id]=S.day;S.achP[b.id]=v;const R0=RARITY[b.r]; + if(!h)h=hof();const today=new Date().toISOString().slice(0,10),x=h[b.id]||(h[b.id]={d:today,n:S.name,vs:{}});if(x.vs[v]===undefined)x.vs[v]=today;if(bvar(x.v).lv${b.i} ${had?tr('badges.badge_upgraded_name',{name:esc(b.t)}):tr('badges.badge_unlocked_name',{name:esc(b.t)})}
${R0.n}${v==='oncall'?'':` · ${V.i} ${tr(V.n)}`} · ${esc(b.d)}`,'goal',[],{a:'tab',v:'goals'});sfx('coin');track('badge_'+b.id+(v==='oncall'?'':'_'+v));} if(h)try{localStorage.setItem('sot-badges',JSON.stringify(h));}catch(e){}} -function badgeGrid(){const h=hof(),got=BADGES.filter(b=>S.ach&&S.ach[b.id]!==undefined).length; - return `

${tr('common.badges')} ${tr('badges.got_total_this_game_ever_ever',{got,total:BADGES.length,ever:Object.keys(h).filter(k=>BADGES.some(b=>b.id===k)).length})}

${BADGES.map(b=>{const on=S.ach&&S.ach[b.id]!==undefined,ever=!!h[b.id],R0=RARITY[b.r],hide=b.secret&&!on&&!ever; - return `
${hide?'❔':b.i}${esc(hide?'???':b.t)}${R0.n}${ever&&!on?' · '+tr('common.earned_before'):''}${hide?'':`${esc(b.d)}`}
`;}).join('')}
`;} +// How many badges this device has ever earned in each variant: the collection. +function badgeShelf(h){const o={freeze:0,oncall:0,bgp:0};for(const b of BADGES){const x=h[b.id];if(x)for(const v of BVAR_IDS)if(x.vs[v]!==undefined)o[v]++;}return o;} +function badgeGrid(){const h=hof(),got=BADGES.filter(b=>S.ach&&S.ach[b.id]!==undefined).length,sh=badgeShelf(h),V=badgeVar(); + return `

${tr('common.badges')} ${tr('badges.got_total_this_game_ever_ever',{got,total:BADGES.length,ever:Object.keys(h).filter(k=>BADGES.some(b=>b.id===k)).length})}

+
${BVAR_IDS.map(v=>`${BVAR[v].i} ${esc(tr(BVAR[v].n))} ${sh[v]}/${BADGES.length}`).join('')}
${V&&V!=='oncall'?`

${V==='bgp'?tr('badges.this_game_earns_fiery_badges'):tr('badges.this_game_earns_frosted_badges')}

`:''} +
${BADGES.map(b=>{const on=S.ach&&S.ach[b.id]!==undefined,ever=!!h[b.id],R0=RARITY[b.r],hide=b.secret&&!on&&!ever,vk=on?bvar(S.achP&&S.achP[b.id]).k:ever?h[b.id].v:'',vn=vk&&vk!=='oncall'?' · '+BVAR[vk].i+' '+tr(BVAR[vk].n):''; + return `
${hide?'❔':b.i}${esc(hide?'???':b.t)}${R0.n}${ever&&!on?' · '+tr('common.earned_before'):''}${vk&&vk!=='oncall'?`${BVAR[vk].i} ${esc(tr(BVAR[vk].n))}`:''}${hide?'':`${esc(b.d)}`}
`;}).join('')}
`;} function checkGoals(){checkBadges(); for(const g of GOALS){if(S.done[g.id]!==undefined)continue;let ok=false;try{ok=g.ok();}catch(e){} if(ok){S.done[g.id]=S.day;if(g.r&&S.mode!=='sandbox'){S.cash+=g.r;} diff --git a/src/game/90-actions/10-interface.js b/src/game/90-actions/10-interface.js index 17f0778..70dc725 100644 --- a/src/game/90-actions/10-interface.js +++ b/src/game/90-actions/10-interface.js @@ -2,13 +2,13 @@ function spend(c){if(S.cash{const l=S.links.find(x=>x.id===id);if(!l||linkDown(l))return;linkCheckModal(l);}, - speed:({v})=>{v=+v;if(![0,0.5,1,2,4,8].includes(v)||(S&&!rule('clock')&&v))return;if(v)UI.lastSpeed=v;UI.speed=v;renderHUD();}, + speed:({v})=>{v=+v;if(pzOn())return;if(![0,0.5,1,2,4,8].includes(v)||(S&&!rule('clock')&&v))return;if(v)UI.lastSpeed=v;UI.speed=v;renderHUD();}, help:()=>showHelp(), - dash:()=>{if(!S)return;const d=$('dash');d.hidden=!d.hidden;if(!d.hidden)renderDash();}, + dash:()=>{if(!S||pzOn())return;const d=$('dash');d.hidden=!d.hidden;if(!d.hidden)renderDash();}, dashClose:()=>{$('dash').hidden=true;}, dashTab:({k})=>{if(!DTABS.includes(k))return;UI.dtab=k;renderDash();const d=$('dash');if(d)d.scrollTop=0;}, dashSort:({k})=>{if(!['name','asn','type','traffic','cost','lost'].includes(k))return;if(UI.dashSort===k)UI.dashDir=-(UI.dashDir||-1);else{UI.dashSort=k;UI.dashDir=k==='name'||k==='type'||k==='asn'?1:-1;}renderDash();}, - bank:()=>{if(!S)return;UI.confirm=null;$('dash').hidden=true;const b=$('bankBox');b.hidden=false;UI._bh=null;renderBank();}, + bank:()=>{if(!S||pzOn())return;UI.confirm=null;$('dash').hidden=true;const b=$('bankBox');b.hidden=false;UI._bh=null;renderBank();}, bankClose:()=>{UI.confirm=null;$('bankBox').hidden=true;}, takeLoan:({id})=>{const o=S.loanOffers.find(x=>x.id===id);if(!o)return;S.stats.loans=(S.stats.loans||0)+1;const B=BANKS[o.bank];let got=o.amount,note=''; if(B.crypto){const f=0.55+Math.random()*0.8;got=Math.round(o.amount*f);note=' '+(f>=1?tr('interface.tubecoin_moved_up_p_on_the',{p:Math.round(Math.abs(f-1)*100)}):tr('interface.tubecoin_moved_down_p_on_the',{p:Math.round(Math.abs(f-1)*100)}));} @@ -34,8 +34,8 @@ const ACT={ meetGo:({city})=>{if(!isCity(city))return;$('dash').hidden=true;ACT.focusCity({city});if(S.pops[city]){UI.tab='peer';renderPanel();}}, toggleLeft:()=>{UI.leftOpen=!UI.leftOpen;renderLeft();}, phoneTab:({t})=>{if(!['goals','deals','noc','nets'].includes(t))return;if($('modal').classList.contains('link-check'))closeModal();haptic(8);if(UI.leftOpen&&UI.left===t&&!UI.sel){UI.leftOpen=false;}else{UI.left=t;UI.leftOpen=true;UI.sel=null;renderPanel();}$('left').classList.remove('full');renderLeft();}, - phonePlay:()=>{if(S&&!rule('clock'))return;haptic(10);if(UI.speed){UI.lastSpeed=UI.speed;UI.speed=0;}else UI.speed=UI.lastSpeed||1;renderHUD();}, - phoneSpeed:()=>{if(S&&!rule('clock'))return;haptic(8);const cur=UI.speed||UI.lastSpeed||1,i=SPEEDS.indexOf(cur),n=SPEEDS[(i+1)%SPEEDS.length];UI.speed=n;UI.lastSpeed=n;renderHUD();}, + phonePlay:()=>{if(pzOn())return;if(S&&!rule('clock'))return;haptic(10);if(UI.speed){UI.lastSpeed=UI.speed;UI.speed=0;}else UI.speed=UI.lastSpeed||1;renderHUD();}, + phoneSpeed:()=>{if(pzOn())return;if(S&&!rule('clock'))return;haptic(8);const cur=UI.speed||UI.lastSpeed||1,i=SPEEDS.indexOf(cur),n=SPEEDS[(i+1)%SPEEDS.length];UI.speed=n;UI.lastSpeed=n;renderHUD();}, install:()=>{if(installEvt){installEvt.prompt();installEvt.userChoice.finally(()=>{installEvt=null;});return;} openModal(pitchHtml(false));}, pitchSkip:()=>{const p=UI.pendGame;UI.pendGame=null;UI.pitched=true;if(p)beginGame(...p);else closeModal();}, diff --git a/src/game/90-actions/89-game-and-settings.js b/src/game/90-actions/89-game-and-settings.js index 55ab145..11c4b9f 100644 --- a/src/game/90-actions/89-game-and-settings.js +++ b/src/game/90-actions/89-game-and-settings.js @@ -19,7 +19,7 @@ Object.assign(ACT,{ exportSave:()=>exportSave(), importPick:()=>{let f=$('importIn');if(!f){f=document.createElement('input');f.type='file';f.accept='.json,application/json';f.id='importIn';f.hidden=true;document.body.appendChild(f);f.addEventListener('change',()=>{importFile(f.files[0]);f.value='';});}f.click();}, importGo:()=>{const s0=UI.importing;if(!s0)return;UI.importing=null;const prev=S;try{S=migrate(JSON.parse(JSON.stringify(s0)));compute();checkGoals();renderAll();}catch(e){S=prev;if(S)compute();renderAll();toast(tr('game_and_settings.import_failed_that_save_is_damaged'),'bad');sfx('err');return;}UI.confirm=null;$('bankBox').hidden=true;$('dash').hidden=true;UI.started=true;UI.sel=null;UI.speed=S.uiSpeed===undefined?1:S.uiSpeed;if(S.cam&&isFinite(S.cam.x))Object.assign(cam,S.cam);else{const h=CITY[S.home];if(h){cam.x=h.x;cam.y=h.y;}}closeModal();$('modal').hidden=true;compute();renderAll();save();toast(tr('game_and_settings.welcome_back_name_imported_and_saved',{name:esc(S.name)}),'good');sfx('coin');track('game_import');}, - menu:()=>{if(!S||!UI.started){showTitle();return;}openModal(`
AS${S.asn} · ${esc(dateStr(S.day))} · ${tierLabel()}

${esc(S.name)}

+ menu:()=>{if(!S||!UI.started){showTitle();return;}if(pzOn()){pzMenu();return;}openModal(`
AS${S.asn} · ${esc(dateStr(S.day))} · ${tierLabel()}

${esc(S.name)}

${saveFailing()?`

${saveFailMsg()}

`:`

${tr('game_and_settings.your_game_saves_itself_every_few')}

`}${isPhone()?installRow():''} ';} diff --git a/src/game/94-dashboard/80-hint.js b/src/game/94-dashboard/80-hint.js index 1c8b175..037a7b3 100644 --- a/src/game/94-dashboard/80-hint.js +++ b/src/game/94-dashboard/80-hint.js @@ -1,6 +1,7 @@ function renderHint(){ const hn=$('hint');if(!S||UI.hintOff||(S.tut!==undefined&&S.tut!==null)||(innerWidth<760&&(UI.sel||UI.leftOpen)&&!(UI.drag&&UI.drag.mode==='link'))){hn.hidden=true;return;} let t=''; + if(pzOn()){t=UI.drag&&UI.drag.mode==='link'?(UI.snap?tr('hint.release_to_plan_a_link'):tr('hint.drag_onto_another_city')):!Object.keys(S.pops).length?tr('puzzles.tap_a_goal_city_to_open'):!S.links.length?tr('puzzles.drag_from_a_pink_pop_to'):'';hn.textContent=t;hn.hidden=!t;return;} if(UI.drag&&UI.drag.mode==='link')t=UI.snap?tr('hint.release_to_plan_a_link'):tr('hint.drag_onto_another_city'); else if(!S.links.length&&S.done.tr)t=tr('hint.tip_drag_from_your_pink_router'); else if(!S.done.bb)t=tr('hint.tap_your_city_then_launch_broadband'); diff --git a/src/game/95-modals/60-help.js b/src/game/95-modals/60-help.js index 31c3000..2fc0865 100644 --- a/src/game/95-modals/60-help.js +++ b/src/game/95-modals/60-help.js @@ -5,7 +5,7 @@ function showHelp(){
${tr('common.eyeballs')}
${tr('help.home_broadband_users_they_mostly')}
POP
${tr('help.point_of_presence_your_router_in')}
${tr('common.ip_transit')}
${tr('help.you_pay_a_bigger_network_per')}
-
Tier 1 / Tier 2
${tr('help.tier_1s_reach_the_whole_internet')}
+
Tier 1 / Tier 2
${tr('help.tier_1s_reach_the_whole_internet_cones')}
CDN
${tr('help.content_networks_like_netchill_and')}
${tr('help.ix_internet_exchange')}
${tr('help.a_shared_switch_in_a_city')}
PNI
${tr('help.private_network_interconnect_a_cable')}
diff --git a/src/game/95-modals/95-puzzles.js b/src/game/95-modals/95-puzzles.js new file mode 100644 index 0000000..1ae57a6 --- /dev/null +++ b/src/game/95-modals/95-puzzles.js @@ -0,0 +1,81 @@ +/* ---------- puzzles: the card, the panels, the link picker, the results and the list ---------- */ +const PZ_ICON={goal:'🎯',via:'🪨',avoid:'🚫'}; +function pzTwistTxt(t){const P=S.pz; + if(t.k==='sub')return tr('puzzles.no_subsea_cables'); + if(t.k==='ring')return tr('puzzles.one_ring_through_every_pop'); + if(t.k==='g')return tr('puzzles.every_link_n_g_or_more',{n:P.minG}); + if(t.k==='avoid')return tr('puzzles.no_pop_in_list',{list:P.avoid.map(c=>CITY[c].name).join(', ')}); + const [a,b,ms]=P.lat;return isFinite(t.ms)?tr('puzzles.a_to_b_under_ms_now',{a:CITY[a].name,b:CITY[b].name,ms,now:t.ms.toFixed(1)}):tr('puzzles.a_to_b_under_ms',{a:CITY[a].name,b:CITY[b].name,ms});} +// The short version, for the puzzle list. +function pzTwistTag(d){const t=[];if(d.noSub)t.push(tr('puzzles.no_subsea'));if(d.ring)t.push(tr('puzzles.ring'));if(d.lat)t.push(tr('puzzles.under_n_ms',{n:d.lat[2]}));if(d.minG)t.push(tr('puzzles.n_g_links',{n:d.minG}));if(d.avoid)t.push(tr('puzzles.avoid_list',{list:d.avoid.map(c=>CITY[c].name).join(', ')}));return t;} +const pzUnitName=u=>{const l=S.links.find(x=>pzUnit(x)===u);return l?`${CITY[l.a].name} ⇄ ${CITY[l.b].name}${l.cable?' ('+esc(CAB[l.cable].name)+')':''}`:'';}; +function pzRender(){const el=$('pzBox');if(!pzOn()){el.hidden=true;return;}el.hidden=false; + const e=pzEval(),P=S.pz,d=pzDef(P.id),pk=d&&PZ_PACKS.find(x=>x.id===d.pack); + const star=(on,l)=>`⭐${l}`; + let h=`
${pk?esc(pk.n):tr('puzzles.weekly_puzzle')}

${esc(pzName(d||P))}

${btn('☰','puzzleMenu',{},'ghost sm')}
`; + if(d)h+=`

${esc(d.j)}

`; + h+=`
${star(e.goal,tr('puzzles.goal'))}${star(e.goal&&e.cheap,P.budget?tr('puzzles.budget'):tr('puzzles.free'))}${star(e.goal&&e.n1,'N-1')}
`; + h+=`
${e.marks.map(m=>`${esc(CITY[m.c].name)}${m.st===2?' ✓':m.st===1?' ·':' …'}`).join('')}
`; + for(const t of e.tw)h+=`
${t.ok?'✓':'✗'} ${pzTwistTxt(t)}
`; + const sp=fmt$(e.spend); + h+=P.budget?`
${tr('puzzles.spent_x_of_y',{x:sp,y:fmt$(P.budget)})}${e.cheap?'✓':'✗'}
` + :`
${tr('puzzles.spent_x',{x:sp})}${tr('puzzles.no_budget_star_on_the_house')}
`; + h+=!e.conn?`
🛡 ${tr('puzzles.n_1_connect_everything_first')}
`:e.n1?`
🛡 ${tr('puzzles.survives_any_single_cut')}
`:`
⚠️ ${tr('puzzles.one_cut_splits_it_where',{where:pzUnitName(e.weak[0])})}
`; + h+=`
${btn('↶ '+tr('puzzles.undo'),'pzUndo',{},'ghost sm',!(UI.pzHist&&UI.pzHist.length))}${btn(tr('puzzles.reset'),'pzReset',{},'ghost sm',!S.links.length&&!Object.keys(S.pops).length)}${btn(UI.pzFrom==='game'?tr('puzzles.back_to_my_network'):tr('puzzles.back_to_the_title'),'pzLeave',{},'ghost sm')}
`; + if(h!==UI._pzh){UI._pzh=h;morph(el,h);}} +function pzPanel(sel){const head=(eb,name,facts)=>`
${eb}

${name}

${facts?`
${facts}
`:''}
`; + if(sel.type==='city'){const c=sel.id,k=pzKind(c),p=S.pops[c],C=CITY[c];if(!k)return ''; + const eb=k==='goal'?tr('puzzles.goal_city'):k==='via'?tr('puzzles.stepping_stone_optional'):tr('puzzles.off_limits'); + let h=head(`${PZ_ICON[k]} ${eb}`,esc(C.name),p?`${tr('common.your_pop')}`:'')+'
'; + if(k==='avoid')return h+`

${tr('puzzles.not_this_one_find_a_way_around')}

`; + if(!p)h+=`

${tr('puzzles.a_pop_costs_setup_plus_a_year',{setup:fmt$(popCost(c)),mo:fmt$(POP_MO)})}

${btn(tr('puzzles.open_a_pop_cost',{cost:fmt$(pzPopCost(c))}),'pzPop',{city:c},'pink big')}
`; + else{const others=[...S.pz.cities,...S.pz.via].filter(x=>x!==c); + h+=`

${tr('puzzles.drag_from_this_pop_onto_another')}

${tr('puzzles.lease_a_wave_to')}

${others.map(x=>btn(esc(CITY[x].name),'pzLinkTo',{a:c,b:x},S.pops[x]?'':'ghost')).join('')}
`; + const ls=S.links.filter(l=>l.a===c||l.b===c);if(ls.length)h+=`

${tr('common.links')}

`+ls.map(l=>`
${esc(CITY[l.a===c?l.b:l.a].name)}
${capName(l)} · ${linkLat(l).toFixed(1)} ms
${btn(tr('common.open'),'selLink',{id:l.id},'ghost sm')}
`).join(''); + h+=`
${btn(tr('puzzles.remove_this_pop'),'pzRmPop',{city:c},'red sm')}
`;} + return h+'';} + const l=S.links.find(x=>x.id===sel.id);if(!l)return ''; + let h=head(l.cable?esc(CAB[l.cable].name):tr('common.overland'),`${esc(CITY[l.a].name)} ⇄ ${esc(CITY[l.b].name)}`,`${capName(l)}${l.km.toLocaleString()} km${linkLat(l).toFixed(1)} ms${tr('puzzles.price_per_year',{price:fmt$(l.mo*PZ_YEAR)})}`)+'
'; + h+=`

${tr('puzzles.size')}

${PZ_TIERS.map(i=>{const r={km:l.km,sub:l.sub,f:l.mult||1},why=subWaveWhy(i,l.km,l.sub);return btn(`${LT[i].n} ${tr('puzzles.price_per_year',{price:fmt$(pzMo(r,i,false)*PZ_YEAR)})}`,'pzTier',{id:l.id,tier:i},l.tier===i?'pink':'ghost',!!why||l.tier===i);}).join('')}
`; + return h+`
${btn(tr('puzzles.remove_this_link'),'pzRmLink',{id:l.id},'red sm')}
`;} +// The link picker: overland or one of the real cables between the two cities, and a size. Prices are for a year. +function pzLinkModal(a,b,keep){const kb=pzKind(b); + if(!kb||kb==='avoid'||!pzKind(a)){toast(kb==='avoid'?tr('puzzles.not_this_one_find_a_way_around'):tr('puzzles.that_city_is_not_part_of'),'bad');sfx('err');return;} + if(!keep){UI.pzVia=null;UI.pzDiv=true;}UI.pending={a,b};const rs=pzRoutes(a,b),P=S.pz; + const head=`
${kmBetween(a,b).toLocaleString()} km

${esc(CITY[a].name)} → ${esc(CITY[b].name)}

`; + if(!rs.length){openModal(head+`

${tr('puzzles.no_cable_lands_in_both_try',{a:esc(CITY[a].name),b:esc(CITY[b].name)})}

`);return;} + const r=rs.find(x=>x.via===UI.pzVia)||rs.find(x=>!(P.noSub&&x.sub))||rs[0];UI.pzVia=r.via; + const land=!r.sub&&S.links.some(l=>edgeKey(l)===edgeKey({a,b})&&!l.cable),div=land&&UI.pzDiv!==false,pop=S.pops[b]?0:pzPopCost(b); + let h=head+`

${tr('common.route')}

${rs.map(x=>btn(`${x.cab?esc(CAB[x.cab].name):tr('common.overland')} ${x.ms.toFixed(1)} ms${x.cab&&CAB[x.cab].age==='old'?'':''}`,'pzVia',{v:x.via},x.via===r.via?'pink':'ghost',P.noSub&&x.sub)).join('')}
`; + if(P.noSub&&r.sub)h+=`

${tr('puzzles.the_sharks_say_no')}

`; + if(r.cab)h+=`

${esc(CAB[r.cab].blurb)}

`; + if(land)h+=`
${btn(tr('puzzles.diverse_route_40_survives_a_backhoe'),'pzDiv',{v:1},div?'pink':'ghost')}${btn(tr('puzzles.same_trench_cheaper_one_backhoe_cuts'),'pzDiv',{v:0},div?'ghost':'pink')}
`; + if(pop)h+=`

${tr('puzzles.includes_a_new_pop_in_city',{city:esc(CITY[b].name),price:fmt$(pop)})}

`; + h+=`
${PZ_TIERS.map(i=>{const why=subWaveWhy(i,r.km,r.sub),c=pzLinkCost(r,i,div)+pop;return ``;}).join('')}
`; + openModal(h);} +// ---------- results ---------- +function pzLine(e){return e.stars>=3?tr('puzzles.a_backhoe_walks_into_your_network'):!e.n1&&!e.cheap?tr('puzzles.it_works_finance_and_the_backhoe'):!e.n1?tr('puzzles.one_backhoe_away_from_a_very'):tr('puzzles.rock_solid_and_gold_plated_the');} +function pzConfetti(){if(!animOn())return '';const cols=['#FF4F9A','#FFD23F','#22C47A','#2F8CFF','#FF8A3D','#7B61FF'];let h=''; + for(let i=0;i<28;i++)h+=``; + return ``;} +function pzResults(e,prev){const P=S.pz,nx=P.id==='weekly'?null:pzNextDef(); + const row=(ok,l,v)=>`
${ok?'⭐':'☆'} ${l}${v}
`; + const stars=[0,1,2].map(i=>`⭐`).join(''); + openModal(`
${e.stars>=3?pzConfetti():''}
${tr('puzzles.puzzle_solved')}

${esc(pzName(pzDef(P.id)||P))}

+
${stars}

${pzLine(e)}

+ ${row(true,tr('puzzles.goal'),tr('puzzles.connected'))}${row(e.cheap,tr('puzzles.budget'),P.budget?tr('puzzles.spent_x_of_y',{x:fmt$(e.spend),y:fmt$(P.budget)}):tr('puzzles.on_the_house'))}${row(e.n1,'N-1',e.n1?tr('puzzles.survives_any_single_cut'):tr('puzzles.one_cut_splits_it'))} +
${nx?btn(tr('puzzles.next_puzzle'),'pzStart',{id:nx.id},'pink big'):btn(tr('puzzles.more_puzzles'),'puzzleMenu',{},'pink big')}${e.stars<3?btn(tr('puzzles.retry_for_3_stars'),'pzRetry',{},''):''}${btn(tr('common.share_2cd9'),'pzShare',{},'')}${btn(tr('puzzles.keep_building'),'closeModal',{},'ghost')}
`); + for(let i=prev;i{sfx('star');haptic(15);},Math.max(0,i-prev)*450+150); + if(e.stars>=3&&prev<3)setTimeout(()=>sfx('fanfare'),(3-prev)*450+250);} +// ---------- the list ---------- +function pzMenu(){const p=pzLoad(),tot=pzStarsTotal(p),max=PZ.length*3,nxP=PZ_PACKS.find(x=>x.need>tot),w=pzWeekly(),wr=p.wk[w.key],st=p.streak,streak=st.last===w.key||st.last===pzPrevKey(w.key)?st.n:0; + let h=`
${tr('puzzles.puzzles')}

${tr('puzzles.small_calm_network_builds')}

+

${tr('puzzles.no_clock_no_bills_nothing_breaks')}

+
${tr('puzzles.your_stars')}⭐ ${tot} / ${max}
${nxP?`
${tr('puzzles.next_pack_unlocks_at_n',{n:nxP.need,pack:esc(nxP.n)})}
`:''}
`; + if(pzOn())h+=`
${btn(UI.pzFrom==='game'?tr('puzzles.back_to_my_network'):tr('puzzles.back_to_the_title'),'pzLeave',{},'')}${btn(tr('puzzles.keep_building'),'closeModal',{},'ghost')}
`; + h+=`
${tr('puzzles.weekly_puzzle_key',{key:esc(w.key)})} ${wr?`${pzStarStr(wr.st)}`:''}
${w.cities.map(c=>esc(CITY[c].name)).join(' · ')} · ${tr('puzzles.budget_x',{x:fmt$(w.budget)})}
${tr('puzzles.same_puzzle_for_everyone_this_week')}${streak?' · 🔥 '+trn('puzzles.n_week_streak',streak):''}
${btn(tr('common.play'),'pzWeekly',{},'pink')}
`; + for(const pk of PZ_PACKS){const open=tot>=pk.need,got=PZ.filter(x=>x.pack===pk.id).reduce((a,x)=>a+((p.s[x.id]||{}).st|0),0),n=PZ.filter(x=>x.pack===pk.id).length; + h+=`

${open?'':'🔒 '}${esc(pk.n)} ⭐ ${got}/${n*3}

${open?esc(pk.d):tr('puzzles.unlocks_at_n_stars',{n:pk.need})}

`; + for(const d of PZ.filter(x=>x.pack===pk.id)){const r=p.s[d.id],tg=pzTwistTag(d); + h+=`
${esc(d.n)} ${pzStarStr(r?r.st:0)}
${esc(d.j)}
${d.cities.map(c=>esc(CITY[c].name)).join(' · ')} · ${d.budget?tr('puzzles.budget_x',{x:fmt$(d.budget)}):tr('puzzles.no_budget')}${tg.length?' · '+tg.join(' · ')+'':''}${r&&r.sp!=null?' · '+tr('puzzles.best_x',{x:fmt$(r.sp)}):''}
${btn(tr('common.play'),'pzStart',{id:d.id},r&&r.st>=3?'ghost':'',!open)}
`;}} + openModal(h);} diff --git a/src/game/96-map/60-draw.js b/src/game/96-map/60-draw.js index fe22967..de49bd3 100644 --- a/src/game/96-map/60-draw.js +++ b/src/game/96-map/60-draw.js @@ -85,7 +85,7 @@ function drawFrame(now){ // Which cities show an offer bubble (a big one?) or an incident marker, worked out once for all of them. CM.off=new Set();CM.big=new Set();for(const o of S.offers){const big=BIZ_T[o.type].lv>=3||BIZ_T[o.type].event;for(const c of bCities(o)){CM.off.add(c);if(big)CM.big.add(c);}} CM.inc=new Set(S.inc.filter(i=>i.type!=='leak').map(i=>i.ref));CM.far=farL; - for(const v of vis.slice().reverse())drawCity(v.C,v.sx,v.sy,sc,now,v.ly); + if(pzOn())for(const v of vis.slice().reverse())pzDrawCity(v,sc,now);else for(const v of vis.slice().reverse())drawCity(v.C,v.sx,v.sy,sc,now,v.ly); // floaters for(let i=FLOATS.length-1;i>=0;i--){const f=FLOATS[i],a=(now-f.t)/1600;if(a>1){FLOATS.splice(i,1);continue;} for(const k of ks){const [sx,sy]=toS(f.x,f.y,k);ctx.globalAlpha=1-a*a;ctx.font='800 17px "Baloo 2", sans-serif';ctx.textAlign='center';ctx.textBaseline='middle';ctx.lineWidth=4;ctx.strokeStyle='#fff';ctx.strokeText(f.text,sx,sy-a*40);ctx.fillStyle=f.col;ctx.fillText(f.text,sx,sy-a*40);ctx.globalAlpha=1;}} diff --git a/src/game/96-map/85-puzzle-cities.js b/src/game/96-map/85-puzzle-cities.js new file mode 100644 index 0000000..3c2a0f0 --- /dev/null +++ b/src/game/96-map/85-puzzle-cities.js @@ -0,0 +1,10 @@ +/* Puzzle map: the puzzle's cities stand out (goals with a pulsing ring, stepping stones with a dashed one, cities to + avoid crossed out); every other city stays on the map, faded and untappable. */ +function pzDrawCity(v,sc,now){const k=pzKind(v.C.id); + if(!k){ctx.save();ctx.globalAlpha=0.3;drawCity(v.C,v.sx,v.sy,sc,now,null);ctx.restore();return;} + const r=(CM.far?16:34)*sc,y=v.sy-(CM.far?0:6*sc),p=S.pops[v.C.id]; + ctx.save();ctx.lineWidth=3; + if(k==='avoid'){ctx.strokeStyle='#FF4D5E';ctx.beginPath();ctx.arc(v.sx,y,r,0,7);ctx.moveTo(v.sx-r*.7,y-r*.7);ctx.lineTo(v.sx+r*.7,y+r*.7);ctx.stroke();} + else{const a=animOn()?.55+.35*Math.sin(now/300):.8;ctx.strokeStyle=k==='goal'?`rgba(255,79,154,${p?1:a})`:'rgba(30,38,64,.7)';if(k==='via')ctx.setLineDash([5,5]); + ctx.fillStyle=k==='goal'&&!p?'rgba(255,210,63,.35)':'rgba(255,255,255,.25)';ctx.beginPath();ctx.arc(v.sx,y,r,0,7);ctx.fill();ctx.stroke();ctx.setLineDash([]);} + ctx.restore();drawCity(v.C,v.sx,v.sy,sc,now,v.ly===null?undefined:v.ly);} diff --git a/src/game/96-map/90-input.js b/src/game/96-map/90-input.js index e57a029..42ad63b 100644 --- a/src/game/96-map/90-input.js +++ b/src/game/96-map/90-input.js @@ -1,5 +1,5 @@ /* ---------- hit tests & input ---------- */ -function hitCity(x,y,r=28){let best=null,bd=r*iconScale();const KS=visibleKs();for(const C of CITIES){if(C.off&&!cityOn(C.id))continue;for(const k of KS){const [sx,sy]=toS(C.x,C.y,k);const d=Math.hypot(sx-x,sy+4-y);if(d{ function endPtr(e){ ptrs.delete(e.pointerId);const d=UI.drag;if(!d)return; if(d.mode==='pinch'){if(ptrs.size===0){UI.drag=null;UI.snap=null;cv.classList.remove('linking');}return;} - if(d.mode==='link'){if(UI.snap&&UI.snap.id!==d.from){openLinkModal(d.from,UI.snap.id);sfx('click');}} + if(d.mode==='link'){if(UI.snap&&UI.snap.id!==d.from){if(pzOn())pzLinkModal(d.from,UI.snap.id);else openLinkModal(d.from,UI.snap.id);sfx('click');}} else if(!d.moved&&S){const h=pickCity(e.clientX,e.clientY); if(h){selectCity(h.id);renderLeft();sfx('click');} else{const l=hitLink(e.clientX,e.clientY);if(l){selectLink(l);sfx('click');}else{UI.sel=null;renderPanel();renderLeft();}}} @@ -38,5 +38,5 @@ cv.addEventListener('pointerup',endPtr);cv.addEventListener('pointercancel',canc const ZMIN=0.35,ZMAX=16; function zoomAt(mx,my,f){const wx=cam.x+(mx-CW/2)/cam.z,wy=cam.y+(my-CH/2)/cam.z;cam.z=clamp(cam.z*f,ZMIN,ZMAX);cam.x=wx-(mx-CW/2)/cam.z;cam.y=wy-(my-CH/2)/cam.z;wrapCam();} cv.addEventListener('wheel',e=>{e.preventDefault();zoomAt(e.clientX,e.clientY,Math.exp(-e.deltaY*0.0015));},{passive:false}); -addEventListener('keydown',e=>{if(e.key==='Enter'&&e.target.id==='metIn'){ACT.metricSet({id:e.target.dataset.id});return;}if(e.target.closest&&e.target.closest('input,textarea,select,[contenteditable]'))return;if(e.ctrlKey||e.metaKey||e.altKey)return;if(e.code==='Space'&&e.target.closest&&e.target.closest('button,a'))return;if(e.code==='Space'&&(!S||rule('clock'))){e.preventDefault();UI.speed=UI.speed?0:1;renderHUD();}if(e.key==='0')ACT.speed({v:0.5});if(e.key==='1')ACT.speed({v:1});if(e.key==='2')ACT.speed({v:2});if(e.key==='3')ACT.speed({v:4});if(e.key==='4')ACT.speed({v:8});if(e.key==='Escape'&&!$('bankBox').hidden){$('bankBox').hidden=true;return;}if(e.key==='Escape'&&!$('dash').hidden){$('dash').hidden=true;return;}if(e.key==='Escape'){if(!$('modal').hidden){if(S&&UI.started&&!S.lost)closeModal();}else{UI.sel=null;renderPanel();}}}); +addEventListener('keydown',e=>{if(e.key==='Enter'&&e.target.id==='metIn'){ACT.metricSet({id:e.target.dataset.id});return;}if(e.target.closest&&e.target.closest('input,textarea,select,[contenteditable]'))return;if(e.ctrlKey||e.metaKey||e.altKey)return;if(e.code==='Space'&&e.target.closest&&e.target.closest('button,a'))return;if(e.code==='Space'&&(!S||rule('clock'))&&!pzOn()){e.preventDefault();UI.speed=UI.speed?0:1;renderHUD();}if(e.key==='0')ACT.speed({v:0.5});if(e.key==='1')ACT.speed({v:1});if(e.key==='2')ACT.speed({v:2});if(e.key==='3')ACT.speed({v:4});if(e.key==='4')ACT.speed({v:8});if(e.key==='Escape'&&!$('bankBox').hidden){$('bankBox').hidden=true;return;}if(e.key==='Escape'&&!$('dash').hidden){$('dash').hidden=true;return;}if(e.key==='Escape'){if(!$('modal').hidden){if(S&&UI.started&&!S.lost)closeModal();}else{UI.sel=null;renderPanel();}}}); diff --git a/src/game/96-map/95-clicks.js b/src/game/96-map/95-clicks.js index 34711e3..5b68bee 100644 --- a/src/game/96-map/95-clicks.js +++ b/src/game/96-map/95-clicks.js @@ -1,6 +1,6 @@ /* ---------- click delegation ---------- */ let pressing=false; -document.addEventListener('pointerdown',e=>{if(e.target.closest('#panel,#left,#dash,#bankBox,#modal,#tabbar,#toasts'))pressing=true;}); +document.addEventListener('pointerdown',e=>{if(e.target.closest('#panel,#left,#dash,#bankBox,#modal,#tabbar,#toasts,#pzBox'))pressing=true;}); addEventListener('pointerup',()=>setTimeout(()=>pressing=false,0)); addEventListener('pointercancel',()=>{pressing=false;});addEventListener('blur',()=>{pressing=false;}); document.addEventListener('change',e=>{const el=e.target.closest('[data-chg]');if(!el||(!S&&!['langSet','pickHome'].includes(el.dataset.chg)))return;const fn=ACT[el.dataset.chg];if(fn)fn({v:el.value});}); @@ -11,5 +11,5 @@ let PD={t:0,b:null}; document.addEventListener('pointerdown',e=>{PD={t:performance.now(),b:e.target.closest('[data-act]')};},true); function tapOk(e,b){if(!e.isTrusted||!PD.t||e.detail===0)return true;const now=performance.now();if(now-PD.t>4000)return true; if(PD.b!==b)return false;if((UI.layerAt||0)>PD.t)return false;const ts=b.closest('.toast');if(ts&&PD.t-(+ts.dataset.born||0)<500)return false;return true;} -document.addEventListener('click',e=>{const b=e.target.closest('[data-act]');if(!b||b.disabled)return;if(!$('modal').hidden&&!b.closest('#modal'))return;if(!tapOk(e,b))return;audioInit();const fn=ACT[b.dataset.act];if(!fn)return;if(!S&&!['start','randomName','pickStart','cont','help','helpClose','newgame','mute','animSet','soundSet','langSet','closeModal','speed','bankClose','whatsNewShow','updateNow','updateLater','importPick','importGo','modeSet','presetSet','chaosSet','puzzleDoor','puzzleMenu','scenarios','startScn','startWeekly','settings','settingsClose','prefSet','vpSet','install','pitchSkip'].includes(b.dataset.act))return;let a={};try{a=JSON.parse(b.dataset.args||'{}');}catch(_){}fn(a);}); +document.addEventListener('click',e=>{const b=e.target.closest('[data-act]');if(!b||b.disabled)return;if(!$('modal').hidden&&!b.closest('#modal'))return;if(!tapOk(e,b))return;audioInit();const fn=ACT[b.dataset.act];if(!fn)return;if(!S&&!['start','randomName','pickStart','cont','help','helpClose','newgame','mute','animSet','soundSet','langSet','closeModal','speed','bankClose','whatsNewShow','updateNow','updateLater','importPick','importGo','modeSet','presetSet','chaosSet','puzzleDoor','puzzleMenu','pzStart','pzWeekly','scenarios','startScn','startWeekly','settings','settingsClose','prefSet','vpSet','install','pitchSkip'].includes(b.dataset.act))return;let a={};try{a=JSON.parse(b.dataset.args||'{}');}catch(_){}fn(a);}); diff --git a/src/game/99-loop.js b/src/game/99-loop.js index 7f1b386..84ea6d9 100644 --- a/src/game/99-loop.js +++ b/src/game/99-loop.js @@ -8,9 +8,9 @@ function frame(now){ if(S&&UI.started&&!S.lost&&now-(UI.lastSave||0)>5000)save(); // The panels catch up on the frame after a day, so one frame does not carry both the day's simulation and them. if(UI.panelsDue){UI.panelsDue=false;if(!pressing){renderPanel();renderLeft();if(!$('dash').hidden)renderDash();renderBank();}renderHint();} - if(S&&!S.lost&&$('modal').hidden&&UI.speed){acc+=dt*UI.speed;let n=0;while(acc>=DAY_MS&&n<4&&UI.speed){acc-=DAY_MS;try{dayTick();}catch(e){tickErr(e);}n++;} + if(S&&!S.lost&&$('modal').hidden&&UI.speed&&!pzOn()){acc+=dt*UI.speed;let n=0;while(acc>=DAY_MS&&n<4&&UI.speed){acc-=DAY_MS;try{dayTick();}catch(e){tickErr(e);}n++;} if(n){UI.ticking=true;renderHUD();UI.ticking=false;UI.panelsDue=true;}} - if(UI.speed&&!(S&&S.lost))animT+=dt; /* paused = frozen dots, waves and clouds */ + if((UI.speed||pzOn())&&!(S&&S.lost))animT+=dt; /* paused = frozen dots, waves and clouds */ const t=animOn()?animT:0; if(!(UI.mapHid=mapHidden())&&!mapStill(t,now)){try{draw(t);}catch(e){tickErr(e);}UI.drawnAt=now;} } diff --git a/src/i18n/en.js b/src/i18n/en.js index b2c756b..9e5308b 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -18,6 +18,7 @@ "badges.attend_a_conference":"Attend a conference.", "badges.attend_six_conferences_in_one_game":"Attend six conferences in one game.", "badges.badge_unlocked_name":"Badge unlocked: {name}", +"badges.badge_upgraded_name":"Badge upgraded: {name}", "badges.blackhole_one_of_your_own_cities":"Blackhole one of your own cities to stop a DDoS.", "badges.bring_up_your_first_peering_session":"Bring up your first peering session.", "badges.build_fiber_across_the_andes":"Build fiber across the Andes.", @@ -99,9 +100,14 @@ "badges.take_a_de_kicks_retention_offer":"Take a DE-KICKS retention offer.", "badges.take_out_a_loan":"Take out a loan.", "badges.the_long_way_round":"The Long Way Round", +"badges.this_game_earns_fiery_badges":"This game runs BGP at 3 a.m.: every badge you earn here is forged in fire, and upgrades one you already have.", +"badges.this_game_earns_frosted_badges":"This game runs a Change Freeze: badges you earn here come freeze-dried.", "badges.through_the_wall":"Through the Wall", "badges.turn_on_a_transit_clean_pipe":"Turn on a transit clean-pipe add-on.", "badges.two_buildings_three_cities":"Two Buildings, Three Cities", +"badges.variant_forged_at_3_a_m":"Forged at 3 a.m.", +"badges.variant_freeze_dried":"Freeze-dried", +"badges.variant_on_call":"On-call", "badges.weather_a_ddos_with_your_defences":"Weather a DDoS with your defences ready.", "badges.weather_a_multi_terabit_ddos":"Weather a multi-terabit DDoS.", "badges.win_without_ever_taking_a_loan":"Win without ever taking a loan.", @@ -1843,7 +1849,7 @@ "goals.make_5_peering_friends":"Make 5 peering friends", "goals.on_the_peering_tab_request_sessions":"On the Peering tab, request sessions, or join the route server to peer with every open network at once.", "goals.open_your_home_city_and_press":"Open your home city and press “Launch broadband”. Eyeballs are people at home watching cat videos. They pay you every month.", -"goals.peer_with_every_tier_1_over":"Peer with every Tier 1 over PNIs and cancel every transit port. Then nobody charges you to reach the internet.", +"goals.peer_with_every_tier_1_their_customers":"Peer with every Tier 1 over PNIs and cancel every transit port. Their customers come along for free, so you only chase the networks nobody sells transit to.", "goals.pops_in_five_of_the_six":"POPs in five of the six regions on the map.", "goals.reach_the_whole_internet":"Reach the whole internet", "goals.serve_10_tbps":"Serve 10 Tbps", @@ -1905,7 +1911,7 @@ "help.the_chart_button_at_the_top":"The chart button at the top opens traffic graphs by exit (caches, PNIs, IX, transit), money over time, per-ASN traffic with how it reaches you and what its transit costs, plus your busiest links and routers.", "help.the_group_behind_several_big":"The group behind several big exchanges (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) treats price lists as a state secret. Ports are quoted per customer and go up the bigger you look. Haggling can work, backfire or stall for a week. Prices get \"harmonised\" upwards once a year, add-ons appear on your invoice until you opt out, and trying to leave earns you a retention discount that ends with a fee.", "help.things_break_all_the_time_fiber":"Things break all the time: fiber cuts, router crashes, power cuts, IX loops, fabric outages, route leaks, DDoS, fat fingers, cooling failures, and geopolitics: sanctions, tariffs, BGP hijacks, landing permit disputes, exam-day shutdowns and Red Sea cable cuts. Traffic reroutes automatically over other paths and upstreams. Parallel links on diverse routes, a second router and a backup generator all help. Or pay to rush repairs.", -"help.tier_1s_reach_the_whole_internet":"Tier 1s reach the whole internet without paying anyone, because they all peer with each other. Tier 2s peer a lot but still buy some transit.", +"help.tier_1s_reach_the_whole_internet_cones":"Tier 1s reach the whole internet without paying anyone: they all peer with each other, and each brings along its customer cone, everyone who buys transit from it. Tier 2s peer a lot but still buy some transit.", "help.traffic_follows_the_shortest_path_by":"Traffic follows the shortest path by distance and link metric, and reroutes by itself when links fail. When a path is merely full, the overflow is dropped, just like a real IGP. From customer level 3 you can install Auto-TE in the NOC tab: it spills overflow onto up to two alternate paths with free capacity, as long as they are no more than twice as long.", "help.transit_bills_sample_your_usage":"Transit bills sample your usage every day and charge the 95th percentile of the last 30 days, so short spikes are forgiven but long ones are not.", "help.users_feel_the_round_trip_to":"Users feel the round trip to wherever their traffic leaves your network for transit. Up to 20 ms (about 1,500 km) is fine; past 50 ms broadband and internet services count as bad service, which costs revenue and customers. Traffic over your own peering, PNIs and caches is not penalised.", @@ -1930,12 +1936,13 @@ "hot_ports_and_rank.upgrade_the_ix_port_or_add":"Upgrade the IX port or add a LAG member.", "hot_ports_and_rank.upgrade_the_router_or_add_a":"Upgrade the router or add a second one in the Infra tab.", "hot_ports_and_rank.you_buy_transit_again":"you buy transit again", -"hot_ports_and_rank.you_cannot_reach_list":"you cannot reach {list}", +"hot_ports_and_rank.you_cannot_reach_list_outside_cones":"you cannot reach {list}, which nobody you peer with sells transit to", "hot_ports_and_rank.your_reach_is_p_not_100":"your reach is {p}, not 100%", "hud_and_panels.all_connections_n":"All connections {n}", "hud_and_panels.all_systems_green_enjoy_it_while":"All systems green. Enjoy it while it lasts.", "hud_and_panels.auto_fix_in_n_day":{"one":"Auto-fix in {n} day","other":"Auto-fix in {n} days"}, "hud_and_panels.blackholing_g":"blackholing {g}", +"hud_and_panels.buys_transit_from_net_peer_with":"Buys transit from {net}. Peer with {net} and it comes along.", "hud_and_panels.customer_level_lv_name":"Customer level {lv}: {name}", "hud_and_panels.dropping_or_overflowing":"dropping or overflowing", "hud_and_panels.every_network_on_the_map_traffic":"Every network on the map. Traffic share is how much of your users' traffic goes to them. Tap a connection to jump to its POP.", @@ -1972,6 +1979,7 @@ "hud_and_panels.p_of_traffic_between_them_scattered":"{p}% of traffic between them, scattered across exchanges. You peer with {n}.", "hud_and_panels.ports_caches_and_routers_running_hot":"Ports, caches and routers running hot", "hud_and_panels.raise_a_full_link_s_metric":"Raise a full link’s metric so traffic prefers another path, upgrade it, or install Auto-TE.", +"hud_and_panels.reached_through_the_customer_cone_of":"Reached through the customer cone of {net}: it buys transit there.", "hud_and_panels.reaches_networks_from_the_last":"Reaches networks from the last update that you have no other path to, for free. Connect to them before it ends.", "hud_and_panels.reward_cash":"Reward {cash}", "hud_and_panels.survived_with_no_impact":"Survived with no impact", @@ -2382,6 +2390,8 @@ "loop.welcome_back_name_your_network_is":"Welcome back, {name}.
Your network is right where you left it: {date}.", "loop.your_saved_game_could_not_be":"Your saved game could not be loaded.
It was damaged, so a backup was kept and you can start fresh.", "meet_a_network.all_n_out_of_reach":{"one":"All {n} out of reach","other":"All {n} out of reach"}, +"meet_a_network.peer_with_the_tier_1_club":"Peer with the Tier 1 club: their customers come along for free. Only networks in nobody’s customer cone need peering of their own.", +"meet_a_network.peer_with_the_tier_1_club_n":{"one":"Peer with the Tier 1 club: their customers come along for free. {n} network already comes along with a peer.","other":"Peer with the Tier 1 club: their customers come along for free. {n} networks already come along with a peer."}, "meet_a_network.pnis_with_every_tier_1":"PNIs with every Tier 1", "meet_a_network.reach_without_transit":"Reach without transit", "meet_a_network.road_to_tier_1":"Road to Tier 1", @@ -2820,6 +2830,122 @@ "progress.under_attack_now":"Under attack now", "progress.your_score_peak_traffic":"Your score: peak traffic", "progress.your_traffic_to_and_from_asia":"Your traffic to and from Asia", +"puzzles.a_backhoe_walks_into_your_network":"A backhoe walks into your network. Nothing happens.", +"puzzles.a_pop_costs_setup_plus_a_year":"A POP costs {setup} to set up, then {mo}/mo. Puzzles count the setup and a year of rent.", +"puzzles.a_tiny_island_where_half_the":"A tiny island where half the Pacific's cables stop for coffee.", +"puzzles.a_to_b_under_ms":"{a} → {b} under {ms} ms", +"puzzles.a_to_b_under_ms_now":"{a} → {b} under {ms} ms (now {now} ms)", +"puzzles.aloha_latency":"Aloha Latency", +"puzzles.avoid_list":"avoid {list}", +"puzzles.back_to_my_network":"Back to my network", +"puzzles.back_to_the_title":"Back to the title screen", +"puzzles.beat_the_clock_light_in_glass":"Light in glass does 200 km per millisecond. Pick your cables like it matters.", +"puzzles.belt_and_braces":"Belt and Braces", +"puzzles.best_x":"best {x}", +"puzzles.budget":"Budget", +"puzzles.budget_x":"budget {x}", +"puzzles.connect_list":"Connect {list}.", +"puzzles.connected":"Connected", +"puzzles.copied_paste_it_anywhere":"Copied! Paste it anywhere:
{t}", +"puzzles.de_kicks_sales_has_your_number":"DE-KICKS sales has your number. Connect Germany without Frankfurt.", +"puzzles.diverse_route_40_survives_a_backhoe":"Diverse route (+40%, survives a backhoe)", +"puzzles.down_under_up_and_running":"Down Under, Up and Running", +"puzzles.drag_from_a_pink_pop_to":"Drag from a pink POP to another city to lease a wave", +"puzzles.drag_from_this_pop_onto_another":"Drag from this POP onto another puzzle city, or pick one here.", +"puzzles.euro_trip":"Euro Trip", +"puzzles.every_internet_starts_with_one_tube":"Every internet starts with one tube.", +"puzzles.every_link_n_g_or_more":"Every link {n}G or more", +"puzzles.fat_pipes_only":"Fat Pipes Only", +"puzzles.flash_boys":"Flash Boys", +"puzzles.for_architects_who_sleep_through_backhoes":"For architects who sleep through backhoe season.", +"puzzles.four_capitals_one_very_long_winter":"Four capitals, one very long winter, zero excuses for downtime.", +"puzzles.four_cities_four_cables_one_ring":"Four cities, one ring. Tolkien would approve; your NOC definitely does.", +"puzzles.four_cities_one_continent_and_a":"Four cities, one continent and a lot of corn between them.", +"puzzles.frankfurt_to_singapore_the_short_way":"Frankfurt to Singapore the short way. The long way is overland, and it shows.", +"puzzles.free":"Free", +"puzzles.goal":"Goal", +"puzzles.goal_city":"Goal city", +"puzzles.guam_slam":"Guam Slam", +"puzzles.hello_world":"Hello, World", +"puzzles.honolulu_the_world_s_most_scenic":"Honolulu: the world's most scenic regeneration site.", +"puzzles.includes_a_new_pop_in_city":"Includes a new POP in {city} ({price} for a year).", +"puzzles.it_works_finance_and_the_backhoe":"It works! Finance and the backhoe would like a word.", +"puzzles.keep_building":"Keep building", +"puzzles.kiwi_fruit_salad":"Kiwi Fruit Salad", +"puzzles.lease_a_wave_to":"Lease a wave to", +"puzzles.more_puzzles":"More puzzles", +"puzzles.n_1_club":"N-1 Club", +"puzzles.n_1_connect_everything_first":"N-1: connect everything first", +"puzzles.n_g_links":"{n}G links", +"puzzles.n_week_streak":{"one":"{n} week in a row","other":"{n} weeks in a row"}, +"puzzles.new_zealand_is_far_from_everything":"New Zealand is far from everything. That is the point, and the problem.", +"puzzles.next_pack_unlocks_at_n":"Next pack, {pack}, unlocks at {n}⭐", +"puzzles.next_puzzle":"Next puzzle", +"puzzles.no_budget":"no budget", +"puzzles.no_budget_star_on_the_house":"no budget: ⭐ on the house", +"puzzles.no_cable_lands_in_both_try":"No cable lands in both {a} and {b}. Try a stepping stone in between.", +"puzzles.no_clock_no_bills_nothing_breaks":"No clock, no bills, nothing breaks. Connect the cities, then go for three stars: under budget, and still connected when any one link is cut.", +"puzzles.no_pop_in_list":"No POP in {list}", +"puzzles.no_subsea":"no subsea", +"puzzles.no_subsea_cables":"No subsea cables", +"puzzles.nobody_ever_got_fired_for_buying":"Nobody ever got fired for buying 100G.", +"puzzles.not_this_one_find_a_way_around":"Not this one. Find a way around.", +"puzzles.not_through_frankfurt":"Not Through Frankfurt", +"puzzles.off_limits":"Off limits", +"puzzles.on_the_house":"On the house", +"puzzles.one_backhoe_away_from_a_very":"One backhoe away from a very long night. Add a second path for ⭐⭐⭐.", +"puzzles.one_cut_splits_it":"One cut splits it", +"puzzles.one_cut_splits_it_where":"One cut splits it: {where}", +"puzzles.one_ring_through_every_pop":"One ring through every POP", +"puzzles.one_very_big_island_and_a":"One very big island, and a lot of very empty fiber.", +"puzzles.open_a_pop_cost":"Open a POP · {cost}", +"puzzles.pacific_rim_shot":"Pacific Rim Shot", +"puzzles.ping_pong_to_tokyo":"Ping Pong to Tokyo", +"puzzles.price_per_year":"{price}/yr", +"puzzles.puzzle":"Puzzle", +"puzzles.puzzle_solved":"Puzzle solved", +"puzzles.puzzles":"Puzzles", +"puzzles.remove_this_link":"Remove this link", +"puzzles.remove_this_pop":"Remove this POP", +"puzzles.reset":"Reset", +"puzzles.retry_for_3_stars":"Retry for ⭐⭐⭐", +"puzzles.ring":"ring", +"puzzles.ring_of_fire":"Ring of Fire", +"puzzles.rock_solid_and_gold_plated_the":"Rock solid, and gold plated. The CFO has questions.", +"puzzles.samba_sprint":"Samba Sprint", +"puzzles.same_puzzle_for_everyone_this_week":"Same puzzle for everyone this week", +"puzzles.same_trench_cheaper_one_backhoe_cuts":"Same trench (cheaper, one backhoe cuts both)", +"puzzles.sao_paulo_to_miami_before_the":"São Paulo to Miami before the caipirinha gets warm.", +"puzzles.sea_to_shining_sea":"Sea to Shining Sea", +"puzzles.seattle_to_singapore_with_a_stop":"Seattle to Singapore, with a stop for sushi and dim sum.", +"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es", +"puzzles.size":"Size", +"puzzles.small_calm_network_builds":"Small, calm network builds", +"puzzles.smorgasbord":"Smörgåsbord", +"puzzles.speed_runs":"Speed Runs", +"puzzles.spent_x":"Spent {x}", +"puzzles.spent_x_of_y":"Spent {x} / {y}", +"puzzles.stepping_stone_optional":"Stepping stone (optional)", +"puzzles.suez_you_later":"Suez You Later", +"puzzles.survives_any_single_cut":"Survives any single cut", +"puzzles.tap_a_goal_city_to_open":"Tap a glowing city to open your first POP", +"puzzles.that_city_is_not_part_of":"That city is not part of this puzzle.", +"puzzles.the_pacific_is_big_light_is":"The Pacific is big. Light is fast. Your budget is neither.", +"puzzles.the_pacific_rim_where_every_hop":"The Pacific rim, where every hop is an ocean.", +"puzzles.the_shark_tank":"The Shark Tank", +"puzzles.the_sharks_have_been_biting_again":"The sharks have been biting again. Keep it on dry land.", +"puzzles.the_sharks_say_no":"The sharks say no.", +"puzzles.three_cities_two_currencies_one_very":"Three cities, two currencies, one very short tunnel under the sea.", +"puzzles.traders_paid_millions_to_shave_milliseconds":"Traders paid millions to shave milliseconds off this route. You get to do it for less.", +"puzzles.two_cables_across_the_atlantic_because":"Two cables across the Atlantic, because one is a hope, not a plan.", +"puzzles.under_n_ms":"under {n} ms", +"puzzles.undo":"Undo", +"puzzles.unlocks_at_n_stars":"Unlocks at {n}⭐", +"puzzles.weekly_puzzle":"Weekly puzzle", +"puzzles.weekly_puzzle_key":"Weekly puzzle {key}", +"puzzles.with_the_pop_price":"with the POP: {price}", +"puzzles.your_first_tubes_no_pressure":"Your first tubes. No pressure, no budget.", +"puzzles.your_stars":"Your stars", "reach_and_subsea.premium_submarine_terminals":"Premium submarine terminals", "release_notes.and_n_more_change":{"one":"…and {n} more change","other":"…and {n} more changes"}, "release_notes.read_the_full_notes_on_github":"Read the full notes on GitHub", @@ -3229,6 +3355,7 @@ "title.source_on_github":"Source on GitHub", "title.the_real_game_climb_from_tier":"The real game: climb from Tier 3 to Tier 1.", "title.your_network_name_was_saved_and":"Your network {name} was saved and is waiting for you.", +"traceroute.a_peer_s_customers_come_after":"a peer’s customers come after direct peers, before transit", "traceroute.across_the_ix_switch":"across the {ix} switch", "traceroute.as_path_path":"AS path: {path}", "traceroute.caches_beat_pnis":"caches beat PNIs", @@ -3244,6 +3371,7 @@ "traceroute.n_network_unreachable":"!N network unreachable", "traceroute.name_transit":"{name} transit", "traceroute.net_carries_it_to_city":"{net} carries it to {city}", +"traceroute.net_hands_it_to_its_customer":"{net} hands it to its customer {to}", "traceroute.net_hands_it_to_to":"{net} hands it to {to}", "traceroute.no_path_every_route_between_these":"No path: every route between these cities is down or missing.", "traceroute.no_working_path_between_these_pops":"no working path between these POPs", diff --git a/src/index.html b/src/index.html index 2f8bfa9..4b97816 100644 --- a/src/index.html +++ b/src/index.html @@ -143,6 +143,7 @@
+
diff --git a/src/styles/40-modal.css b/src/styles/40-modal.css index 6d85dac..dc341fc 100644 --- a/src/styles/40-modal.css +++ b/src/styles/40-modal.css @@ -10,6 +10,17 @@ .bdg.ever{opacity:.85;border-style:dashed;border-color:var(--rc)} .bdg.on{opacity:1;border-color:var(--rc);background:#fff;box-shadow:0 2px 0 var(--rc)} .bdg.on .bi,.bdg.ever .bi{filter:none} +.bdg .bv{font:900 10px Nunito,sans-serif;letter-spacing:.02em} +.bdg.on.v-freeze{background:linear-gradient(160deg,#F2FBFF,#D6F1FC);border-color:#5BC0EB;box-shadow:0 2px 0 #5BC0EB,inset 0 0 0 2px #fff} +.bdg.v-freeze .bv{color:#2A8DB8} +.bdg.on.v-bgp{background:linear-gradient(160deg,#FFF6E8,#FFD9B8);border-color:#FF5A1F;box-shadow:0 2px 0 #C8102E,0 0 8px rgba(255,90,31,.45)} +.bdg.v-bgp .bv{color:#C8102E} +.bdg.ever.v-freeze{border-color:#5BC0EB}.bdg.ever.v-bgp{border-color:#FF5A1F} +.bshelf{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px} +.bsh{font:800 12px Nunito,sans-serif;border:2px solid #C9CEDD;border-radius:999px;padding:2px 9px;background:#fff;white-space:nowrap} +.bsh.v-freeze{border-color:#5BC0EB}.bsh.v-oncall{border-color:#FFD23F}.bsh.v-bgp{border-color:#FF5A1F} +.bsh.cur{box-shadow:0 2px 0 var(--ink)} +.bvt.v-freeze{color:#2A8DB8;font-weight:900}.bvt.v-bgp{color:#FF5A1F;font-weight:900} .scn{display:flex;gap:10px;align-items:center;border:2px solid #DDE1EC;border-radius:12px;padding:8px 10px;margin-top:8px} .scn.wk{border-color:var(--me);background:#FFF0F6} .scn .nm{font-weight:900} diff --git a/src/styles/70-puzzles.css b/src/styles/70-puzzles.css new file mode 100644 index 0000000..20fa6b1 --- /dev/null +++ b/src/styles/70-puzzles.css @@ -0,0 +1,40 @@ +/* Puzzles (#190): one card for the goal, the stars and the budget; on phones a bottom sheet you can shrink. */ +body.pz #hud .chip:not(.brand):not(.speed),body.pz #hud .speed button:not(#muteBtn),body.pz #leftToggle,body.pz #left{display:none !important} +#pzBox{position:fixed;top:calc(env(safe-area-inset-top,0px) + 76px);left:max(12px,env(safe-area-inset-left,0px));width:300px;max-height:calc(100% - 96px - env(safe-area-inset-top,0px));overflow:auto;z-index:4;padding:10px 14px 12px;box-sizing:border-box} +#pzBox .pzh{display:flex;align-items:center;gap:8px}#pzBox h3{font-size:19px} +.pzj{margin:4px 0 6px;font-size:12.5px;color:var(--ink2);line-height:1.35} +.pzs{display:flex;gap:6px;margin:6px 0}.pzs span{flex:1;display:flex;flex-direction:column;align-items:center;border:2.5px solid var(--ink);border-radius:11px;padding:3px 0;font-size:20px;filter:grayscale(1);opacity:.45;transition:transform .25s,opacity .25s} +.pzs span small{font:900 10px var(--body);text-transform:uppercase;letter-spacing:.05em}.pzs span.on{filter:none;opacity:1;background:#FFF3C4;transform:scale(1.05)} +.pzck{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}.pzc{font-weight:900;font-size:12px;border:2px solid var(--ink);border-radius:999px;padding:1px 8px;background:#fff} +.pzc.s1{background:#FFE3F0}.pzc.s2{background:var(--ok);color:#fff} +.pztw{font-size:12.5px;font-weight:800;color:var(--bad);margin:3px 0}.pztw.ok{color:var(--eye)} +.pzbud{margin:6px 0}.pzbud .kv{font-size:12.5px} +.pzn1{font-size:12.5px;font-weight:800;margin:6px 0;padding:4px 8px;border:2px solid var(--line);border-radius:10px;color:var(--ink2)} +.pzn1.on{border-color:var(--ok);background:#DFFBEA;color:var(--ink);animation:pzglow 1.6s ease-in-out infinite}.pzn1.bad{border-color:var(--warn);background:#FFF4D6;color:var(--ink)} +@keyframes pzglow{50%{box-shadow:0 0 0 4px rgba(34,196,122,.25)}} +#pzBox .btns{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px} +#pzBox .grab{display:none} +.pzprog{margin:6px 0 4px}.pzpack{font-size:17px;margin:14px 0 2px}.pzst{font-size:12px;letter-spacing:-1px;white-space:nowrap} +.scn.lock{opacity:.5} +.pzres{position:relative}.pzstars{display:flex;justify-content:center;gap:10px;margin:10px 0 2px} +.pzbig{font-size:46px;filter:grayscale(1);opacity:.3}.pzbig.on{filter:none;opacity:1} +.pzbig.pop{animation:pzpop .5s cubic-bezier(.3,1.6,.5,1) var(--d) both} +@keyframes pzpop{0%{transform:scale(0) rotate(-40deg);opacity:0}100%{transform:scale(1) rotate(0);opacity:1}} +.pzconf{position:absolute;inset:-16px;pointer-events:none;overflow:hidden;z-index:2} +.pzconf i{position:absolute;top:-12px;left:var(--x);width:8px;height:12px;background:var(--c);border:1.5px solid var(--ink);border-radius:2px;animation:pzfall var(--t) ease-in var(--dl) both} +@keyframes pzfall{0%{transform:translateY(0) rotate(0);opacity:1}100%{transform:translateY(420px) rotate(var(--r));opacity:0}} +@media (max-width:760px),(max-height:500px) and (pointer:coarse){ + #pzBox{top:auto;left:0;right:0;width:auto;bottom:0;max-height:min(46%,330px);border-radius:20px 20px 0 0;border-bottom:0;box-shadow:0 -3px 0 var(--ink);padding:0 12px calc(10px + env(safe-area-inset-bottom,0px))} + #pzBox .grab{display:block} + #pzBox.mini{max-height:none}#pzBox.mini>:not(.grab):not(.pzh):not(.pzs){display:none} + #pzBox.mini .pzs{margin-top:0} + body.pz.sheet-open #pzBox{display:none} + body.pz #panel{bottom:0 !important} + body.pz #hint{bottom:calc(min(46%,330px) + 8px) !important} + .pzbig{font-size:40px} +} +@media (orientation:landscape) and (max-height:500px) and (pointer:coarse),(orientation:landscape) and (max-width:760px) and (max-height:500px){ + #pzBox{left:auto;right:0;width:min(360px,52%);top:calc(env(safe-area-inset-top,0px) + 50px);max-height:none;border-radius:20px 0 0 0;border-right:0} + body.pz #hint{bottom:12px !important;left:30% !important} + body.pz #toasts{left:8px !important;transform:none !important;width:calc(48% - 16px) !important} +} diff --git a/tests/badges-variants.test.js b/tests/badges-variants.test.js new file mode 100644 index 0000000..648aaed --- /dev/null +++ b/tests/badges-variants.test.js @@ -0,0 +1,137 @@ +// Badge variants by ruleset preset (2.0): On-call earns the standard badge, Change Freeze a frosted one and BGP at +// 3 a.m. a fiery one; Sandbox and puzzles earn none. A harder preset upgrades a badge you already have. +const test = require('node:test'); +const assert = require('node:assert/strict'); +const { load } = require('./harness'); + +// The preset is read from S.rules.preset until the ruleset feature lands with rulePreset(). +const start = (ev, preset) => { + ev("localStorage.removeItem('sot-badges');ACT.start({});if(UI.pendGame)ACT.pitchSkip();S.cash=1e8;for(const g of GOALS)S.done[g.id]=0;ACT.launchBB({city:'fra'})"); + if (preset) ev(`S.rules={preset:'${preset}'}`); + ev("S.ach={};S.achP={};compute()"); +}; +const earnHello = (ev) => ev("S.pni.push({id:'x',net:'nfx',city:'fra',tier:0});compute();checkBadges()"); +const hof = (ev) => JSON.parse(ev("localStorage.getItem('sot-badges')||'{}'")); + +test('every save without a preset plays On-call and earns the standard badge', () => { + const { ev, errors } = load(); + start(ev); + assert.equal(ev('badgeVar()'), 'oncall'); + earnHello(ev); + assert.ok(ev('S.ach.hello!==undefined')); + assert.equal(ev('S.achP.hello'), 'oncall'); + assert.deepEqual(hof(ev).hello.vs && Object.keys(hof(ev).hello.vs), ['oncall']); + assert.equal(hof(ev).hello.v, 'oncall'); + assert.deepEqual(errors, []); +}); + +test('Change Freeze earns frosted badges and BGP at 3 a.m. fiery ones, shown in the toast and the list', () => { + for (const [p, name, cls] of [['freeze', /Freeze-dried/, 'v-freeze'], ['bgp', /Forged at 3 a\.m\./, 'v-bgp']]) { + const { ev, dom, errors } = load(); + start(ev, p); + ev("window.__t=[];const _t=toast;toast=(h,...a)=>{window.__t.push(h);return _t(h,...a);}"); + earnHello(ev); + assert.equal(ev('S.achP.hello'), p); + assert.match(ev("window.__t.join(' ')"), name, `${p}: the toast names the variant`); + ev("UI.left='goals';UI.leftOpen=true;UI.sel=null;renderLeft()"); + const card = dom.window.document.querySelector(`#leftBody .bdg.on.${cls}`); + assert.ok(card, `${p}: the badge list shows the variant`); + assert.match(card.textContent, name); + assert.equal(hof(ev).hello.v, p, 'remembered on this device'); + assert.deepEqual(errors, []); + } +}); + +test('Sandbox and puzzles earn no badges', () => { + for (const p of ['sandbox', 'puzzle']) { + const { ev, errors } = load(); + start(ev, p); + earnHello(ev); + assert.equal(ev('badgeVar()'), null); + assert.equal(ev('Object.keys(S.ach).length'), 0, p); + assert.deepEqual(errors, []); + } + const { ev, errors } = load(); + start(ev); + ev("S.mode='sandbox'"); + earnHello(ev); + assert.equal(ev('Object.keys(S.ach).length'), 0, 'the old sandbox mode too'); + assert.deepEqual(errors, []); +}); + +test('a harder preset upgrades a badge, an easier one never downgrades it', () => { + const { ev, errors } = load(); + start(ev, 'freeze'); + earnHello(ev); + const day = ev('S.ach.hello'); + ev("window.__t=[];const _t=toast;toast=(h,...a)=>{window.__t.push(h);return _t(h,...a);}"); + ev("S.rules.preset='oncall';checkBadges()"); + assert.equal(ev('S.achP.hello'), 'oncall', 'On-call beats Change Freeze'); + assert.match(ev("window.__t.join(' ')"), /Badge upgraded/); + ev("S.day+=10;S.rules.preset='bgp';checkBadges()"); + assert.equal(ev('S.achP.hello'), 'bgp'); + assert.equal(ev('S.ach.hello'), day, 'the day it was first earned stays'); + ev("window.__t=[];S.rules.preset='freeze';checkBadges()"); + assert.equal(ev('S.achP.hello'), 'bgp', 'never downgraded'); + assert.equal(ev("window.__t.length"), 0, 'and no toast'); + const h = hof(ev).hello; + assert.deepEqual(Object.keys(h.vs).sort(), ['bgp', 'freeze', 'oncall'], 'the collection holds every variant earned'); + assert.equal(h.v, 'bgp', 'the shelf shows the best one'); + assert.deepEqual(errors, []); +}); + +test('the collection counts badges per variant on this device, and fits a phone', () => { + const { ev, dom, errors } = load(); + ev('window.innerWidth=360'); + start(ev, 'bgp'); + earnHello(ev); + ev("UI.left='goals';UI.leftOpen=true;UI.sel=null;renderLeft()"); + const shelf = dom.window.document.querySelector('#leftBody .bshelf'); + assert.ok(shelf); + const total = ev('BADGES.length'); + assert.match(shelf.textContent, new RegExp(`Forged at 3 a\\.m\\. 1/${total}`)); + assert.match(shelf.textContent, new RegExp(`Freeze-dried 0/${total}`)); + assert.ok(dom.window.document.querySelector('#leftBody .bsh.v-bgp.cur'), 'the variant this game earns is marked'); + assert.match(dom.window.document.getElementById('leftBody').textContent, /forged in fire/); + assert.deepEqual(JSON.parse(ev('JSON.stringify(badgeShelf(hof()))')), { freeze: 0, oncall: 0, bgp: 1 }); + assert.deepEqual(errors, []); +}); + +test('old saves and old halls of fame keep loading, as standard badges', () => { + const { ev, errors } = load(); + start(ev); + // a 1.x save: S.ach holds days, no S.achP; a 1.x hall of fame: {d, n} per badge + ev("localStorage.setItem('sot-badges',JSON.stringify({hello:{d:'2025-01-02',n:'Old'},t1:{d:'2025-03-04',n:'Old'},junk:5}))"); + ev("const o=JSON.parse(JSON.stringify(S));o.ach={hello:12,t1:'400'};delete o.achP;S=migrate(o)"); + assert.equal(ev('S.achP.hello'), 'oncall'); + assert.equal(ev('S.ach.t1'), 400, 'days are numbers'); + assert.deepEqual(JSON.parse(ev("JSON.stringify(Object.keys(S.achP).sort())")), ['hello', 't1']); + const h = JSON.parse(ev('JSON.stringify(hof())')); + assert.equal(h.hello.v, 'oncall'); + assert.equal(h.hello.vs.oncall, '2025-01-02'); + assert.equal(h.junk, undefined, 'broken entries are dropped'); + // a hand-edited variant is not trusted + ev("const o=JSON.parse(JSON.stringify(S));o.achP={hello:'lava',t1:'bgp'};S=migrate(o)"); + assert.equal(ev('S.achP.hello'), 'oncall'); + assert.equal(ev('S.achP.t1'), 'bgp'); + ev("localStorage.setItem('sot-badges','[1,2]')"); + assert.equal(ev('JSON.stringify(hof())'), '{}'); + ev("UI.left='goals';UI.leftOpen=true;renderLeft()"); + // new games start with an empty variant map + ev("ACT.start({});if(UI.pendGame)ACT.pitchSkip()"); + assert.equal(ev('JSON.stringify(S.achP)'), '{}'); + assert.deepEqual(errors, []); +}); + +test('the share card rings the variant badges', () => { + const { ev, errors } = load(); + start(ev, 'bgp'); + earnHello(ev); + // count the strokes the card draws with a variant badge and with the same badge in its standard look + const calls = () => ev("(()=>{const cv=shareCanvas();return cv.getContext('2d').calls.n;})()"); + const fiery = calls(); + ev("S.achP.hello='oncall'"); + const plain = calls(); + assert.ok(fiery > plain, `the ring and the tally are drawn (${fiery} > ${plain} calls)`); + assert.deepEqual(errors, []); +}); diff --git a/tests/helpers/reference-allocation.js b/tests/helpers/reference-allocation.js index 52e6af4..4658ced 100644 --- a/tests/helpers/reference-allocation.js +++ b/tests/helpers/reference-allocation.js @@ -6,7 +6,7 @@ module.exports = ` if(f.rem<=1e-6||(rank===0&&!f.cache)||(pass&&!pass(f)))continue; Dv=SDi[f.ci];Pv=SPi[f.ci];PP=walked[f.ci]||(walked[f.ci]=[]);vis++; const candidates=E.filter(e=>e.used(a.pref==='high'?0:1)-(b.pref==='high'?0:1)||Dv[CIDX[a.city]]-Dv[CIDX[b.city]]); for(let i=0;i1e-6;){ let j=i+1;while(j JSON.parse(ev('JSON.stringify(pzEval())')); + +test('puzzle data: every puzzle is valid, solvable, and its 3-star reference earns three stars', () => { + const { ev, errors } = load(); + const ids = JSON.parse(ev('JSON.stringify(PZ.map(p=>p.id))')); + assert.ok(ids.length >= 16, 'at least 16 puzzles'); + assert.equal(new Set(ids).size, ids.length, 'ids are unique'); + assert.deepEqual(Object.keys(REF).sort(), ids.slice().sort(), 'every puzzle has a reference solution'); + assert.ok(ev("PZ.every(p=>PZ_PACKS.some(k=>k.id===p.pack)&&p.n&&p.j&&p.cities.length>=2&&p.cities.length<=6&&[...p.cities,...(p.via||[]),...(p.avoid||[])].every(c=>isCity(c)&&!CITY[c].off&&!CITY[c].cn))"), 'cities exist and are playable'); + assert.ok(ev("PZ.every(p=>!p.budget||(p.budget>=100000&&p.budget<=5e6))"), 'budgets are sane'); + assert.ok(ev("PZ_PACKS[0].need===0&&PZ_PACKS.every((k,i)=>!i||k.need>PZ_PACKS[i-1].need)"), 'packs unlock in order'); + assert.ok(ev("PZ.filter(p=>p.pack==='hello'&&!p.budget).length>=2"), 'the first puzzles give the budget star away'); + for (const id of ids) { + ev(`pzBegin(pzDef('${id}'))`); + build(ev, REF[id].one); + let e = evalP(ev); + assert.ok(e.goal, `${id}: the one-star reference reaches the goal`); + assert.ok(e.stars >= 1, `${id}: one star`); + ev('ACT.pzReset({})'); + assert.equal(evalP(ev).stars, 0, `${id}: reset clears it`); + build(ev, REF[id].three); + e = evalP(ev); + assert.equal(e.stars, 3, `${id}: three stars (spend ${e.spend} of ${ev('S.pz.budget')}, n1 ${e.n1}, twists ${JSON.stringify(e.tw)})`); + } + assert.deepEqual(errors, []); +}); + +test('stars: goal, budget, N-1 and twists each count', () => { + const { ev, errors } = load(); + ev("pzBegin(pzDef('braces'))"); + build(ev, REF.braces.one); + let e = evalP(ev); + assert.equal(e.stars, 2, 'connected and under budget, but one cut splits it'); + assert.ok(!e.n1 && e.weak.length > 0); + build(ev, [['dub', 'nyc', 'havf']]); + assert.equal(evalP(ev).stars, 3); + ev('S.pz.budget=1000'); + assert.equal(evalP(ev).stars, 2, 'over budget loses the second star'); + // Two waves in the same trench are one backhoe away from nothing. + ev("pzBegin(pzDef('shining'))"); + build(ev, REF.shining.one); + ev("ACT.pzLinkTo({a:'nyc',b:'chi'});ACT.pzVia({v:'land'});ACT.pzDiv({v:0});ACT.pzLink({tier:0})"); + assert.equal(ev("new Set(S.links.filter(l=>edgeKey(l)==='chi|nyc').map(pzUnit)).size"), 1, 'same trench shares the cut'); + // Twists: no subsea, ring, latency, minimum size, cities to avoid. + ev("pzBegin(pzDef('sharks'))");build(ev, REF.sharks.one); + assert.ok(evalP(ev).goal); + ev("pzBegin(pzDef('fire'))");build(ev, REF.fire.one);ev("ACT.pzRmLink({id:S.links[3].id})"); + e = evalP(ev); + assert.ok(e.conn && !e.goal, 'a line is not a ring'); + ev('ACT.pzUndo({})'); + assert.ok(evalP(ev).goal, 'undo puts the ring back'); + ev("pzBegin(pzDef('flash'))");build(ev, [['nyc', 'lon', 'grace']]); + e = evalP(ev); + assert.ok(e.conn && !e.goal, 'Grace Hopscotch is too slow for the traders'); + ev("pzBegin(pzDef('fatpipes'))");build(ev, REF.fatpipes.one.map(([a, b, v]) => [a, b, v, 0])); + assert.ok(!evalP(ev).goal, '10G is too thin'); + ev("ACT.pzTier({id:S.links[0].id,tier:1});ACT.pzTier({id:S.links[1].id,tier:1});ACT.pzTier({id:S.links[2].id,tier:1})"); + assert.ok(evalP(ev).goal, 'upgraded in place'); + ev("pzBegin(pzDef('nofra'))"); + ev("ACT.pzPop({city:'fra'})"); + assert.equal(ev("!!S.pops.fra"), false, 'no POP in a city to avoid'); + assert.equal(ev("pzKind('lon')"), null, 'cities outside the puzzle are inert'); + ev("ACT.pzPop({city:'lon'})"); + assert.equal(ev("Object.keys(S.pops).length"), 0); + // Subsea is greyed out in the shark tank. + ev("pzBegin(pzDef('sharks'));ACT.pzPop({city:'lis'});ACT.pzLinkTo({a:'lis',b:'bcn'});ACT.pzVia({v:'medusa'});ACT.pzLink({tier:0})"); + assert.equal(ev('S.links.length'), 0); + assert.deepEqual(errors, []); +}); + +test('no clock in a puzzle: days never pass, nothing breaks, no bills', () => { + const { ev, errors } = load(); + ev("pzBegin(pzDef('hello'))"); + build(ev, REF.hello.three); + ev('ACT.speed({v:8});ACT.phonePlay({});for(let i=0;i<50;i++)frame(performance.now()+i*3000)'); + assert.equal(ev('S.day'), 0); + assert.equal(ev('UI.speed'), 0); + assert.equal(ev('S.inc.length'), 0); + assert.equal(ev('S.cash'), ev('START_CASH'), 'nothing is charged'); + assert.equal(ev("document.getElementById('left').hidden"), true, 'no goals/deals/NOC/networks drawer'); + assert.equal(ev("document.getElementById('pzBox').hidden"), false); + assert.deepEqual(errors, []); +}); + +test('the main save is byte-identical before and after playing and solving a puzzle', () => { + const { ev, errors } = load(); + ev("ACT.start({});S.cash=1e7;for(const g of GOALS)S.done[g.id]=0;ACT.launchBB({city:'fra'});ACT.buildPop({city:'ams'});save(true)"); + const before = ev("localStorage.getItem('sot-save-v1')"); + const name = ev('S.name'), day = ev('S.day'); + ev('ACT.puzzleMenu({})'); + assert.match(ev("document.getElementById('modalCard').textContent"), /Hello, World/); + ev("ACT.pzStart({id:'hello'})"); + assert.equal(ev('S.mode'), 'puzzle'); + build(ev, REF.hello.three); + ev("save(true);for(let i=0;i<5;i++)frame(performance.now()+6000*i);window.dispatchEvent(new Event('pagehide'));ACT.exportSave({})"); + assert.equal(ev("localStorage.getItem('sot-save-v1')"), before, 'untouched while in the puzzle'); + assert.equal(ev("JSON.parse(localStorage.getItem('sot-puzzles')).s.hello.st"), 3, 'the stars are kept'); + ev('ACT.pzLeave({})'); + assert.equal(ev('S.mode'), 'normal'); + assert.equal(ev('S.name'), name); + assert.equal(ev('S.day'), day); + assert.ok(ev('!!S.pops.ams')); + assert.equal(ev('UI.started'), true); + assert.equal(ev("localStorage.getItem('sot-save-v1')"), before, 'and after'); + assert.deepEqual(errors, []); +}); + +test('leaving a puzzle with no game goes back to the title screen', () => { + const { ev, errors } = load(); + assert.ok(ev("!!document.querySelector('#modalCard .door[data-door=puzzle]')"), 'the title screen has a Puzzles door'); + ev("document.querySelector('#modalCard .door[data-door=puzzle]').click()"); + ev("document.querySelector('#modalCard [data-act=pzStart]').click()"); + assert.equal(ev('S.mode'), 'puzzle'); + ev('ACT.pzLeave({})'); + assert.equal(ev('S'), null); + assert.equal(ev("localStorage.getItem('sot-save-v1')"), null, 'no main save appeared'); + assert.match(ev("document.getElementById('modalCard').textContent"), /Series/); + assert.deepEqual(errors, []); +}); + +test('results card pops the stars, offers the next puzzle, a retry and a share line', () => { + const { ev, errors } = load(); + ev("pzBegin(pzDef('eurotrip'))"); + build(ev, REF.eurotrip.one); + let card = ev("document.getElementById('modalCard').textContent"); + assert.match(card, /Puzzle solved/); + assert.ok(ev("!!document.querySelector('#modalCard [data-act=pzRetry]')")); + assert.match(ev("document.querySelector('#modalCard [data-act=pzStart]').dataset.args"), /shining/); + build(ev, [['lon', 'ams', 'concerto'], ['ams', 'fra', 'land']]); + card = ev("document.getElementById('modalCard').textContent"); + assert.match(card, /A backhoe walks into your network/); + assert.equal(ev("document.querySelectorAll('#modalCard .pzbig.on').length"), 3); + const line = ev('pzShareText(pzEval())'); + assert.match(line, /^Series of Tubes puzzle Euro Trip ⭐⭐⭐ \$\d+k · seriesoftub\.es$/); + assert.deepEqual(errors, []); +}); + +test('weekly puzzle: stable seed per ISO week, solvable, share string and streak', () => { + const { ev, errors } = load(); + const a = ev("JSON.stringify(pzWeekly(new Date(2026,9,28)))"), b = ev("JSON.stringify(pzWeekly(new Date(2026,10,1)))"), c = ev("JSON.stringify(pzWeekly(new Date(2026,10,2)))"); + assert.equal(a, b, 'same week, same puzzle'); + assert.notEqual(a, c, 'next week, a new one'); + const w = JSON.parse(a); + assert.equal(w.key, '2026-W44'); + assert.ok(w.cities.length >= 4 && w.cities.length <= 5 && w.budget > 0); + // Every week of a few years can be solved with three stars by its own reference ring. + for (let i = 0; i < 160; i += 7) { + ev(`pzBegin(pzWeekly(new Date(2026,0,1+${i})))`); + const ring = JSON.parse(ev('JSON.stringify(pzWeekly(new Date(2026,0,1+' + i + ')).ref)')); + const links = ring.map((x, j) => { const y = ring[(j + 1) % ring.length]; return [x, y, ev(`pzRoutes('${x}','${y}').sort((p,q)=>pzLinkCost(p,0)-pzLinkCost(q,0))[0].via`)]; }); + build(ev, links); + assert.equal(evalP(ev).stars, 3, `week +${i}`); + } + ev("localStorage.removeItem('sot-puzzles');pzBegin(pzWeekly(new Date(2026,9,28)))"); + const ring = w.ref; + build(ev, ring.map((x, j) => { const y = ring[(j + 1) % ring.length]; return [x, y, ev(`pzRoutes('${x}','${y}').sort((p,q)=>pzLinkCost(p,0)-pzLinkCost(q,0))[0].via`)]; })); + assert.match(ev('pzShareText(pzEval())'), /^Series of Tubes puzzle 2026-W44 ⭐⭐⭐ \$\d+k · seriesoftub\.es$/); + assert.equal(ev("JSON.parse(localStorage.getItem('sot-puzzles')).streak.n"), 1); + // A streak counts weeks in a row; a gap starts again. + ev("const p=pzLoad();pzStreak(p,'2026-W45');pzStreak(p,'2026-W45');pzStreak(p,'2026-W46');window.__p=p"); + assert.equal(ev('__p.streak.n'), 3); + ev("pzStreak(__p,'2026-W49')"); + assert.equal(ev('__p.streak.n'), 1); + assert.equal(ev('__p.streak.best'), 3); + assert.equal(ev("pzPrevKey('2027-W01')"), '2026-W53'); + assert.equal(ev("pzPrevKey('2026-W01')"), '2025-W52'); + assert.deepEqual(errors, []); +}); + +test('pack unlocking follows the stars, and bad progress data is ignored', () => { + const { ev, errors } = load(); + ev("localStorage.removeItem('sot-puzzles')"); + assert.equal(ev("pzPackOpen('hello')"), true); + assert.equal(ev("pzPackOpen('fire')"), false); + ev("ACT.pzStart({id:'aloha'})"); + assert.notEqual(ev('S&&S.mode'), 'puzzle', 'a locked puzzle does not start'); + ev("localStorage.setItem('sot-puzzles',JSON.stringify({s:{hello:{st:3},eurotrip:{st:3}}}))"); + assert.equal(ev("pzPackOpen('fire')"), true, '6 stars open pack 2'); + ev('ACT.puzzleMenu({})'); + assert.match(ev("document.getElementById('modalCard').textContent"), /Next pack, Speed Runs, unlocks at 14/); + ev("localStorage.setItem('sot-puzzles',JSON.stringify({s:{hello:{st:99,sp:'x'},nope:{st:3},__proto__:{st:3}},wk:{bad:{st:3}},streak:{n:-4,last:''}}))"); + const p = JSON.parse(ev('JSON.stringify(pzLoad())')); + assert.deepEqual(p.s, { hello: { st: 3, sp: null } }); + assert.deepEqual(p.wk, {}); + assert.deepEqual(p.streak, { last: null, n: 0, best: 0 }); + ev("localStorage.setItem('sot-puzzles','{nope')"); + assert.equal(ev('pzStarsTotal(pzLoad())'), 0); + assert.deepEqual(errors, []); +}); + +test('puzzle HUD fits a 360 px phone: bottom sheet, no tab bar, panels work', () => { + const { dom, ev, errors } = load(); + ev("innerWidth=360;innerHeight=740;dispatchEvent(new Event('resize'))"); + ev("pzBegin(pzDef('hello'))"); + assert.equal(ev("document.getElementById('tabbar').hidden"), true); + assert.equal(ev("document.getElementById('pzBox').hidden"), false); + ev("selectCity('lon')"); + assert.match(ev("document.getElementById('panelBody').textContent"), /Open a POP/); + ev("document.querySelector('#panelBody [data-act=pzPop]').click()"); + assert.ok(ev('!!S.pops.lon')); + ev("selectCity('par')"); + assert.equal(ev("document.getElementById('panel').hidden"), true, 'other cities do nothing'); + ev("pzLinkModal('lon','nyc')"); + assert.ok(ev("document.querySelectorAll('#modalCard .tierbtn').length") === 3, 'three sizes'); + assert.deepEqual(errors, []); + void dom; +}); + +test('puzzles in every language', () => { + for (const lang of ['de', 'es', 'fr', 'it', 'pt']) { + const { ev, errors } = load({ lang }); + ev("ACT.puzzleMenu({});pzBegin(pzDef('braces'))"); + build(ev, REF.braces.three); + const seen = ev("['pzBox','modalCard','hud'].map(id=>document.getElementById(id).textContent).join(' ')"); + assert.ok(!/puzzles\./.test(seen), `${lang}: no raw labels`); + assert.match(seen, /⭐/); + assert.deepEqual(errors, [], lang); + } +}); diff --git a/tests/rules.test.js b/tests/rules.test.js index aab6864..9d24992 100644 --- a/tests/rules.test.js +++ b/tests/rules.test.js @@ -60,8 +60,6 @@ test('the title screen: four doors, three Normal presets, a chaos picker for San assert.equal(doc.getElementById('doorSandbox').hidden, false); assert.equal(doc.getElementById('doorNormal').hidden, true); doc.querySelector('.chs[data-chaos=spicy]').click(); - doc.querySelector('.door[data-door=puzzle]').click(); - assert.match(doc.getElementById('toasts').textContent, /coming soon/, 'puzzles are not here yet'); doc.querySelector('.door[data-door=normal]').click(); ev("ACT.start({});if(UI.pendGame)ACT.pitchSkip()"); assert.equal(ev('rulePreset()'), 'freeze'); diff --git a/tests/tier1-cone.test.js b/tests/tier1-cone.test.js new file mode 100644 index 0000000..bc79518 --- /dev/null +++ b/tests/tier1-cone.test.js @@ -0,0 +1,148 @@ +// Tier 1 by customer cone (#85): peering with every Tier 1 reaches their customers and their customers' customers, +// so the long tail stops mattering for the win; networks in nobody's cone still need peering of their own. +const test = require('node:test'); +const assert = require('node:assert/strict'); +const { load } = require('./harness'); + +// A transit-free network in Frankfurt with a PNI to every Tier 1 it needs. +const t1Club = (ev) => { + ev("ACT.start({});if(UI.pendGame)ACT.pitchSkip();S.cash=1e9;S.lvl=6;for(const g of GOALS)S.done[g.id]=0;delete S.done.t1;ACT.launchBB({city:'fra'});S.pops.fra.bb.d=500"); + ev("S.transit=[];S.ixp={};S.peers={};S.pni=[];S.grace=null;for(const n of t1Need())S.pni.push({id:'p'+n.id,net:n.id,city:'fra',tier:2});compute()"); +}; + +test('cones are built once at load and hold customers of customers', () => { + const { ev, errors } = load(); + assert.equal(ev("CONE.voc.includes('ddo')&&CONE.voc.includes('spn')"), true, 'Hocus Pocus brings its own customers'); + // Doodoo buys from Hocus Pocus, which buys from Not That Telecom: two levels down + assert.equal(ev("NET.ddo.up.includes('voc')&&NET.voc.up.includes('ntt')"), true); + assert.equal(ev("CONE_S.ntt.has('ddo')"), true, 'the Tier 1 cone is transitive'); + assert.equal(ev("CONE.ntt[0]"), 'ntt', 'a network is first in its own cone'); + assert.equal(ev("PNI_NETS===CONE"), true); + assert.equal(ev("ANC.ddo[0]"), 'voc', 'nearest upstream first'); + assert.equal(ev("NETS.filter(n=>n.tail).every(n=>n.up&&n.up.length&&n.up.every(u=>NET[u]))"), true, 'the long tail buys transit'); + assert.equal(ev("NETS.filter(n=>n.tail).every(n=>ANC[n.id].some(u=>NET[u].type==='t1'))"), true, 'from a Tier 1, directly or through a carrier'); + assert.equal(ev("NET.tail45.up.join()"), 'mag', 'Auckland has no Tier 1: Hobbit Hole buys from a carrier that is there'); + assert.equal(ev("NETS.filter(n=>n.tail).map(n=>n.up.join('+')).join()"), ev("NETS.filter(n=>n.tail).map(n=>tailUp(n.name,n.pops).join('+')).join()"), 'stable: picked by name'); + // Australians buy only from Australian carriers, so a Tier 1 PNI is still no back door into Australia. + assert.equal(ev("['opt','tpr','abb','npt','lpt','lnt','pnt','stb','blg'].some(id=>t1Need().some(t=>CONE_S[t.id].has(id)))"), false); + assert.deepEqual(errors, []); +}); + +test('a transit-free network with PNIs to every Tier 1 reaches the long tail through their cones', () => { + const { ev, errors } = load(); + t1Club(ev); + const tail = ev("NETS.find(n=>n.tail&&n.pops.includes('akl')).id"); + for (const id of ['tail0', 'tail38', tail, 'sky', 'kys', 'tim']) { + assert.equal(ev(`!!R.reachable.${id}`), true, `${id} is reachable`); + assert.equal(ev(`!!R.nt.${id}`), true, `${id} without transit`); + assert.equal(ev(`!!R.cone.${id}`), true, `${id} through a peer's cone`); + } + // the traffic really goes over the PNI with the upstream, not some made-up exit + const up = ev("NET.tail0.up[0]"); + assert.ok(ev("(R.netEg.tail0||{}).p") > 0, 'over a PNI'); + assert.ok(ev(`R.usePni['p${up}']`) > 0, 'the PNI with its upstream carries it'); + // the traceroute shows the hand-off to the customer and an AS path one hop longer + const tr = JSON.parse(ev("JSON.stringify(traceroute('fra',{net:'tail0'}))")); + assert.match(tr.text, /hands it to its customer/); + assert.equal(tr.asPath.length, 3, 'you, the Tier 1, the customer'); + assert.equal(tr.asPath[1], ev(`NET.${up}.asn`), 'through the upstream it buys transit from'); + assert.match(tr.why, /customers come after direct peers/); + assert.deepEqual(errors, []); +}); + +test('a network in nobody\'s cone still needs reaching directly', () => { + const { ev, errors } = load(); + t1Club(ev); + // Doitsche Telekomm buys from no one: no Tier 1 PNI reaches it + assert.equal(ev("(NET.dtk.up||[]).length"), 0); + assert.equal(ev("R.reachable.dtk"), false); + assert.equal(ev("isTier1()"), false); + assert.match(ev('t1Why()'), /nobody you peer with sells transit to/); + // peer with every island directly and the win comes + ev("for(const n of NETS)if(!R.reachable[n.id])S.pni.push({id:'i'+n.id,net:n.id,city:n.pops[0],tier:0});for(const n of NETS)if(n.pops.length&&!S.pops[n.pops[0]])S.pops[n.pops[0]]={day:0,bb:null,boost:0,down:0,routers:1,gen:false};compute()"); + assert.ok(ev("R.reach") > 0.999, `reach ${ev('R.reach')}`); + assert.equal(ev("isTier1()"), true); + assert.deepEqual(errors, []); +}); + +test('the long tail no longer stands between you and Tier 1', () => { + const { ev, errors } = load(); + t1Club(ev); + // peer directly only with the networks in nobody's cone, never with the long tail itself + ev("for(const n of NETS)if(!R.reachable[n.id]){if(!S.pops[n.pops[0]])S.pops[n.pops[0]]={day:0,bb:null,boost:0,down:0,routers:1,gen:false};S.pni.push({id:'i'+n.id,net:n.id,city:n.pops[0],tier:0});}compute()"); + assert.equal(ev("S.pni.some(p=>NET[p.net].tail)"), false, 'no session with any long-tail network'); + assert.equal(ev("NETS.filter(n=>n.tail).every(n=>R.reachable[n.id])"), true); + assert.equal(ev("isTier1()"), true); + // the peers you need directly are all real networks of some size, and fewer than before + const islands = ev("S.pni.filter(p=>p.id[0]==='i').length"); + assert.ok(islands < 70, `${islands} networks to peer with directly`); + assert.deepEqual(errors, []); +}); + +test('a peer\'s cone comes after direct peering and before transit, so peering widely still pays', () => { + const { ev, errors } = load(); + t1Club(ev); + ev("ACT.buyTransit({city:'fra',net:'cog',tier:2});S.pni=S.pni.filter(p=>p.net!=='cog');compute()"); + // a Cogentle customer is reached through another Tier 1's cone only if it buys from one; transit is the fallback + const id = ev("NETS.find(n=>n.tail&&n.up.length===1&&n.up[0]==='tly').id"); + assert.ok(ev(`(R.netEg.${id}||{}).p`) > 0, 'over the PNI with its upstream, not over transit'); + assert.equal(ev(`(R.netEg.${id}||{}).t||0`), 0); + // a direct session beats the cone: peer with it at the exchange and its traffic moves there + ev(`S.pops.fra.bb.d=500;ACT.buyIx({city:'fra',tier:1,signed:true});ACT.rs({city:'fra'});compute()`); + if (ev(`ixSessions('fra').has('${id}')`)) { + assert.ok(ev(`(R.netEg.${id}||{}).ix`) > 0, 'direct peering wins over the cone'); + assert.equal(ev(`(R.netEg.${id}||{}).p||0`), 0); + } + // an IX session also brings the member's customers along + assert.equal(ev("ixSessions('fra').has('gsl')"), true); + const down = ev("DOWN.gsl.find(id=>!t1Need().some(t=>CONE_S[t.id].has(id))&&!ixSessions('fra').has(id))||''"); + if (down) assert.equal(ev(`R.reachable.${down}`), true, `${down} comes along with Glowball Sakura Lager's session`); + assert.deepEqual(errors, []); +}); + +test('old saves keep their win: cones only ever add reach', () => { + const { ev, errors } = load(); + t1Club(ev); + ev("for(const n of NETS)if(!R.reachable[n.id]){if(!S.pops[n.pops[0]])S.pops[n.pops[0]]={day:0,bb:null,boost:0,down:0,routers:1,gen:false};S.pni.push({id:'i'+n.id,net:n.id,city:n.pops[0],tier:0});}compute()"); + ev("S.won=true;S.done.t1=S.day;S.t1Now=true"); + // a save from before 2.0, with an older Tier 1 set and no record of cones, loads and is still Tier 1 + ev("const o=JSON.parse(JSON.stringify(S));o.t1v=2;S=migrate(o);compute()"); + assert.equal(ev("S.won"), true); + assert.equal(ev("isTier1()"), true); + assert.equal(ev("tierLabel()"), 'Tier 1'); + // and reach with cones is never lower than reach without: every exit still reaches what it did + const before = ev("R.reach"); + ev("for(const id of NET_IDS){CONE_S[id]=new Set([id]);DOWN[id]=[];}compute()"); + assert.ok(ev("R.reach") <= before + 1e-9, 'switching cones off can only lose reach'); + assert.deepEqual(errors, []); +}); + +test('the Road to Tier 1 card and the network list explain the cone, on a phone too', () => { + for (const w of [1280, 360]) { + const { ev, dom, errors } = load(); + ev(`window.innerWidth=${w}`); + t1Club(ev); + ev("UI.left='goals';UI.leftOpen=true;UI.sel=null;renderLeft()"); + const txt = dom.window.document.getElementById('leftBody').textContent; + assert.match(txt, /Road to Tier 1/); + assert.match(txt, /their customers come along for free/); + assert.match(txt, /\d+ networks already come along with a peer/); + ev("ACT.netFocus({id:'tail0'})"); + assert.match(dom.window.document.getElementById('leftBody').textContent, /Reached through the customer cone of/); + ev("S.pni=[];compute();ACT.netFocus({id:'tail0'})"); + assert.match(dom.window.document.getElementById('leftBody').textContent, /Buys transit from .*Peer with/); + assert.match(ev("GOALS.find(g=>g.id==='t1').d"), /customers come along for free/); + assert.deepEqual(errors, [], `${w}px`); + } +}); + +test('routing with cones costs about what it did: exits are asked once, cones are built at load', () => { + const { ev, errors } = load(); + t1Club(ev); + ev("for(const n of NETS.filter(n=>!n.tail&&!n.cn).slice(0,40))for(const c of ['fra','ams','lon']){if(!S.pops[c])S.pops[c]={day:0,bb:{d:400},boost:0,down:0,routers:4,gen:true};S.pni.push({id:n.id+c,net:n.id,city:c,tier:2});}compute()"); + const t = ev("(()=>{for(let i=0;i<3;i++)compute();const a=performance.now();for(let i=0;i<10;i++)compute();return (performance.now()-a)/10;})()"); + const plain = ev(`(()=>{const keep={};for(const id of NET_IDS){keep[id]=[CONE_S[id],DOWN[id]];CONE_S[id]=new Set([id]);DOWN[id]=[];} + for(let i=0;i<3;i++)compute();const a=performance.now();for(let i=0;i<10;i++)compute();const r=(performance.now()-a)/10;for(const id of NET_IDS){CONE_S[id]=keep[id][0];DOWN[id]=keep[id][1];}return r;})()`); + assert.ok(t < plain * 2 + 20, `compute() with cones ${t.toFixed(1)} ms vs without ${plain.toFixed(1)} ms`); + assert.deepEqual(errors, []); +});