diff --git a/Items/SummonItems/CryoKey.cs b/Items/SummonItems/CryoKey.cs index 133a7bac1b..642dd3e093 100644 --- a/Items/SummonItems/CryoKey.cs +++ b/Items/SummonItems/CryoKey.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Items.SummonItems { public class CryoKey : ModItem { - // Todo: Change all Main.getGoodWorlds here once 1.4.4 porting has begun public override void SetStaticDefaults() { SacrificeTotal = 1; @@ -59,7 +58,7 @@ namespace CalamityMod.Items.SummonItems public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/CryoKey").Value; - Color overlay = Main.getGoodWorld ? Color.Red : Color.White; + Color overlay = CalamityMod.Instance.legendaryMode ? Color.Red : Color.White; spriteBatch.Draw(texture, position, null, overlay, 0f, origin, scale, 0, 0); return false; } @@ -67,7 +66,7 @@ namespace CalamityMod.Items.SummonItems public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/CryoKey").Value; - Color overlay = Main.getGoodWorld ? Color.Red : lightColor; + Color overlay = CalamityMod.Instance.legendaryMode ? Color.Red : lightColor; spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, overlay, 0f, Vector2.Zero, 1f, 0, 0); return false; } @@ -78,7 +77,7 @@ namespace CalamityMod.Items.SummonItems TooltipLine name = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "ItemName"); TooltipLine line0 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - if (Main.getGoodWorld) + if (CalamityMod.Instance.legendaryMode) { name.Text = "Pyro Key"; line0.Text = "Summons Cryogen when used in the tundra...?"; diff --git a/Items/SummonItems/EyeofDesolation.cs b/Items/SummonItems/EyeofDesolation.cs index 35aeb9ca42..cae85c940f 100644 --- a/Items/SummonItems/EyeofDesolation.cs +++ b/Items/SummonItems/EyeofDesolation.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Items.SummonItems Player player = Main.LocalPlayer; TooltipLine line3 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2"); - if (Main.getGoodWorld) + if (CalamityMod.Instance.legendaryMode) { line3.Text = "Creates a square arena of blocks, with you at its center\nEnrages during the day"; } diff --git a/Items/SummonItems/SandstormsCore.cs b/Items/SummonItems/SandstormsCore.cs index 6474a5d2e1..b7f783eba6 100644 --- a/Items/SummonItems/SandstormsCore.cs +++ b/Items/SummonItems/SandstormsCore.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.SummonItems Player player = Main.LocalPlayer; TooltipLine line0 = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip0"); - if (Main.getGoodWorld) + if (CalamityMod.Instance.legendaryMode) { line0.Text = "Summons the Great Sand Shark when used in the astral desert"; } diff --git a/Items/SummonItems/Terminus.cs b/Items/SummonItems/Terminus.cs index ec58bd393d..c592b8546b 100644 --- a/Items/SummonItems/Terminus.cs +++ b/Items/SummonItems/Terminus.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Items.SummonItems public override void SetDefaults() { Item.rare = ItemRarityID.Blue; - Item.width = Main.getGoodWorld ? 54 : 28; - Item.height = Main.getGoodWorld ? 78 : 28; + Item.width = CalamityMod.Instance.legendaryMode ? 54 : 28; + Item.height = CalamityMod.Instance.legendaryMode ? 78 : 28; Item.useAnimation = 45; Item.useTime = 45; Item.channel = true; @@ -39,7 +39,7 @@ namespace CalamityMod.Items.SummonItems public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { - if (Main.getGoodWorld) + if (CalamityMod.Instance.legendaryMode) { Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value; Color overlay = Color.White; @@ -52,7 +52,7 @@ namespace CalamityMod.Items.SummonItems public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - if (Main.getGoodWorld) + if (CalamityMod.Instance.legendaryMode) { Texture2D texture = ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, 0, 0); @@ -67,7 +67,7 @@ namespace CalamityMod.Items.SummonItems Player player = Main.LocalPlayer; TooltipLine name = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "ItemName"); - if (Main.getGoodWorld) + if (CalamityMod.Instance.legendaryMode) { name.Text = "Ogscule"; } diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index e180fb8247..405bcc45c7 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Boss if (damage <= 0 || Projectile.Opacity != 1f) return; - if (Projectile.ai[0] == 0f || Main.getGoodWorld) + if (Projectile.ai[0] == 0f || CalamityMod.Instance.legendaryMode) target.AddBuff(ModContent.BuffType(), 120); else target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index 6a1d6a2fa1..b07e5755a3 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Boss if (damage <= 0 || Projectile.timeLeft < 51) return; - if (Projectile.ai[0] == 0f || Main.getGoodWorld) + if (Projectile.ai[0] == 0f || CalamityMod.Instance.legendaryMode) target.AddBuff(ModContent.BuffType(), 120); else target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index 2f95c3d692..702c5e6ac2 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Boss if (damage <= 0 || Projectile.Opacity != 1f) return; - if (Projectile.ai[0] == 0f || Main.getGoodWorld) + if (Projectile.ai[0] == 0f || CalamityMod.Instance.legendaryMode) target.AddBuff(ModContent.BuffType(), 120); else target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index 4835d6577f..5cb56691b0 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Boss // If the other projectile is indeed the same owned by the same player and they're too close, nudge them away. bool sameProjType = otherProj.type == Projectile.type; float taxicabDist = Vector2.Distance(Projectile.Center, otherProj.Center); - float distancegate = Main.getGoodWorld ? 360f : 320f; + float distancegate = CalamityMod.Instance.legendaryMode ? 360f : 320f; if (sameProjType && taxicabDist < distancegate) { if (Projectile.position.X < otherProj.position.X) diff --git a/Projectiles/Boss/Flarenado.cs b/Projectiles/Boss/Flarenado.cs index e35fb78962..dea442cab0 100644 --- a/Projectiles/Boss/Flarenado.cs +++ b/Projectiles/Boss/Flarenado.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Boss num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623; Projectile.position.X += num624 * -Projectile.direction; } - if (Projectile.ai[0] == breakThreshold && Main.getGoodWorld) + if (Projectile.ai[0] == breakThreshold && CalamityMod.Instance.legendaryMode) { Projectile.velocity.X = Main.rand.NextBool(2) ? -tornadoSpeed : tornadoSpeed; } diff --git a/Projectiles/Boss/Infernado.cs b/Projectiles/Boss/Infernado.cs index 0845d122be..62672e9667 100644 --- a/Projectiles/Boss/Infernado.cs +++ b/Projectiles/Boss/Infernado.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Boss num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623; Projectile.position.X += num624 * -Projectile.direction; } - if (Projectile.ai[0] == breakThreshold && Main.getGoodWorld) + if (Projectile.ai[0] == breakThreshold && CalamityMod.Instance.legendaryMode) { Projectile.velocity.X = Main.rand.NextBool(2) ? -tornadoSpeed : tornadoSpeed; } diff --git a/Projectiles/Boss/Infernado2.cs b/Projectiles/Boss/Infernado2.cs index 02d81545c4..e1894737c3 100644 --- a/Projectiles/Boss/Infernado2.cs +++ b/Projectiles/Boss/Infernado2.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Boss num624 = (float)(Math.Cos((double)(num622 * -(double)Projectile.ai[0])) - 0.5) * num623; Projectile.position.X += num624 * -Projectile.direction; } - if (Projectile.ai[0] == breakThreshold && Main.getGoodWorld) + if (Projectile.ai[0] == breakThreshold && CalamityMod.Instance.legendaryMode) { Projectile.velocity.X = Main.rand.NextBool(2) ? -tornadoSpeed : tornadoSpeed; }