Save slots: several networks per browser, one per window, with a cross-window guard

This commit is contained in:
Frederic Jung 2026-10-28 20:52:47 +01:00
parent 39ef7c13bb
commit da8150b7c4
No known key found for this signature in database
29 changed files with 595 additions and 124 deletions

View file

@ -100,7 +100,7 @@ test('networks in its own regions buy their transit from it, so a PNI with it re
test('a game saved before it existed gets the courtesy route to it', () => {
const a = load();
a.ev("ACT.start({});S.day=40;S.seen=S.seen.filter(x=>x!=='gsl');save(true)");
const b = load({ storage: { 'sot-save-v1': a.ev("localStorage.getItem('sot-save-v1')") } });
const b = load({ storage: { 'sot-save-v1': a.ev("slotRaw(UI.slot)") } });
assert.equal(b.ev("S.grace.nets.includes('gsl')"), true);
assert.equal(b.ev("S.seen.includes('gsl')"), true);
assert.equal(b.ev("R.reachable.gsl"), true, 'reachable through the courtesy route until you find your own way');