diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index f0bf371..8375689 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,8 +1,8 @@ # Circular Dependencies -Generated: 2026-05-16T09:52:18.323Z +Generated: 2026-05-17T06:14:10.695Z Found: 7 circular chain(s) — these MUST be fixed before modifying involved files. -1. Processed 138 files (1.3s) (36 warnings) +1. Processed 150 files (3.1s) (37 warnings) 2. 1) data/equipment/index.ts > data/equipment/utils.ts 3. 2) data/golems/index.ts > data/golems/utils.ts 4. 3) stores/combat-actions.ts > stores/combatStore.ts diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index ff39ff8..cc4c05c 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-05-16T09:52:16.800Z", + "generated": "2026-05-17T06:14:07.009Z", "description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.", "usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry." }, @@ -203,6 +203,26 @@ "data/crafting-recipes.ts": [ "types.ts" ], + "data/disciplines/base-disciplines.ts": [], + "data/disciplines/base.ts": [ + "types/disciplines.ts" + ], + "data/disciplines/enchanter-disciplines.ts": [], + "data/disciplines/enchanter.ts": [ + "types/disciplines.ts" + ], + "data/disciplines/fabricator-disciplines.ts": [ + "types/disciplines.ts" + ], + "data/disciplines/fabricator.ts": [ + "types/disciplines.ts" + ], + "data/disciplines/invoker-disciplines.ts": [ + "types/disciplines.ts" + ], + "data/disciplines/invoker.ts": [ + "types/disciplines.ts" + ], "data/enchantment-effects.ts": [ "data/enchantments/index.ts" ], @@ -348,11 +368,17 @@ ], "effects.ts": [ "data/enchantment-effects.ts", + "effects/discipline-effects.ts", "special-effects.ts", "types.ts", "upgrade-effects.ts", "upgrade-effects.types.ts" ], + "effects/discipline-effects.ts": [ + "stores/discipline-slice.ts", + "types.ts", + "utils/discipline-math.ts" + ], "formatting.ts": [ "computed-stats.ts" ], @@ -565,6 +591,14 @@ "types.ts", "upgrade-effects.ts" ], + "stores/discipline-slice.ts": [ + "data/disciplines/base.ts", + "data/disciplines/enchanter.ts", + "data/disciplines/fabricator.ts", + "data/disciplines/invoker.ts", + "types/disciplines.ts", + "utils/discipline-math.ts" + ], "stores/gameActions.ts": [ "stores/combatStore.ts", "stores/manaStore.ts", @@ -635,6 +669,7 @@ "upgrade-effects.ts" ], "types.ts": [ + "data/equipment/types.ts", "types/attunements.ts", "types/elements.ts", "types/equipment.ts", @@ -642,6 +677,9 @@ "types/spells.ts" ], "types/attunements.ts": [], + "types/disciplines.ts": [ + "types/elements.ts" + ], "types/elements.ts": [], "types/equipment.ts": [], "types/game.ts": [ @@ -675,6 +713,9 @@ "data/enchantment-effects.ts", "types.ts" ], + "utils/discipline-math.ts": [ + "types/disciplines.ts" + ], "utils/enemy-utils.ts": [ "constants.ts", "types.ts", diff --git a/docs/project-structure.txt b/docs/project-structure.txt index 9587c5a..cc82175 100644 --- a/docs/project-structure.txt +++ b/docs/project-structure.txt @@ -315,6 +315,7 @@ Mana-Loop/ │ │ │ ├── disciplines.ts │ │ │ ├── elements.ts │ │ │ ├── equipment.ts +│ │ │ ├── equipmentSlot.ts │ │ │ ├── game.ts │ │ │ ├── index.ts │ │ │ └── spells.ts diff --git a/src/components/game/crafting/EnchantmentPreparer.tsx b/src/components/game/crafting/EnchantmentPreparer.tsx index e08abc0..688edae 100644 --- a/src/components/game/crafting/EnchantmentPreparer.tsx +++ b/src/components/game/crafting/EnchantmentPreparer.tsx @@ -11,7 +11,8 @@ import { Separator } from '@/components/ui/separator'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog'; import { Trash2, CheckCircle, AlertTriangle } from 'lucide-react'; import { EQUIPMENT_TYPES } from '@/lib/game/data/equipment'; -import type { EquipmentInstance, AppliedEnchantment, LootInventory, EquipmentCraftingProgress, EquipmentSlot } from '@/lib/game/types'; +import type { EquipmentInstance, AppliedEnchantment, LootInventory, EquipmentCraftingProgress } from '@/lib/game/types'; +import type { EquipmentSlot } from '@/lib/game/data/equipment'; import { fmt } from '@/lib/game/stores'; import { useGameStore, useCraftingStore, useManaStore, useSkillStore } from '@/lib/game/stores'; import { useGameToast } from '@/components/game/GameToast'; diff --git a/src/lib/game/crafting-slice.ts b/src/lib/game/crafting-slice.ts index 4183ce1..1273ff6 100755 --- a/src/lib/game/crafting-slice.ts +++ b/src/lib/game/crafting-slice.ts @@ -4,7 +4,8 @@ // crafting-apply, crafting-equipment, crafting-loot, crafting-attunements. import type { GameState, EquipmentInstance, AppliedEnchantment, EnchantmentDesign, DesignEffect, EquipmentCraftingProgress, LootInventory, AttunementState } from './types'; -import { EQUIPMENT_TYPES, type EquipmentSlot } from './data/equipment'; +import { EQUIPMENT_TYPES } from './data/equipment'; +import type { EquipmentSlot } from './data/equipment'; import { ENCHANTMENT_EFFECTS, calculateEffectCapacityCost } from './data/enchantment-effects'; import { CRAFTING_RECIPES, canCraftRecipe, type CraftingRecipe } from './data/crafting-recipes'; import { SPELLS_DEF } from './constants'; diff --git a/src/lib/game/data/crafting-recipes.ts b/src/lib/game/data/crafting-recipes.ts index f9f2a0b..c4d86d0 100755 --- a/src/lib/game/data/crafting-recipes.ts +++ b/src/lib/game/data/crafting-recipes.ts @@ -1,7 +1,7 @@ // ─── Crafting Recipes ───────────────────────────────────────────────────────── // Defines what materials are needed to craft equipment from blueprints -import type { EquipmentSlot } from '../types'; +import type { EquipmentSlot } from './equipment/types'; export interface CraftingRecipe { id: string; // Blueprint ID (matches loot drop) diff --git a/src/lib/game/types/equipmentSlot.ts b/src/lib/game/types/equipmentSlot.ts new file mode 100644 index 0000000..9f4292a --- /dev/null +++ b/src/lib/game/types/equipmentSlot.ts @@ -0,0 +1,12 @@ +// EquipmentSlot type definition +export type EquipmentSlot = + | "mainHand" + | "offHand" + | "head" + | "body" + | "hands" + | "accessory" + | "accessory1" + | "accessory2"; + +// Export barrel from index diff --git a/src/lib/game/types/index.ts b/src/lib/game/types/index.ts index 842d37e..0805a66 100644 --- a/src/lib/game/types/index.ts +++ b/src/lib/game/types/index.ts @@ -37,7 +37,8 @@ export type { EquipmentCraftingProgress, EquipmentSpellState, BlueprintDef, - LootInventory + LootInventory, + EquipmentSlot } from './equipment'; // Game state types @@ -57,3 +58,21 @@ export type { ActivityEventType, ActivityLogEntry, } from './game'; + +// Game state types +export type { + RoomType, + EnemyState, + FloorState, + AchievementDef, + AchievementState, + GameAction, + ScheduleBlock, + StudyTarget, + SummonedGolem, + GolemancyState, + GameState, + GameActionType, + ActivityEventType, + ActivityLogEntry, +} from './game';