chore: remove unused imports, vars, and params — 84 imports, 7 vars, 16 params across 45+ files
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
This commit is contained in:
@@ -8,7 +8,6 @@ import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Progress } from '@/components/ui/progress';
|
||||
import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import { SectionHeader } from '@/components/ui/section-header';
|
||||
import { DebugName } from '@/components/game/debug/debug-context';
|
||||
import { fmt } from '@/lib/game/stores';
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ describe('Fabricator recipes data', () => {
|
||||
});
|
||||
|
||||
it('getRecipesByManaType filters correctly', async () => {
|
||||
const { getRecipesByManaType, FABRICATOR_RECIPES } = await import('@/lib/game/data/fabricator-recipes');
|
||||
const { getRecipesByManaType } = await import('@/lib/game/data/fabricator-recipes');
|
||||
const earthRecipes = getRecipesByManaType('earth');
|
||||
expect(earthRecipes.length).toBeGreaterThan(0);
|
||||
for (const r of earthRecipes) {
|
||||
|
||||
@@ -37,7 +37,7 @@ function RecipeCard({
|
||||
onCraft: (recipe: FabricatorRecipe) => void;
|
||||
isCrafting: boolean;
|
||||
}) {
|
||||
const { canCraft, missingMaterials, missingMana } = canCraftRecipe(
|
||||
const { canCraft } = canCraftRecipe(
|
||||
recipe,
|
||||
materials,
|
||||
manaAmount,
|
||||
|
||||
@@ -13,7 +13,7 @@ export function DisciplineDebugSection() {
|
||||
const activate = useDisciplineStore((s) => s.activate);
|
||||
const deactivate = useDisciplineStore((s) => s.deactivate);
|
||||
|
||||
const handleTogglePause = (id: string) => {
|
||||
const _handleTogglePause = (id: string) => {
|
||||
const disc = disciplines[id];
|
||||
if (!disc) return;
|
||||
if (disc.paused) {
|
||||
@@ -77,7 +77,6 @@ export function DisciplineDebugSection() {
|
||||
const disc = disciplines[def.id];
|
||||
const isActive = activeIds.includes(def.id);
|
||||
const xp = disc?.xp || 0;
|
||||
const isPaused = disc?.paused ?? true;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@@ -168,8 +168,7 @@ function TimeControlSection({ day, hour, paused, onSetDay, onTogglePause }: {
|
||||
|
||||
// ─── Quick Actions Section ───────────────────────────────────────────────────
|
||||
|
||||
function QuickActionsSection({ elements, onUnlockBase, onSkipToFloor, onResetFloorHP }: {
|
||||
elements: Record<string, { unlocked?: boolean }>;
|
||||
function QuickActionsSection({ onUnlockBase, onSkipToFloor, onResetFloorHP }: {
|
||||
onUnlockBase: () => void;
|
||||
onSkipToFloor: () => void;
|
||||
onResetFloorHP: () => void;
|
||||
@@ -261,7 +260,6 @@ export function GameStateDebugSection() {
|
||||
<ManaDebugSection rawMana={rawMana} onAddMana={handleAddMana} onFillMana={handleFillMana} />
|
||||
<TimeControlSection day={day} hour={hour} paused={paused} onSetDay={handleSetDay} onTogglePause={togglePause} />
|
||||
<QuickActionsSection
|
||||
elements={elements}
|
||||
onUnlockBase={handleUnlockBase}
|
||||
onSkipToFloor={() => debugSetFloor?.(100)}
|
||||
onResetFloorHP={() => resetFloorHP?.()}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Bug } from 'lucide-react';
|
||||
import { usePrestigeStore, useManaStore, useUIStore, useGameStore } from '@/lib/game/stores';
|
||||
import { usePrestigeStore, useUIStore, useGameStore } from '@/lib/game/stores';
|
||||
import { ELEMENTS } from '@/lib/game/constants';
|
||||
import { getGuardianForFloor, getAllGuardianFloors } from '@/lib/game/data/guardian-encounters';
|
||||
|
||||
@@ -56,15 +56,12 @@ function GuardianPactRow({ floor, isSigned, onForceSign, onRemove }: {
|
||||
export function PactDebugSection() {
|
||||
const signedPacts = usePrestigeStore((s) => s.signedPacts);
|
||||
const signedPactDetails = usePrestigeStore((s) => s.signedPactDetails);
|
||||
const elements = useManaStore((s) => s.elements);
|
||||
const prestigeUpgrades = usePrestigeStore((s) => s.prestigeUpgrades);
|
||||
|
||||
const addSignedPact = usePrestigeStore((s) => s.addSignedPact);
|
||||
const removePact = usePrestigeStore((s) => s.removePact);
|
||||
const debugSetSignedPacts = usePrestigeStore((s) => s.debugSetSignedPacts);
|
||||
const debugSetPactDetails = usePrestigeStore((s) => s.debugSetPactDetails);
|
||||
const unlockElement = useManaStore((s) => s.unlockElement);
|
||||
|
||||
const addLog = useUIStore((s) => s.addLog);
|
||||
|
||||
const guardianFloors = getAllGuardianFloors();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
|
||||
// ─── Test: EquipmentTab barrel export ──────────────────────────────────────────
|
||||
|
||||
|
||||
Executable → Regular
+1
-1
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { canAffordSpellCost, fmt } from '@/lib/game/stores';
|
||||
import { canAffordSpellCost } from '@/lib/game/stores';
|
||||
import { useCombatStore, useManaStore } from '@/lib/game/stores';
|
||||
import { ELEMENTS, SPELLS_DEF } from '@/lib/game/constants';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
|
||||
@@ -5,7 +5,6 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Progress } from '@/components/ui/progress';
|
||||
import { getSpireRoomTypeDisplay } from '@/lib/game/utils/spire-utils';
|
||||
import { getModifierDisplay, getModifierDescription } from '@/lib/game/utils/enemy-generator';
|
||||
import { ELEMENTS } from '@/lib/game/constants';
|
||||
import { fmt } from '@/lib/game/stores';
|
||||
|
||||
@@ -14,7 +13,7 @@ interface RoomDisplayProps {
|
||||
floor: number;
|
||||
}
|
||||
|
||||
function EnemyRow({ enemy, floor }: { enemy: EnemyState; floor: number }) {
|
||||
function EnemyRow({ enemy }: { enemy: EnemyState }) {
|
||||
const elemDef = ELEMENTS[enemy.element];
|
||||
const hpPercent = enemy.maxHP > 0 ? (enemy.hp / enemy.maxHP) * 100 : 0;
|
||||
const barrierVal = enemy.barrier ?? 0;
|
||||
@@ -192,7 +191,7 @@ export function RoomDisplay({ floorState, floor }: RoomDisplayProps) {
|
||||
<div className="text-xs text-gray-500 italic">Room cleared!</div>
|
||||
) : (
|
||||
enemies.map((enemy) => (
|
||||
<EnemyRow key={enemy.id} enemy={enemy} floor={floor} />
|
||||
<EnemyRow key={enemy.id} enemy={enemy} />
|
||||
))
|
||||
)}
|
||||
</CardContent>
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { useCombatStore, useManaStore, canAffordSpellCost, fmt } from '@/lib/game/stores';
|
||||
import { useCombatStore, useManaStore, canAffordSpellCost } from '@/lib/game/stores';
|
||||
import { SPELLS_DEF, ELEMENTS } from '@/lib/game/constants';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Progress } from '@/components/ui/progress';
|
||||
import { GOLEMS_DEF } from '@/lib/game/data/golems';
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ export function SpireCombatPage() {
|
||||
setAction('climb');
|
||||
}, [currentFloor, totalRooms, setCurrentRoom, setAction]);
|
||||
|
||||
const handleRoomCleared = () => {
|
||||
const _handleRoomCleared = () => {
|
||||
const nextRoomIndex = roomsCleared + 1;
|
||||
|
||||
if (nextRoomIndex >= totalRooms) {
|
||||
|
||||
Executable → Regular
+1
-2
@@ -1,7 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { usePrestigeStore, fmt, fmtDec } from '@/lib/game/stores';
|
||||
import { ELEMENTS } from '@/lib/game/constants';
|
||||
import { usePrestigeStore } from '@/lib/game/stores';
|
||||
import { useManaStats, useCombatStats, useStudyStats } from '@/lib/game/hooks/useGameDerived';
|
||||
import { ManaStatsSection } from './StatsTab/ManaStatsSection';
|
||||
import { CombatStatsSection } from './StatsTab/CombatStatsSection';
|
||||
|
||||
@@ -4,7 +4,6 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { FlaskConical } from 'lucide-react';
|
||||
import { ELEMENTS } from '@/lib/game/constants';
|
||||
import { fmt, fmtDec } from '@/lib/game/stores';
|
||||
import { usePrestigeStore, useManaStore } from '@/lib/game/stores';
|
||||
import type { ElementState } from '@/lib/game/types';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user