// The build standard sheet (93-ui/59-build-standard.js): pick a target, or bring everything up to the standard in one go. Object.assign(ACT,{ bstdOpen:()=>{if(S&&!pzOn())bstdModal();}, // v: a position in the list the sheet shows; without v, the next value (the MCP tools step through a list). bstdSet:({k,v})=>{if(!S||pzOn()||!own(BSTDK,k))return;const D=bstd(),x=opsPick(bstdOpts(k),D[k],v);if(x===undefined||!bstdOk(BSTDK[k],x))return; D[k]=x;S.popStd=bstdPut(D);sfx('click');after();opsRedraw('bstdSet',{k},bstdModal);}, // The same jobs, in the same order and through the same gates as the intern's order, while the cash lasts. One // recompute at the end, and one toast: what got done, and what still waits. bstdApply:()=>{if(!S||pzOn()||!S.popStd)return;const J=bstdPlan(false);if(!J.length)return;const c0=S.cash;let n=0; opsQuiet(()=>{n=bstdDo(J,j=>{const c=bstdPrice(j);return c<=0||S.cash>=c;},j=>!!j.go()).length;}); after();const q=bstdQuote(false),left=q.pops+q.ports+q.links; toast((n?trn('bstd.applied',n,{cost:fmt$(c0-S.cash)}):tr('bstd.applied_none'))+(left?' '+trn('bstd.left',left):''),n?'good':'bad');sfx(n?'build':'err'); if(bstdShown())bstdModal();}, });