fix: remove combat action guard from craftMaterial — material crafting is instant and should work in any combat state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m27s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m27s
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
// Separate file to avoid exceeding the 400-line limit in craftingStore.ts.
|
// Separate file to avoid exceeding the 400-line limit in craftingStore.ts.
|
||||||
|
|
||||||
import { useManaStore } from '../stores/manaStore';
|
import { useManaStore } from '../stores/manaStore';
|
||||||
import { useCombatStore } from '../stores/combatStore';
|
|
||||||
import { useUIStore } from '../stores/uiStore';
|
import { useUIStore } from '../stores/uiStore';
|
||||||
import {
|
import {
|
||||||
getFabricatorRecipe,
|
getFabricatorRecipe,
|
||||||
@@ -19,9 +18,6 @@ export function craftMaterial(
|
|||||||
recipeId: string,
|
recipeId: string,
|
||||||
lootInventoryMaterials: Record<string, number>,
|
lootInventoryMaterials: Record<string, number>,
|
||||||
): CraftMaterialResult {
|
): CraftMaterialResult {
|
||||||
const currentAction = useCombatStore.getState().currentAction;
|
|
||||||
if (currentAction !== 'meditate') return { success: false };
|
|
||||||
|
|
||||||
const recipe = getFabricatorRecipe(recipeId);
|
const recipe = getFabricatorRecipe(recipeId);
|
||||||
if (!recipe || recipe.recipeType !== 'material') return { success: false };
|
if (!recipe || recipe.recipeType !== 'material') return { success: false };
|
||||||
if (!recipe.resultMaterial || !recipe.resultAmount) return { success: false };
|
if (!recipe.resultMaterial || !recipe.resultAmount) return { success: false };
|
||||||
|
|||||||
Reference in New Issue
Block a user