fix: lootInventory, prestige, golemancy, attunementStore export, debug components
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s

This commit is contained in:
Refactoring Agent
2026-05-05 15:00:22 +02:00
parent f0532c1673
commit ed616738fd
10 changed files with 171 additions and 68 deletions
+14 -5
View File
@@ -3,7 +3,7 @@
'use client';
import { useState } from 'react';
import { useGameStore, usePrestigeStore, useSkillStore, useManaStore } from '@/lib/game/stores';
import { usePrestigeStore, useSkillStore, useManaStore, useCraftingStore } from '@/lib/game/stores';
import { useGameLoop } from '@/lib/game/stores/gameHooks';
import { getUnifiedEffects } from '@/lib/game/effects';
import {
@@ -21,19 +21,28 @@ import { fmt } from '@/lib/game/stores';
export function PrestigeTab() {
const [selectedManaType, setSelectedManaType] = useState<string>('');
const store = useGameStore();
useGameLoop();
const skills = useSkillStore((s) => s.skills);
const prestigeUpgrades = usePrestigeStore((s) => s.prestigeUpgrades);
const rawMana = useManaStore((s) => s.rawMana);
const elements = useManaStore((s) => s.elements);
const skillUpgrades = useSkillStore((s) => s.skillUpgrades);
const skillTiers = useSkillStore((s) => s.skillTiers);
const equipmentInstances = useCraftingStore((s) => s.equipmentInstances);
const equippedInstances = useCraftingStore((s) => s.equippedInstances);
const doPrestige = usePrestigeStore((s) => s.doPrestige);
const upgradeEffects = getUnifiedEffects(store);
const upgradeEffects = getUnifiedEffects({
skillUpgrades,
skillTiers,
equipmentInstances,
equippedInstances,
});
// Get unlocked elements for mana type selector
const unlockedElements = Object.entries(ELEMENTS)
.filter(([id]) => store.elements[id]?.unlocked)
.filter(([id]) => elements[id]?.unlocked)
.map(([id, elem]) => ({
id,
name: elem.name,
@@ -66,7 +75,7 @@ export function PrestigeTab() {
<Button
size="sm"
disabled={!canAfford || level >= def.maxLevel}
onClick={() => store.doPrestige(id)}
onClick={() => doPrestige(id)}
>
{level >= def.maxLevel ? 'Maxed' : `Upgrade (${fmt(def.cost)})`}
</Button>