ModWall
This class represents a type of wall that can be added by a mod. Only one instance of this class will ever exist for each type of wall that is added. Any hooks that are called will be called by the instance corresponding to the wall type.
Methods
- AddMapEntry(Microsoft.Xna.Framework.Color,Terraria.Localization.LocalizedText)()
- Adds an entry to the minimap for this wall with the given color and display name. This should be called in SetDefaults.
- CreateMapEntryName(System.String)()
- Creates a ModTranslation object that you can use in AddMapEntry.
- AddMapEntry(Microsoft.Xna.Framework.Color,Terraria.ModLoader.ModTranslation)()
- Adds an entry to the minimap for this wall with the given color and display name. This should be called in SetDefaults.
- AddMapEntry(Microsoft.Xna.Framework.Color,Terraria.Localization.LocalizedText,System.Func{System.String,System.Int32,System.Int32,System.String})()
- Adds an entry to the minimap for this wall with the given color, default display name, and display name function. The parameters for the function are the default display name, x-coordinate, and y-coordinate. This should be called in SetDefaults.
- AddMapEntry(Microsoft.Xna.Framework.Color,Terraria.ModLoader.ModTranslation,System.Func{System.String,System.Int32,System.Int32,System.String})()
- Adds an entry to the minimap for this wall with the given color, default display name, and display name function. The parameters for the function are the default display name, x-coordinate, and y-coordinate. This should be called in SetDefaults.
- Autoload(System.String@,System.String@)()
- Allows you to modify the name and texture path of this wall when it is autoloaded. Return true to autoload this wall. When a wall is autoloaded, that means you do not need to manually call Mod.AddWall. By default returns the mod's autoload property.
- SetDefaults()
- Allows you to set the properties of this wall. Many properties are stored as arrays throughout Terraria's code.
- KillSound(System.Int32,System.Int32)()
- 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.
- NumDust(System.Int32,System.Int32,System.Boolean,System.Int32@)()
- Allows you to change how many dust particles are created when the wall at the given coordinates is hit.
- CreateDust(System.Int32,System.Int32,System.Int32@)()
- 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 type parameter) from being created. Returns true by default.
- Drop(System.Int32,System.Int32,System.Int32@)()
- Allows you to customize which items the wall at the given coordinates drops. Return false to stop the game from dropping the tile's default item (the type parameter). Returns true by default.
- KillWall(System.Int32,System.Int32,System.Boolean@)()
- Allows you to determine what happens when the tile at the given coordinates is killed or hit with a hammer. Fail determines whether the tile is mined (whether it is killed).
- CanExplode(System.Int32,System.Int32)()
- 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.
- GetMapOption(System.Int32,System.Int32)()
- Allows you to choose which minimap entry the wall at the given coordinates will use. 0 is the first entry added by AddMapEntry, 1 is the second entry, etc. Returns 0 by default.
- ModifyLight(System.Int32,System.Int32,System.Single@,System.Single@,System.Single@)()
- Allows you to determine how much light this wall emits. This can also let you light up the block in front of this wall.
- RandomUpdate(System.Int32,System.Int32)()
- Called whenever the world randomly decides to update the tile containing this wall in a given tick. Useful for things such as growing or spreading.
- AnimateWall(System.Byte@,System.Byte@)()
- Allows you to animate your wall. Use frameCounter to keep track of how long the current frame has been active, and use frame to change the current frame.
- PreDraw(System.Int32,System.Int32,Microsoft.Xna.Framework.Graphics.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.
- PostDraw(System.Int32,System.Int32,Microsoft.Xna.Framework.Graphics.SpriteBatch)()
- Allows you to draw things in front of the wall at the given coordinates.
- PlaceInWorld(System.Int32,System.Int32,Terraria.Item)()
- Called after this wall is placed in the world by way of the item provided.