TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.ModLoader.EquipLoader Class Reference

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...

+ Collaboration diagram for Terraria.ModLoader.EquipLoader:

Static Public Member Functions

static EquipTexture GetEquipTexture (EquipType type, int slot)
 Gets the equipment texture for the specified equipment type and ID.
 
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.
 
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.
 
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.
 
static void EquipFrameEffects (Player player)
 Hook Player.PlayerFrame Calls each of the item's equipment texture's FrameEffects hook.
 

Static Public Attributes

static readonly EquipType[] EquipTypes
 

Static Package Functions

static int ReserveEquipID (EquipType type)
 
static void ResizeAndFillArrays ()
 
static void Unload ()
 
static int GetNumVanilla (EquipType type)
 
static Asset< Texture2D >[] GetTextureArray (EquipType type)
 
static void SetSlot (Item item)
 
static int GetPlayerEquip (Player player, EquipType type)
 

Static Package Attributes

static readonly Dictionary< EquipType, int > nextEquip
 
static readonly Dictionary< EquipType, Dictionary< int, EquipTexture > > equipTextures
 
static readonly Dictionary< int, Dictionary< EquipType, int > > idToSlot
 
static readonly Dictionary< EquipType, Dictionary< int, int > > slotToId
 

Static Private Member Functions

static EquipLoader ()
 

Detailed Description

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.

Definition at line 15 of file EquipLoader.cs.


The documentation for this class was generated from the following file: