Beispiel #1
0
 public static void AddItem(FoodItem item)
 {
     if (itemCache == null)
     {
         return;
     }
     itemCache.Add(GetCacheID(item.FoodItemType, item.GetItemId()), item);
 }
Beispiel #2
0
 public Ingredient(Recipe recipe, FoodItem fooditem)
 {
     this.recipe           = recipe;
     this.data             = new IngredientDO();
     data.AmountSelectedDB = fooditem.NewEntryAmount.ToStorageString();
     data.AmountScaleDB    = 1;
     data.ItemId           = fooditem.GetItemId();
     this.item             = fooditem;
     item.NotifyIngredients.Add(this);
     data.OrderId  = recipe.MaxOrderId + 1;
     data.RecipeId = recipe.GetFoodItemId();
 }