tModLoader v2024.10
A mod to make and play Terraria mods
ModCactus Class Referenceabstract

This class represents a type of modded cactus. This class encapsulates a function for retrieving the cactus's texture and an array for type of soil it grows on. More...

Inherits IPlant.

Public Member Functions

abstract Asset< Texture2D > GetFruitTexture ()
 The fruit texture has a special layout that needs to be followed, see ExampleCactus_Fruit.png in ExampleMod for a template.
 
abstract Asset< Texture2D > GetTexture ()
 
abstract void SetStaticDefaults ()
 
- Public Member Functions inherited from IPlant
abstract Asset< Texture2D > GetTexture ()
 
void ILoadable. Load (Mod mod)
 Called when loading the type. More...
 
abstract void SetStaticDefaults ()
 
void ILoadable. Unload ()
 Called during unloading when needed. More...
 
- Public Member Functions inherited from ILoadable
virtual bool IsLoadingEnabled (Mod mod)
 Whether or not this type should be loaded when it's told to. Returning false disables Mod.AddContent from actually loading this type. More...
 
abstract void Load (Mod mod)
 Called when loading the type. More...
 
abstract void Unload ()
 Called during unloading when needed. More...
 

Properties

int[] GrowsOnTileId [get, set]
 
int PlantTileId [get]
 The cactus will share a tile ID with the vanilla cacti (80), so that the cacti can freely convert between each other if the sand below is converted. More...
 
int VanillaCount [get]
 
- Properties inherited from IPlant
int[] GrowsOnTileId [get, set]
 
int PlantTileId [get]
 
int VanillaCount [get]
 

Detailed Description

This class represents a type of modded cactus. This class encapsulates a function for retrieving the cactus's texture and an array for type of soil it grows on.

Member Function Documentation

◆ GetTexture()

abstract Asset< Texture2D > ModCactus.GetTexture ( )
pure virtual

Implements IPlant.

◆ SetStaticDefaults()

abstract void ModCactus.SetStaticDefaults ( )
pure virtual

Implements IPlant.

Property Documentation

◆ GrowsOnTileId

int [] ModCactus.GrowsOnTileId
getset

Implements IPlant.

◆ PlantTileId

int ModCactus.PlantTileId
get

The cactus will share a tile ID with the vanilla cacti (80), so that the cacti can freely convert between each other if the sand below is converted.

Implements IPlant.

◆ VanillaCount

int ModCactus.VanillaCount
get

Implements IPlant.