This serves as a central place to store equipment slots and their corresponding textures. You will use this to obtain the IDs for your equipment textures.
More...
|
static int | AddEquipTexture (Mod mod, string texture, EquipType type, ModItem item=null, string name=null, EquipTexture equipTexture=null) |
| Adds an equipment texture of the specified type, internal name, and/or associated item to your mod.
If no internal name is provided, the associated item's name will be used instead.
You can then get the ID for your texture by calling EquipLoader.GetEquipTexture, and using the EquipTexture's Slot property.
If you need to override EquipmentTexture's hooks, you can specify the class of the equipment texture class. More...
|
|
static void | EquipFrameEffects (Player player) |
| Hook Player.PlayerFrame Calls each of the item's equipment texture's FrameEffects hook.
|
|
static int | GetEquipSlot (Mod mod, string name, EquipType type) |
| Gets the slot/ID of the equipment texture corresponding to the given name. Returns -1 if no EquipTexture with the given name is found. More...
|
|
static EquipTexture | GetEquipTexture (EquipType type, int slot) |
| Gets the equipment texture for the specified equipment type and ID. More...
|
|
static EquipTexture | GetEquipTexture (Mod mod, string name, EquipType type) |
| Gets the EquipTexture instance corresponding to the name and EquipType. Returns null if no EquipTexture with the given name and EquipType is found. More...
|
|
This serves as a central place to store equipment slots and their corresponding textures. You will use this to obtain the IDs for your equipment textures.
static int Terraria.ModLoader.EquipLoader.AddEquipTexture |
( |
Mod |
mod, |
|
|
string |
texture, |
|
|
EquipType |
type, |
|
|
ModItem |
item = null , |
|
|
string |
name = null , |
|
|
EquipTexture |
equipTexture = null |
|
) |
| |
|
static |
Adds an equipment texture of the specified type, internal name, and/or associated item to your mod.
If no internal name is provided, the associated item's name will be used instead.
You can then get the ID for your texture by calling EquipLoader.GetEquipTexture, and using the EquipTexture's Slot property.
If you need to override EquipmentTexture's hooks, you can specify the class of the equipment texture class.
If both an internal name and associated item are provided, the EquipTexture's name will be set to the internal name, alongside the keys for the equipTexture dictionnary.
Additionally, if multiple EquipTextures of the same type are registered for the same item, the first one to be added will be the one automatically displayed on the player and mannequins.
- Parameters
-
mod | The mod the equipment texture is from. |
equipTexture | The equip texture. |
item | The item. |
name | The internal name. |
type | The type. |
texture | The texture. |
- Returns
- the ID / slot that is assigned to the equipment texture.