fix: remove debug Skip to Floor 100 and Reset Floor HP buttons
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- Remove debugSetFloor and resetFloorHP actions from combatStore.ts - Remove their type definitions from combat-state.types.ts - Remove Skip to Floor 100 and Reset Floor HP buttons from GameStateDebugSection.tsx - Remove same buttons from legacy GameStateDebug.tsx - Remove floor quick-jump and Reset Floor HP from SpireDebugSection.tsx - Remove associated tests from DebugTab.test.ts, store-actions.test.ts, store-actions-combat-prestige.test.ts - Add missing src/test/setup.ts required by vitest config These debug buttons created inconsistent game states by teleporting players to floors without proper initialization (no spireMode, no room state, no clearedFloors, no guardian encounters). resetFloorHP could be spammed to infinitely retry any floor for free.
This commit is contained in:
@@ -168,10 +168,8 @@ function TimeControlSection({ day, hour, paused, onSetDay, onTogglePause }: {
|
||||
|
||||
// ─── Quick Actions Section ───────────────────────────────────────────────────
|
||||
|
||||
function QuickActionsSection({ onUnlockBase, onSkipToFloor, onResetFloorHP }: {
|
||||
function QuickActionsSection({ onUnlockBase }: {
|
||||
onUnlockBase: () => void;
|
||||
onSkipToFloor: () => void;
|
||||
onResetFloorHP: () => void;
|
||||
}) {
|
||||
return (
|
||||
<Card className="bg-gray-900/80 border-gray-700">
|
||||
@@ -186,12 +184,6 @@ function QuickActionsSection({ onUnlockBase, onSkipToFloor, onResetFloorHP }: {
|
||||
<Button size="sm" variant="outline" onClick={onUnlockBase}>
|
||||
Unlock All Base Elements
|
||||
</Button>
|
||||
<Button size="sm" variant="outline" onClick={onSkipToFloor}>
|
||||
Skip to Floor 100
|
||||
</Button>
|
||||
<Button size="sm" variant="outline" onClick={onResetFloorHP}>
|
||||
Reset Floor HP
|
||||
</Button>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -211,8 +203,7 @@ export function GameStateDebugSection() {
|
||||
const togglePause = useUIStore((s) => s.togglePause);
|
||||
const resetGame = useGameStore((s) => s.resetGame);
|
||||
const gatherMana = useGameStore((s) => s.gatherMana);
|
||||
const debugSetFloor = useCombatStore((s) => s.debugSetFloor);
|
||||
const resetFloorHP = useCombatStore((s) => s.resetFloorHP);
|
||||
|
||||
const elements = useManaStore((s) => s.elements);
|
||||
const unlockElement = useManaStore((s) => s.unlockElement);
|
||||
|
||||
@@ -262,8 +253,6 @@ export function GameStateDebugSection() {
|
||||
<TimeControlSection day={day} hour={hour} paused={paused} onSetDay={handleSetDay} onTogglePause={togglePause} />
|
||||
<QuickActionsSection
|
||||
onUnlockBase={handleUnlockBase}
|
||||
onSkipToFloor={() => debugSetFloor?.(100)}
|
||||
onResetFloorHP={() => resetFloorHP?.()}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user