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

◆ ChooseStyle()

override void Terraria.ModLoader.SurfaceBackgroundStylesLoader.ChooseStyle ( out int style,
out SceneEffectPriority priority )
inlinevirtual

Reimplemented from Terraria.ModLoader.SceneEffectLoader< ModSurfaceBackgroundStyle >.

Definition at line 32 of file SurfaceBackgroundStylesLoader.cs.

33 {
34 priority = SceneEffectPriority.None;
35 style = -1;
36 if (loaded && GlobalBackgroundStyleLoader.loaded)
37 {
38 int playerSurfaceBackground = Main.LocalPlayer.CurrentSceneEffect.surfaceBackground.value;
39 if (playerSurfaceBackground >= base.VanillaCount)
40 {
42 priority = Main.LocalPlayer.CurrentSceneEffect.surfaceBackground.priority;
43 }
44 }
45 }

References Terraria.ModLoader.GlobalBackgroundStyleLoader.loaded, Terraria.ModLoader.SurfaceBackgroundStylesLoader.loaded, and Terraria.Main.LocalPlayer.