tModLoader v0.11.8.9
A mod to make and play Terraria mods
|
This class allows you to modify the behavior of any wall in the game (although admittedly walls don't have much behavior). Create an instance of an overriding class then call Mod.AddGlobalWall to use this. More...
Public Member Functions | |
virtual bool | Autoload (ref string name) |
Allows you to automatically load a GlobalWall instead of using Mod.AddGlobalWall. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name. Use this method to either force or stop an autoload or to control the internal name. More... | |
virtual bool | CanExplode (int i, int j, int type) |
Whether or not the wall at the given coordinates can be killed by an explosion (ie. bombs). Returns true by default; return false to stop an explosion from destroying it. More... | |
virtual bool | CreateDust (int i, int j, int type, ref int dustType) |
Allows you to modify the default type of dust created when the wall at the given coordinates is hit. Return false to stop the default dust (the dustType parameter) from being created. Returns true by default. More... | |
virtual bool | Drop (int i, int j, int type, ref int dropType) |
Allows you to customize which items the wall at the given coordinates drops. Return false to stop the game from dropping the wall's default item (the dropType parameter). Returns true by default. More... | |
virtual bool | KillSound (int i, int j, int type) |
Allows you to customize which sound you want to play when the wall at the given coordinates is hit. Return false to stop the game from playing its default sound for the wall. Returns true by default. More... | |
virtual void | KillWall (int i, int j, int type, ref bool fail) |
Allows you to determine what happens when the wall at the given coordinates is killed or hit with a hammer. Fail determines whether the wall is mined (whether it is killed). More... | |
virtual void | ModifyLight (int i, int j, int type, ref float r, ref float g, ref float b) |
Allows you to determine how much light the wall emits. This can also let you light up the block in front of the wall. More... | |
virtual void | NumDust (int i, int j, int type, bool fail, ref int num) |
Allows you to change how many dust particles are created when the wall at the given coordinates is hit. More... | |
virtual void | PlaceInWorld (int i, int j, int type, Item item) |
Called after this wall type was placed in the world by way of the item provided. More... | |
virtual void | PostDraw (int i, int j, int type, SpriteBatch spriteBatch) |
Allows you to draw things in front of the wall at the given coordinates. More... | |
virtual bool | PreDraw (int i, int j, int type, SpriteBatch spriteBatch) |
Allows you to draw things behind the wall at the given coordinates. Return false to stop the game from drawing the wall normally. Returns true by default. More... | |
virtual void | RandomUpdate (int i, int j, int type) |
Called for every wall the world randomly decides to update in a given tick. Useful for things such as growing or spreading. More... | |
virtual void | SetDefaults () |
Allows you to modify the properties of any wall in the game. Most properties are stored as arrays throughout the Terraria code. More... | |
Properties | |
Mod | mod [get, set] |
The mod to which this GlobalWall belongs. More... | |
string | Name [get, set] |
The name of this GlobalWall instance. More... | |
This class allows you to modify the behavior of any wall in the game (although admittedly walls don't have much behavior). Create an instance of an overriding class then call Mod.AddGlobalWall to use this.
Definition at line 8 of file GlobalWall.cs.
|
virtual |
Allows you to automatically load a GlobalWall instead of using Mod.AddGlobalWall. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name. Use this method to either force or stop an autoload or to control the internal name.
Definition at line 29 of file GlobalWall.cs.
References Terraria.ModLoader.ModProperties.Autoload, Terraria.ModLoader.GlobalWall.mod, and Terraria.ModLoader.Mod.Properties.
Referenced by Terraria.ModLoader.Mod.AutoloadGlobalWall().
|
virtual |
Whether or not the wall at the given coordinates can be killed by an explosion (ie. bombs). Returns true by default; return false to stop an explosion from destroying it.
Definition at line 75 of file GlobalWall.cs.
|
virtual |
Allows you to modify the default type of dust created when the wall at the given coordinates is hit. Return false to stop the default dust (the dustType parameter) from being created. Returns true by default.
Definition at line 55 of file GlobalWall.cs.
|
virtual |
Allows you to customize which items the wall at the given coordinates drops. Return false to stop the game from dropping the wall's default item (the dropType parameter). Returns true by default.
Definition at line 62 of file GlobalWall.cs.
|
virtual |
Allows you to customize which sound you want to play when the wall at the given coordinates is hit. Return false to stop the game from playing its default sound for the wall. Returns true by default.
Definition at line 42 of file GlobalWall.cs.
|
virtual |
Allows you to determine what happens when the wall at the given coordinates is killed or hit with a hammer. Fail determines whether the wall is mined (whether it is killed).
Definition at line 69 of file GlobalWall.cs.
|
virtual |
Allows you to determine how much light the wall emits. This can also let you light up the block in front of the wall.
Definition at line 82 of file GlobalWall.cs.
|
virtual |
Allows you to change how many dust particles are created when the wall at the given coordinates is hit.
Definition at line 49 of file GlobalWall.cs.
|
virtual |
Called after this wall type was placed in the world by way of the item provided.
Definition at line 107 of file GlobalWall.cs.
|
virtual |
Allows you to draw things in front of the wall at the given coordinates.
Definition at line 101 of file GlobalWall.cs.
|
virtual |
Allows you to draw things behind the wall at the given coordinates. Return false to stop the game from drawing the wall normally. Returns true by default.
Definition at line 94 of file GlobalWall.cs.
|
virtual |
Called for every wall the world randomly decides to update in a given tick. Useful for things such as growing or spreading.
Definition at line 88 of file GlobalWall.cs.
|
virtual |
Allows you to modify the properties of any wall in the game. Most properties are stored as arrays throughout the Terraria code.
Definition at line 36 of file GlobalWall.cs.
|
getset |
The mod to which this GlobalWall belongs.
Definition at line 13 of file GlobalWall.cs.
Referenced by Terraria.ModLoader.GlobalWall.Autoload().
|
getset |
The name of this GlobalWall instance.
Definition at line 21 of file GlobalWall.cs.
Referenced by Terraria.ModLoader.Mod.AutoloadGlobalWall().