Cleaned up backgrounds
This commit is contained in:
1 parent
440e500cbc
commit
769efc53cd
6 files changed
+37
-79
No files matched your search
@@ -1,31 +1,21 @@
|
||||
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralDesertSurfaceBGStyle : ModSurfaceBgStyle
|
||||
{
|
||||
public override int ChooseFarTexture()
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralDesertSurfaceFar");
|
||||
}
|
||||
public override int ChooseMiddleTexture()
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralDesertSurfaceMiddle");
|
||||
}
|
||||
public override int ChooseFarTexture() => mod.GetBackgroundSlot("Backgrounds/AstralDesertSurfaceFar");
|
||||
|
||||
public override int ChooseMiddleTexture() => mod.GetBackgroundSlot("Backgrounds/AstralDesertSurfaceMiddle");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
b -= 75f;
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralDesertSurfaceClose");
|
||||
}
|
||||
|
||||
public override bool ChooseBgStyle()
|
||||
{
|
||||
return !Main.gameMenu && Main.LocalPlayer.GetModPlayer<CalamityPlayer>(mod).ZoneAstral && Main.LocalPlayer.ZoneDesert;
|
||||
}
|
||||
public override bool ChooseBgStyle() => !Main.gameMenu && Main.LocalPlayer.InAstral() && Main.LocalPlayer.ZoneDesert;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
|
||||
@@ -1,30 +1,17 @@
|
||||
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSnowSurfaceBGStyle : ModSurfaceBgStyle
|
||||
{
|
||||
public override int ChooseFarTexture()
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralSnowSurfaceFar");
|
||||
}
|
||||
public override int ChooseMiddleTexture()
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralSnowSurfaceMiddle");
|
||||
}
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralSurfaceClose");
|
||||
}
|
||||
public override int ChooseFarTexture() => mod.GetBackgroundSlot("Backgrounds/AstralSnowSurfaceFar");
|
||||
|
||||
public override bool ChooseBgStyle()
|
||||
{
|
||||
return !Main.gameMenu && Main.LocalPlayer.GetModPlayer<CalamityPlayer>(mod).ZoneAstral && Main.LocalPlayer.ZoneSnow;
|
||||
}
|
||||
public override int ChooseMiddleTexture() => mod.GetBackgroundSlot("Backgrounds/AstralSnowSurfaceMiddle");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => mod.GetBackgroundSlot("Backgrounds/AstralSurfaceClose");
|
||||
|
||||
public override bool ChooseBgStyle() => !Main.gameMenu && Main.LocalPlayer.InAstral() && Main.LocalPlayer.ZoneSnow;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSurfaceBGStyle : ModSurfaceBgStyle
|
||||
{
|
||||
public override int ChooseFarTexture()
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralSurfaceFar");
|
||||
}
|
||||
public override int ChooseMiddleTexture()
|
||||
{
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralSurfaceMiddle");
|
||||
}
|
||||
public override int ChooseFarTexture() => mod.GetBackgroundSlot("Backgrounds/AstralSurfaceFar");
|
||||
|
||||
public override int ChooseMiddleTexture() => mod.GetBackgroundSlot("Backgrounds/AstralSurfaceMiddle");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
scale *= 0.75f;
|
||||
return mod.GetBackgroundSlot("Backgrounds/AstralSurfaceClose");
|
||||
}
|
||||
|
||||
public override bool ChooseBgStyle()
|
||||
{
|
||||
return !Main.gameMenu && Main.LocalPlayer.GetModPlayer<CalamityPlayer>(mod).ZoneAstral && !Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow;
|
||||
}
|
||||
public override bool ChooseBgStyle() => !Main.gameMenu && Main.LocalPlayer.InAstral() && !Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralUndergroundBGStyle : ModUgBgStyle
|
||||
{
|
||||
public override bool ChooseBgStyle() => Main.LocalPlayer.InAstral();
|
||||
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
for (int i = 0; i <= 3; i++)
|
||||
{
|
||||
textureSlots[i] = mod.GetBackgroundSlot("Backgrounds/AstralUG" + i.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class ExampleUgBgStyle : ModUgBgStyle
|
||||
{
|
||||
public override bool ChooseBgStyle()
|
||||
{
|
||||
return Main.LocalPlayer.GetModPlayer<CalamityPlayer>().ZoneAstral;
|
||||
}
|
||||
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
textureSlots[0] = mod.GetBackgroundSlot("Backgrounds/AstralUG0");
|
||||
textureSlots[1] = mod.GetBackgroundSlot("Backgrounds/AstralUG1");
|
||||
textureSlots[2] = mod.GetBackgroundSlot("Backgrounds/AstralUG2");
|
||||
textureSlots[3] = mod.GetBackgroundSlot("Backgrounds/AstralUG3");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
using CalamityMod.CalPlayer;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class SulphurSeaSurfaceBGStyle : ModSurfaceBgStyle
|
||||
@@ -13,10 +11,7 @@ namespace CalamityMod.Backgrounds
|
||||
return mod.GetBackgroundSlot("Backgrounds/SulphurSeaSurfaceClose");
|
||||
}
|
||||
|
||||
public override bool ChooseBgStyle()
|
||||
{
|
||||
return !Main.gameMenu && Main.LocalPlayer.GetModPlayer<CalamityPlayer>(mod).ZoneSulphur;
|
||||
}
|
||||
public override bool ChooseBgStyle() => !Main.gameMenu && Main.LocalPlayer.InSulphur();
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user