Support current-turn payments in public deals

This commit is contained in:
Quintine committed 2026-10-28 19:13:17 +11:00
1 parent 974b7fd99f
commit bb193d8f8c
19 files changed
+1203 -44

No files matched your search

+6
View File
@@ -4296,6 +4296,12 @@ export function botActions(g: GameView): Action[] {
return g.status === 'playing' && !g.roomControl?.paused && !g.roomControl?.closed && !g.automaticContinuationPending
? policyActions(g) : [];
if (g.homeworldTupileBlocked) return [];
const dealPayer = g.players.find(player => player.id === g.me);
if ((dealPayer?.bot || dealPayer?.autopilot) && g.status === 'playing' &&
!g.roomControl?.paused && !g.roomControl?.closed && !g.automaticContinuationPending) {
const payable = Object.entries(g.deferredDealPaymentOptions ?? {}).find(([,option]) => !option.blocked);
if (payable) return [{type:'dealPay',deal:payable[0]}];
}
if (g.decision?.kind === 'homeworldTupileCleanup' || g.homeworldTupileCleanup)
return tupileCleanupActions(g);
if (g.turnActionGuide && g.status === 'playing' &&