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

◆ BiomeTorchHoldStyle()

int Terraria.Player.BiomeTorchHoldStyle ( int style)
inline

Definition at line 39003 of file Player.cs.

39004 {
39005 if (!UsingBiomeTorches || style != 8)
39006 {
39007 return style;
39008 }
39009 if (ZoneShimmer)
39010 {
39011 style = 5353;
39012 }
39013 else if (ZoneLihzhardTemple)
39014 {
39015 style = 4388;
39016 }
39017 else if (ZoneDungeon)
39018 {
39019 style = 3004;
39020 }
39021 else if (position.Y > (float)(Main.UnderworldLayer * 16))
39022 {
39023 style = 433;
39024 }
39025 else if (ZoneHallow)
39026 {
39027 style = 4387;
39028 }
39029 else if (ZoneCorrupt)
39030 {
39031 style = 4385;
39032 }
39033 else if (ZoneCrimson)
39034 {
39035 style = 4386;
39036 }
39037 else if (ZoneSnow)
39038 {
39039 style = 974;
39040 }
39041 else if (ZoneGlowshroom)
39042 {
39043 style = 5293;
39044 }
39045 else if (ZoneJungle)
39046 {
39047 style = 4388;
39048 }
39049 else if ((ZoneDesert && (double)position.Y < Main.worldSurface * 16.0) || ZoneUndergroundDesert)
39050 {
39051 style = 4383;
39052 }
39053 else if (ZoneDesert && Main.remixWorld)
39054 {
39055 style = 4383;
39056 }
39057 if (CurrentSceneEffect.biomeTorchItemType.value > -1)
39058 {
39059 style = CurrentSceneEffect.biomeTorchItemType.value;
39060 }
39061 return style;
39062 }
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
bool ZoneUndergroundDesert
Definition Player.cs:3932
SceneEffectLoader.SceneEffectInstance CurrentSceneEffect
Container for current SceneEffect client properties such as: Backgrounds, music, and water styling.
Definition Player.cs:4612
bool UsingBiomeTorches
Definition Player.cs:4289
bool ZoneLihzhardTemple
Definition Player.cs:4116
bool ZoneGlowshroom
Definition Player.cs:3920

References Terraria.Player.CurrentSceneEffect, Terraria.Entity.position, Terraria.Main.remixWorld, Terraria.Main.UnderworldLayer, Terraria.Player.UsingBiomeTorches, Terraria.Main.worldSurface, Terraria.Player.ZoneCorrupt, Terraria.Player.ZoneCrimson, Terraria.Player.ZoneDesert, Terraria.Player.ZoneDungeon, Terraria.Player.ZoneGlowshroom, Terraria.Player.ZoneHallow, Terraria.Player.ZoneJungle, Terraria.Player.ZoneLihzhardTemple, Terraria.Player.ZoneShimmer, Terraria.Player.ZoneSnow, and Terraria.Player.ZoneUndergroundDesert.

Referenced by Terraria.Player.ItemCheck_EmitHeldItemLight(), and Terraria.Player.PlayerFrame().

+ Here is the caller graph for this function: