fix: resolve all Priority 4 and Priority 3 issues (18 issues total)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s

Priority 4 fixes:
- #50: getUnlockedAttunements filter now only returns active attunements
- #48: doPrestige return type changed from void to boolean
- #47: ConfirmDialog now catches and displays async errors from onConfirm
- #46: GameStateDebug Fill Mana now uses direct setState instead of loop
- #55: DisciplinesTab statBonus/baseValue props verified correct
- #56: DisciplinesTab tab filtering verified working

Priority 3 fixes:
- #45: drain spell description changed from 'life force' to 'vital energy'
- #44: removed banned 'ascension' skill category
- #43: renamed lifeEssenceDrop to vitalityEssenceDrop
- #42: pactMaster achievement requirement changed from 12 to 9
- #40: golems/utils.ts and equipment/utils.ts now import from index
- #39: removed duplicate RoomType from constants/rooms.ts
- #38: consolidated EquipmentSlot type in types/equipmentSlot.ts
- #37: removed duplicate EnchantmentEffectDef from spell-effects/types.ts
- #36: renamed RARITY_COLORS in loot-drops.ts to LOOT_RARITY_COLORS
This commit is contained in:
2026-05-18 20:09:54 +02:00
parent 4f932b6810
commit 594eec1ab4
22 changed files with 53 additions and 84 deletions
+9
View File
@@ -87,6 +87,7 @@ export function ConfirmDialog({
destructive = false,
}: ConfirmDialogProps) {
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const Icon = VARIANT_ICONS[variant];
const titleColor = VARIANT_TITLE_COLORS[variant];
@@ -94,9 +95,12 @@ export function ConfirmDialog({
const handleConfirm = async () => {
setIsLoading(true);
setError(null);
try {
await onConfirm();
onOpenChange(false);
} catch (e) {
setError(e instanceof Error ? e.message : 'Action failed');
} finally {
setIsLoading(false);
}
@@ -118,6 +122,11 @@ export function ConfirmDialog({
<AlertDialogDescription className="text-[var(--text-secondary)]">
{description}
</AlertDialogDescription>
{error && (
<div className="mt-2 rounded-md bg-red-900/30 border border-red-700/50 px-3 py-2 text-sm text-red-300">
{error}
</div>
)}
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel
+1 -1
View File
@@ -12,7 +12,7 @@ import {
} from 'lucide-react';
import { ElementBadge } from '@/components/ui/element-badge';
import type { LootInventory as LootInventoryType, EquipmentInstance, ElementState } from '@/lib/game/types';
import { LOOT_DROPS, RARITY_COLORS } from '@/lib/game/data/loot-drops';
import { LOOT_DROPS, LOOT_RARITY_COLORS } from '@/lib/game/data/loot-drops';
import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment';
import { ELEMENTS } from '@/lib/game/constants';
import { useGameToast } from '@/components/game/GameToast';
+1 -1
View File
@@ -2,7 +2,7 @@
import { useState } from 'react';
import type { LootInventory as LootInventoryType, EquipmentInstance, ElementState } from '@/lib/game/types';
import { LOOT_DROPS, RARITY_COLORS } from '@/lib/game/data/loot-drops';
import { LOOT_DROPS } from '@/lib/game/data/loot-drops';
import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment';
import { ELEMENTS } from '@/lib/game/constants';
@@ -8,7 +8,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
import { Separator } from '@/components/ui/separator';
import { Package, Sparkles, Trash2, Anvil } from 'lucide-react';
import { CRAFTING_RECIPES, canCraftRecipe } from '@/lib/game/data/crafting-recipes';
import { LOOT_DROPS, RARITY_COLORS } from '@/lib/game/data/loot-drops';
import { LOOT_DROPS, LOOT_RARITY_COLORS } from '@/lib/game/data/loot-drops';
import type { EquipmentInstance, AppliedEnchantment, LootInventory, EquipmentCraftingProgress } from '@/lib/game/types';
import { fmt } from '@/lib/game/stores';
import { useCraftingStore, useCombatStore, useManaStore } from '@/lib/game/stores';
@@ -65,7 +65,7 @@ export function EquipmentCrafter() {
rawMana
);
const rarityStyle = RARITY_COLORS[recipe.rarity];
const rarityStyle = LOOT_RARITY_COLORS[recipe.rarity];
return (
<div
@@ -160,7 +160,7 @@ export function EquipmentCrafter() {
const drop = LOOT_DROPS[matId];
if (!drop) return null;
const rarityStyle = RARITY_COLORS[drop.rarity];
const rarityStyle = LOOT_RARITY_COLORS[drop.rarity];
return (
<div
+1 -4
View File
@@ -159,10 +159,7 @@ export function GameStateDebug() {
className="w-full bg-blue-600 hover:bg-blue-700"
onClick={() => {
const max = getMaxMana() || 100;
const current = rawMana;
for (let i = 0; i < Math.floor(max - current); i++) {
gatherMana();
}
useManaStore.setState((s) => ({ rawMana: Math.max(s.rawMana, max) }));
}}
>
Fill Mana