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

This class serves as a central place from which NPC head slots are stored and NPC head textures are assigned. This can be used to obtain the corresponding slots to head textures. More...

+ Collaboration diagram for Terraria.ModLoader.NPCHeadLoader:

Static Public Member Functions

static int GetHeadSlot (string texture)
 Gets the index of the head texture corresponding to the given texture path.
 
static int GetBossHeadSlot (string texture)
 Gets the index of the boss head texture corresponding to the given texture path.
 

Static Public Attributes

static readonly int VanillaHeadCount = TextureAssets.NpcHead.Length
 The number of vanilla town NPC head textures that exist.
 
static readonly int VanillaBossHeadCount = TextureAssets.NpcHeadBoss.Length
 The number of vanilla boss head textures that exist.
 

Static Package Functions

static int ReserveHeadSlot ()
 
static int ReserveBossHeadSlot (string texture)
 
static void ResizeAndFillArrays ()
 
static void Unload ()
 
static int GetNPCHeadSlot (int type)
 

Static Package Attributes

static IDictionary< string, int > heads = new Dictionary<string, int>()
 
static IDictionary< string, int > bossHeads = new Dictionary<string, int>()
 
static IDictionary< int, int > npcToHead = new Dictionary<int, int>()
 
static IDictionary< int, int > npcToBossHead = new Dictionary<int, int>()
 

Properties

static int NPCHeadCount [get]
 

Static Private Attributes

static int nextHead = VanillaHeadCount
 
static int nextBossHead = VanillaBossHeadCount
 

Detailed Description

This class serves as a central place from which NPC head slots are stored and NPC head textures are assigned. This can be used to obtain the corresponding slots to head textures.

Definition at line 15 of file NPCHeadLoader.cs.


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