From ceaf4dbb937c2d5180d01738febe51d9260ef83a Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Sat, 24 Oct 2026 21:35:29 +0200 Subject: [PATCH] Punch up the random network names Swap the real PTT Telecom for Post, Telegraph & Tubes, make the carrier pigeon an RFC 1149 one, drop the names without a twist and add a batch of networking puns. Adds a test for the name picker. --- CHANGELOG.md | 5 +++-- site/index.html | 13 +++++++------ tests/modes.test.js | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7f7327..b93ade2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,8 +25,9 @@ All notable changes to this project are documented here. The project follows - Community exchanges: FRIES-IX, Paella-NIX, KleyWrecks, LO-NAPS, JINXED-IX, IX Strayla and Bento-IX have their own, smaller member lists and cheaper ports. FRIES-IX 10G and 100G ports and LAG members are free. -- New networks get a random name, from Shinternet to PTT Telecom. Click - "Another one" for more questionable branding, or type your own. +- New networks get a random name, from Shinternet to Bogon Voyage. Click + "Another one" for more questionable branding, or type your own (#27, + thanks @NickBouwhuis). ## [1.10.0] — 2026-10-24 diff --git a/site/index.html b/site/index.html index c7da907..810ac10 100644 --- a/site/index.html +++ b/site/index.html @@ -2650,13 +2650,14 @@ function toast(html,kind='',actions=[]){ function openModal(html){$('modalCard').innerHTML=html;$('modal').hidden=false;} function closeModal(){$('modal').hidden=true;UI.pending=null;} const NETWORK_NAMES=[ - 'Packet Pals','Shinternet','PTT Telecom','Peering Pressure','Best Effort Telecom', + 'Packet Pals','Shinternet','Post, Telegraph & Tubes','Peering Pressure','Best Effort Telecom', 'Mostly Online','Buffering & Sons','Lord of the Pings','The Ping Dynasty', - 'LAN Before Time','Bits Please','Packet Racket','Hopless Networks', - 'Route of All Evil','TTL You Later','Fiber McFiberface','Carrier Pigeon', - 'Spanning Tree Huggers','Dial-Up & Cry','Flaky Fiber','404 Telecom', - 'Unstable Cable','Lag Happens','Loss Leaders','Last Mile Standing', - 'Have You Tried Off & On', + 'LAN Before Time','Bits Please','Hopless Networks','Route of All Evil', + 'TTL You Later','Fiber McFiberface','RFC 1149 Avian Carriers','Spanning Tree Huggers', + 'Dial-Up & Cry','404 Telecom','Loss Leaders','Last Mile Standing', + 'Have You Tried Off & On','Bogon Voyage','Default Route 66','Anycast Away', + 'Hot Potato Routing','Null Route Rangers','Looking Glass Half Full','Jumbo Frame Shop', + 'Route Flap Jacks','Split Horizon & Co.','Path of Least Resistance', ]; function randomNetworkName(current){ // Naming must not advance a running scenario's seeded simulation. diff --git a/tests/modes.test.js b/tests/modes.test.js index f2bcf54..e2a7b88 100644 --- a/tests/modes.test.js +++ b/tests/modes.test.js @@ -168,3 +168,20 @@ test('RouteScript: parses safely, reports errors helpfully, and changes routing' assert.equal(ev("S.te.script"), ''); assert.deepEqual(errors, []); }); + +test('#27 new networks get a random name, and "Another one" never repeats it', () => { + const { ev, errors } = load(); + assert.ok(ev("NETWORK_NAMES.every(n=>n.length<=24)&&new Set(NETWORK_NAMES).size===NETWORK_NAMES.length")); + const first = ev("document.getElementById('nmIn').value"); + assert.ok(ev(`NETWORK_NAMES.includes(${JSON.stringify(first)})`)); + let prev = first; + for (let i = 0; i < 40; i++) { + ev("ACT.randomName()"); + const now = ev("document.getElementById('nmIn').value"); + assert.notEqual(now, prev); + prev = now; + } + ev("document.getElementById('nmIn').value='My Own Net';ACT.start({})"); + assert.equal(ev("S.name"), 'My Own Net'); + assert.deepEqual(errors, []); +});