コード例 #1
0
    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));
        }
    }
コード例 #2
0
    public void StoreCompletedCraftingSequence()
    {
        if (activeSequence.IsValid())
        {
            Debug.Log(activeSequence.ToString());
            activeSequence.RegisterSuccessfulSequenceConclusion();
            completedCraftingSequences.Push(activeSequence);

            activeSequence = new CraftingSequence();
            progressTracker.RegisterCraftingSequenceProgress(completedCraftingSequences.Peek());
        }

        activeSequence.ClearSequence();
    }