fix: add error logging, missing persist fields, and version to store configs
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
- safe-persist.ts: add console.error logging to setItem catch block (was silently swallowing all errors) - manaStore.ts: add meditateTicks to partialize (was lost on refresh) - combatStore.ts: add currentAction, currentRoom, comboHitCount, floorHitCount, totalSpellsCast, totalDamageDealt, totalCraftsCompleted to partialize - All 8 stores: add version: 1 to persist configs for future schema migration safety Fixes #147
This commit is contained in:
@@ -307,20 +307,28 @@ export const useCombatStore = create<CombatStore>()(
|
||||
{
|
||||
storage: createSafeStorage(),
|
||||
name: 'mana-loop-combat',
|
||||
version: 1,
|
||||
partialize: (state) => ({
|
||||
currentFloor: state.currentFloor,
|
||||
maxFloorReached: state.maxFloorReached,
|
||||
spells: state.spells,
|
||||
activeSpell: state.activeSpell,
|
||||
currentAction: state.currentAction,
|
||||
floorHP: state.floorHP,
|
||||
floorMaxHP: state.floorMaxHP,
|
||||
castProgress: state.castProgress,
|
||||
spireMode: state.spireMode,
|
||||
currentRoom: state.currentRoom,
|
||||
clearedFloors: state.clearedFloors,
|
||||
golemancy: state.golemancy,
|
||||
equipmentSpellStates: state.equipmentSpellStates,
|
||||
comboHitCount: state.comboHitCount,
|
||||
floorHitCount: state.floorHitCount,
|
||||
activityLog: state.activityLog,
|
||||
achievements: state.achievements,
|
||||
totalSpellsCast: state.totalSpellsCast,
|
||||
totalDamageDealt: state.totalDamageDealt,
|
||||
totalCraftsCompleted: state.totalCraftsCompleted,
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user