Add room-creation and host lobby rules selectors, readiness reset, explicit preview start and a persistent warning. Admit the six classic factions, Tech Tokens with 3+ players and optional Stronghold Cards through genuine setup. Keep expansion/module gates and complete-rules/publication criteria. Persist the preview marker and enforce fresh native leaders, unchanged piece custody and clean runtime/pacing state. Preserve private projections, JSON continuation, exact room-entry retries and version/CAS protection. Independent review resolved malformed leader, extra card-zone, missing required-key and stale bot-deadline admission gaps. Validation on the shared development tree: types, lint, 5169 offline tests, build and 50 HTTP tests passed. The tree also contained the separate deployment task's changes; this commit stages only preview scope. All 57 base rosters completed real setup with each legal AI profile. Five normal-preview-start games (2–6 seats) completed 1950 actions and 51 JSON restores without rejected actions; no strategy calibration. Browser: actual create, host switch/readiness/Stronghold reset, explicit start, exact private refresh, desktop and mobile warning checked. Retained dev process stopped; backed up 1,629 saved games, restored server with all unchanged, and resumed the same traitor choice into Storm. Baseline all-table preservation retained 1626 rooms and 3442 seats; totals now 1669 rooms and 3536 seats. No reset or automation. Preview remains incomplete. Legacy unsupported expansion creation payloads remain accepted for exact retry compatibility but cannot start. Existing rules ambiguities and full visual acceptance remain open.
56 lines
1.4 KiB
TypeScript
56 lines
1.4 KiB
TypeScript
'use client';
|
|
|
|
export function AdvancedPreviewNotice({
|
|
compact = false,
|
|
}: {
|
|
compact?: boolean;
|
|
}) {
|
|
return (
|
|
<p className="development-note advanced-preview-note">
|
|
<strong>Advanced preview</strong> · Rules and card interactions are still
|
|
being completed.{' '}
|
|
{compact
|
|
? 'Some play may need fixes.'
|
|
: 'Use the six classic factions; expansion games are not available. Tech Tokens and Stronghold Cards can be enabled in the lobby.'}
|
|
</p>
|
|
);
|
|
}
|
|
|
|
export function RulesetControls({
|
|
advanced,
|
|
disabled = false,
|
|
lobby = false,
|
|
host = true,
|
|
onChange,
|
|
}: {
|
|
advanced: boolean;
|
|
disabled?: boolean;
|
|
lobby?: boolean;
|
|
host?: boolean;
|
|
onChange: (advanced: boolean) => void;
|
|
}) {
|
|
return (
|
|
<div>
|
|
<label>
|
|
Rules
|
|
<select
|
|
value={advanced ? 'advanced' : 'basic'}
|
|
disabled={disabled || !host}
|
|
onChange={(event) => onChange(event.target.value === 'advanced')}
|
|
>
|
|
<option value="basic">Basic</option>
|
|
<option value="advanced">Advanced preview</option>
|
|
</select>
|
|
</label>
|
|
{advanced && <AdvancedPreviewNotice />}
|
|
{lobby && (
|
|
<p className="fine">
|
|
{host
|
|
? 'Changing rules clears player readiness. Switching to Basic removes Stronghold Cards.'
|
|
: 'The host chooses the rules. A change clears player readiness.'}
|
|
</p>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|