public void CheckRequirement() { var requiredItems = RecipeManager.GetItemRequirement(currentItem.Code); var slotRequirements = requiredItems.Count; if (CookingEntity.SlotRequiredLevel(slotRequirements) > CookingEntity.NeededSkillLevel) { SetVisibility(SlotLock); return; } if (RecipeManager.HaveEnoughIngredients(currentRecipe, AvailableIngredients)) { SetVisibility(Available); if (!SeenRecipes.Contains(currentItem.Code)) { SeenRecipes.Add(currentItem.Code); } } else { SetVisibility(CookedRecipes.Contains(currentItem.Code) || SeenRecipes.Contains(currentItem.Code) ? Locked : Hidden); } }
public void CheckRequirement() { float multiplier = 1; _price = GetTotalCost() * multiplier; if (CookedRecipes.Contains(currentItem.Code) || currentItem.Code == ItemCode.Jelly) { SetVisibility(_price <= Stats.Money ? Available : Locked); } else { SetVisibility(SlotLock); } SetSelectAction(Cook); }