From 19062d55e9533fb28f225eb8e4d4317cee1fe7aa Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 18 Oct 2021 18:07:42 -0500 Subject: [PATCH] 1 - Removed some comments and other tiny things that aren't necessary. --- CalamityLists.cs | 1 - CalamityNetcode.cs | 12 ++++++------ NPCs/CalamityGlobalNPCLoot.cs | 2 -- World/CalamityWorld.cs | 14 +++++++------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/CalamityLists.cs b/CalamityLists.cs index cb33cda65c..eef7fac556 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -62,7 +62,6 @@ using CalamityMod.Projectiles.Enemy; using CalamityMod.Projectiles.Hybrid; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Melee; -using CalamityMod.Projectiles.Melee.Spears; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Summon; diff --git a/CalamityNetcode.cs b/CalamityNetcode.cs index 0dcb703949..3ddd3c05a5 100644 --- a/CalamityNetcode.cs +++ b/CalamityNetcode.cs @@ -280,11 +280,11 @@ namespace CalamityMod Main.player[reader.ReadInt32()].Calamity().HandleReforgeTierSafety(reader); break; - // - // Default case: with no idea how long the packet is, we can't safely read data. - // Throw an exception now instead of allowing the network stream to corrupt. - // - default: + // + // Default case: with no idea how long the packet is, we can't safely read data. + // Throw an exception now instead of allowing the network stream to corrupt. + // + default: CalamityMod.Instance.Logger.Error($"Failed to parse Calamity packet: No Calamity packet exists with ID {msgType}."); throw new Exception("Failed to parse Calamity packet: Invalid Calamity packet ID."); } @@ -399,6 +399,6 @@ namespace CalamityMod // Reforge syncs ItemTypeLastReforgedSync, // TODO -- there has to be a better way to do this, but I don't know what it is - ReforgeTierSafetySync, + ReforgeTierSafetySync } } diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 3bb683a376..6ae4b5f5a6 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -43,8 +43,6 @@ namespace CalamityMod.NPCs return false; } - // TODO -- why do we have random enemies dying in the abyss regardless of whether they're underwater - // this just causes multiplayer desyncs if anything if (AbyssLootCancel(npc, mod)) return false; diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ac52fba962..bb4dce395a 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -75,10 +75,10 @@ namespace CalamityMod.World public static bool death = false; // Death Mode public static bool armageddon = false; // Armageddon Mode public static bool ironHeart = false; // Iron Heart Mode - public static bool malice = false; // Malice Mode, enrages all bosses and makes them drop good shit + public static bool malice = false; // Malice Mode - // New Temple Altar - public static int newAltarX = 0; + // New Temple Altar + public static int newAltarX = 0; public static int newAltarY = 0; // Evil Islands @@ -542,12 +542,12 @@ namespace CalamityMod.World ["Reforges"] = Reforges, ["MoneyStolenByBandit"] = MoneyStolenByBandit, - ["SunkenSeaLabCenter"] = SunkenSeaLabCenter, + ["SunkenSeaLabCenter"] = SunkenSeaLabCenter, ["PlanetoidLabCenter"] = PlanetoidLabCenter, ["JungleLabCenter"] = JungleLabCenter, ["HellLabCenter"] = HellLabCenter, - ["IceLabCenter"] = IceLabCenter, - }; + ["IceLabCenter"] = IceLabCenter + }; } #endregion @@ -649,7 +649,7 @@ namespace CalamityMod.World Reforges = tag.GetInt("Reforges"); MoneyStolenByBandit = tag.GetInt("MoneyStolenByBandit"); - SunkenSeaLabCenter = tag.Get("SunkenSeaLabCenter"); + SunkenSeaLabCenter = tag.Get("SunkenSeaLabCenter"); PlanetoidLabCenter = tag.Get("PlanetoidLabCenter"); JungleLabCenter = tag.Get("JungleLabCenter"); HellLabCenter = tag.Get("HellLabCenter");