Class CookingRecipe
- Namespace
- Vintagestory.GameContent
- Assembly
- VSSurvivalMod.dll
Defines a recipe to be made using a cooking pot. Creating a new recipe for a cooking pot will automatically register the new meal item, unless using CooksInto.
public class CookingRecipe
- Inheritance
-
CookingRecipe
Examples
{
"code": "jam",
"perishableProps": {
"freshHours": { "avg": 1080 },
"transitionHours": { "avg": 180 },
"transitionRatio": 1,
"transitionedStack": {
"type": "item",
"code": "rot"
}
},
"shape": { "base": "block/food/meal/jam" },
"ingredients": [
{
"code": "honey",
"validStacks": [
{
"type": "item",
"code": "honeyportion",
"shapeElement": "bowl/honey",
"cookedStack": {
"type": "item",
"code": "jamhoneyportion"
}
}
],
"minQuantity": 2,
"maxQuantity": 2,
"portionSizeLitres": 0.2
},
{
"code": "fruit",
"validStacks": [
{
"type": "item",
"code": "fruit-*",
"shapeElement": "bowl/fruit"
}
],
"minQuantity": 2,
"maxQuantity": 2
}
]
}
Fields
Code (Required)
A unique code for the recipe and meal created.
public string Code
Field Value
Ingredients (Required)
A list of ingredients for the recipe. Although cooking pots have a maximum of 4 unique entries, there is no limit on the number of potential ingredients.
public CookingRecipeIngredient[] Ingredients
Field Value
PerishableProps (Required)
The transitionable properties for the meal item. Usually controls meal expiry.
public TransitionableProperties PerishableProps
Field Value
Shape (Required)
A path to the shape file for this meal when inside a cooking pot. Specific ingredient-based elements can be enabled using the ShapeElement in the ingredient stacks.
public CompositeShape Shape
Field Value
CooksInto (Optional) (Default: None)
If set, will treat the recipe not as a meal with its ingredients retained but convert the ingredients into supplied itemstack.
public JsonItemStack CooksInto
Field Value
Enabled (Optional) (Default: True)
Should this recipe be loaded by the game?
public bool Enabled