Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void SetSeed(string seed)
 {
     SetSeed(Crafting.StringToSeed(seed));
 }