Every table option is also a preference: the choice a new table starts with, shown in the panel

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-23 18:57:25 -04:00
co-authored by Claude Fable 5.1
parent 3825dfb44c
commit 74df9a253a
2 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
let name = $state(playerName());
let code = $state('');
/** The host's choices for the next table, from the game's declared options. */
// The host's last choices come back as the defaults; a regular does not re-pick them each visit.
// A new table starts from the preferences' table defaults, which the hall's own selectors also set.
let options = $state<Record<string, string>>(
Object.fromEntries((game.options ?? []).map((o) => [o.key, o.choices.some((c) => c.value === prefs[`table.${o.key}`]) ? String(prefs[`table.${o.key}`]) : o.default]))
);