Files
Mana-Loop/src/lib/game/stores/index.ts
T
n8n-gitea 8a7ddaae27
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
refactor: split bloated state types into State + Actions interfaces (issue #102)
- CombatState: split into CombatState (data) + CombatActions + CombatStore
- PrestigeState: split into PrestigeState (data) + PrestigeActions + PrestigeStore
- ManaState: split into ManaState (data) + ManaActions + ManaStore
- GameState: deprecated, removed from barrel exports
- crafting-actions: updated to use CraftingState instead of GameState
- combat-utils/mana-utils: replaced Pick<GameState,...> with focused interfaces
- DisciplineCardProps: split into Definition + Runtime + Callbacks
- stores/index.ts: now exports both State and Actions types
2026-05-20 21:05:22 +02:00

50 lines
1.7 KiB
TypeScript
Executable File

// ─── Store Index ──────────────────────────────────────────
// Exports all stores and re-exports commonly used utilities
// Stores
export { useUIStore } from './uiStore';
export type { UIState } from './uiStore';
export { usePrestigeStore } from './prestigeStore';
export type { PrestigeState, PrestigeActions, PrestigeStore } from './prestigeStore';
export { useManaStore, makeInitialElements } from './manaStore';
export type { ManaState, ManaActions, ManaStore } from './manaStore';
export { useCombatStore, makeInitialSpells } from './combatStore';
export type { CombatState, CombatActions, CombatStore } from './combat-state.types';
export { useCraftingStore } from './craftingStore';
export type { CraftingState, CraftingActions } from './craftingStore.types';
export { useAttunementStore } from './attunementStore';
export type { AttunementStoreState } from './attunementStore';
export { useDisciplineStore } from './discipline-slice';
export type { DisciplineStoreState, DisciplineStoreActions, DisciplineStore } from './discipline-slice';
export { useGameStore } from './gameStore';
export { useGameLoop } from './gameHooks';
export type { GameCoordinatorState, GameCoordinatorStore } from './gameStore';
// Re-export utilities from utils.ts and computed-stats
export {
fmt,
fmtDec,
getFloorMaxHP,
getFloorElement,
computeMaxMana,
computeRegen,
computeEffectiveRegen,
computeClickMana,
getMeditationBonus,
getBoonBonuses,
calcDamage,
calcInsight,
getIncursionStrength,
canAffordSpellCost,
deductSpellCost,
} from '../utils';
export { getStudySpeedMultiplier, getStudyCostMultiplier } from '../constants';