From 14ba02d98794391d59b42b61bbac295b2d688325 Mon Sep 17 00:00:00 2001 From: n8n-gitea Date: Mon, 18 May 2026 14:51:38 +0200 Subject: [PATCH] fix: remove debugSetTime and useGameStore import from combatStore to break remaining circular deps --- docs/circular-deps.txt | 15 ++++++--------- docs/dependency-graph.json | 23 +++++++++++++++++++---- src/lib/game/stores/combatStore.ts | 5 +---- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index dc50e4d..6f7c4be 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,14 +1,11 @@ # Circular Dependencies -Generated: 2026-05-18T12:22:03.557Z -Found: 7 circular chain(s) — these MUST be fixed before modifying involved files. +Generated: 2026-05-18T12:47:02.133Z +Found: 4 circular chain(s) — these MUST be fixed before modifying involved files. -1. Processed 121 files (1.2s) (30 warnings) -2. 1) data/equipment/index.ts > data/equipment/utils.ts -3. 2) data/golems/index.ts > data/golems/utils.ts -4. 3) stores/combatStore.ts > stores/combat-actions.ts -5. 4) stores/combatStore.ts > stores/gameStore.ts -6. 5) stores/combatStore.ts > stores/gameStore.ts > stores/gameActions.ts -7. 6) stores/combatStore.ts > stores/gameStore.ts > stores/gameLoopActions.ts +1. Processed 122 files (1.3s) (30 warnings) +2. 1) stores/combatStore.ts > stores/gameStore.ts +3. 2) stores/combatStore.ts > stores/gameStore.ts > stores/gameActions.ts +4. 3) stores/combatStore.ts > stores/gameStore.ts > stores/gameLoopActions.ts ## How to fix 1. Identify which import in the chain can be extracted to a shared types/utils file. diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index 07a0e0f..7ac7d22 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-05-18T12:22:02.104Z", + "generated": "2026-05-18T12:47:00.491Z", "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." }, @@ -318,7 +318,15 @@ ], "data/equipment/types.ts": [], "data/equipment/utils.ts": [ - "data/equipment/index.ts", + "data/equipment/accessories.ts", + "data/equipment/body.ts", + "data/equipment/casters.ts", + "data/equipment/catalysts.ts", + "data/equipment/feet.ts", + "data/equipment/hands.ts", + "data/equipment/head.ts", + "data/equipment/shields.ts", + "data/equipment/swords.ts", "data/equipment/types.ts" ], "data/golems/base-golems.ts": [ @@ -339,7 +347,9 @@ ], "data/golems/types.ts": [], "data/golems/utils.ts": [ - "data/golems/index.ts", + "data/golems/base-golems.ts", + "data/golems/elemental-golems.ts", + "data/golems/hybrid-golems.ts", "data/golems/types.ts" ], "data/loot-drops.ts": [ @@ -395,13 +405,17 @@ ], "stores/combat-actions.ts": [ "constants.ts", - "stores/combatStore.ts", + "stores/combat-state.types.ts", "stores/prestigeStore.ts", "types.ts", "utils/index.ts" ], + "stores/combat-state.types.ts": [ + "types.ts" + ], "stores/combatStore.ts": [ "stores/combat-actions.ts", + "stores/combat-state.types.ts", "stores/gameStore.ts", "stores/prestigeStore.ts", "types.ts", @@ -471,6 +485,7 @@ "stores/index.ts": [ "constants.ts", "stores/attunementStore.ts", + "stores/combat-state.types.ts", "stores/combatStore.ts", "stores/craftingStore.ts", "stores/gameHooks.ts", diff --git a/src/lib/game/stores/combatStore.ts b/src/lib/game/stores/combatStore.ts index 81167ae..b1c59bc 100755 --- a/src/lib/game/stores/combatStore.ts +++ b/src/lib/game/stores/combatStore.ts @@ -6,7 +6,6 @@ import { persist } from 'zustand/middleware'; import type { GameAction, SpellState, FloorState, GolemancyState, ActivityLogEntry, AchievementState, EquipmentSpellState, ActivityEventType } from '../types'; import { getFloorMaxHP } from '../utils'; import { usePrestigeStore } from './prestigeStore'; -import { useGameStore } from './gameStore'; import { generateFloorState } from '../utils/room-utils'; import { addActivityLogEntry } from '../utils/activity-log'; import { processCombatTick, makeInitialSpells } from './combat-actions'; @@ -267,9 +266,7 @@ export const useCombatStore = create()( })); }, - debugSetTime: (day: number, hour: number) => { - useGameStore.setState({ day, hour }); - }, + }), { name: 'mana-loop-combat',