private void AddCraft(List <Pickup> pickups) { Recipe recipe = new Recipe(pickups); int[] ids = new int[8]; int i = 0; foreach (var pickup in recipe.Pickups) { for (int j = 0; j < pickup.Amount; j++) { ids[i] = pickup.Id; i++; } } int item_id = Crafting.CalculateCrafting(ids, Seed); Item existing_item = Items.FirstOrDefault(i => i.Id == item_id); existing_item?.Recipes.Add(recipe); }
public void SetSeed(string seed) { SetSeed(Crafting.StringToSeed(seed)); }