fix: resolve 7 circular dependency chains in src/lib/game
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 57s

- equipment/utils.ts: import directly from individual equipment modules instead of index.ts
- golems/utils.ts: import directly from individual golem modules instead of index.ts
- combatStore.ts: extract CombatState to combat-state.types.ts, remove debugSetTime (was only user of gameStore import)
- combat-actions.ts: import CombatState from combat-state.types.ts instead of combatStore
- stores/index.ts: re-export CombatState from combat-state.types.ts
- GameStateDebug.tsx: replace debugSetTime calls with direct useGameStore.setState()

Verification: bunx madge --circular src/lib/game → No circular dependency found!
This commit is contained in:
2026-05-18 14:46:57 +02:00
parent ea3035ec5e
commit 084fea2a25
8 changed files with 148 additions and 115 deletions
+21 -1
View File
@@ -1,7 +1,27 @@
// ─── Equipment Helper Functions ─────────────────────────
import type { EquipmentType, EquipmentSlot, EquipmentCategory } from './types';
import { EQUIPMENT_TYPES } from './index';
import { ACCESSORIES_EQUIPMENT } from './accessories';
import { BODY_EQUIPMENT } from './body';
import { CASTER_EQUIPMENT } from './casters';
import { CATALYST_EQUIPMENT } from './catalysts';
import { FEET_EQUIPMENT } from './feet';
import { HANDS_EQUIPMENT } from './hands';
import { HEAD_EQUIPMENT } from './head';
import { SHIELD_EQUIPMENT } from './shields';
import { SWORD_EQUIPMENT } from './swords';
const EQUIPMENT_TYPES: Record<string, EquipmentType> = {
...ACCESSORIES_EQUIPMENT,
...BODY_EQUIPMENT,
...CASTER_EQUIPMENT,
...CATALYST_EQUIPMENT,
...FEET_EQUIPMENT,
...HANDS_EQUIPMENT,
...HEAD_EQUIPMENT,
...SHIELD_EQUIPMENT,
...SWORD_EQUIPMENT,
};
export function getEquipmentType(id: string): EquipmentType | undefined {
return EQUIPMENT_TYPES[id];