Fix incorrect imports: hasSpecial and SPECIAL_EFFECTS should be imported from special-effects.ts, not upgrade-effects.ts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 40s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 40s
- Fixed src/components/game/GameContext/Provider.tsx - Fixed src/components/game/GameContext/types.ts The upgrade-effects.ts imports these from special-effects.ts but doesn't re-export them.
This commit is contained in:
@@ -21,6 +21,7 @@ import { useCombatStore } from './combatStore';
|
||||
import * as ApplicationActions from '../crafting-actions/application-actions';
|
||||
import * as CraftingApply from '../crafting-apply';
|
||||
import * as PreparationActions from '../crafting-actions/preparation-actions';
|
||||
import * as EquipmentCraftingActions from '../crafting-actions/crafting-equipment-actions';
|
||||
|
||||
export interface CraftingState {
|
||||
// Crafting progress
|
||||
@@ -78,6 +79,10 @@ export interface CraftingActions {
|
||||
// Loot inventory actions
|
||||
deleteMaterial: (materialId: string, amount: number) => void;
|
||||
deleteEquipmentInstance: (instanceId: string) => void;
|
||||
|
||||
// Equipment crafting actions
|
||||
startCraftingEquipment: (blueprintId: string) => boolean;
|
||||
cancelEquipmentCrafting: () => void;
|
||||
}
|
||||
|
||||
export type CraftingStore = CraftingState & CraftingActions;
|
||||
@@ -236,6 +241,34 @@ export const useCraftingStore = create<CraftingStore>()(
|
||||
useCombatStore.setState({ currentAction: 'meditate' });
|
||||
},
|
||||
|
||||
// Equipment crafting actions
|
||||
startCraftingEquipment: (blueprintId: string) => {
|
||||
// Get state needed for equipment crafting
|
||||
const rawMana = useManaStore.getState().rawMana;
|
||||
const currentAction = useCombatStore.getState().currentAction;
|
||||
const lootInventory = get().lootInventory;
|
||||
// Create a temporary state object with all required fields
|
||||
const tempState = {
|
||||
...get(),
|
||||
rawMana,
|
||||
currentAction,
|
||||
lootInventory,
|
||||
} as any;
|
||||
return EquipmentCraftingActions.startCraftingEquipment(
|
||||
blueprintId,
|
||||
() => tempState,
|
||||
set
|
||||
);
|
||||
},
|
||||
|
||||
cancelEquipmentCrafting: () => {
|
||||
EquipmentCraftingActions.cancelEquipmentCrafting(
|
||||
get,
|
||||
set
|
||||
);
|
||||
useCombatStore.setState({ currentAction: 'meditate' });
|
||||
},
|
||||
|
||||
// Loot inventory actions
|
||||
deleteMaterial: (materialId: string, amount: number) => {
|
||||
set((state) => {
|
||||
|
||||
@@ -15,6 +15,8 @@ export const createResetGame = (set: (state: any) => void, initialState: any) =>
|
||||
localStorage.removeItem('mana-loop-skill-storage');
|
||||
localStorage.removeItem('mana-loop-combat-storage');
|
||||
localStorage.removeItem('mana-loop-game-storage');
|
||||
localStorage.removeItem('mana-loop-crafting-storage');
|
||||
localStorage.removeItem('mana-loop-attunement-storage');
|
||||
}
|
||||
|
||||
const startFloor = 1;
|
||||
|
||||
Reference in New Issue
Block a user