fix: resolve critical bugs - disciplines, debug reset, floating point, spire loop
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Fixes:
- Issue 193: Remove unnecessary useEffect that set activeTab when spireMode is true, and redundant setAction('climb') in SpireCombatPage
- Issue 194: Fix signed_pact prerequisite check in checkDisciplinePrerequisites by accepting signedPacts param; add 'At Limit' feedback on discipline button when concurrent limit reached
- Issue 195: Add resetDisciplines(), resetAttunements(), resetCrafting() calls to createResetGame; add resetCrafting action to crafting store
- Issue 196: Fix floating point display in ElementStatsSection (mana pools) and GameStateDebug (time); fix duplicate 'Base Regen' label in ManaStatsSection
All 917 tests pass. Files stay under 400-line limit.
This commit is contained in:
@@ -3,6 +3,38 @@
|
||||
|
||||
import * as CraftingUtils from '../crafting-utils';
|
||||
import type { EquipmentInstance } from '../types';
|
||||
import type { CraftingState } from './craftingStore.types';
|
||||
|
||||
/**
|
||||
* Create the full default state for the crafting store.
|
||||
* Used by both initial store creation and resetCrafting().
|
||||
*/
|
||||
export function createDefaultCraftingState(): CraftingState {
|
||||
const initial = createInitialEquipmentInstances();
|
||||
return {
|
||||
designProgress: null,
|
||||
designProgress2: null,
|
||||
preparationProgress: null,
|
||||
applicationProgress: null,
|
||||
equipmentCraftingProgress: null,
|
||||
enchantmentDesigns: [],
|
||||
unlockedEffects: [],
|
||||
equippedInstances: initial.equippedInstances,
|
||||
equipmentInstances: initial.instances,
|
||||
lootInventory: {
|
||||
materials: {},
|
||||
blueprints: [],
|
||||
},
|
||||
enchantmentSelection: {
|
||||
selectedEquipmentType: null,
|
||||
selectedEffects: [],
|
||||
designName: '',
|
||||
selectedDesign: null,
|
||||
selectedEquipmentInstance: null,
|
||||
},
|
||||
lastError: null,
|
||||
};
|
||||
}
|
||||
|
||||
export function createInitialEquipmentInstances() {
|
||||
const staffId = CraftingUtils.generateInstanceId();
|
||||
|
||||
Reference in New Issue
Block a user