Class InPieProperties
- Namespace
- Vintagestory.GameContent
- Assembly
- VSSurvivalMod.dll
Defines the type of ingredient (crust, filling, topping), food category for mixing, and what mixing codes it can be used with, if any. Open in GitHub
[DocumentAsJson]
public class InPieProperties
- Inheritance
-
InPieProperties
Fields
PartType (Required)
Is this a crust, filling, or topping?
Crust is used as the pie's base. The ingredient used to create a pie must be a crust. Crust can also be used as a topping and is not restricted by mixing codes.
Filling is what's inside the pie. AllowMixing determines if it can only be used for single-ingredient pies. If it can be mixed, only ingredients with at least one matching mixing code can be added.
Pies with only one filling are always named after that ingredient.
Topping is the pie's last layer. Like filling, it is restricted by mixing codes. Any crust may be used in place of a topping without being restricted by mixing codes.
[DocumentAsJson("Required", "", false)]
public required EnumPiePartType PartType
Field Value
- EnumPiePartType
Texture (Required)
[DocumentAsJson("Required", "", false)]
public required AssetLocation Texture
Field Value
AllowMixing (Optional) (Default: true)
Is this filling allowed to mix with other ingredients?
For toppings, set this to false to require mixing codes.
Crusts always ignore this
For fillings MixingCodes has no effect when this is false
because this ingredient cannot be combined with anything else.
Don't add mixing codes to fillings if this is disabled.
[DocumentAsJson("Optional", "true", false)]
public bool AllowMixing
Field Value
FoodCategory (Optional)
The food category of the ingredient when used in a pie. This does
not affect the actual nutrition when consumed. It is only used
to determine which category mixing code to prepend in the case
that the code is not already present.
An ingredient of the NoNutrition category cannot be added to pies unless
it has at least one explicit mixing code or mixing has been disabled.
NoNutrition may be used explicitly, skipping the process below.
Checks in order, stopping once a value is found:
- inPieProperties["foodCategory"]
- If stack has WaterTightContainableProps:
- 2a. NutritionPropsPerLitreWhenInMeal.FoodCategory
- 2b. NutritionPropsPerLitre.FoodCategory
- If stack has NutritionProps:
- 3a. NutritionPropsWhenInMeal.FoodCategory
- 3b. NutritionProps.FoodCategory
- Use NoNutrition. If no nutrition props are present, the InPieProperties are always null.
[DocumentAsJson("Optional", "", false)]
public EnumFoodCategory FoodCategory
Field Value
MixingCodes (Optional) (Default: [])
A list of mixing codes that are allowed for this ingredient. When
checking for mixing codes, the first mixing code present in all
ingredients is used for the pie type. Mixing codes do not apply
to crust ingredients and will be ignored.
If the ingredient's food category is not NoNutrition and the category
code is not already present, it will be prepended. This means that by
default, mixing codes are of a lower priority than the food category.
[ "potpie" ] -> [ "vegetable", "potpie" ]
By including the food category in the list of mixing codes, other codes
can be given a higher priority. For example, the following would create
a "mushroom" mixing code that would take precedence over "vegetable".
[ "mushroom", "vegetable", "potpie" ]
An ingredient may have multiple food category mixing codes. It will be
allowed in any of those mixed pies. Other mixing codes will not be
affected.
If MixingCodes is empty, the food category code will always be added.
It is an error for a NoNutrition ingredient to have no mixing codes
unless it cannot be mixed.
[DocumentAsJson("Optional", "[]", false)]
public string[] MixingCodes
Field Value
- string[]
PortionSize (Optional) (Default: 2)
For items; The number of items in the stack used for one layer.
[DocumentAsJson("Optional", "2", false)]
public int PortionSize
Field Value
PortionSizeLitres (Optional) (Default: 0.1)
For liquids; The number of liters used for one layer.
[DocumentAsJson("Optional", "0.1", false)]
public float PortionSizeLitres
Field Value
ToppingShapeElement (Optional)
The shape to use if this is a topping.
Toppings must have this property to be used.
[DocumentAsJson("Optional", "", false)]
public string? ToppingShapeElement