Class ModCraftTreeLinkingNode
Abstract class that provides methods for adding new nodes into the crafting tree.
public abstract class ModCraftTreeLinkingNode : ModCraftTreeNode
- Inheritance
-
ModCraftTreeLinkingNode
- Derived
- Inherited Members
- Extension Methods
Fields
ChildNodes
The child nodes linked bellow this node.
public readonly List<ModCraftTreeNode> ChildNodes
Field Value
- See Also
Methods
AddCraftingNode(IEnumerable<TechType>)
Creates a collection of new crafting nodes for the crafting tree and links it to the calling node.
public void AddCraftingNode(IEnumerable<TechType> techTypes)
Parameters
techTypesIEnumerable<TechType>- The TechTypes to be crafted.
- See Also
AddCraftingNode(TechType)
Creates a new crafting node for the crafting tree and links it to the calling node.
public void AddCraftingNode(TechType techType)
Parameters
techTypeTechType- The TechType to be crafted.
- See Also
AddCraftingNode(params TechType[])
Creates a collection of new crafting nodes for the crafting tree and links it to the calling node.
public void AddCraftingNode(params TechType[] techTypes)
Parameters
techTypesTechType[]- The TechTypes to be crafted.
- See Also
AddModdedCraftingNode(string)
Creates a new crafting node for a modded item and links it to the calling node.
If the modded item isn't present for the player, this call is safely ignored.
public void AddModdedCraftingNode(string moddedTechTypeName)
Parameters
moddedTechTypeNamestring- The internal name of the custom TechType to be crafted.
Remarks
If the player doesn't have the mod for this TechType installed, then nothing will happen.
- See Also
AddTabNode(string)
Creates a new tab node for the crafting tree and links it to the calling node.
public ModCraftTreeTab AddTabNode(string nameID)
Parameters
nameIDstring- The name/ID of this node.
Returns
- ModCraftTreeTab
- A new tab node linked to the root node and ready to use.
- See Also
AddTabNode(string, string, Sprite, string)
Creates a new tab node for the crafting tree and links it to the calling node.
public ModCraftTreeTab AddTabNode(string nameID, string displayText, Atlas.Sprite sprite, string language = "English")
Parameters
nameIDstring- The name/ID of this node.
displayTextstring- The hover text to display in-game. If null or empty, this will use the language line "{CraftTreeName}_{
nameID}" instead. spriteAtlas.Sprite- The custom sprite to display on this tab node.
languagestring- The language for the display name. Defaults to English.
Returns
- ModCraftTreeTab
- A new tab node linked to the root node and ready to use.
- See Also
AddTabNode(string, string, Sprite, string)
Creates a new tab node for the crafting tree and links it to the calling node.
public ModCraftTreeTab AddTabNode(string nameID, string displayText, Sprite sprite, string language = "English")
Parameters
nameIDstring- The name/ID of this node.
displayTextstring- The hover text to display in-game. If null or empty, this will use the language line "{CraftTreeName}_{
nameID}" instead. spriteSprite- The custom sprite to display on this tab node.
languagestring- The language for the display name. Defaults to English.
Returns
- ModCraftTreeTab
- A new tab node linked to the root node and ready to use.
- See Also
GetCraftingNode(TechType)
Gets the crafting node from the calling node.
public ModCraftTreeCraft GetCraftingNode(TechType techType)
Parameters
techTypeTechType- The TechType whose node to get.
Returns
- See Also
GetNode(string)
Gets the node associated with the ID specified. Used if you don't know whether node is a tab or a craft node.
public ModCraftTreeNode GetNode(string nameID)
Parameters
nameIDstring
Returns
- See Also
GetTabNode(string)
Gets the tab from the calling node.
public ModCraftTreeTab GetTabNode(string nameID)
Parameters
nameIDstring- The name id of the tab to get.
Returns
- See Also