void FilterUncraftableRecipes(CraftingSequence sequence) { if (sequence.IsValid()) { int actionId = sequence.actionItemObject.Item.itemId; int targetId = sequence.targetItemObject.Item.itemId; recipeStepsTaken.FilterOut(r => !r.CraftableWithItemAmount(actionId, 1) || !r.CraftableWithItemAmount(targetId, 1)); } }
public void StoreCompletedCraftingSequence() { if (activeSequence.IsValid()) { Debug.Log(activeSequence.ToString()); activeSequence.RegisterSuccessfulSequenceConclusion(); completedCraftingSequences.Push(activeSequence); activeSequence = new CraftingSequence(); progressTracker.RegisterCraftingSequenceProgress(completedCraftingSequences.Peek()); } activeSequence.ClearSequence(); }