From e3c4fd98ce1e3302b39769e6c2ea7b4842aa2e09 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 Jul 2026 15:09:12 -0400 Subject: [PATCH] Removed a ton of deadcode --- CalPlayer/CalamityPlayer.cs | 2 +- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- CalPlayer/CalamityPlayerOnHit.cs | 4 +- ILEditing/MechanicILChanges.cs | 8 -- Items/CalamityGlobalItemTooltip.cs | 8 -- Items/Fishing/StuffedFish.cs | 25 ---- Items/Tools/SpawnBlocker/AntiCystOintment.cs | 39 ------ Items/Tools/SpawnBlocker/AntiTumorOintment.cs | 39 ------ Items/Tools/SpawnBlocker/BleachBall.cs | 39 ------ Items/Tools/SpawnBlocker/BrokenWaterFilter.cs | 39 ------ .../Tools/SpawnBlocker/SirenproofEarMuffs.cs | 39 ------ .../SpawnBlocker/VoodooDemonVoodooDoll.cs | 39 ------ Items/Weapons/Magic/UndinesRetribution.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 13 -- NPCs/ExoMechs/Ares/AresBody.cs | 8 -- NPCs/NormalNPCs/WulfrumRover.cs | 15 --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 77 ----------- Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs | 16 --- Projectiles/Boss/CalamitousFireball.cs | 10 +- Projectiles/Boss/CataclysmicFlame.cs | 56 +------- .../DraedonsArsenal/AerialTrackerLaser.cs | 13 -- Projectiles/Enemy/JellyghoulBolt.cs | 11 -- Projectiles/Magic/ClimaxBeam.cs | 9 -- Projectiles/Magic/LightningArc.cs | 28 ---- Projectiles/Magic/LuxorsGiftMagic.cs | 9 +- Projectiles/Melee/CosmicIceBurst.cs | 5 - Projectiles/Melee/CrystylCrusherRay.cs | 8 +- .../Melee/ExaltedOathbladeThrownBlade.cs | 20 --- Projectiles/Melee/ExobladeProj.cs | 17 --- Projectiles/Melee/RoxcaliburProj.cs | 24 ++-- .../Melee/Yoyos/BurningRevelationYoyo.cs | 12 -- Projectiles/Pets/ChibiiDoggo.cs | 10 -- Projectiles/Pets/DannyDevitoPet.cs | 47 ------- Projectiles/Rogue/WrathwingCinder.cs | 9 -- Projectiles/Summon/HydrothermicVent.cs | 9 -- Projectiles/Typeless/AscendantAura.cs | 19 --- .../Mechanic/TilePingerSystem.PingEffects.cs | 27 ---- Tiles/Crags/ScorchedRemainsGrass.cs | 123 +----------------- Tiles/FurnitureAshen/AshenAccentSlab.cs | 117 ----------------- Tiles/FurnitureAshen/AshenSlab.cs | 117 ----------------- .../OtherworldlyStone.cs | 123 +----------------- Tiles/UelibloomBrick.cs | 123 +----------------- Tiles/VernalSoil.cs | 123 +----------------- Walls/UnsafeWalls/UnsafeAstralGrassWall.cs | 5 - World/SunkenSea.cs | 61 --------- 45 files changed, 38 insertions(+), 1511 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index d3fe2b6ce4..a1a8fa4a7d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5318,7 +5318,7 @@ namespace CalamityMod.CalPlayer EnhancedDarknessSystem.lights.Add(new(lastDeerclopsPosition.Value, scale: DeerclopsAI.borderScale, texture: DeerclopsAI.ArenaTex.Value)); //we draw light around the player when far away so they have some visibility, although very small. This is especially nice in multiplayer. we scale opacity with distance bc it looks better - EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / (409600 /*640^2*/), 0, 1))); + EnhancedDarknessSystem.lights.Add(new EnhancedDarknessSystem.LightSource(scale: 0.75f, opacity: MathHelper.Clamp(Main.LocalPlayer.DistanceSQ(lastDeerclopsPosition.Value) / 409600, 0, 1))); if (darknessIntensity == 0) { diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 5579e5a77b..3f03418614 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -556,7 +556,7 @@ namespace CalamityMod.CalPlayer } } - public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers)/* tModPorter If you don't need the Projectile, consider using ModifyHitNPC instead */ + public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers) { if (proj.npcProj || proj.trap) return; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f80ed26df4..2839ac6342 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -62,7 +62,7 @@ namespace CalamityMod.CalPlayer #endregion #region On Hit NPC - public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Item, consider using OnHitNPC instead */ + public override void OnHitNPCWithItem(Item item, NPC target, NPC.HitInfo hit, int damageDone) { if (Player.whoAmI != Main.myPlayer) return; @@ -207,7 +207,7 @@ namespace CalamityMod.CalPlayer #endregion #region On Hit NPC With Proj - public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone)/* tModPorter If you don't need the Projectile, consider using OnHitNPC instead */ + public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone) { if (Player.whoAmI != Main.myPlayer) return; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index bab9586447..e1954175c9 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -237,14 +237,6 @@ namespace CalamityMod.ILEditing dir = self.direction; dashing = true; - // CIT 16OCT2024: Commented this code out, as there's no reason for custom dash hotkey to use Player.dashTime - // and was causing the return of Celestial Starboard's dash bug from early 1.4 versions - /*if ((self.dashTime <= 0 && self.direction == -1) || (self.dashTime >= 0 && self.direction == 1)) - { - self.dashTime = 15; - return; - }*/ - dashing = true; self.dashTime = 0; self.timeSinceLastDashStarted = 0; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index ed39fe7901..1ff8523654 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -1669,14 +1669,6 @@ namespace CalamityMod.Items return false; } - - // Rainbow effect originally made for Orderbringer because it used to have a special rarity - // But why did it have one in the first place?? - // Might be used for Miracle stuff later or something idk - /*if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType()) - { - - }*/ return true; } #endregion diff --git a/Items/Fishing/StuffedFish.cs b/Items/Fishing/StuffedFish.cs index 658d83fb17..4ee77f6e42 100644 --- a/Items/Fishing/StuffedFish.cs +++ b/Items/Fishing/StuffedFish.cs @@ -112,31 +112,6 @@ namespace CalamityMod.Items.Fishing } else CalamityMod.Log.Warn("Could not find either Marine Kelp or Marine Kelp Seeds from Thorium. These items will not be added to Stuffed Fish."); - - // Ozzatron 30DEC2022: It is unlikely SoA will ever be ported to 1.4 and beyond. Commenting this out indefinitely. - /* - Mod soa = CalamityMod.Instance.soa; - if (soa is not null) - { - try - { - itemLoot.Add(soa.Find("Welkinbell").Type, 4, herbMin, herbMax); - itemLoot.Add(soa.Find("WelkinbellSeeds").Type, 10, seedMin, seedMax); - - itemLoot.AddIf(() => Main.hardMode, soa.Find("Illumifern").Type, 4, herbMin, herbMax); - itemLoot.AddIf(() => Main.hardMode, soa.Find("IllumifernSeeds").Type, 10, seedMin, seedMax); - - // TODO -- There is no way to determine if SoA's Abaddon is dead without reflection. - // Dan Yami has confirmed that downed calls will be added to SoA eventually. - //itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find("Enduflora").Type, 4, herbMin, herbMax); - //itemLoot.AddIf(() => SacredTools.ModdedWorld.downedAbaddon, soa.Find("EndufloraSeeds").Type, 10, seedMin, seedMax); - } - catch - { - CalamityMod.Log.Debug("One of the items in this file got renamed internally. Please report this in the #bugs-read-pins channel of the official Calamity discord server."); - } - } - */ } public override void ModifyTooltips(List list) diff --git a/Items/Tools/SpawnBlocker/AntiCystOintment.cs b/Items/Tools/SpawnBlocker/AntiCystOintment.cs index 08abe17ffe..113db25d9e 100644 --- a/Items/Tools/SpawnBlocker/AntiCystOintment.cs +++ b/Items/Tools/SpawnBlocker/AntiCystOintment.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disablePerfCystSpawns |= Enabled; } - /* - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - - return false; - } - - public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/AntiCystOintment").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - return false; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Tools/SpawnBlocker/AntiTumorOintment.cs b/Items/Tools/SpawnBlocker/AntiTumorOintment.cs index 564dc8d4c3..97b59f6657 100644 --- a/Items/Tools/SpawnBlocker/AntiTumorOintment.cs +++ b/Items/Tools/SpawnBlocker/AntiTumorOintment.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableHiveCystSpawns |= Enabled; } - /* - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - - return false; - } - - public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/AntiTumorOintment").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - return false; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Tools/SpawnBlocker/BleachBall.cs b/Items/Tools/SpawnBlocker/BleachBall.cs index c2c6df1948..1cf4051fc4 100644 --- a/Items/Tools/SpawnBlocker/BleachBall.cs +++ b/Items/Tools/SpawnBlocker/BleachBall.cs @@ -61,45 +61,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableNaturalScourgeSpawns |= Enabled; } - /* - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - - return false; - } - - public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/BleachBall").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - return false; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs b/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs index 9740d03c89..5efb08dac3 100644 --- a/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs +++ b/Items/Tools/SpawnBlocker/BrokenWaterFilter.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().noStupidNaturalARSpawns |= Enabled; } - /* - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - - return false; - } - - public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/BrokenWaterFilter").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - return false; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs b/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs index 29c1e1e10d..f467ff0e9c 100644 --- a/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs +++ b/Items/Tools/SpawnBlocker/SirenproofEarMuffs.cs @@ -60,45 +60,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableAnahitaSpawns |= Enabled; } - /* - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - - return false; - } - - public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/SirenproofEarMuffs").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - return false; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs b/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs index dd57546bb3..910e38e235 100644 --- a/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs +++ b/Items/Tools/SpawnBlocker/VoodooDemonVoodooDoll.cs @@ -62,45 +62,6 @@ namespace CalamityMod.Items.Tools.SpawnBlocker player.Calamity().disableVoodooSpawns |= Enabled; } - /* - public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; - spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0); - } - - return false; - } - - public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) - { - Texture2D texture; - - if (state) - { - //Replace with enabled texture - texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - else - { - texture = ModContent.Request("CalamityMod/Items/VoodooDemonVoodooDoll").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); - } - return false; - } - */ - public override void ModifyTooltips(List tooltips) { string text; diff --git a/Items/Weapons/Magic/UndinesRetribution.cs b/Items/Weapons/Magic/UndinesRetribution.cs index 2213a85c36..24d5d80277 100644 --- a/Items/Weapons/Magic/UndinesRetribution.cs +++ b/Items/Weapons/Magic/UndinesRetribution.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Magic } for (int i = 0; i < 3; i++) { - realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); //- realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 realPlayerPos.Y += (float)(100 * i); //-= mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; //+ - diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index fed2affc2e..ce811e5e71 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -640,12 +640,6 @@ namespace CalamityMod.NPCs.DevourerofGods string key = "Mods.CalamityMod.Status.Boss.DoGPhase2"; Color messageColor = Color.Cyan; CalamityUtils.BroadcastLocalizedText(key, messageColor); - /* - var ctid = CombatText.NewText(NPC.Hitbox, messageColor, Language.GetTextValue(key), true); - if (ctid < Main.maxCombatText) - player.Calamity().subtitletext = Main.combatText[ctid]; - player.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia }; - */ DialogueDisplaySystem.StartDialogue("Mods.CalamityMod.DevourerOfGods.Phases", NPC, 2, 120, false, new BossText()); } } @@ -1477,13 +1471,6 @@ namespace CalamityMod.NPCs.DevourerofGods string key = "Mods.CalamityMod.Status.Boss.DoGSubphase1"; Color messageColor = Color.Cyan; CalamityUtils.BroadcastLocalizedText(key, messageColor); - - /* - int ctid = CombatText.NewText(NPC.Hitbox, messageColor, Language.GetTextValue(key), true); - if (ctid < Main.maxCombatText) - player.Calamity().subtitletext = Main.combatText[ctid]; - player.Calamity().subtitleColors = new Color[] { Color.Cyan, Color.Fuchsia }; - */ DialogueDisplaySystem.StartDialogue("Mods.CalamityMod.DevourerOfGods.Phases", NPC, 1, 120, false, new BossText()); } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index a254f33078..724c6f8fa0 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -504,14 +504,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares draedonAlive = true; } - // Prevent mechs from being respawned - // CIT 08JUN2025: This code is pointless and makes me unable to work swapping the laser arm position. Commenting it out. - /*if (otherExoMechWasFirst) - { - if (NPC.ai[3] < 1f) - NPC.ai[3] = 1f; - }*/ - // Phases bool spawnOtherExoMechs = lifeRatio < 0.7f && NPC.ai[3] == 0f; bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index 592183f14f..3d2a46c076 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -194,21 +194,6 @@ namespace CalamityMod.NPCs.NormalNPCs { if (Supercharged) { - //old - /* - Texture2D shieldTexture = ModContent.Request("CalamityMod/NPCs/NormalNPCs/WulfrumRoverShield").Value; - Rectangle frame = shieldTexture.Frame(1, 11, 0, (int)(Main.GlobalTimeWrappedHourly * 8) % 11); - spriteBatch.Draw(shieldTexture, - NPC.Center - screenPos + Vector2.UnitY * (NPC.gfxOffY + 6f), - frame, - Color.White * 0.625f, - NPC.rotation, - shieldTexture.Size() * 0.5f / new Vector2(1f, 11f), - NPC.scale + (float)Math.Cos(Main.GlobalTimeWrappedHourly) * 0.1f, - SpriteEffects.None, - 0f); - */ - //0.6 : The noise upscale //0.15 the scale its drawn at usually, 0.2 on Zenith float scale = (Main.zenithWorld ? 0.2f : 0.15f) + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + NPC.whoAmI * 0.2f)); diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 01165da0e4..5117b1748a 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -1805,83 +1805,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.noTileCollide = false; NPC.noGravity = false; NPC.damage = 0; - - /* - // Teleport back to the arena on defeat - if (giveUpCounter == GiveUpCounterMax) - { - Dust.QuickDustLine(NPC.Center, initialRitualPosition + new Vector2(0, -30), 500f, permafrost ? Color.Cyan : Color.Red); - NPC.Center = initialRitualPosition + new Vector2(0, -30); - NPC.noTileCollide = false; - NPC.noGravity = false; - NPC.damage = 0; - SoundEngine.PlaySound(GiveUpSound with { Volume = 1.7f }, NPC.Center); - } - if (giveUpCounter == 1010) - { - Particle pulse2 = new StaticPulseRing(NPC.Center, Vector2.Zero, Color.Red * 0.55f, new Vector2(1f, 1f), 0f, 5f, 0f, 47); - GeneralParticleHandler.SpawnParticle(pulse2); - } - - if (shieldOpacity > 0f) - shieldOpacity = 0; - if (giveUpCounter > 1000) - forcefieldScale = MathHelper.Lerp(forcefieldScale, 1.55f, 0.045f); - else if (giveUpCounter > 960) - forcefieldScale = MathHelper.Lerp(forcefieldScale, 0.4f, 0.085f); - - if (giveUpCounter > 960) - { - for (int i = 0; i < 2; i++) - { - Vector2 sparkVel = new Vector2(15, 15).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.1f); - GlowOrbParticle orb = new GlowOrbParticle(NPC.Center + sparkVel * (8 * forcefieldScale), sparkVel * Utils.GetLerpValue(1200, 960, giveUpCounter, true), false, 60, Main.rand.NextFloat(0.7f, 1.7f) * Utils.GetLerpValue(1200, 960, giveUpCounter), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true); - GeneralParticleHandler.SpawnParticle(orb); - } - - float vibrate = 15 * Utils.GetLerpValue(1200, 960, giveUpCounter, true); - NPC.Center = (initialRitualPosition + new Vector2(0, -30)) + Main.rand.NextVector2Circular(vibrate, vibrate); - } - else - { - if (giveUpCounter == 960) - { - NPC.Center = initialRitualPosition + new Vector2(0, -30); - - Vector2 BurstFXDirection = new Vector2(0, 15); - for (int i = 0; i < 4; i++) - { - SparkParticle spark = new SparkParticle(NPC.Center, (BurstFXDirection) * (i + 1), false, 11, (5f - i * 0.6f) * 3, Color.Lerp(Color.Red, Color.Magenta, Utils.GetLerpValue(-3, 3, i)) * 0.8f); - GeneralParticleHandler.SpawnParticle(spark); - } - for (int i = 0; i < 4; i++) - { - SparkParticle spark = new SparkParticle(NPC.Center, (-BurstFXDirection) * (i + 1), false, 11, (5f - i * 0.6f) * 3, Color.Lerp(Color.Red, Color.Magenta, Utils.GetLerpValue(-3, 3, i)) * 0.8f); - GeneralParticleHandler.SpawnParticle(spark); - } - - Particle orb = new CustomPulse(NPC.Center, Vector2.Zero, Color.Red, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.2f, 1.1f, 13); - GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new CustomPulse(NPC.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1f, 0.9f, 13); - GeneralParticleHandler.SpawnParticle(orb2); - for (int i = 0; i < 4; i++) - { - Particle orb3 = new CustomPulse(NPC.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.9f, 0.8f, 13); - GeneralParticleHandler.SpawnParticle(orb3); - } - - for (int i = 0; i < 30; i++) - { - GlowOrbParticle burst = new GlowOrbParticle(NPC.Center, (new Vector2(30, 30).RotatedByRandom(100) + new Vector2(0, -2)) * Main.rand.NextFloat(0.1f, 1.2f), true, 120, Main.rand.NextFloat(1.7f, 2.7f), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true); - GeneralParticleHandler.SpawnParticle(burst); - } - - NPC.velocity = new Vector2(18 * NPC.spriteDirection, -12); - giveUpCounter = GiveUpCounterMax; - hasDoneDeathAnim = true; - } - } - */ } else { diff --git a/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs b/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs index 59747e4788..5459c7f056 100644 --- a/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs +++ b/Projectiles/Boss/BrainOfCthulhu/CrimsonEye.cs @@ -158,22 +158,6 @@ public class CrimsonEye : ModProjectile, ILocalizedModType if (DistanceRatio > 0) { - /* - Main.spriteBatch.SetBlendState(BlendState.Additive); - - Texture2D tex = ModContent.Request("CalamityMod/Particles/HollowCircleHardEdge").Value; - Color color = Color.Red * DistanceRatio; - if (Time <= 65) - color *= (Time - 45) / 20f; - - if (Projectile.timeLeft <= 20) - color *= Projectile.timeLeft / 20f; - - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, color, 0f, tex.Size() * 0.5f, 1.75f, 0); - - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - */ - float opacity = DistanceRatio; if (Time <= 65) opacity *= (Time - 45) / 20f; diff --git a/Projectiles/Boss/CalamitousFireball.cs b/Projectiles/Boss/CalamitousFireball.cs index 03c0f5dcb0..3de7c71ac7 100644 --- a/Projectiles/Boss/CalamitousFireball.cs +++ b/Projectiles/Boss/CalamitousFireball.cs @@ -91,14 +91,6 @@ namespace CalamityMod.Projectiles.Boss target.AddBuff(ModContent.BuffType(), 240); } - public override bool PreDraw(ref Color lightColor) - { - return false; - - /* - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - */ - } + public override bool PreDraw(ref Color lightColor) => false; } } diff --git a/Projectiles/Boss/CataclysmicFlame.cs b/Projectiles/Boss/CataclysmicFlame.cs index 60179713e4..59ecbb93b0 100644 --- a/Projectiles/Boss/CataclysmicFlame.cs +++ b/Projectiles/Boss/CataclysmicFlame.cs @@ -106,60 +106,6 @@ namespace CalamityMod.Projectiles.Boss } } - public override bool PreDraw(ref Color lightColor) - { - return false; - - /* - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; - - // The conga line of colors to sift through - Color color1 = new Color(255, 110, 100, 200); - Color color2 = new Color(255, 50, 50, 70); - Color color3 = new Color(255, 100, 100, 100); - Color color4 = new Color(200, 35, 30, 100); - float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); - float vOffset = Math.Min(Time, 20f); - float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); - float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f); - - if (timeRatio >= 1f) - return false; - - for (float j = 1f; j >= 0f; j -= length) - { - // Color - Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) : - ((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) : - ((timeRatio < 0.35f) ? color2 : - ((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) : - ((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) : - Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio))))))); - fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true); - Color innerColor = Color.Lerp(fireColor, Color.Black, 0.3f); - - // Positions and rotations - Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; - float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; - float trailRot = MathHelper.PiOver4 - mainRot; - - // Draw one backtrail - Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f; - Main.EntitySpriteDraw(fire, firePos - trailOffset, null, innerColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); - - // Draw the main fire - Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); - - // Draw the masking smoke - Main.spriteBatch.SetBlendState(BlendState.Additive); - Rectangle frame = mist.Frame(1, 3, 0, MistType); - Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); - Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None); - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - } - return false; - */ - } + public override bool PreDraw(ref Color lightColor) => false; } } diff --git a/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs b/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs index 22e3b48d87..e3b3d53418 100644 --- a/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs +++ b/Projectiles/DraedonsArsenal/AerialTrackerLaser.cs @@ -88,19 +88,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal modifiers.HideCombatText(); } - public override void OnKill(int timeLeft) - { - /* - for (int i = 0; i < 7; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, 267); - dust.velocity = (Projectile.velocity * 3 * Projectile.scale).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 1f); - dust.scale = Main.rand.NextFloat(0.4f, 0.7f) * Projectile.scale; - dust.noGravity = true; - dust.color = Color.Red; - } - */ - } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) { overPlayers.Add(index); diff --git a/Projectiles/Enemy/JellyghoulBolt.cs b/Projectiles/Enemy/JellyghoulBolt.cs index d023799517..b9d14552b4 100644 --- a/Projectiles/Enemy/JellyghoulBolt.cs +++ b/Projectiles/Enemy/JellyghoulBolt.cs @@ -89,17 +89,6 @@ namespace CalamityMod.Projectiles.Enemy Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; int projFrame = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = projFrame * Projectile.frame; - - /*Main.spriteBatch.EnterShaderRegion(BlendState.Additive); - Texture2D ring = ModContent.Request("CalamityMod/Particles/HollowCircleHardEdge").Value; - for (int j = 0; j < 2; j++) - { - for (int i = 2; i < 7; i += 2) - { - Main.spriteBatch.Draw(ring, Projectile.oldPos[i] + Projectile.Size / 2 - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), null, Color.Red * Projectile.Opacity, Projectile.velocity.ToRotation(), ring.Size() / 2, new Vector2(0.5f, 1) * 0.2f * MathHelper.Lerp(1f, 0.5f, (i - 2) / 3f), SpriteEffects.None, 0); - } - } - Main.spriteBatch.ExitShaderRegion();*/ return false; } public float SlashWidthFunction(float _, Vector2 vertexPos) => 16 * Utils.GetLerpValue(0f, 0.1f, _, true); diff --git a/Projectiles/Magic/ClimaxBeam.cs b/Projectiles/Magic/ClimaxBeam.cs index aec84744d8..3c11255b6c 100644 --- a/Projectiles/Magic/ClimaxBeam.cs +++ b/Projectiles/Magic/ClimaxBeam.cs @@ -29,15 +29,6 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - /* - Vector2 projPos = Projectile.position; - projPos -= Projectile.velocity * 0.25f; - int boltDust = Dust.NewDust(projPos, 1, 1, DustID.UnusedWhiteBluePurple, 0f, 0f, 0, default, 1.25f); - Main.dust[boltDust].position = projPos; - Main.dust[boltDust].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[boltDust].velocity *= 0.1f; - */ - if (Projectile.timeLeft == 500) { Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Aqua, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 3); diff --git a/Projectiles/Magic/LightningArc.cs b/Projectiles/Magic/LightningArc.cs index 8f43f46666..9c367924a7 100644 --- a/Projectiles/Magic/LightningArc.cs +++ b/Projectiles/Magic/LightningArc.cs @@ -85,7 +85,6 @@ namespace CalamityMod.Projectiles.Magic } } - // Main.dust[dust].velocity /= 2f; Vector2 current = Projectile.Center; if (target) { @@ -115,33 +114,6 @@ namespace CalamityMod.Projectiles.Magic } Projectile.position = current; - - /*int tx = (int)(projectile.position.X / 16f); - int ty = (int)(projectile.position.Y / 16f); - - if (tx < 0) - { - tx = 0; - } - if (tx > Main.maxTilesX) - { - tx = Main.maxTilesX; - } - if (ty < 0) - { - ty = 0; - } - if (ty > Main.maxTilesY) - { - ty = Main.maxTilesY; - } - - if (Main.tile[tx, ty] != null && Main.tileSolid[(int)Main.tile[tx,ty].type] && Main.tile[tx, ty].wall == 0) - { - projectile.timeLeft -= 12; - }*/ - - } public override bool OnTileCollide(Vector2 oldVelocity) { diff --git a/Projectiles/Magic/LuxorsGiftMagic.cs b/Projectiles/Magic/LuxorsGiftMagic.cs index 53d96f1139..8056df5a3e 100644 --- a/Projectiles/Magic/LuxorsGiftMagic.cs +++ b/Projectiles/Magic/LuxorsGiftMagic.cs @@ -39,14 +39,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.velocity *= 0.1f; if (Projectile.velocity.Length() < 8) Projectile.velocity *= 1.01f; - /* - Vector2 dustVel = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2().RotatedByRandom(0.5f) * Main.rand.NextFloat(0.8f, 1.3f); - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(4, 4), ModContent.DustType(), dustVel * Main.rand.NextFloat(0.5f, 1.2f)); - dust.noGravity = !Main.rand.NextBool(3); - dust.scale = Main.rand.NextFloat(0.45f, 0.6f); - dust.color = Color.Gold; - dust.noLightEmittence = true; - */ + if (Projectile.timeLeft > 30) { for (int i = 0; i < 2; i++) diff --git a/Projectiles/Melee/CosmicIceBurst.cs b/Projectiles/Melee/CosmicIceBurst.cs index 379f8d6c13..6318cf0643 100644 --- a/Projectiles/Melee/CosmicIceBurst.cs +++ b/Projectiles/Melee/CosmicIceBurst.cs @@ -110,11 +110,6 @@ namespace CalamityMod.Projectiles.Melee return true; } - /*public override Color? GetAlpha(Color lightColor) - { - return new Color(150, Main.DiscoG, 255, 127); - }*/ - // Only inflict Nightwither if not spawned from Icebreaker public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { diff --git a/Projectiles/Melee/CrystylCrusherRay.cs b/Projectiles/Melee/CrystylCrusherRay.cs index 9e308d1d6f..65c0577e3d 100644 --- a/Projectiles/Melee/CrystylCrusherRay.cs +++ b/Projectiles/Melee/CrystylCrusherRay.cs @@ -144,9 +144,7 @@ namespace CalamityMod.Projectiles.Melee DestroyTiles(); } - /* - * Sets the end of the laser position based on where it collides with something - */ + // Sets the end of the laser position based on where it collides with something private void SetLaserPosition(Player player) { Distance = MathHelper.Max(player.Distance(player.ClampedMouseWorld()) - 20f, MOVE_DISTANCE + 5f); @@ -228,9 +226,7 @@ namespace CalamityMod.Projectiles.Melee public override bool ShouldUpdatePosition() => false; - /* - * Update CutTiles so the laser will cut tiles (like grass) - */ + // Update CutTiles so the laser will cut tiles (like grass) public override bool? CanCutTiles() => IsAtMaxCharge ? null : false; public override void CutTiles() { diff --git a/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs b/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs index b50aac643e..becc25a285 100644 --- a/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs +++ b/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs @@ -368,25 +368,5 @@ namespace CalamityMod.Projectiles.Melee return false; } - /* - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(Projectile.timeLeft); - writer.Write(Projectile.rotation); - writer.Write(Projectile.localAI[2]); - writer.Write(Projectile.localAI[0]); - - writer.WriteFlags(stuckInTarget, thrown); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - Projectile.timeLeft = reader.Read(); - Projectile.rotation = reader.ReadSingle(); - Projectile.localAI[2] = reader.ReadSingle(); - Projectile.localAI[0] = reader.ReadSingle(); - - reader.ReadFlags(out stuckInTarget, out thrown); - } - */ } } diff --git a/Projectiles/Melee/ExobladeProj.cs b/Projectiles/Melee/ExobladeProj.cs index 4eeb944925..5f55b2ea97 100644 --- a/Projectiles/Melee/ExobladeProj.cs +++ b/Projectiles/Melee/ExobladeProj.cs @@ -530,23 +530,6 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition, null, Color.White, BaseRotation, texture.Size() / 2f, SquishVector * 3f * Projectile.scale, direction, 0); - /* - if (PerformingPowerfulSlash) - { - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, swingFX, Main.GameViewMatrix.TransformationMatrix); - - float bouncyProgression = (float)Math.Sin(Progression * MathHelper.Pi); - swingFX.Parameters["color"].SetValue(Color.MediumSpringGreen.ToVector4() with { W = bouncyProgression * 0.5f }); - - for (int i = 0; i < 4; i++) - { - Vector2 offset = (i / 4f * MathHelper.TwoPi + SwingAngleShift + MathHelper.PiOver4).ToRotationVector2() * 2f * Projectile.scale; - Main.EntitySpriteDraw(texture, Owner.MountedCenter - Main.screenPosition + offset, null, Color.White, BaseRotation, texture.Size() / 2f, SquishVector * 3f * Projectile.scale, direction, 0); - } - } - */ - Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/RoxcaliburProj.cs b/Projectiles/Melee/RoxcaliburProj.cs index 3b9034c5f4..e68a091c84 100644 --- a/Projectiles/Melee/RoxcaliburProj.cs +++ b/Projectiles/Melee/RoxcaliburProj.cs @@ -55,18 +55,18 @@ namespace CalamityMod.Projectiles.Melee //more precise hitbox. makes the weapon harder to use but looks visually better: use it if you want. /* - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (HitTimer <= 0) - { - float size = Projectile.Size.Length(); - Vector2 hiltPos = Projectile.Center - Projectile.velocity * size / 2; - Vector2 endPos = Projectile.Center + Projectile.velocity * size / 2; - float useless = 0f; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), hiltPos, endPos, size / 2, ref useless); - } - return base.Colliding(projHitbox, targetHitbox); - } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (HitTimer <= 0) + { + float size = Projectile.Size.Length(); + Vector2 hiltPos = Projectile.Center - Projectile.velocity * size / 2; + Vector2 endPos = Projectile.Center + Projectile.velocity * size / 2; + float useless = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), hiltPos, endPos, size / 2, ref useless); + } + return base.Colliding(projHitbox, targetHitbox); + } */ public override void AI() diff --git a/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs index c88f451f81..a20df2e91d 100644 --- a/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs +++ b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs @@ -108,18 +108,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos SoundEngine.PlaySound(fire with { Volume = 0.6f, PitchVariance = 0.2f }, Projectile.Center); } - // Technically scrapped because the weapon is complex enough, but we might want to use this in the future - /* - if (timer % 60 == 0) // Fire Heal Stars at player (slightly predictive) - { - Vector2 vel = ((Projectile.Center - Owner.Center) - Owner.velocity * 8).SafeNormalize(Vector2.UnitX) * -10; - Projectile healStar = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0, cloneYoyo ? 3 : 10, 5); - healStar.extraUpdates = 2; - SoundStyle fireHeal = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianDash"); - SoundEngine.PlaySound(fireHeal with { Volume = 0.9f, Pitch = 0.3f }, Projectile.Center); - } - */ - if (timer > 0) { timer--; diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index 9bcfc40ee6..87cca66150 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -153,21 +153,11 @@ IL_6899: if (Projectile.tileCollide) { Projectile.hide = false; - - //if (projectile.extraUpdates == 1) PreventFastfall(); - - /*Vector2 distance = Main.player[projectile.owner].Center - projectile.Center; - if (distance.Length() < 100) - projectile.extraUpdates = 0; - else - projectile.extraUpdates = 1;*/ } else { Projectile.hide = true; - //projectile.extraUpdates = 1; - if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.position.X, Projectile.position.Y, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Projectile.owner, (float)Projectile.identity); } diff --git a/Projectiles/Pets/DannyDevitoPet.cs b/Projectiles/Pets/DannyDevitoPet.cs index a57bd3e2d5..5a0fd9662a 100644 --- a/Projectiles/Pets/DannyDevitoPet.cs +++ b/Projectiles/Pets/DannyDevitoPet.cs @@ -249,53 +249,6 @@ namespace CalamityMod.Projectiles.Pets } } - /*public override void PostDraw(Color lightColor) - { - if (!Main.gamePaused || Main.gameMenu) - { - Vector2 projDirect = projectile.position - Main.screenPosition; - if ((float)Main.mouseX > projDirect.X && (float)Main.mouseX < projDirect.X + (float)projectile.width && (float)Main.mouseY > projDirect.Y && (float)Main.mouseY < projDirect.Y + (float)projectile.height) - { - int playerTileX = (int)(Main.player[projectile.owner].Center.X / 16f); - int playerTileY = (int)(Main.player[projectile.owner].Center.Y / 16f); - int projTileX = (int)projectile.Center.X / 16; - int projTileY = (int)projectile.Center.Y / 16; - int lastTileRangeX = Main.player[projectile.owner].lastTileRangeX; - int lastTileRangeY = Main.player[projectile.owner].lastTileRangeY; - if (playerTileX >= projTileX - lastTileRangeX && playerTileX <= projTileX + lastTileRangeX + 1 && playerTileY >= projTileY - lastTileRangeY && playerTileY <= projTileY + lastTileRangeY + 1) - { - Main.player[projectile.owner].noThrow = 2; - Main.player[projectile.owner].cursorItemIconEnabled = true; - Main.player[projectile.owner].cursorItemIconID = 3213; - if (PlayerInput.UsingGamepad) - { - Main.player[projectile.owner].GamepadEnableGrappleCooldown(); - } - if (Main.mouseRight && Main.mouseRightRelease && Player.StopMoneyTroughFromWorking == 0) - { - Main.mouseRightRelease = false; - if (Main.player[projectile.owner].chest == -2) - { - Main.PlaySound(SoundID.Item11, -1, -1); - Main.player[projectile.owner].chest = -1; - Recipe.FindRecipes(); - return; - } - Main.player[projectile.owner].GetCalamityPlayer().trashManChest = projectile.type; - Main.player[projectile.owner].chest = -2; - Main.player[projectile.owner].chestX = (int)(projectile.Center.X / 16f); - Main.player[projectile.owner].chestY = (int)(projectile.Center.Y / 16f); - Main.player[projectile.owner].talkNPC = -1; - Main.npcShop = 0; - Main.playerInventory = true; - Main.PlaySound(SoundID.Item10, -1, -1); - Recipe.FindRecipes(); - } - } - } - } - }*/ - private bool HoleBelow() //pretty much the same as the one used in mantis { int tileWidth = 4; diff --git a/Projectiles/Rogue/WrathwingCinder.cs b/Projectiles/Rogue/WrathwingCinder.cs index ab70362863..844aa62b7c 100644 --- a/Projectiles/Rogue/WrathwingCinder.cs +++ b/Projectiles/Rogue/WrathwingCinder.cs @@ -78,15 +78,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.velocity.X *= 0.995f; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; - // commented out sound because it was way too loud - /* - if (projectile.localAI[0] == 0f) - { - projectile.localAI[0] = 1f; - Main.PlayTrackedSound(SoundID.DD2_BetsyFireballShot, projectile.Center); - } - */ - if (Projectile.ai[0] >= 2f) { Projectile.alpha -= 25; diff --git a/Projectiles/Summon/HydrothermicVent.cs b/Projectiles/Summon/HydrothermicVent.cs index a90d0b2d32..fdd82f6bb5 100644 --- a/Projectiles/Summon/HydrothermicVent.cs +++ b/Projectiles/Summon/HydrothermicVent.cs @@ -173,15 +173,6 @@ namespace CalamityMod.Projectiles.Summon Projectile.ai[0] = 20f; } } - - //doesn't look good - /*Vector2 goreVec = new Vector2(projectile.Center.X, projectile.Center.Y - yAdjust - 10f); - Vector2 goreVec = new Vector2(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y); - if (Main.rand.NextBool(8)) - { - int smoke = Gore.NewGore(goreVec, default, Main.rand.Next(375, 378), 0.5f); - Main.gore[smoke].behindTiles = true; - }*/ } } diff --git a/Projectiles/Typeless/AscendantAura.cs b/Projectiles/Typeless/AscendantAura.cs index 36a18030fa..1d3b8c7af3 100644 --- a/Projectiles/Typeless/AscendantAura.cs +++ b/Projectiles/Typeless/AscendantAura.cs @@ -63,25 +63,6 @@ namespace CalamityMod.Projectiles.Typeless // Stay on the player's head Projectile.Center = (Owner.MountedCenter + new Vector2(0, -45)); - Vector2 spawnPos = Projectile.Center + Main.rand.NextVector2Circular(5, 5); - int lifetime = Main.rand.Next(3, 6); - float scale = Main.rand.NextFloat(0.5f, 0.9f); - Color color = Main.rand.NextBool(3) ? Color.LightGreen : Color.Khaki; - /* - SparkParticle spark1 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark1); - SparkParticle spark2 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(7, 12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark2); - SparkParticle spark3 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(7, 12), Main.rand.NextFloat(-7, -12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark3); - SparkParticle spark4 = new SparkParticle(spawnPos, new Vector2(Main.rand.NextFloat(-7, -12), Main.rand.NextFloat(-7, -12)), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark4); - SparkParticle spark5 = new SparkParticle(Projectile.Center + new Vector2(20, 0), new Vector2(Main.rand.NextFloat(7, 12), 0), false, lifetime, scale, color); - GeneralParticleHandler.SpawnParticle(spark5); - SparkParticle spark6 = new SparkParticle(Projectile.Center + new Vector2(-20, 0), new Vector2(Main.rand.NextFloat(-7, -12), 0), false, lifetime, scale - 0.3f, color); - GeneralParticleHandler.SpawnParticle(spark6); - */ - // Emit some light Vector3 Light = new Vector3(0.251f, 0.255f, 0.219f); Lighting.AddLight(Projectile.Center, Light * 5); diff --git a/Systems/Mechanic/TilePingerSystem.PingEffects.cs b/Systems/Mechanic/TilePingerSystem.PingEffects.cs index 0627884742..6217aef3d7 100644 --- a/Systems/Mechanic/TilePingerSystem.PingEffects.cs +++ b/Systems/Mechanic/TilePingerSystem.PingEffects.cs @@ -142,33 +142,6 @@ public class WulfrumPingTileEffect : IPingedTileEffect, ILoadable Main.spriteBatch.Draw(emptyFrame, pos.ToWorldCoordinates() - Main.screenPosition, null, Color.White, 0, new Vector2(emptyFrame.Width / 2f, emptyFrame.Height / 2f), 16f, 0, 0); } - // CIT 16JUL2025: Tile lighting override is now applied via an On edit; this code is duplicated there, and thus is no longer needed here. - /*public void EditDrawData(int i, int j, ref TileDrawInfo drawData) - { - float distanceFromCenter = (new Point(i, j).ToWorldCoordinates() - PingCenter).Length(); - float currentExpansion = MathHelper.Clamp(PingProgress * MaxPingLife / (float)MaxPingTravelTime, 0f, 1f) * MaxPingRadius; - - if (distanceFromCenter - 8 > currentExpansion) - return; - - float brightness = 1f; - Tile tile = Framing.GetTileSafely(i, j); - //Counteracts slopes and half tiles being too bright - if (tile.Slope != SlopeType.Solid || tile.IsHalfBlock) - brightness = 0.64f; - - //Fade on the edges - if (distanceFromCenter + 8 > currentExpansion) - brightness *= 1 - (distanceFromCenter - currentExpansion + 8f) / 16f; - - //Fade away with the effect - brightness *= 1 - Math.Max(PingProgress - 0.9f, 0) / (0.1f); - - if (drawData.tileLight.R < 200 * brightness) drawData.tileLight.R = (byte)(200 * brightness); - if (drawData.tileLight.G < 200 * brightness) drawData.tileLight.G = (byte)(200 * brightness); - if (drawData.tileLight.B < 200 * brightness) drawData.tileLight.B = (byte)(200 * brightness); - }*/ - public void UpdateEffect() { if (PingTimer > 0) diff --git a/Tiles/Crags/ScorchedRemainsGrass.cs b/Tiles/Crags/ScorchedRemainsGrass.cs index 728a96dc12..fc184afc16 100644 --- a/Tiles/Crags/ScorchedRemainsGrass.cs +++ b/Tiles/Crags/ScorchedRemainsGrass.cs @@ -177,9 +177,7 @@ namespace CalamityMod.Tiles.Crags #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -194,9 +192,7 @@ namespace CalamityMod.Tiles.Crags private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -220,9 +216,7 @@ namespace CalamityMod.Tiles.Crags private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -244,9 +238,7 @@ namespace CalamityMod.Tiles.Crags private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -325,113 +317,6 @@ namespace CalamityMod.Tiles.Crags { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion } } diff --git a/Tiles/FurnitureAshen/AshenAccentSlab.cs b/Tiles/FurnitureAshen/AshenAccentSlab.cs index 7eb8b524e2..6935d176e5 100644 --- a/Tiles/FurnitureAshen/AshenAccentSlab.cs +++ b/Tiles/FurnitureAshen/AshenAccentSlab.cs @@ -532,122 +532,5 @@ namespace CalamityMod.Tiles.FurnitureAshen Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } } - - /* - /// - /// Gets the tile variant to use. Returns -1 by default - /// - /// - /// - /// - public int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - if (j % 3 < 2) - { - //We need to get the particular tile to refer to. This is the top left tile in each iteration of the pattern (large slab above the small rune bricks - Tile sourceTile = Main.tile[i - (i % 2), j - (j % 3)]; //Gets the tile for this iteration by taking the current position of the tile minus this tile's position in the pattern - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - return (variant); - } - */ } } diff --git a/Tiles/FurnitureAshen/AshenSlab.cs b/Tiles/FurnitureAshen/AshenSlab.cs index 809dbd3bc7..88cb5bc72b 100644 --- a/Tiles/FurnitureAshen/AshenSlab.cs +++ b/Tiles/FurnitureAshen/AshenSlab.cs @@ -532,122 +532,5 @@ namespace CalamityMod.Tiles.FurnitureAshen Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 8)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } } - - /* - /// - /// Gets the tile variant to use. Returns -1 by default - /// - /// - /// - /// - public int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - if (j % 3 < 2) - { - //We need to get the particular tile to refer to. This is the top left tile in each iteration of the pattern (large slab above the small rune bricks - Tile sourceTile = Main.tile[i - (i % 2), j - (j % 3)]; //Gets the tile for this iteration by taking the current position of the tile minus this tile's position in the pattern - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - return (variant); - } - */ } } diff --git a/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs b/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs index 1d736949b8..b8f9142d04 100644 --- a/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs +++ b/Tiles/FurnitureOtherworldly/OtherworldlyStone.cs @@ -82,9 +82,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -99,9 +97,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -125,9 +121,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -149,9 +143,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -230,113 +222,6 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion } } diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index d4f08a90bf..a12b232265 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -90,9 +90,7 @@ namespace CalamityMod.Tiles #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -107,9 +105,7 @@ namespace CalamityMod.Tiles private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -133,9 +129,7 @@ namespace CalamityMod.Tiles private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -157,9 +151,7 @@ namespace CalamityMod.Tiles private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -238,113 +230,6 @@ namespace CalamityMod.Tiles { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion } } diff --git a/Tiles/VernalSoil.cs b/Tiles/VernalSoil.cs index 729d05c74c..4826424766 100644 --- a/Tiles/VernalSoil.cs +++ b/Tiles/VernalSoil.cs @@ -199,9 +199,7 @@ namespace CalamityMod.Tiles #region 'Extra Drapes' Drawing private void DrawExtraTop(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface - */ + // If the tile directly above this tile is not otherworldly stone, or if it is, there is air to both sides of that tile, draw the Extra surface if ( CheckTile(Type, false, 0, 1, i, j) || (CheckTile(Type, true, 0, 1, i, j) && CheckTile(Type, false, 1, 1, i, j) && CheckTile(Type, false, -1, 1, i, j) && CheckTile(Type, true, 1, 0, i, j) && CheckTile(Type, true, -1, 0, i, j)) @@ -216,9 +214,7 @@ namespace CalamityMod.Tiles private void DrawExtraWallEnds(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Ending the Extra when a wall is reached - */ + // Ending the Extra when a wall is reached //Left if ( @@ -242,9 +238,7 @@ namespace CalamityMod.Tiles private void DrawExtraOverhang(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached - */ + // Called from DrawExtraTop(). Ending the Extra when the edge of the tile is reached //Left if ( @@ -266,9 +260,7 @@ namespace CalamityMod.Tiles private void DrawExtraDrapes(int i, int j, Texture2D extras, Vector2 drawOffset, Color drawColour) { - /* - Hanging 'drapes' of the extra element - */ + // Hanging 'drapes' of the extra element //Base if ( @@ -347,113 +339,6 @@ namespace CalamityMod.Tiles { return Main.tile[i, j].TileFrameNumber * extraFrameWidth; } - - /* - private int GetTileVariant(int i, int j) - { - int variant = 0; //Default to using variant 1 - Tile sourceTile = Main.tile[i, j]; - //Now to get the particular 'variant group' to use, which is used to take the frameX/frameY of the tile and convert it to the variant the tile is using - int frameX = sourceTile.frameX / 18; - int frameY = sourceTile.frameY / 18; - if (frameY < 3 && !(frameX >= 6 && frameX < 9)) - { - int group = 0; - int[] group1XPos = new int[] { 1, 2, 3 }; - int[] group2XPos = new int[] { 0, 4, 5, 9, 10, 11, 12 }; - foreach (int k in group1XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 1; - } - } - foreach (int k in group2XPos) - { - if (frameX < k + 1 && frameX >= k) - { - group = 2; - } - } - if (group == 1) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 3) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (group == 2) - { - if (frameY < 1) - { - variant = 0; - } - else if (frameY < 2) - { - variant = 1; - } - else - { - variant = 2; - } - } - } - else if (frameX < 6 && frameY >= 3) - { - if (frameX < 2) - { - variant = 0; - } - else if (frameX < 4) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 6 && frameX < 9) - { - if (frameX < 7) - { - variant = 0; - } - else if (frameX < 8) - { - variant = 1; - } - else - { - variant = 2; - } - } - else if (frameX >= 9 && frameY >= 3) - { - if (frameX < 10) - { - variant = 0; - } - else if (frameX < 11) - { - variant = 1; - } - else - { - variant = 2; - } - } - return (variant); - } - */ #endregion public override void NumDust(int i, int j, bool fail, ref int num) { diff --git a/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs b/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs index a543900c4e..70952ffd8b 100644 --- a/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs +++ b/Walls/UnsafeWalls/UnsafeAstralGrassWall.cs @@ -15,11 +15,6 @@ namespace CalamityMod.Walls.UnsafeWalls public static Asset leafTexture = null; public static Vector2 TileAdj => (Lighting.Mode == Terraria.Graphics.Light.LightMode.Retro || Lighting.Mode == Terraria.Graphics.Light.LightMode.Trippy) ? Vector2.Zero : Vector2.One * 12; - /*public override bool Autoload(ref string name, ref string texture) - { - mod.AddWall("AstralGrassWallUnsafe", this, texture); - return base.Autoload(ref name, ref texture); - }*/ public override void SetStaticDefaults() { diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 786fcb8bf9..0bcb66de9c 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -774,66 +774,5 @@ namespace CalamityMod.World return false; } - - /* - public static void PlaceTit(int x, int y, ushort type = 165) - { - if (WorldGen.SolidTile(x, y - 1) && !Main.tile[x, y].HasTile && !Main.tile[x, y + 1].HasTile) - { - if (Main.tile[x, y - 1].TileType == (ushort)ModContent.TileType()) - { - if (WorldGen.genRand.Next(2) == 0 || Main.tile[x, y + 2].HasTile) - { - int num2 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num2; - Main.tile[x, y].TileFrameY = 72; - } - else - { - int num3 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num3; - Main.tile[x, y].TileFrameY = 0; - Main.tile[x, y + 1].TileType = type; - Main.tile[x, y + 1].Get().HasTile = true; - Main.tile[x, y + 1].TileFrameX = (short)num3; - Main.tile[x, y + 1].TileFrameY = 18; - } - } - } - else - { - if (WorldGen.SolidTile(x, y + 1) && !Main.tile[x, y].HasTile && !Main.tile[x, y - 1].HasTile) - { - if (Main.tile[x, y + 1].TileType == (ushort)ModContent.TileType()) - { - if (WorldGen.genRand.Next(2) == 0 || Main.tile[x, y - 2].HasTile) - { - int num13 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num13; - Main.tile[x, y].TileFrameY = 90; - } - else - { - int num14 = WorldGen.genRand.Next(3) * 18; - Main.tile[x, y - 1].TileType = type; - Main.tile[x, y - 1].Get().HasTile = true; - Main.tile[x, y - 1].TileFrameX = (short)num14; - Main.tile[x, y - 1].TileFrameY = 36; - Main.tile[x, y].TileType = type; - Main.tile[x, y].Get().HasTile = true; - Main.tile[x, y].TileFrameX = (short)num14; - Main.tile[x, y].TileFrameY = 54; - } - } - } - } - } - */ } }