TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ GetHeadSlot()

static int Terraria.ModLoader.NPCHeadLoader.GetHeadSlot ( string texture)
inlinestatic

Gets the index of the head texture corresponding to the given texture path.

Parameters
textureRelative texture path
Returns
The index of the texture in the heads array, -1 if not found.

Definition at line 60 of file NPCHeadLoader.cs.

61 {
62 if (!heads.TryGetValue(texture, out var slot))
63 {
64 return -1;
65 }
66 return slot;
67 }
static IDictionary< string, int > heads

References Terraria.ModLoader.NPCHeadLoader.heads.

Referenced by Terraria.ModLoader.ModContent.GetModHeadSlot().

+ Here is the caller graph for this function: