Class RecipeConfig
Configuration class for adding custom recipes.
Inheritance
System.Object
RecipeConfig
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Jotunn.Configs
Assembly: Jotunn.dll
Syntax
public class RecipeConfig
Properties
| Improve this Doc View SourceAmount
The amount of Item that will be created from this Recipe. Defaults to
1
.
Declaration
public int Amount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CraftingStation
The name of the crafting station prefab where this recipe can be crafted.
Can be set to
Can be set to
null
to have the recipe be craftable without a crafting station.
Declaration
public string CraftingStation { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Enabled
Whether this recipe is craftable or not. Defaults to true.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item
The name of the item prefab that this recipe should create.
Declaration
public string Item { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MinStationLevel
The minimum required level for the crafting station. Defaults to
1
.
Declaration
public int MinStationLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Name
The unique name for your recipe.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RepairStation
The name of the crafting station prefab where this item can be repaired.
Can be set to
Can be set to
null
to have the recipe be repairable without a crafting station.
Declaration
public string RepairStation { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Requirements
Array of RequirementConfigs for all crafting materials it takes to craft the recipe.
Declaration
public RequirementConfig[] Requirements { get; set; }
Property Value
Type | Description |
---|---|
RequirementConfig[] |
Methods
| Improve this Doc View SourceFromJson(String)
Loads a single RecipeConfig from a JSON string.
Declaration
public static RecipeConfig FromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | JSON text |
Returns
Type | Description |
---|---|
RecipeConfig | Loaded RecipeConfig |
GetRecipe()
Converts the RecipeConfig to a Valheim style Recipe.
Declaration
public Recipe GetRecipe()
Returns
Type | Description |
---|---|
Recipe | The Valheim recipe |
GetRequirements()
Converts the RequirementConfigs to Valheim style Piece.Requirements
Declaration
public Piece.Requirement[] GetRequirements()
Returns
Type | Description |
---|---|
Piece.Requirement[] | The Valheim Piece.Requirement array |
ListFromJson(String)
Loads a list of RecipeConfigs from a JSON string.
Declaration
public static List<RecipeConfig> ListFromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | JSON text |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<RecipeConfig> | Loaded list of RecipeConfigs |