Merge upstream: route worker for every routing, intern specialisations, sales renewals, French cities
Some checks are pending
CI / test 1/4 (push) Waiting to run
CI / test 2/4 (push) Waiting to run
CI / test 3/4 (push) Waiting to run
CI / test 4/4 (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Blocked by required conditions
CI / translations (push) Waiting to run
Some checks are pending
CI / test 1/4 (push) Waiting to run
CI / test 2/4 (push) Waiting to run
CI / test 3/4 (push) Waiting to run
CI / test 4/4 (push) Waiting to run
CI / build (push) Waiting to run
CI / test (push) Blocked by required conditions
CI / translations (push) Waiting to run
# Conflicts: # CHANGELOG.md # src/game/60-features/39-sales-auto.js # src/game/60-features/95-standing-orders.js # src/game/85-incidents/40-chaos-monkey.js # src/game/88-days/10-day-tick.js # tests/gameplay-rules.test.js # tests/i18n.test.js
This commit is contained in:
commit
032470f486
54 changed files with 1123 additions and 181 deletions
|
|
@ -38,14 +38,14 @@ function tour(ev) {
|
|||
['tutorial', 'S.tut=0;renderCoach();S.tut=3;renderCoach();S.tut=null;renderCoach()'], ['win', 'showWin()'],
|
||||
// The build standard sheet with every target set (and the game left as it was).
|
||||
['build standard', "{const was=S.popStd;S.popStd={g:3,rt:2,site2:true,gen:true,lag:2,split:true,ix:true,pni:2,sys:'roadm',opt:'fast',wv:2};ACT.bstdOpen();S.popStd=was;closeModal()}"]]) step(label, src);
|
||||
const failSrc = ev('fireFailure.toString()');
|
||||
const failSrc = ev('failureRun.toString()');
|
||||
for (const t of ['harmless', 'fatwave', 'label', 'mtu', 'oops', 'cleaner', 'prepend', 'rpki', 'amp', 'roadmff', 'optic', 'ac', 'cut', 'crash', 'power', 'transit', 'ixloop', 'leak', 'ddos']) {
|
||||
const kind = ['harmless', 'fatwave', 'label', 'mtu', 'oops', 'cleaner', 'prepend', 'rpki', 'roadmff', 'ac'].includes(t) ? 'funny' : t;
|
||||
const patched = failSrc.replace(/^function fireFailure/, 'function')
|
||||
const patched = failSrc.replace(/^function\* failureRun/, 'function*')
|
||||
.replace('let tot=opts.reduce', `if(!opts.some(o=>o[0]==='${kind}'))return;opts.splice(0,opts.length,['${kind}',1]);let tot=opts.reduce`)
|
||||
.replace('type=pick(f);}', `type=f.includes('${t}')?'${t}':pick(f);}`);
|
||||
assert.ok(patched.includes(`['${kind}',1]`) && patched.includes(`f.includes('${t}')`), 'fireFailure still has the hooks this tour forces');
|
||||
step('failure ' + t, `window.__ff=${patched};S.links.forEach(l=>{l.cut=0;l.eqDown=0;l.chFail=null});S.transit.forEach(t=>t.down=0);for(const c in S.pops)S.pops[c].down=0;compute();__ff();dayTick();ACT.leftTab({t:'noc'})`);
|
||||
assert.ok(patched.includes(`['${kind}',1]`) && patched.includes(`f.includes('${t}')`), 'failureRun() still has the hooks this tour forces');
|
||||
step('failure ' + t, `window.__ff=${patched};S.links.forEach(l=>{l.cut=0;l.eqDown=0;l.chFail=null});S.transit.forEach(t=>t.down=0);for(const c in S.pops)S.pops[c].down=0;compute();runNow(__ff());dayTick();ACT.leftTab({t:'noc'})`);
|
||||
}
|
||||
// A cable the Baltic event can hit, so the anchor badge does not depend on what the random days built.
|
||||
step('baltic cable', "if(!S.pops.hel)ACT.buildPop({city:'hel'});UI.via='clion';openLinkModal('fra','hel');ACT.buildLink({tier:0});closeModal();UI.via=null");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue