Add opt-in CHOAM market skip for the current turn
Verify and publish checkpoint container / container (push) Successful in 10m42s

This commit is contained in:
Quintine committed 2026-10-29 07:08:53 +11:00
1 parent 685bd8bdfc
commit 825f903cce
12 files changed
+536 -2

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
'use client';
import type { Action, GameView } from '@/game/engine';
import { Button } from '@/components/ui/button';
/** The projection is owner-only and remains visible outside the market. */
export function ChoamMarketAuto({ game, act, busy }: {
game: GameView;
act: (action: Action) => void;
busy: boolean;
}) {
if (!game.choamMarketSkipActive) return null;
return (
<section className="notice" aria-label="CHOAM market preference">
<p>
Your remaining markets this turn will be skipped, including other sales
and trades and opportunities to receive gifts. A current-turn
Truthtrance answer or pending paid deal keeps the market open. Cancel
this choice to use a future market; you can enable it again only from a
future market.
</p>
<Button
className="game-action"
variant="outline"
disabled={busy}
onClick={() => { if (!busy) act({ type: 'cancelChoamMarketSkip' }); }}
>
Cancel skipping remaining markets
</Button>
</section>
);
}
+20
View File
@@ -129,6 +129,26 @@ export function ChoamMarket({
>
Finish this phase
</Button>
{g.choamMarketSkipAvailable && g.choamMarket?.owner === g.me && (
<div className="notice">
<p>
Skip your remaining markets this turn, including other sales and
trades and opportunities to receive gifts. You can cancel this
choice later; after canceling, you can enable it again only from a
future market.
</p>
<Button
className="game-action"
variant="outline"
disabled={busy}
onClick={() => {
if (!busy) act({ type: 'decision', done: true, skipMarketsThisTurn: true });
}}
>
Finish and skip remaining markets this turn
</Button>
</div>
)}
</>
);
}
+3
View File
@@ -184,6 +184,7 @@ import { ChoamBattleFunding } from './choam-battle-funding';
import { AuditorDecision, AuditorInsight } from './choam-auditor';
import { ChoamCashIn } from './choam-cash-in';
import { ChoamMarket } from './choam-market';
import { ChoamMarketAuto } from './choam-market-auto';
import { BattlePromises } from './battle-promises';
import { Truthtrance, TruthHistory } from './truthtrance';
import { TruthCharityPromise } from './truth-charity-promise';
@@ -6051,6 +6052,8 @@ export function GameTable({
: ' · Flips at the next Mentat Pause'}
</p>
)}
<ChoamMarketAuto game={g} act={act} busy={busy || !!g.response || !!g.truthtrance || !!g.phaseOpening ||
(!!g.decision && (g.decision.kind !== 'choamMarket' || g.decision.player !== g.me))} />
<PublicDeals game={g} act={(action) => { void send(action); }}
busy={transportBusy || !!g.roomControl?.paused || !!g.roomControl?.closed || !!me.autopilot} />
{!reactionOwnsControls && <Bribes game={g} act={act} busy={busy} />}