Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ GetTextureNPCShouldUse()

Asset< Texture2D > Terraria.GameContent.Profiles.LegacyNPCProfile.GetTextureNPCShouldUse ( NPC npc)
inline

Implements Terraria.GameContent.ITownNPCProfile.

Definition at line 93 of file Profiles.cs.

94 {
95 if (npc.IsABestiaryIconDummy && !npc.ForcePartyHatOn)
96 {
97 return _defaultNoAlt;
98 }
99 if (npc.altTexture == 1)
100 {
101 return _defaultParty;
102 }
103 return _defaultNoAlt;
104 }

References Terraria.GameContent.Profiles.LegacyNPCProfile._defaultNoAlt, Terraria.GameContent.Profiles.LegacyNPCProfile._defaultParty, Terraria.NPC.altTexture, Terraria.NPC.ForcePartyHatOn, and Terraria.NPC.IsABestiaryIconDummy.