generated from nhcarrigan/template
feat: expansion coming-soon preview with save-safe display data
Add an expansion preview system so the Goddess and Vampire panels render their full content (zones, bosses, thralls, achievements, etc.) even when the expansion has not been unlocked, with all interactive elements visually disabled. - API /load now returns expansionPreview alongside game state, populated from initialGoddessState() and initialVampireState() — never part of the saved blob - LoadResponse type updated with expansionPreview field - gameContext exposes goddessPreview and vampirePreview, stored in separate state vars that never touch stateReference so saves are never polluted - gameLayout applies expansion-preview CSS class when viewing a locked expansion with preview data available, and shows the coming-soon banner - All 22 expansion panels updated to use state.vampire ?? vampirePreview and state.goddess ?? goddessPreview for display - CSS disables all buttons/inputs/selects inside .expansion-preview - apotheosis service patched to never auto-initialise goddess state — expansion remains locked until explicitly released
This commit is contained in:
@@ -198,7 +198,9 @@ const ThrallCard = ({
|
||||
* @returns The JSX element.
|
||||
*/
|
||||
const VampireThrallsPanel = (): JSX.Element => {
|
||||
const { state, formatNumber, toggleVampireAutoThrall } = useGame();
|
||||
const {
|
||||
state, formatNumber, toggleVampireAutoThrall, vampirePreview,
|
||||
} = useGame();
|
||||
const [ selectedBatch, setSelectedBatch ] = useState<BatchSize>(() => {
|
||||
return parseBatchSize(localStorage.getItem("elysium_thrall_batch"));
|
||||
});
|
||||
@@ -211,7 +213,7 @@ const VampireThrallsPanel = (): JSX.Element => {
|
||||
);
|
||||
}
|
||||
|
||||
const vampireState = state.vampire;
|
||||
const vampireState = state.vampire ?? vampirePreview;
|
||||
if (vampireState === undefined) {
|
||||
return (
|
||||
<section className="panel">
|
||||
|
||||
Reference in New Issue
Block a user