Esempio n. 1
0
    private void AddBlueprint()
    {
        blueprint.resultItem       = new CraftItem();
        blueprint.resultItem.item  = inventoryDatabase.itemList[resultItemIndex];
        blueprint.resultItem.count = resultItemCount;

        for (int i = 0; i < neededItemIndexes.Count; i++)
        {
            CraftItem neededItem = new CraftItem();
            neededItem.item  = inventoryDatabase.itemList[neededItemIndexes[i]];
            neededItem.count = neededItemCounts[i];
            blueprint.neededItems.Add(neededItem);
        }
        inventoryDatabase.craftBlueprints.Add(new Blueprint(blueprint.resultItem, blueprint.neededItems));

        blueprint.Clear();
        neededItemNumber = 0;
        neededItemIndexes.Clear();
        neededItemCounts.Clear();
    }