Deals belong to Sales: the intern sticks to the network, the sales desk signs deals for you, orbit ones too
The NOC intern loses the sales order. Saves that had it load cleanly: sanitize drops the order, its log lines and its weekly tally, and an intern who was running it hands its switch and minimum to the sales desk (S.slAuto). With someone at the sales desk, the player can let them sign offers once a game day and decline the ones under a minimum (39-sales-auto.js), each in their own style: the engineer and the CEO sign after the #185 routing trial (one a day, a misfit waits a week), the shark signs every offer whose POPs are up, promises and commission included, and the CEO's declines are a handshake away. Orbit offers need room on their landing dish instead of a trial. Nobody at the desk (the default; the CEO is a choice, not a given): every deal is signed by hand. The sales desk runs before the intern's shift, so a deal signed today is in the loads the intern works from. The sheet shows the switch, the minimum and this week's and last week's tally; the NOC gets one notice a week. Orbit offers go through the desk too (99-pie-sales.js): they carry o.by, so commission, renewal haggles and each one's mark at renewal apply. The engineer only offers where the landing dish has 1.5x room on a well-served POP, and those customers renew like the nerds (0.5x leave). The shark rings airlines, cruise lines and the Mars mission first, at the biggest size that fits and 25% more, and half of them get a full-sky promise (REQS.skyfull: a crust at 90%) before there is one; they grumble down to 40 happiness and never cancel over the promise alone. The CEO plays every other golf game with the Founder: the biggest orbit deal that fits, Mars first, at 30% off; jitters cut his orbit prices by 0.4x the jitters and from 0.6 the Founder skips golf. Without a salesperson orbit offers are drawn exactly as before (the O7 balance save has nobody at the desk: payback unchanged, 7.0 years on seed 7, 7.5 on seed 11). Also: the scenario reference plays 'sales' as the CEO signing for you; the route fuzz leaves out the state and buttons of a standing order only main still has; the intern's on/off dials (paid peering, keep a spare) show their translated value in the shipped page instead of the raw label.
This commit is contained in:
parent
2243280aff
commit
9a5522bbb1
28 changed files with 613 additions and 184 deletions
|
|
@ -158,9 +158,14 @@
|
|||
const parts = () => { const o = {}; if (!R) return o; for (const k of Object.keys(R)) o[k] = JSON.stringify(R[k]); o.fl = R.fl ? JSON.stringify(R.fl) : ''; return o; };
|
||||
// A field only this checkout's game has (a new feature's state, on S or on its customers and offers) cannot match main
|
||||
// yet: the driver passes those (drop) and they are left out; every field both games have must still match.
|
||||
const sKeys = () => ({ top: Object.keys(S), items: [...new Set([...(S.biz || []), ...(S.offers || [])].flatMap((x) => Object.keys(x)))] });
|
||||
const sDrop = (drop) => { if (!drop || (!drop.top.length && !drop.items.length)) return S; const o = {};
|
||||
for (const k of Object.keys(S)) if (!drop.top.includes(k)) o[k] = S[k];
|
||||
// The intern's state two levels deep (ops.on.sales, ops.wk.rev): a standing order one game has and the other retired.
|
||||
const opsPaths = () => { const O = S.ops, out = []; if (!O || typeof O !== 'object') return out;
|
||||
for (const k of Object.keys(O)) { out.push(k); const v = O[k]; if (v && typeof v === 'object' && !Array.isArray(v)) for (const j of Object.keys(v)) out.push(k + '.' + j); } return out; };
|
||||
const sKeys = () => ({ top: Object.keys(S), items: [...new Set([...(S.biz || []), ...(S.offers || [])].flatMap((x) => Object.keys(x)))], ops: opsPaths(), orders: typeof OPSK === 'object' ? Object.keys(OPSK) : [] });
|
||||
const opsDrop = (ops) => { const o = {}; for (const k of Object.keys(S.ops)) { if (ops.includes(k)) continue; const v = S.ops[k];
|
||||
if (v && typeof v === 'object' && !Array.isArray(v)) { const w = {}; for (const j of Object.keys(v)) if (!ops.includes(k + '.' + j)) w[j] = v[j]; o[k] = w; } else o[k] = v; } return o; };
|
||||
const sDrop = (drop) => { if (!drop || (!drop.top.length && !drop.items.length && !(drop.ops || []).length)) return S; const o = {};
|
||||
for (const k of Object.keys(S)) if (!drop.top.includes(k)) o[k] = k === 'ops' && S.ops && (drop.ops || []).length ? opsDrop(drop.ops) : S[k];
|
||||
for (const k of ['biz', 'offers']) if (Array.isArray(o[k])) o[k] = o[k].map((x) => { const y = {}; for (const f of Object.keys(x)) if (!drop.items.includes(f)) y[f] = x[f]; return y; });
|
||||
return o; };
|
||||
const sDigest = (drop) => JSON.stringify(sDrop(drop));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue