From 9361718742ebc9c0a26987598353ccc40ff767ba Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 13 Oct 2024 21:55:09 -0700 Subject: [PATCH 01/21] Okay 800 damage nerf was too much apparently Also multitarget healing was too much --- Items/Weapons/Melee/GrandDad.cs | 2 +- Projectiles/Melee/GrandDadHoldout.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Melee/GrandDad.cs b/Items/Weapons/Melee/GrandDad.cs index fbd699748c..ac5bfb214c 100644 --- a/Items/Weapons/Melee/GrandDad.cs +++ b/Items/Weapons/Melee/GrandDad.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 124; Item.height = 124; - Item.damage = 1977; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( + Item.damage = 2407; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = 77; Item.useTime = 77; diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index be4ff0a9bb..cd8d165a80 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -216,7 +216,7 @@ namespace CalamityMod.Projectiles.Melee Owner.Calamity().GeneralScreenShakePower = 6.5f; } - int heal = (int)(MathHelper.Clamp(20 - Projectile.numHits * 5, 1, 20)); + int heal = (int)(MathHelper.Clamp(25 - Projectile.numHits * 8, 1, 25)); if (Projectile.numHits < 20) { Owner.HealPlayer(heal); From 5bbf90d8d6b76961de9e861616cb4cfd938c0061 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 14 Oct 2024 01:05:53 -0400 Subject: [PATCH 02/21] Mimic loot pools no longer get fucked in Remix --- NPCs/CalamityGlobalNPCLoot.cs | 67 +++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 90bc98b50e..ef5caf55cc 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -166,19 +166,42 @@ namespace CalamityMod.NPCs return false; }); - int[] mimicItems = new int[] - { + // Yes, Mimics have three separate loot tables which we must reintegrate + int[] normalMimicItems = + [ ItemID.MagicDagger, ItemID.CrossNecklace, ItemID.PhilosophersStone, ItemID.StarCloak, ItemID.TitanGlove, ItemID.DualHook - }; + ]; + int[] remixPreHardMimicItems = + [ + ItemID.BandofRegeneration, + ItemID.MagicMirror, + ItemID.CloudinaBottle, + ItemID.HermesBoots, + ItemID.ShoeSpikes, + ItemID.Mace + ]; + int[] remixHardmodeMimicItems = + [ + ItemID.WandofSparking, + ItemID.CrossNecklace, + ItemID.PhilosophersStone, + ItemID.StarCloak, + ItemID.TitanGlove, + ItemID.DualHook + ]; // Mimics will not drop any items if spawned from statues. - var notStatue = npcLoot.DefineConditionalDropSet(new Conditions.NotFromStatue()); - notStatue.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, mimicItems)); + var notRemix = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !(npc.SpawnedFromStatue || Main.remixWorld))); + var remixPreHM = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && !Main.hardMode)); + var remixHardmode = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && Main.hardMode)); + notRemix.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, normalMimicItems)); + remixPreHM.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixPreHardMimicItems)); + remixHardmode.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixHardmodeMimicItems)); } catch (ArgumentNullException) { } break; @@ -236,17 +259,39 @@ namespace CalamityMod.NPCs return false; }); - int[] iceMimicItems = new int[] - { + // Yes, Ice Mimics have three separate loot tables which me must reintegrate + int[] normalIceMimicItems = + [ ItemID.Frostbrand, ItemID.IceBow, ItemID.FlowerofFrost - }; + ]; + int[] remixPreHardIceMimicItems = + [ + ItemID.IceBoomerang, + ItemID.IceBlade, + ItemID.IceBow, + ItemID.IceSkates, + ItemID.BlizzardinaBottle, + ItemID.FlurryBoots + ]; + int[] remixHardmodeIceMimicItems = + [ + ItemID.Frostbrand, + ItemID.SnowballCannon, + ItemID.FlowerofFrost + ]; // Ice Mimics will not drop any items if spawned from statues. - var notStatue = npcLoot.DefineConditionalDropSet(new Conditions.NotFromStatue()); - notStatue.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, iceMimicItems)); - notStatue.Add(ItemID.ToySled, 20, 1, 1); + var notRemix = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !(npc.SpawnedFromStatue || Main.remixWorld))); + var remixPreHM = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && !Main.hardMode)); + var remixHardmode = npcLoot.DefineConditionalDropSet(DropHelper.If(() => !npc.SpawnedFromStatue && Main.remixWorld && Main.hardMode)); + notRemix.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, normalIceMimicItems)); + remixPreHM.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixPreHardIceMimicItems)); + remixHardmode.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, remixHardmodeIceMimicItems)); + + // Independent from all of the Remix madness, Ice Mimics have a 5% chance to drop Toy Sled. + npcLoot.DefineConditionalDropSet(new Conditions.NotFromStatue()).Add(ItemID.ToySled, 20); } catch (ArgumentNullException) { } break; From a497e293d3e9e061e22cfb7569bffbf560c4ecad Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Mon, 14 Oct 2024 00:41:26 -0700 Subject: [PATCH 03/21] Hellborn & Thunderbolt are now main pool weapons --- Items/TreasureBags/BrimstoneWaifuBag.cs | 4 ++-- Items/TreasureBags/StormWeaverBag.cs | 4 ++-- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 4 ++-- NPCs/StormWeaver/StormWeaverHead.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Items/TreasureBags/BrimstoneWaifuBag.cs b/Items/TreasureBags/BrimstoneWaifuBag.cs index 124589d49e..574c173543 100644 --- a/Items/TreasureBags/BrimstoneWaifuBag.cs +++ b/Items/TreasureBags/BrimstoneWaifuBag.cs @@ -67,9 +67,9 @@ namespace CalamityMod.Items.TreasureBags { ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() })); - itemLoot.Add(ModContent.ItemType(), 10); // Equipment itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[] diff --git a/Items/TreasureBags/StormWeaverBag.cs b/Items/TreasureBags/StormWeaverBag.cs index ba26529ae2..96dcc7defe 100644 --- a/Items/TreasureBags/StormWeaverBag.cs +++ b/Items/TreasureBags/StormWeaverBag.cs @@ -61,9 +61,9 @@ namespace CalamityMod.Items.TreasureBags itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[] { ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() })); - itemLoot.Add(ModContent.ItemType(), 10); // Equipment itemLoot.AddRevBagAccessories(); diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index e96067ad2b..4b93e2182c 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -203,10 +203,10 @@ namespace CalamityMod.NPCs.BrimstoneElemental { ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType() }; normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); - normalOnly.Add(ModContent.ItemType(), 10); // Materials normalOnly.Add(ModContent.ItemType(), 1, 8, 10); diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index c42521c275..5fa90eca1c 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -988,9 +988,9 @@ namespace CalamityMod.NPCs.StormWeaver { ModContent.ItemType(), ModContent.ItemType(), + ModContent.ItemType(), }; normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); - normalOnly.Add(ModContent.ItemType(), 10); // Materials normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 5, 7)); From 85dc98017ab992f5d0c0fe9a34a23f5edb19b736 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:51:49 +0700 Subject: [PATCH 04/21] Glomerlings are affected by Astraglomerate Banner --- NPCs/Astral/Glomerling.cs | 2 ++ NPCs/Astral/SightseerSpitter.cs | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/NPCs/Astral/Glomerling.cs b/NPCs/Astral/Glomerling.cs index f8e2103c9d..4c4c7b3a57 100644 --- a/NPCs/Astral/Glomerling.cs +++ b/NPCs/Astral/Glomerling.cs @@ -28,6 +28,7 @@ namespace CalamityMod.NPCs.Astral NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y -= 8; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; + NPCID.Sets.PositiveNPCTypesExcludedFromDeathTally[Type] = true; } public override void SetDefaults() @@ -42,6 +43,7 @@ namespace CalamityMod.NPCs.Astral NPC.knockBackResist = 0.5f; NPC.noGravity = true; NPC.value = Item.buyPrice(0, 0, 1, 0); + Banner = ModContent.NPCType(); if (DownedBossSystem.downedAstrumAureus) { NPC.damage = 50; diff --git a/NPCs/Astral/SightseerSpitter.cs b/NPCs/Astral/SightseerSpitter.cs index 48e7e95ff2..a3203c862c 100644 --- a/NPCs/Astral/SightseerSpitter.cs +++ b/NPCs/Astral/SightseerSpitter.cs @@ -195,7 +195,6 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 1; NPCID.Sets.ProjectileNPC[Type] = true; } @@ -251,12 +250,11 @@ namespace CalamityMod.NPCs.Astral { if (modifiers.GetDamage(NPC.damage, 0f, 0f) > 0) { - if (target.HasNPCBannerBuff(ModContent.NPCType())) + int parent = ModContent.NPCType(); + if (target.HasNPCBannerBuff(parent)) { - if (Main.expertMode) - modifiers.IncomingDamageMultiplier *= 0.5f; - else - modifiers.IncomingDamageMultiplier *= 0.75f; + ItemID.BannerEffect effect = ItemID.Sets.BannerStrength[Item.BannerToItem(parent)]; + modifiers.IncomingDamageMultiplier *= (Main.expertMode ? effect.ExpertDamageReceived : effect.NormalDamageReceived); } if (Main.netMode != NetmodeID.MultiplayerClient) From 9b5512afa431c3cce6b1bcee256167e49d967272 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:04:47 +0700 Subject: [PATCH 05/21] Profaned Energy attacks are mitigated by Profaned Energy Banner --- NPCs/NormalNPCs/ProfanedEnergyLantern.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs index 96f0ffcbf5..cdbdc9cfa4 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs @@ -25,6 +25,7 @@ namespace CalamityMod.NPCs.NormalNPCs { ChainTexture = ModContent.Request("CalamityMod/NPCs/NormalNPCs/ProfanedEnergySegment", AssetRequestMode.AsyncLoad); } + NPCID.Sets.PositiveNPCTypesExcludedFromDeathTally[Type] = true; // You can't kill this thing but just in case anyway } public override void SetDefaults() @@ -42,6 +43,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.dontTakeDamage = true; NPC.HitSound = SoundID.NPCHit52; NPC.DeathSound = SoundID.NPCDeath55; + Banner = ModContent.NPCType(); } public override void AI() From 02d244f31b385728d557d5efddb06382839331ac Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:48:58 +0700 Subject: [PATCH 06/21] Luck can now boost certain spawns These are similar to vanilla's --- NPCs/AcidRain/BloodwormNormal.cs | 7 +++++++ NPCs/CalamityGlobalNPC.cs | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index b95a54e1eb..8894e09d34 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -117,6 +117,13 @@ namespace CalamityMod.NPCs.AcidRain int bloodwormAmt = NPC.CountNPCS(NPC.type); float spawnMult = bloodwormAmt > 5 ? 1f : (float)(0.16 * Math.Pow(5 - bloodwormAmt, 2)) + 1f; float baseSpawnRate = DownedBossSystem.downedBoomerDuke ? 0.1f : AcidRainEvent.OldDukeHasBeenEncountered ? 0.4f : 0.2f; + + float luck = spawnInfo.Player.luck; + if (luck > 0f && Main.rand.NextFloat() < luck) + spawnMult *= Main.rand.NextFloat(1f, 2f); + if (luck < 0f && Main.rand.NextFloat() < -luck) + spawnMult *= Main.rand.NextFloat(0.5f, 1f); + float spawnRate = baseSpawnRate * spawnMult; return spawnRate; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 996670b636..d214369b95 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6354,9 +6354,10 @@ namespace CalamityMod.NPCs NPC.downedMoonlord && Main.player[npc.target].ZoneDungeon) { - int maxValue = Main.expertMode ? 4 : 6; + // This value can change by (on average) 0.75x or 1.25x depending on your having positive or negative luck + int baseValue = Main.expertMode ? 4 : 6; - if (Main.rand.NextBool(maxValue) && Main.wallDungeon[Main.tile[(int)npc.Center.X / 16, (int)npc.Center.Y / 16].WallType]) + if (Main.player[npc.target].RollLuck(baseValue) == 0 && Main.wallDungeon[Main.tile[(int)npc.Center.X / 16, (int)npc.Center.Y / 16].WallType]) { int randomType = Utils.SelectRandom(Main.rand, new int[] { From 98e43151fbe8c5e11a0e022ae26aadcf48ed99bd Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:17:03 +0700 Subject: [PATCH 07/21] fixed drill containment unit running CanUseItem by frame --- Items/CalamityGlobalItem.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index a7487c8cb8..9749b0a114 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -801,6 +801,11 @@ namespace CalamityMod.Items return false; // Don't use weapons if you're charging with a spear } + // If the player if using the Drill Containment Unit, ignore all this. + // It will start to check for everything below EVERY FRAME, including attacking with PSC or using Charge + if (player.mount.Type == MountID.Drill) + return base.CanUseItem(item, player); + // Conversion for Andromeda if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) { From 464c51c296e97001fd48a9eabb5d343f0b1bffd7 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:26:48 +0700 Subject: [PATCH 08/21] Potion/Food flavour particles - idk what to do with pot of pain - hadal stew, grape beer, margarita no longer heal mana --- Items/Potions/Alcohol/BloodyMary.cs | 20 ++++++++---------- Items/Potions/Alcohol/CaribbeanRum.cs | 21 ++++++++----------- Items/Potions/Alcohol/CinnamonRoll.cs | 20 ++++++++---------- Items/Potions/Alcohol/Everclear.cs | 20 ++++++++---------- Items/Potions/Alcohol/EvergreenGin.cs | 21 ++++++++----------- Items/Potions/Alcohol/FabsolsVodka.cs | 20 ++++++++---------- Items/Potions/Alcohol/Fireball.cs | 20 ++++++++---------- Items/Potions/Alcohol/GrapeBeer.cs | 21 ++++++++----------- Items/Potions/Alcohol/Margarita.cs | 21 ++++++++----------- Items/Potions/Alcohol/Moonshine.cs | 21 ++++++++----------- Items/Potions/Alcohol/MoscowMule.cs | 21 ++++++++----------- Items/Potions/Alcohol/OddMushroom.cs | 20 ++++++++---------- Items/Potions/Alcohol/OldFashioned.cs | 20 ++++++++---------- Items/Potions/Alcohol/RedWine.cs | 20 ++++++++---------- Items/Potions/Alcohol/Rum.cs | 20 ++++++++---------- Items/Potions/Alcohol/Screwdriver.cs | 20 ++++++++---------- Items/Potions/Alcohol/StarBeamRye.cs | 21 ++++++++----------- Items/Potions/Alcohol/Tequila.cs | 20 ++++++++---------- Items/Potions/Alcohol/TequilaSunrise.cs | 20 ++++++++---------- Items/Potions/Alcohol/Vodka.cs | 20 ++++++++---------- Items/Potions/Alcohol/Whiskey.cs | 20 ++++++++---------- Items/Potions/Alcohol/WhiteWine.cs | 21 ++++++++----------- Items/Potions/AnechoicCoating.cs | 18 +++++++--------- Items/Potions/AstralInjection.cs | 18 ++++++---------- Items/Potions/AureusCell.cs | 21 ++++++++----------- Items/Potions/Baguette.cs | 26 +++++++++--------------- Items/Potions/BlasphemousDonut.cs | 21 ++++++++----------- Items/Potions/BoundingPotion.cs | 18 ++++++---------- Items/Potions/CalciumPotion.cs | 18 ++++++---------- Items/Potions/CeaselessHungerPotion.cs | 19 +++++++---------- Items/Potions/DeliciousMeat.cs | 20 +++++++----------- Items/Potions/FlaskOfBrimstone.cs | 20 +++++++----------- Items/Potions/FlaskOfCrumbling.cs | 19 +++++++---------- Items/Potions/FlaskOfHolyFlames.cs | 19 +++++++---------- Items/Potions/GravityNormalizerPotion.cs | 19 +++++++---------- Items/Potions/HadalStew.cs | 23 +++++++++------------ Items/Potions/OmegaHealingPotion.cs | 20 +++++++----------- Items/Potions/PhotosynthesisPotion.cs | 19 +++++++---------- Items/Potions/PotionofOmniscience.cs | 19 +++++++---------- Items/Potions/ShadowPotion.cs | 19 +++++++---------- Items/Potions/SoaringPotion.cs | 20 +++++++----------- Items/Potions/SulphurskinPotion.cs | 20 +++++++----------- Items/Potions/SupremeHealingPotion.cs | 19 +++++++---------- Items/Potions/SupremeManaPotion.cs | 17 +++++++--------- Items/Potions/ZenPotion.cs | 20 +++++++----------- Items/Potions/ZergPotion.cs | 20 +++++++----------- 46 files changed, 356 insertions(+), 564 deletions(-) diff --git a/Items/Potions/Alcohol/BloodyMary.cs b/Items/Potions/Alcohol/BloodyMary.cs index 964b55b6ed..3a05e66424 100644 --- a/Items/Potions/Alcohol/BloodyMary.cs +++ b/Items/Potions/Alcohol/BloodyMary.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(204, 90, 73), + new Color(168, 37, 37), + new Color(120, 28, 28) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(20, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 80); + Item.rare = ItemRarityID.Lime; } } } diff --git a/Items/Potions/Alcohol/CaribbeanRum.cs b/Items/Potions/Alcohol/CaribbeanRum.cs index fb3b0a0705..67b3449640 100644 --- a/Items/Potions/Alcohol/CaribbeanRum.cs +++ b/Items/Potions/Alcohol/CaribbeanRum.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,20 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Based on the drink itself + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(105, 29, 14), + new Color(128, 39, 22), + new Color(138, 28, 7) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(14, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 60); + Item.rare = ItemRarityID.Lime; } } } diff --git a/Items/Potions/Alcohol/CinnamonRoll.cs b/Items/Potions/Alcohol/CinnamonRoll.cs index 1910bad0c8..1270088e04 100644 --- a/Items/Potions/Alcohol/CinnamonRoll.cs +++ b/Items/Potions/Alcohol/CinnamonRoll.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(245, 223, 181), + new Color(222, 186, 147), + new Color(176, 129, 106) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Yellow; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(18, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(gold: 1); + Item.rare = ItemRarityID.Yellow; } } } diff --git a/Items/Potions/Alcohol/Everclear.cs b/Items/Potions/Alcohol/Everclear.cs index 33e4888e93..2ca6759049 100644 --- a/Items/Potions/Alcohol/Everclear.cs +++ b/Items/Potions/Alcohol/Everclear.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Everclear is clear so uhm... yeah? + ItemID.Sets.DrinkParticleColors[Type] = new Color[2] { + new Color(153, 168, 162, 180), + new Color(198, 205, 207, 180) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(60f); + Item.DefaultToFood(14, 42, ModContent.BuffType(), CalamityUtils.SecondsToFrames(60f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 80); + Item.rare = ItemRarityID.Lime; } } } diff --git a/Items/Potions/Alcohol/EvergreenGin.cs b/Items/Potions/Alcohol/EvergreenGin.cs index 0453782cd2..6fcc5f841a 100644 --- a/Items/Potions/Alcohol/EvergreenGin.cs +++ b/Items/Potions/Alcohol/EvergreenGin.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,20 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Pale green-blue + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(201, 248, 248), + new Color(201, 248, 221), + new Color(177, 240, 184) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(18, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 60); + Item.rare = ItemRarityID.Lime; } } } diff --git a/Items/Potions/Alcohol/FabsolsVodka.cs b/Items/Potions/Alcohol/FabsolsVodka.cs index d129b6f23c..86d5a08d52 100644 --- a/Items/Potions/Alcohol/FabsolsVodka.cs +++ b/Items/Potions/Alcohol/FabsolsVodka.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.Alcohol; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,24 +16,19 @@ namespace CalamityMod.Items.Potions.Alcohol { Item.ResearchUnlockCount = 5; ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(239, 123, 202), + new Color(187, 56, 158), + new Color(165, 47, 255) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(900f); + Item.DefaultToFood(30, 42, ModContent.BuffType(), CalamityUtils.SecondsToFrames(900f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 30); + Item.rare = ItemRarityID.LightRed; } public override void AddRecipes() diff --git a/Items/Potions/Alcohol/Fireball.cs b/Items/Potions/Alcohol/Fireball.cs index a177520b66..e7f9f76d24 100644 --- a/Items/Potions/Alcohol/Fireball.cs +++ b/Items/Potions/Alcohol/Fireball.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(245, 171, 22), + new Color(227, 128, 41), + new Color(237, 82, 31) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(16, 38, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 30); + Item.rare = ItemRarityID.LightRed; } } } diff --git a/Items/Potions/Alcohol/GrapeBeer.cs b/Items/Potions/Alcohol/GrapeBeer.cs index c1462f6d78..5b6c7928f4 100644 --- a/Items/Potions/Alcohol/GrapeBeer.cs +++ b/Items/Potions/Alcohol/GrapeBeer.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,25 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(36, 2, 41), + new Color(56, 0, 64), + new Color(82, 10, 92) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.healLife = 100; - Item.healMana = 100; - Item.consumable = true; - Item.potion = true; + Item.DefaultToHealingPotion(12, 28, 100); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 3); + Item.rare = ItemRarityID.LightRed; } public override void OnConsumeItem(Player player) diff --git a/Items/Potions/Alcohol/Margarita.cs b/Items/Potions/Alcohol/Margarita.cs index 04ebc3f9af..30a6730df0 100644 --- a/Items/Potions/Alcohol/Margarita.cs +++ b/Items/Potions/Alcohol/Margarita.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,25 +15,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(219, 227, 191), + new Color(186, 189, 147), + new Color(142, 161, 125) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 40; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.potion = true; - Item.healLife = 200; - Item.healMana = 200; + Item.DefaultToHealingPotion(28, 40, 200); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 60); + Item.rare = ItemRarityID.Lime; } public override void OnConsumeItem(Player player) diff --git a/Items/Potions/Alcohol/Moonshine.cs b/Items/Potions/Alcohol/Moonshine.cs index 165545297f..ca4b665233 100644 --- a/Items/Potions/Alcohol/Moonshine.cs +++ b/Items/Potions/Alcohol/Moonshine.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,20 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Another clear drink + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(237, 237, 218, 128), + new Color(227, 219, 191, 128), + new Color(209, 204, 194, 128) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Yellow; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(24, 28, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(gold: 1); + Item.rare = ItemRarityID.Yellow; } } } diff --git a/Items/Potions/Alcohol/MoscowMule.cs b/Items/Potions/Alcohol/MoscowMule.cs index 10433f63b9..ee5e40e3e7 100644 --- a/Items/Potions/Alcohol/MoscowMule.cs +++ b/Items/Potions/Alcohol/MoscowMule.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,24 +14,20 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Pale green with a hint of red + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(194, 252, 192), + new Color(226, 252, 192), + new Color(250, 225, 222) + }; } public override void SetDefaults() { - Item.width = 32; - Item.height = 34; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Yellow; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(32, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(gold: 1); + Item.rare = ItemRarityID.Yellow; } } } diff --git a/Items/Potions/Alcohol/OddMushroom.cs b/Items/Potions/Alcohol/OddMushroom.cs index f3e1efa5f3..1c3472f24d 100644 --- a/Items/Potions/Alcohol/OddMushroom.cs +++ b/Items/Potions/Alcohol/OddMushroom.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.FoodParticleColors[Type] = new Color[3] { + new Color(232, 100, 90), + new Color(230, 215, 117), + new Color(143, 83, 64) + }; } public override void SetDefaults() { - Item.width = 38; - Item.height = 50; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.rare = ItemRarityID.LightRed; - Item.useStyle = ItemUseStyleID.EatFood; - Item.UseSound = SoundID.Item2; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(3600f); + Item.DefaultToFood(38, 50, ModContent.BuffType(), CalamityUtils.SecondsToFrames(3600f)); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(gold: 10); + Item.rare = ItemRarityID.LightRed; } public override void OnConsumeItem(Player player) diff --git a/Items/Potions/Alcohol/OldFashioned.cs b/Items/Potions/Alcohol/OldFashioned.cs index a440396e3d..e76f994ed3 100644 --- a/Items/Potions/Alcohol/OldFashioned.cs +++ b/Items/Potions/Alcohol/OldFashioned.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,24 +16,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(255, 118, 3), + new Color(255, 200, 82), + new Color(255, 228, 122) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 40; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(360f); + Item.DefaultToFood(30, 38, ModContent.BuffType(), CalamityUtils.SecondsToFrames(360f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 60); + Item.rare = ItemRarityID.Lime; } } } diff --git a/Items/Potions/Alcohol/RedWine.cs b/Items/Potions/Alcohol/RedWine.cs index 06a09a61b2..e1a185a15b 100644 --- a/Items/Potions/Alcohol/RedWine.cs +++ b/Items/Potions/Alcohol/RedWine.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(54, 5, 21), + new Color(82, 9, 36), + new Color(105, 4, 29) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.healLife = 200; - Item.consumable = true; - Item.potion = true; + Item.DefaultToHealingPotion(14, 48, 200); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 30); + Item.rare = ItemRarityID.LightRed; } public override void GetHealLife(Player player, bool quickHeal, ref int healValue) diff --git a/Items/Potions/Alcohol/Rum.cs b/Items/Potions/Alcohol/Rum.cs index a6ac51a739..8b06e8ca63 100644 --- a/Items/Potions/Alcohol/Rum.cs +++ b/Items/Potions/Alcohol/Rum.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(237, 165, 9), + new Color(247, 219, 54), + new Color(255, 195, 31) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(24, 26, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 30); + Item.rare = ItemRarityID.LightRed; } } } diff --git a/Items/Potions/Alcohol/Screwdriver.cs b/Items/Potions/Alcohol/Screwdriver.cs index 299d0ff7fb..4a472c629c 100644 --- a/Items/Potions/Alcohol/Screwdriver.cs +++ b/Items/Potions/Alcohol/Screwdriver.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(225, 84, 33), + new Color(244, 176, 77), + new Color(255, 218, 102) + }; } public override void SetDefaults() { - Item.width = 16; - Item.height = 26; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightPurple; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(14, 28, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 40); + Item.rare = ItemRarityID.LightPurple; } } } diff --git a/Items/Potions/Alcohol/StarBeamRye.cs b/Items/Potions/Alcohol/StarBeamRye.cs index f279ce4f8d..28a963686a 100644 --- a/Items/Potions/Alcohol/StarBeamRye.cs +++ b/Items/Potions/Alcohol/StarBeamRye.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,24 +12,20 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Dark red-orange + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(89, 18, 10), + new Color(102, 39, 14), + new Color(128, 31, 9) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Lime; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(20, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 80); + Item.rare = ItemRarityID.Lime; } } } diff --git a/Items/Potions/Alcohol/Tequila.cs b/Items/Potions/Alcohol/Tequila.cs index 3a87ad876d..77cf945a86 100644 --- a/Items/Potions/Alcohol/Tequila.cs +++ b/Items/Potions/Alcohol/Tequila.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,24 +14,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(163, 110, 10), + new Color(176, 135, 0), + new Color(194, 132, 25) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(16, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 30); + Item.rare = ItemRarityID.LightRed; } } } diff --git a/Items/Potions/Alcohol/TequilaSunrise.cs b/Items/Potions/Alcohol/TequilaSunrise.cs index c6c181562c..52f9a4a1e7 100644 --- a/Items/Potions/Alcohol/TequilaSunrise.cs +++ b/Items/Potions/Alcohol/TequilaSunrise.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,24 +13,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(220, 75, 59), + new Color(229, 147, 47), + new Color(255, 190, 76) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Yellow; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(22, 28, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(gold: 1); + Item.rare = ItemRarityID.Yellow; } } } diff --git a/Items/Potions/Alcohol/Vodka.cs b/Items/Potions/Alcohol/Vodka.cs index 56a28b6ecf..819f19c56f 100644 --- a/Items/Potions/Alcohol/Vodka.cs +++ b/Items/Potions/Alcohol/Vodka.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,24 +14,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Another clear drink + ItemID.Sets.DrinkParticleColors[Type] = new Color[2] { + new Color(219, 219, 208, 180), + new Color(181, 181, 176, 180) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightPurple; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(14, 36, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 40); + Item.rare = ItemRarityID.LightPurple; } } } diff --git a/Items/Potions/Alcohol/Whiskey.cs b/Items/Potions/Alcohol/Whiskey.cs index 1b79dd7714..08439d4a39 100644 --- a/Items/Potions/Alcohol/Whiskey.cs +++ b/Items/Potions/Alcohol/Whiskey.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,24 +14,19 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(227, 148, 11), + new Color(235, 177, 5), + new Color(250, 190, 12) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightRed; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); + Item.DefaultToFood(18, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 30); + Item.rare = ItemRarityID.LightRed; } } } diff --git a/Items/Potions/Alcohol/WhiteWine.cs b/Items/Potions/Alcohol/WhiteWine.cs index be17479df9..a011a932a2 100644 --- a/Items/Potions/Alcohol/WhiteWine.cs +++ b/Items/Potions/Alcohol/WhiteWine.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using Microsoft.Xna.Framework; using Terraria; using Terraria.GameInput; using Terraria.ID; @@ -12,25 +13,21 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + // Clear, yellow-green + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(242, 252, 177, 180), + new Color(250, 252, 215, 180), + new Color(228, 245, 181, 180) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.LightPurple; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; + Item.DefaultToFood(14, 44, ModContent.BuffType(), CalamityUtils.SecondsToFrames(300f), true); Item.healMana = 300; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(300f); // Cirrus overcharges: 10% sell value instead of 20% Item.value = Item.sellPrice(silver: 40); + Item.rare = ItemRarityID.LightPurple; } public override void OnConsumeItem(Player player) diff --git a/Items/Potions/AnechoicCoating.cs b/Items/Potions/AnechoicCoating.cs index 03b07c7f64..bc876056a2 100644 --- a/Items/Potions/AnechoicCoating.cs +++ b/Items/Potions/AnechoicCoating.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,22 +13,17 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[2] { + new Color(118, 182, 199), + new Color(150, 227, 230) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.EatFood; + // How do you even use this? + Item.DefaultToFood(22, 26, ModContent.BuffType(), CalamityUtils.SecondsToFrames(240f)); Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(240f); - Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index 8c308b7d0d..59ca31b05b 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -13,22 +14,15 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; + ItemID.Sets.DrinkParticleColors[Type] = new Color[2] { + new Color(255, 164, 94), + new Color(109, 242, 196) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(5f); - + Item.DefaultToFood(14, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(5f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Lime; } diff --git a/Items/Potions/AureusCell.cs b/Items/Potions/AureusCell.cs index 14a10bb22e..5d03d2eacb 100644 --- a/Items/Potions/AureusCell.cs +++ b/Items/Potions/AureusCell.cs @@ -1,4 +1,5 @@ -using Terraria; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.GameInput; using Terraria.ID; using Terraria.ModLoader; @@ -12,23 +13,19 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.FoodParticleColors[Type] = new Color[3] { + new Color(187, 220, 237), + new Color(237, 93, 83), + new Color(123, 99, 130) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.EatFood; + // Eating animation but gulp sound? Sure + Item.DefaultToFood(22, 38, BuffID.MagicPower, CalamityUtils.SecondsToFrames(360f)); Item.healMana = 200; Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = BuffID.MagicPower; - Item.buffTime = CalamityUtils.SecondsToFrames(360f); - Item.value = Item.sellPrice(silver: 50); // Based on material cost rather than potion cost Item.rare = ItemRarityID.Lime; } diff --git a/Items/Potions/Baguette.cs b/Items/Potions/Baguette.cs index 406e1e1d26..df1038ef1c 100644 --- a/Items/Potions/Baguette.cs +++ b/Items/Potions/Baguette.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Potions; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,26 +12,19 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.FoodParticleColors[Type] = new Color[3] { + new Color(231, 137, 159), + new Color(179, 104, 56), + new Color(108, 47, 16) + }; } public override void SetDefaults() { - Item.width = 52; - Item.height = 38; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.EatFood; - Item.UseSound = SoundID.Item2; - Item.consumable = true; - + Item.DefaultToFood(52, 38, BuffID.WellFed, CalamityUtils.SecondsToFrames(300f)); Item.value = Item.sellPrice(silver: 1); Item.rare = ItemRarityID.Blue; Item.Calamity().donorItem = true; - - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(300f); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) @@ -40,9 +34,9 @@ namespace CalamityMod.Items.Potions public override void OnConsumeItem(Player player) { - //5 minutes for both - player.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(300f)); - player.AddBuff(BuffID.WellFed, CalamityUtils.SecondsToFrames(300f)); + // 5 minutes for both + player.AddBuff(BuffID.WellFed, Item.buffTime); + player.AddBuff(ModContent.BuffType(), Item.buffTime); } public override void AddRecipes() diff --git a/Items/Potions/BlasphemousDonut.cs b/Items/Potions/BlasphemousDonut.cs index 9bf9b9f556..44f4d3c1d2 100644 --- a/Items/Potions/BlasphemousDonut.cs +++ b/Items/Potions/BlasphemousDonut.cs @@ -1,4 +1,5 @@ -using Terraria; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,21 +11,15 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.FoodParticleColors[Type] = new Color[3] { + new Color(122, 66, 59), + new Color(206, 116, 59), + new Color(198, 153, 113) + }; } public override void SetDefaults() { - Item.width = 40; - Item.height = 26; - Item.maxStack = 9999; - Item.consumable = true; - Item.useAnimation = 17; - Item.useTime = 17; - Item.UseSound = SoundID.Item2; - Item.useStyle = ItemUseStyleID.EatFood; - Item.useTurn = true; - Item.buffType = BuffID.WellFed2; - Item.buffTime = CalamityUtils.SecondsToFrames(3600f); - + Item.DefaultToFood(40, 26, BuffID.WellFed2, CalamityUtils.SecondsToFrames(3600f)); Item.value = Item.sellPrice(silver: 60); Item.rare = ItemRarityID.Purple; } diff --git a/Items/Potions/BoundingPotion.cs b/Items/Potions/BoundingPotion.cs index 57e6d13131..db489e51e4 100644 --- a/Items/Potions/BoundingPotion.cs +++ b/Items/Potions/BoundingPotion.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,22 +13,15 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[2] { + new Color(213, 255, 226), + new Color(141, 220, 166) + }; } public override void SetDefaults() { - Item.width = 26; - Item.height = 38; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(300f); - + Item.DefaultToFood(26, 38, ModContent.BuffType(), CalamityUtils.SecondsToFrames(300f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Potions/CalciumPotion.cs b/Items/Potions/CalciumPotion.cs index fcd9120b13..672a6e1f67 100644 --- a/Items/Potions/CalciumPotion.cs +++ b/Items/Potions/CalciumPotion.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,22 +13,15 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[2] { + new Color(194, 202, 134), + new Color(149, 144, 86) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(1200f); - + Item.DefaultToFood(18, 30, ModContent.BuffType(), CalamityUtils.SecondsToFrames(1200f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Potions/CeaselessHungerPotion.cs b/Items/Potions/CeaselessHungerPotion.cs index 897dfa116b..63ceb3b079 100644 --- a/Items/Potions/CeaselessHungerPotion.cs +++ b/Items/Potions/CeaselessHungerPotion.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(12, 18, 28), + new Color(110, 197, 212), + new Color(158, 81, 153) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(10f); - + Item.DefaultToFood(22, 32, ModContent.BuffType(), CalamityUtils.SecondsToFrames(10f), true); Item.value = Item.sellPrice(silver: 10); Item.rare = ModContent.RarityType(); } diff --git a/Items/Potions/DeliciousMeat.cs b/Items/Potions/DeliciousMeat.cs index ebfb973d48..f03920f06f 100644 --- a/Items/Potions/DeliciousMeat.cs +++ b/Items/Potions/DeliciousMeat.cs @@ -1,4 +1,5 @@ -using Terraria; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,21 +11,14 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; + ItemID.Sets.FoodParticleColors[Type] = new Color[2] { + new Color(147, 197, 206), + new Color(94, 131, 168), + }; } public override void SetDefaults() { - Item.width = 32; - Item.height = 30; - Item.maxStack = 9999; - Item.consumable = true; - Item.useAnimation = 17; - Item.useTime = 17; - Item.UseSound = SoundID.Item2; - Item.useStyle = ItemUseStyleID.EatFood; - Item.useTurn = true; - Item.buffType = BuffID.WellFed2; - Item.buffTime = CalamityUtils.SecondsToFrames(1800f); - + Item.DefaultToFood(32, 30, BuffID.WellFed2, CalamityUtils.SecondsToFrames(1800f)); Item.value = Item.buyPrice(silver: 50); // Sold by Archmage Item.rare = ItemRarityID.Pink; } diff --git a/Items/Potions/FlaskOfBrimstone.cs b/Items/Potions/FlaskOfBrimstone.cs index 37840d1eec..69610c0c06 100644 --- a/Items/Potions/FlaskOfBrimstone.cs +++ b/Items/Potions/FlaskOfBrimstone.cs @@ -1,6 +1,6 @@ using CalamityMod.Buffs.Potions; -using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(240, 95, 64), + new Color(227, 52, 68), + new Color(189, 112, 123) + }; } public override void SetDefaults() { - Item.width = 30; - Item.height = 34; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(1200f); - + Item.DefaultToFood(30, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(1200f), true); Item.value = Item.sellPrice(silver: 5); Item.rare = ItemRarityID.LightRed; } diff --git a/Items/Potions/FlaskOfCrumbling.cs b/Items/Potions/FlaskOfCrumbling.cs index 2f3387bda8..c0ee5ce802 100644 --- a/Items/Potions/FlaskOfCrumbling.cs +++ b/Items/Potions/FlaskOfCrumbling.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(243, 205, 45), + new Color(192, 97, 38), + new Color(225, 162, 58) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(1200f); - + Item.DefaultToFood(32, 28, ModContent.BuffType(), CalamityUtils.SecondsToFrames(1200f), true); Item.value = Item.sellPrice(silver: 5); Item.rare = ItemRarityID.LightRed; } diff --git a/Items/Potions/FlaskOfHolyFlames.cs b/Items/Potions/FlaskOfHolyFlames.cs index 1005371092..7c2d8e958d 100644 --- a/Items/Potions/FlaskOfHolyFlames.cs +++ b/Items/Potions/FlaskOfHolyFlames.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(252, 23, 23), + new Color(199, 14, 51), + new Color(143, 36, 72) + }; } public override void SetDefaults() { - Item.width = 44; - Item.height = 36; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(1200f); - + Item.DefaultToFood(44, 36, ModContent.BuffType(), CalamityUtils.SecondsToFrames(1200f), true); Item.value = Item.sellPrice(silver: 5); Item.rare = ItemRarityID.Purple; } diff --git a/Items/Potions/GravityNormalizerPotion.cs b/Items/Potions/GravityNormalizerPotion.cs index f75c469072..7397185372 100644 --- a/Items/Potions/GravityNormalizerPotion.cs +++ b/Items/Potions/GravityNormalizerPotion.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Fishing.AstralCatches; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(255, 164, 94), + new Color(109, 242, 196), + new Color(255, 255, 191) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); - + Item.DefaultToFood(24, 36, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Lime; } diff --git a/Items/Potions/HadalStew.cs b/Items/Potions/HadalStew.cs index 7cc4e41010..5dacc07830 100644 --- a/Items/Potions/HadalStew.cs +++ b/Items/Potions/HadalStew.cs @@ -2,6 +2,7 @@ using System.Linq; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Placeables; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.Localization; @@ -21,23 +22,19 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; + // Even though this uses the drinking animation, it does not use DrinkParticleColors + // This is so that dusts fly out (like Bowl of Soup) instead of drip down (like Apple Juice) + ItemID.Sets.FoodParticleColors[Type] = new Color[4] { + new Color(185, 117, 70), + new Color(214, 98, 44), + new Color(235, 156, 117), + new Color(89, 54, 46) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.potion = true; - Item.healLife = 120; - Item.healMana = 150; - + Item.DefaultToHealingPotion(28, 18, 120); Item.value = Item.sellPrice(silver: 40); Item.rare = ItemRarityID.Green; } diff --git a/Items/Potions/OmegaHealingPotion.cs b/Items/Potions/OmegaHealingPotion.cs index edbc269fc0..a4e28baa46 100644 --- a/Items/Potions/OmegaHealingPotion.cs +++ b/Items/Potions/OmegaHealingPotion.cs @@ -1,6 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Rarities; -using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +13,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(255, 31, 25), + new Color(162, 28, 25), + new Color(159, 10, 111) + }; } public override void SetDefaults() { - Item.width = 24; - Item.height = 32; - Item.useTurn = true; - Item.maxStack = 9999; - Item.healLife = 300; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.potion = true; - + Item.DefaultToHealingPotion(24, 32, 300); Item.value = Item.sellPrice(gold: 1); Item.rare = ModContent.RarityType(); } diff --git a/Items/Potions/PhotosynthesisPotion.cs b/Items/Potions/PhotosynthesisPotion.cs index 536a6f4b36..49ada46832 100644 --- a/Items/Potions/PhotosynthesisPotion.cs +++ b/Items/Potions/PhotosynthesisPotion.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,22 +13,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(246, 235, 143), + new Color(230, 204, 121), + new Color(214, 173, 78) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); - + Item.DefaultToFood(30, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.LightRed; } diff --git a/Items/Potions/PotionofOmniscience.cs b/Items/Potions/PotionofOmniscience.cs index ef6c05b4eb..a17b98283c 100644 --- a/Items/Potions/PotionofOmniscience.cs +++ b/Items/Potions/PotionofOmniscience.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,22 +13,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(159, 67, 199), + new Color(176, 147, 243), + new Color(84, 50, 185) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 30; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(900f); - + Item.DefaultToFood(28, 30, ModContent.BuffType(), CalamityUtils.SecondsToFrames(900f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Orange; } diff --git a/Items/Potions/ShadowPotion.cs b/Items/Potions/ShadowPotion.cs index 711d9e66a9..8463f9dfb7 100644 --- a/Items/Potions/ShadowPotion.cs +++ b/Items/Potions/ShadowPotion.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(45, 45, 45), + new Color(0, 0, 0), + new Color(95, 0, 36) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(480f); - + Item.DefaultToFood(20, 28, ModContent.BuffType(), CalamityUtils.SecondsToFrames(480f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Orange; } diff --git a/Items/Potions/SoaringPotion.cs b/Items/Potions/SoaringPotion.cs index f83aae8d07..58a57bdfaf 100644 --- a/Items/Potions/SoaringPotion.cs +++ b/Items/Potions/SoaringPotion.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Fishing.SunkenSeaCatches; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,23 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(85, 181, 217), + new Color(190, 237, 232), + new Color(81, 114, 173) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Orange; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(360f); - + Item.DefaultToFood(30, 30, ModContent.BuffType(), CalamityUtils.SecondsToFrames(360f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.LightRed; } diff --git a/Items/Potions/SulphurskinPotion.cs b/Items/Potions/SulphurskinPotion.cs index 509acbd2a7..0bc6aa530d 100644 --- a/Items/Potions/SulphurskinPotion.cs +++ b/Items/Potions/SulphurskinPotion.cs @@ -1,7 +1,7 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; -using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,22 +14,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(133, 180, 49), + new Color(80, 139, 81), + new Color(117, 95, 133) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(150f); - + Item.DefaultToFood(22, 26, ModContent.BuffType(), CalamityUtils.SecondsToFrames(150f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Green; } diff --git a/Items/Potions/SupremeHealingPotion.cs b/Items/Potions/SupremeHealingPotion.cs index 83abc7325a..8d2d5d7d74 100644 --- a/Items/Potions/SupremeHealingPotion.cs +++ b/Items/Potions/SupremeHealingPotion.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,22 +12,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(255, 31, 25), + new Color(217, 19, 15), + new Color(255, 0, 221) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.healLife = 250; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.potion = true; - + Item.DefaultToHealingPotion(26, 38, 250); Item.value = Item.sellPrice(silver: 60); Item.rare = ItemRarityID.Purple; } diff --git a/Items/Potions/SupremeManaPotion.cs b/Items/Potions/SupremeManaPotion.cs index f768e6e58d..d01a3e3283 100644 --- a/Items/Potions/SupremeManaPotion.cs +++ b/Items/Potions/SupremeManaPotion.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -11,21 +12,17 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(0, 255, 250), + new Color(26, 117, 177), + new Color(160, 82, 144) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; + Item.DefaultToFood(34, 38, 0, 0, true); Item.healMana = 400; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.value = Item.sellPrice(silver: 10); Item.rare = ItemRarityID.Purple; } diff --git a/Items/Potions/ZenPotion.cs b/Items/Potions/ZenPotion.cs index 518b710634..0c7dafcea5 100644 --- a/Items/Potions/ZenPotion.cs +++ b/Items/Potions/ZenPotion.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,23 +13,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(216, 230, 236), + new Color(137, 149, 173), + new Color(102, 85, 128) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Orange; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(900f); - + Item.DefaultToFood(24, 28, ModContent.BuffType(), CalamityUtils.SecondsToFrames(900f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.LightRed; } diff --git a/Items/Potions/ZergPotion.cs b/Items/Potions/ZergPotion.cs index 02cfad7f8c..36bb9e4866 100644 --- a/Items/Potions/ZergPotion.cs +++ b/Items/Potions/ZergPotion.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -12,23 +13,16 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(223, 135, 244), + new Color(94, 74, 213), + new Color(156, 217, 246) + }; } public override void SetDefaults() { - Item.width = 28; - Item.height = 18; - Item.useTurn = true; - Item.maxStack = 9999; - Item.rare = ItemRarityID.Orange; - Item.useAnimation = 17; - Item.useTime = 17; - Item.useStyle = ItemUseStyleID.DrinkLiquid; - Item.UseSound = SoundID.Item3; - Item.consumable = true; - Item.buffType = ModContent.BuffType(); - Item.buffTime = CalamityUtils.SecondsToFrames(900f); - + Item.DefaultToFood(24, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(900f), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.LightRed; } From 04f05c1a7122acf27d44e96dff20c5ea4082c92c Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:12:50 +0700 Subject: [PATCH 09/21] verium bolt afterimage fixes - fixes verium bolt drawing itself twice from predraw true - fixes afterimage rotation following the current arrow rotation due to using DrawAfterimagesCentered type 0 --- Projectiles/Ranged/VeriumBoltProj.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Ranged/VeriumBoltProj.cs b/Projectiles/Ranged/VeriumBoltProj.cs index cfe3975f58..229b93e41e 100644 --- a/Projectiles/Ranged/VeriumBoltProj.cs +++ b/Projectiles/Ranged/VeriumBoltProj.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, 0, Color.Plum); - return true; + CalamityUtils.DrawAfterimagesCentered(Projectile, 2, Color.Plum); + return false; } public override void AI() From e12b5c52079fc93601c64e0941512d992a06b1c9 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:21:10 +0700 Subject: [PATCH 10/21] removed the piss sfx from prisms change inspired by vanilla removing them from last prism its so much better --- Items/Weapons/Magic/DarkSpark.cs | 1 - Items/Weapons/Magic/YharimsCrystal.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/Items/Weapons/Magic/DarkSpark.cs b/Items/Weapons/Magic/DarkSpark.cs index a865c3c00a..bfb28a081d 100644 --- a/Items/Weapons/Magic/DarkSpark.cs +++ b/Items/Weapons/Magic/DarkSpark.cs @@ -29,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; - Item.UseSound = SoundID.Item13; Item.useStyle = ItemUseStyleID.HoldUp; Item.channel = true; Item.noMelee = true; diff --git a/Items/Weapons/Magic/YharimsCrystal.cs b/Items/Weapons/Magic/YharimsCrystal.cs index a7cee17813..79f6ee338e 100644 --- a/Items/Weapons/Magic/YharimsCrystal.cs +++ b/Items/Weapons/Magic/YharimsCrystal.cs @@ -26,7 +26,6 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; - Item.UseSound = SoundID.Item13; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.noUseGraphic = true; From 81d60f69df881eb3334fc9eaed525a0ddacc763b Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 15 Oct 2024 00:15:31 +0700 Subject: [PATCH 11/21] lesser greater luck icons --- CalPlayer/CalamityPlayerMiscEffects.cs | 17 ++++++++++++++++- ExtraTextures/ExtraTextureRefs.cs | 11 +++++++++++ ExtraTextures/VanillaBuffs/LuckyGreater.png | Bin 0 -> 622 bytes ExtraTextures/VanillaBuffs/LuckyLesser.png | Bin 0 -> 612 bytes 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ExtraTextures/VanillaBuffs/LuckyGreater.png create mode 100644 ExtraTextures/VanillaBuffs/LuckyLesser.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c3420d51e5..2a75f7b979 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -860,12 +860,27 @@ namespace CalamityMod.CalPlayer private void MiscEffects() { - // Update Carpet textures + // Update textures if (Main.netMode != NetmodeID.Server && Player.whoAmI == Main.myPlayer) { Asset carpetAuric = ExtraTextureRefs.FlyingCarpetAuric; Asset carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla; TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal); + + for (int l = 0; l < Player.MaxBuffs; l++) + { + if (Player.buffType[l] != BuffID.Lucky) + continue; + + if (Player.buffTime[l] > CalamityUtils.SecondsToFrames(600f)) + TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconGreater; + else if (Player.buffTime[l] > CalamityUtils.SecondsToFrames(300f)) + TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconVanilla; + else + TextureAssets.Buff[BuffID.Lucky] = ExtraTextureRefs.LuckIconLesser; + + break; + } } // Calculate/reset DoG cart rotations based on whether the DoG cart is in use. diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs index 724db66b6e..aaf5d76299 100644 --- a/ExtraTextures/ExtraTextureRefs.cs +++ b/ExtraTextures/ExtraTextureRefs.cs @@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.GameContent; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.ExtraTextures @@ -32,6 +33,11 @@ namespace CalamityMod.ExtraTextures public static Asset FlyingCarpetVanilla; public static Asset FlyingCarpetAuric; + // Lucky Buff icon replacements + public static Asset LuckIconGreater; + public static Asset LuckIconVanilla; + public static Asset LuckIconLesser; + // Boss Heads // I know it's not exactly a Texture2D but it belongs to ExtraTextures. public static int BossHeadIndex_ChadPrime; @@ -60,6 +66,10 @@ namespace CalamityMod.ExtraTextures FlyingCarpetVanilla = TextureAssets.FlyingCarpet; FlyingCarpetAuric = ModContent.Request("CalamityMod/ExtraTextures/AuricCarpet", AssetRequestMode.AsyncLoad); + + LuckIconGreater = ModContent.Request("CalamityMod/ExtraTextures/VanillaBuffs/LuckyGreater", AssetRequestMode.AsyncLoad); + LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky]; + LuckIconLesser = ModContent.Request("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad); } public override void Unload() @@ -67,6 +77,7 @@ namespace CalamityMod.ExtraTextures if (!Main.dedServ) { TextureAssets.FlyingCarpet = FlyingCarpetVanilla; + TextureAssets.Buff[BuffID.Lucky] = LuckIconVanilla; } } } diff --git a/ExtraTextures/VanillaBuffs/LuckyGreater.png b/ExtraTextures/VanillaBuffs/LuckyGreater.png new file mode 100644 index 0000000000000000000000000000000000000000..76441d55cdc07fee478c9eac07501e34ddf60a34 GIT binary patch literal 622 zcmV-!0+IcRP)Px#1ZP1_K>z@;j|==^1poj6{z*hZR9HvVmq925Q5eT(c9l}o9vv(;4wRfEDI^X! z$VPi{;XtlJIXF8goHw`@iyS(>m?G{U7%C z?aZ6q{r>O!-g|4t#=8tp@sm53f-)&KIcjMh@J_3_5QGol8L}b0s08zj8ODB0$D0(;~^wHS6bz`Z$o- z@LmgZIV)=cbG5KcZ0fBg=7$=Hfz$`_?fQr4?rjk<9>R6ysC3Hg5w)YQ1ANXy;ULkP zX(mGU`iqQ&!fP!u62g7u#CsgM+`iqiEu*0-B3CZ?3*H5BdvlgLu7{PM^|7R&m1*mA3PDOrwiZ& zl<$ZTOYMr7Yc6E2?{270L?uo%a0ZS*JagXn{0tdgC1~V;IuG#EEu26mtVYl+YOUv) z<9T@ws3HgW>DcF-kKGgE)vhGRCl5vc>*qjG7qARU{!@ZjwR7P)eb#~4uvpXM=UH;1 zTq=C8=YFLfFpOWiefzGE{B8gM000hUSV?A0O#mtY000O800000007cclK=n!07*qo IM6N<$f`6JBwEzGB literal 0 HcmV?d00001 diff --git a/ExtraTextures/VanillaBuffs/LuckyLesser.png b/ExtraTextures/VanillaBuffs/LuckyLesser.png new file mode 100644 index 0000000000000000000000000000000000000000..95ed2f505fc16f288028672746a997baa838c2fd GIT binary patch literal 612 zcmV-q0-ODbP)Px#1ZP1_K>z@;j|==^1poj6^hrcPR9Hvlmpe-XK@^3PRj>?br$NO>EKDJ!vJHZb zkVY&7m7s_}Knt~23;h8iN>ITM!~@H> z*(~hbGjr$O2~H%Y14^0n#XD|(N#1vZiVl9YP-+y2Jo{Qx@CXD}(sy8L^$3)z-tN@z zwD`VB`-vei)&+RfvD@RoK~XzEbqueA3-ftU>i8rIM&Gm(`A+@5)M;iLoaw`q`&y3J z=76(XRPg7Vk%u=2K&h8m7ffZRz+~(atc~`A6rG|IZtfnetwq3=JJ4R|kL9?}VE0)Z zWaQzc5wI5T0Vz6pe6j($xkZp_xdX-lIE6=jc@Z<}M)A3tb6j5JGWws$o-8o!19Fb3 zr|T-HTvC$%(~a`h1ITRP4r<>%AZvkifMT9Aa!O`_DRO&j0Uh9;&iw5i?*QcrXJ&9M zNXc43XRULTF0000 Date: Tue, 15 Oct 2024 02:15:01 -0400 Subject: [PATCH 12/21] Dancing on Boss Rush screen shader's grave This thing has been nothing but a major detriment to Boss Rush's enjoyability, rest in piss bozo --- Scenes/MiscScenes/BossRushScene.cs | 8 +++++++- Skies/BossRushScreenShader.cs | 23 ----------------------- Skies/BossRushSky.cs | 8 -------- Systems/Graphic/SkyEffectLoaderSystem.cs | 1 - 4 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 Skies/BossRushScreenShader.cs diff --git a/Scenes/MiscScenes/BossRushScene.cs b/Scenes/MiscScenes/BossRushScene.cs index 15dd9727b2..e9f9a021b3 100644 --- a/Scenes/MiscScenes/BossRushScene.cs +++ b/Scenes/MiscScenes/BossRushScene.cs @@ -39,7 +39,13 @@ namespace CalamityMod.Systems SkyManager.Instance.Update(new GameTime()); } - player.ManageSpecialBiomeVisuals("CalamityMod:BossRush", isActive); + if (SkyManager.Instance["CalamityMod:BossRush"] != null && isActive != SkyManager.Instance["CalamityMod:BossRush"].IsActive()) + { + if (isActive) + SkyManager.Instance.Activate("CalamityMod:BossRush"); + else + SkyManager.Instance.Deactivate("CalamityMod:BossRush"); + } } public override float GetWeight(Player player) => 1f; diff --git a/Skies/BossRushScreenShader.cs b/Skies/BossRushScreenShader.cs deleted file mode 100644 index 221d4e516a..0000000000 --- a/Skies/BossRushScreenShader.cs +++ /dev/null @@ -1,23 +0,0 @@ -using CalamityMod.Events; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Graphics.Shaders; - -namespace CalamityMod.Skies -{ - public class BossRushScreenShader : ScreenShaderData - { - public BossRushScreenShader(string passName) : base(passName) { } - - public override void Apply() - { - UseTargetPosition(Main.LocalPlayer.Center); - base.Apply(); - } - - public override void Update(GameTime gameTime) - { - UseColor(Color.Lerp(BossRushSky.GeneralColor, Color.Black, BossRushEvent.WhiteDimness)); - } - } -} diff --git a/Skies/BossRushSky.cs b/Skies/BossRushSky.cs index b36fed965a..c5c2d7c66c 100644 --- a/Skies/BossRushSky.cs +++ b/Skies/BossRushSky.cs @@ -33,14 +33,6 @@ namespace CalamityMod.Skies SkyManager.Instance.Deactivate("CalamityMod:BossRush", new object[0]); } - if (useEffect != Filters.Scene["CalamityMod:BossRush"].IsActive()) - { - if (useEffect) - Filters.Scene.Activate("CalamityMod:BossRush"); - else - Filters.Scene["CalamityMod:BossRush"].Deactivate(new object[0]); - } - return useEffect; } diff --git a/Systems/Graphic/SkyEffectLoaderSystem.cs b/Systems/Graphic/SkyEffectLoaderSystem.cs index 07ed6e0aac..8e8588063f 100644 --- a/Systems/Graphic/SkyEffectLoaderSystem.cs +++ b/Systems/Graphic/SkyEffectLoaderSystem.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Systems Filters.Scene["CalamityMod:Signus"] = new Filter(new SignusScreenShaderData("FilterMiniTower").UseColor(0.35f, 0.1f, 0.55f).UseOpacity(0.35f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:Signus"] = new SignusSky(); - Filters.Scene["CalamityMod:BossRush"] = new Filter(new BossRushScreenShader("FilterMiniTower").UseOpacity(0.75f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:BossRush"] = new BossRushSky(); Filters.Scene["CalamityMod:ExoMechs"] = new Filter(new ExoMechsScreenShaderData("FilterMiniTower").UseColor(ExoMechsSky.DrawColor).UseOpacity(0.25f), EffectPriority.VeryHigh); From 9793c7b4ee9a80b485f85986928964dbfbba72c5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 15 Oct 2024 02:22:27 -0400 Subject: [PATCH 13/21] This King Slime despawn distance is too low, he was repeatedly despawning on me while attempting to test Boss Rush --- NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs index a5b3038f78..bfea3c597a 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs @@ -221,7 +221,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Despawn - int despawnDistance = 60; + int despawnDistance = 150; if (Main.player[npc.target].dead || Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) { CalamityUtils.CalamityTargeting(npc, default); From 320a0ae65a3a5ca3d13a3265fcc19e0061fd703c Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 15 Oct 2024 02:00:23 -0500 Subject: [PATCH 14/21] Correct despawn solution. --- NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs index bfea3c597a..576e88f341 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs @@ -221,12 +221,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Despawn - int despawnDistance = 150; - if (Main.player[npc.target].dead || Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) + int despawnDistance = 60; + if (Main.player[npc.target].dead && Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) { CalamityUtils.CalamityTargeting(npc, default); - if (Main.player[npc.target].dead || Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) + if (Main.player[npc.target].dead && Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) { if (npc.timeLeft > 10) npc.timeLeft = 10; From 3a1b37bc692d6d2945ddfd58c1ae8ccf89f57e4c Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 15 Oct 2024 02:06:24 -0500 Subject: [PATCH 15/21] Added a forced despawn distance. --- NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs index 576e88f341..dca7c85d7d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs @@ -222,11 +222,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Despawn int despawnDistance = 60; - if (Main.player[npc.target].dead && Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) + int forceDespawnDistance = 300; + if ((Main.player[npc.target].dead && Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) || Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > forceDespawnDistance) { CalamityUtils.CalamityTargeting(npc, default); - if (Main.player[npc.target].dead && Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) + if ((Main.player[npc.target].dead && Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > despawnDistance) || Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) / 16f > forceDespawnDistance) { if (npc.timeLeft > 10) npc.timeLeft = 10; From 42f2b39be275e71595afa7dd515ef6d2bda73063 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Tue, 15 Oct 2024 01:20:26 -0700 Subject: [PATCH 16/21] lorde's desperation phase health bar support --- NPCs/Other/THELORDE.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NPCs/Other/THELORDE.cs b/NPCs/Other/THELORDE.cs index dc4b4ad615..a970175053 100644 --- a/NPCs/Other/THELORDE.cs +++ b/NPCs/Other/THELORDE.cs @@ -130,6 +130,8 @@ namespace CalamityMod.NPCs.Other aiSwitchCounter++; if (ajitPaiDidNothingWrong && invincibleCounter < 6000) { + // On a technical level, the defense/DR stat is not being increased, but for player purposes he may as well be + NPC.Calamity().CurrentlyIncreasingDefenseOrDR = true; invincibleCounter++; } NPC.alpha -= 100; @@ -155,6 +157,7 @@ namespace CalamityMod.NPCs.Other // Trigger the death animation else if (NPC.life <= 1 && invincibleCounter >= 6000) { + NPC.Calamity().CurrentlyIncreasingDefenseOrDR = false; NPC.life = 1; if (!Dying) { From 387ef90d26249d6b93032b4481d08473dad95ec6 Mon Sep 17 00:00:00 2001 From: Flowaria Date: Tue, 15 Oct 2024 19:46:38 +0900 Subject: [PATCH 17/21] Removed NPC.damage > 0 condition from Radar --- ILEditing/ILChangesLoading.cs | 1 + ILEditing/VanillaStupidityFixingILChanges.cs | 27 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 970fbe41bd..49f6baa33e 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -205,6 +205,7 @@ namespace CalamityMod.ILEditing IL_Player.TileInteractionsUse += RemovePowerCellPlanteraLock; On_Player.ItemCheck_CheckCanUse += RemoveCelestialSigilUseLock; On_Player.ItemCheck_UseEventItems += ApplyCelestialSigilChanges; + IL_Main.DrawInfoAccs += RemoveDamageConditionFromRadar; // Fix vanilla bugs exposed by Calamity mechanics IL_NPC.NPCLoot += FixSplittingWormBannerDrops; diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index 2f71ef7703..dcc3046b3b 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -1103,6 +1103,33 @@ namespace CalamityMod.ILEditing } #endregion + #region Remove NPC.damage Condition from Radar + private static void RemoveDamageConditionFromRadar(ILContext il) + { + var cursor = new ILCursor(il); + + Func[] searchFor = + [ + (x => x.MatchLdfld(nameof(NPC.damage))), + (x => x.MatchLdcI4(out var comp) && comp == 0), + (x => x.MatchBle(out _)) //ble.s + ]; + + if (!cursor.TryGotoNext(MoveType.After, searchFor)) + { + LogFailure("Radar Condition", "Unable to locate condition for NPC.damage > 0"); + return; + } + + // branch is used for exit condition. So setting ble.s opcode to nop will remove the condition + cursor.Prev.OpCode = OpCodes.Nop; + + // After that we pop NPC.damage and 0 from stack + cursor.EmitPop(); + cursor.EmitPop(); + } + #endregion + // 02JUN2024: Ozzatron: The below code is being kept in its initial state for historic value. #region Store The Stupid Fucking Private Wind Map In Public Property [/*TotallyNot*/Obsolete("This function serves no purpose and is included in the Calamity source code for historic value.", error: true)] From f63b6d515276a1d8a5fc4040b2f9cfcf570dc736 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:23:21 +0700 Subject: [PATCH 18/21] SortingPriorityTerraforming updated to 1.4.4 --- Items/Ammo/AstralSolution.cs | 2 +- Items/Weapons/Typeless/StarStruckWater.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Ammo/AstralSolution.cs b/Items/Ammo/AstralSolution.cs index dcdd3e181b..4026fbb514 100644 --- a/Items/Ammo/AstralSolution.cs +++ b/Items/Ammo/AstralSolution.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Ammo public override void SetStaticDefaults() { Item.ResearchUnlockCount = 99; - ItemID.Sets.SortingPriorityTerraforming[Type] = 95; // Red Solution + ItemID.Sets.SortingPriorityTerraforming[Type] = 94; // Red Solution } public override void SetDefaults() => Item.DefaultToSolution(ModContent.ProjectileType()); diff --git a/Items/Weapons/Typeless/StarStruckWater.cs b/Items/Weapons/Typeless/StarStruckWater.cs index 110edb02eb..7fc6ff3c8d 100644 --- a/Items/Weapons/Typeless/StarStruckWater.cs +++ b/Items/Weapons/Typeless/StarStruckWater.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Typeless public override void SetStaticDefaults() { Item.ResearchUnlockCount = 99; - ItemID.Sets.SortingPriorityTerraforming[Type] = 92; // Blood Water + ItemID.Sets.SortingPriorityTerraforming[Type] = 88; // Blood Water } public override void SetDefaults() From 5d1614d64aab9a85387b3025cabbf9b8fc45db06 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:44:32 +0700 Subject: [PATCH 19/21] Type (item) --- Items/Accessories/Calamity.cs | 2 +- Items/Accessories/RoverDrive.cs | 2 +- Items/Accessories/ScuttlersJewel.cs | 2 +- Items/Accessories/TheSponge.cs | 4 ++-- Items/Accessories/Wings/SoulofCryogen.cs | 2 +- Items/Accessories/WulfrumBattery.cs | 2 +- Items/DraedonMisc/DraedonPowerCell.cs | 2 +- Items/Fishing/AstralCatches/AldebaranAlewife.cs | 2 +- Items/Fishing/AstralCatches/ArcturusAstroidean.cs | 2 +- Items/Fishing/AstralCatches/ProcyonidPrawn.cs | 2 +- Items/Fishing/AstralCatches/TwinklingPollox.cs | 2 +- Items/Fishing/BaseQuestFish.cs | 2 +- Items/Fishing/BrimstoneCragCatches/Bloodfin.cs | 2 +- Items/Fishing/BrimstoneCragCatches/CharredLasher.cs | 2 +- Items/Fishing/BrimstoneCragCatches/CoastalDemonfish.cs | 2 +- Items/Fishing/BrimstoneCragCatches/CragBullhead.cs | 2 +- Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs | 4 ++-- Items/Fishing/BrimstoneCragCatches/Havocfish.cs | 2 +- Items/Fishing/BrimstoneCragCatches/Shadowfish.cs | 2 +- Items/Fishing/EnchantedStarfish.cs | 2 +- Items/Fishing/FishingRods/RiftReeler.cs | 2 +- Items/Fishing/FishingRods/SlurperPole.cs | 2 +- Items/Fishing/FishingRods/TheDevourerofCods.cs | 2 +- Items/Fishing/FishofEleum.cs | 2 +- Items/Fishing/FishofFlight.cs | 2 +- Items/Fishing/FishofLight.cs | 2 +- Items/Fishing/FishofNight.cs | 2 +- Items/Fishing/GlimmeringGemfish.cs | 2 +- Items/Fishing/Gorecodile.cs | 2 +- Items/Fishing/StuffedFish.cs | 2 +- Items/Fishing/SunbeamFish.cs | 2 +- Items/Fishing/SunkenSeaCatches/GreenwaveLoach.cs | 2 +- Items/Fishing/SunkenSeaCatches/PrismaticGuppy.cs | 2 +- Items/Fishing/SunkenSeaCatches/SparklingEmpress.cs | 2 +- Items/Fishing/SunkenSeaCatches/SunkenSailfish.cs | 2 +- Items/LoreItems/LoreItem.cs | 2 +- Items/Materials/AscendantSpiritEssence.cs | 4 ++-- Items/Materials/AshesofAnnihilation.cs | 4 ++-- Items/Materials/AuricBar.cs | 2 +- Items/Materials/CoreofCalamity.cs | 2 +- Items/Materials/CoreofEleum.cs | 2 +- Items/Materials/CoreofHavoc.cs | 2 +- Items/Materials/CoreofSunlight.cs | 2 +- Items/Materials/DarkPlasma.cs | 2 +- Items/Materials/DarksunFragment.cs | 4 ++-- Items/Materials/EndothermicEnergy.cs | 4 ++-- Items/Materials/EssenceofEleum.cs | 4 ++-- Items/Materials/EssenceofHavoc.cs | 4 ++-- Items/Materials/EssenceofSunlight.cs | 4 ++-- Items/Materials/ExoPrism.cs | 4 ++-- Items/Materials/GalacticaSingularity.cs | 2 +- Items/Materials/MiracleMatter.cs | 4 ++-- Items/Materials/NightmareFuel.cs | 4 ++-- Items/Materials/PlasmaDriveCore.cs | 2 +- Items/Materials/SuspiciousScrap.cs | 4 ++-- Items/Materials/TwistingNether.cs | 2 +- Items/Materials/UnholyEssence.cs | 2 +- Items/Materials/YharonSoulFragment.cs | 2 +- Items/Placeables/Furniture/AlgalPrismTorch.cs | 4 ++-- Items/Placeables/Furniture/AstralTorch.cs | 2 +- Items/Placeables/Furniture/GloomTorch.cs | 2 +- Items/Placeables/Furniture/NavyPrismTorch.cs | 4 ++-- Items/Placeables/Furniture/RefractivePrismTorch.cs | 4 ++-- Items/Placeables/Furniture/SulphurousTorch.cs | 4 ++-- Items/Placeables/FurnitureAbyss/AbyssTorch.cs | 4 ++-- Items/Placeables/FurnitureMarnite/MarniteLight.cs | 2 +- Items/Placeables/FurnitureSacrilegious/LargeRitualCandle.cs | 2 +- Items/Placeables/FurnitureSacrilegious/RitualCandle.cs | 2 +- Items/RelicOfConvergence.cs | 2 +- Items/Tools/AxeofPurity.cs | 2 +- Items/Tools/CrystylCrusher.cs | 4 ++-- Items/Tools/Grax.cs | 2 +- Items/Tools/SeismicHampick.cs | 2 +- Items/TreasureBags/AquaticScourgeBag.cs | 2 +- Items/TreasureBags/AstrumAureusBag.cs | 2 +- Items/TreasureBags/AstrumDeusBag.cs | 2 +- Items/TreasureBags/BrimstoneWaifuBag.cs | 2 +- Items/TreasureBags/CalamitasCloneBag.cs | 2 +- Items/TreasureBags/CalamitasCoffer.cs | 2 +- Items/TreasureBags/CeaselessVoidBag.cs | 2 +- Items/TreasureBags/CrabulonBag.cs | 4 ++-- Items/TreasureBags/CryogenBag.cs | 2 +- Items/TreasureBags/DesertScourgeBag.cs | 4 ++-- Items/TreasureBags/DevourerofGodsBag.cs | 2 +- Items/TreasureBags/DraedonBag.cs | 2 +- Items/TreasureBags/DragonfollyBag.cs | 2 +- Items/TreasureBags/HiveMindBag.cs | 4 ++-- Items/TreasureBags/LeviathanBag.cs | 2 +- Items/TreasureBags/OldDukeBag.cs | 2 +- Items/TreasureBags/PerforatorBag.cs | 4 ++-- Items/TreasureBags/PlaguebringerGoliathBag.cs | 2 +- Items/TreasureBags/PolterghastBag.cs | 2 +- Items/TreasureBags/ProvidenceBag.cs | 2 +- Items/TreasureBags/RavagerBag.cs | 2 +- Items/TreasureBags/SignusBag.cs | 2 +- Items/TreasureBags/SlimeGodBag.cs | 4 ++-- Items/TreasureBags/StormWeaverBag.cs | 2 +- Items/TreasureBags/YharonBag.cs | 2 +- Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs | 2 +- Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs | 2 +- Items/Weapons/DraedonsArsenal/PlasmaCaster.cs | 2 +- Items/Weapons/Magic/AlulaAustralis.cs | 2 +- Items/Weapons/Magic/AquamarineStaff.cs | 2 +- Items/Weapons/Magic/ArchAmaryllis.cs | 2 +- Items/Weapons/Magic/AsteroidStaff.cs | 2 +- Items/Weapons/Magic/AstralStaff.cs | 2 +- Items/Weapons/Magic/AstralachneaStaff.cs | 2 +- Items/Weapons/Magic/Atlantis.cs | 2 +- Items/Weapons/Magic/BloodBath.cs | 2 +- Items/Weapons/Magic/BrimroseStaff.cs | 2 +- Items/Weapons/Magic/ChronomancersScythe.cs | 2 +- Items/Weapons/Magic/ClamorNoctus.cs | 2 +- Items/Weapons/Magic/DeathhailStaff.cs | 2 +- Items/Weapons/Magic/DivineRetribution.cs | 2 +- Items/Weapons/Magic/Downpour.cs | 2 +- Items/Weapons/Magic/EidolonStaff.cs | 2 +- Items/Weapons/Magic/Fabstaff.cs | 2 +- Items/Weapons/Magic/FatesReveal.cs | 2 +- Items/Weapons/Magic/GleamingMagnolia.cs | 2 +- Items/Weapons/Magic/HellwingStaff.cs | 2 +- Items/Weapons/Magic/Hematemesis.cs | 2 +- Items/Weapons/Magic/HyphaeRod.cs | 2 +- Items/Weapons/Magic/IcicleStaff.cs | 2 +- Items/Weapons/Magic/IcicleTrident.cs | 2 +- Items/Weapons/Magic/InfernalRift.cs | 2 +- Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs | 2 +- Items/Weapons/Magic/MagneticMeltdown.cs | 2 +- Items/Weapons/Magic/ManaRose.cs | 2 +- Items/Weapons/Magic/Miasma.cs | 2 +- Items/Weapons/Magic/Mistlestorm.cs | 2 +- Items/Weapons/Magic/NightsRay.cs | 2 +- Items/Weapons/Magic/Nucleosynthesis.cs | 2 +- Items/Weapons/Magic/ParasiticSceptor.cs | 2 +- Items/Weapons/Magic/PhantasmalFury.cs | 2 +- Items/Weapons/Magic/PhoenixFlameBarrage.cs | 2 +- Items/Weapons/Magic/Photosynthesis.cs | 2 +- Items/Weapons/Magic/PlagueStaff.cs | 2 +- Items/Weapons/Magic/PlasmaRifle.cs | 2 +- Items/Weapons/Magic/PlasmaRod.cs | 2 +- Items/Weapons/Magic/SHPC.cs | 2 +- Items/Weapons/Magic/SandstreamScepter.cs | 2 +- Items/Weapons/Magic/SanguineFlare.cs | 2 +- Items/Weapons/Magic/ShaderainStaff.cs | 2 +- Items/Weapons/Magic/ShadowboltStaff.cs | 2 +- Items/Weapons/Magic/SkyGlaze.cs | 2 +- Items/Weapons/Magic/SoulPiercer.cs | 2 +- Items/Weapons/Magic/SubsumingVortex.cs | 2 +- Items/Weapons/Magic/ThePrince.cs | 2 +- Items/Weapons/Magic/TheWand.cs | 2 +- Items/Weapons/Magic/ThornBlossom.cs | 2 +- Items/Weapons/Magic/UltraLiquidator.cs | 2 +- Items/Weapons/Magic/UndinesRetribution.cs | 2 +- Items/Weapons/Magic/ValkyrieRay.cs | 2 +- Items/Weapons/Magic/VeeringWind.cs | 2 +- Items/Weapons/Magic/Vehemence.cs | 2 +- Items/Weapons/Magic/VenusianTrident.cs | 2 +- Items/Weapons/Magic/Vesuvius.cs | 4 ++-- Items/Weapons/Magic/Viscera.cs | 2 +- Items/Weapons/Magic/VividClarity.cs | 2 +- Items/Weapons/Magic/VoidVortex.cs | 2 +- Items/Weapons/Magic/VoltaicClimax.cs | 2 +- Items/Weapons/Magic/WyvernsCall.cs | 2 +- Items/Weapons/Melee/AegisBlade.cs | 2 +- Items/Weapons/Melee/AirSpinner.cs | 6 +++--- Items/Weapons/Melee/AmidiasTrident.cs | 2 +- Items/Weapons/Melee/Aorta.cs | 6 +++--- Items/Weapons/Melee/AstralPike.cs | 2 +- Items/Weapons/Melee/Azathoth.cs | 6 +++--- Items/Weapons/Melee/BansheeHook.cs | 2 +- Items/Weapons/Melee/BotanicPiercer.cs | 2 +- Items/Weapons/Melee/Brimlance.cs | 2 +- Items/Weapons/Melee/BrimstoneSword.cs | 2 +- Items/Weapons/Melee/BrinyBaron.cs | 2 +- Items/Weapons/Melee/BrokenBiomeBlade.cs | 4 ++-- Items/Weapons/Melee/BurningRevelation.cs | 6 +++--- Items/Weapons/Melee/DeathsAscension.cs | 2 +- Items/Weapons/Melee/EarthenPike.cs | 2 +- Items/Weapons/Melee/FaultLine.cs | 6 +++--- Items/Weapons/Melee/GildedProboscis.cs | 2 +- Items/Weapons/Melee/GoldplumeSpear.cs | 2 +- Items/Weapons/Melee/HellionFlowerSpear.cs | 2 +- Items/Weapons/Melee/Hellkite.cs | 2 +- Items/Weapons/Melee/IridescentExcalibur.cs | 2 +- Items/Weapons/Melee/Lacerator.cs | 6 +++--- Items/Weapons/Melee/Nadir.cs | 2 +- Items/Weapons/Melee/Oblivion.cs | 6 +++--- Items/Weapons/Melee/OmegaBiomeBlade.cs | 2 +- Items/Weapons/Melee/Pandemic.cs | 6 +++--- Items/Weapons/Melee/PhotonRipper.cs | 2 +- Items/Weapons/Melee/PrismaticBreaker.cs | 4 ++-- Items/Weapons/Melee/Quagmire.cs | 6 +++--- Items/Weapons/Melee/RedtideSpear.cs | 2 +- Items/Weapons/Melee/Riptide.cs | 6 +++--- Items/Weapons/Melee/SaharaSlicers.cs | 2 +- Items/Weapons/Melee/SausageMaker.cs | 2 +- Items/Weapons/Melee/Shimmerspark.cs | 6 +++--- Items/Weapons/Melee/SmokingComet.cs | 6 +++--- Items/Weapons/Melee/StarnightLance.cs | 2 +- Items/Weapons/Melee/StygianShield.cs | 2 +- Items/Weapons/Melee/SulphurousGrabber.cs | 6 +++--- Items/Weapons/Melee/TenebreusTides.cs | 2 +- Items/Weapons/Melee/TheBurningSky.cs | 2 +- Items/Weapons/Melee/TheDarkMaster.cs | 4 ++-- Items/Weapons/Melee/TheGodsGambit.cs | 6 +++--- Items/Weapons/Melee/TheMicrowave.cs | 6 +++--- Items/Weapons/Melee/TheObliterator.cs | 6 +++--- Items/Weapons/Melee/TheOracle.cs | 6 +++--- Items/Weapons/Melee/VanishingPoint.cs | 2 +- Items/Weapons/Melee/VulcaniteLance.cs | 2 +- Items/Weapons/Melee/YateveoBloom.cs | 2 +- Items/Weapons/Melee/YinYo.cs | 6 +++--- Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs | 2 +- Items/Weapons/Ranged/Animosity.cs | 2 +- Items/Weapons/Ranged/BarracudaGun.cs | 2 +- Items/Weapons/Ranged/BloodBoiler.cs | 2 +- Items/Weapons/Ranged/BlossomFlux.cs | 2 +- Items/Weapons/Ranged/Buzzkill.cs | 2 +- Items/Weapons/Ranged/Condemnation.cs | 2 +- Items/Weapons/Ranged/CorinthPrime.cs | 2 +- Items/Weapons/Ranged/Drataliornus.cs | 2 +- Items/Weapons/Ranged/FirestormCannon.cs | 2 +- Items/Weapons/Ranged/Hellborn.cs | 2 +- Items/Weapons/Ranged/Hydra.cs | 2 +- Items/Weapons/Ranged/Infinity.cs | 2 +- Items/Weapons/Ranged/Leviatitan.cs | 2 +- Items/Weapons/Ranged/MagnaCannon.cs | 2 +- Items/Weapons/Ranged/Norfleet.cs | 2 +- Items/Weapons/Ranged/NullificationPistol.cs | 4 ++-- Items/Weapons/Ranged/Photoviscerator.cs | 2 +- Items/Weapons/Ranged/PlagueTaintedSMG.cs | 2 +- Items/Weapons/Ranged/PolarisParrotfish.cs | 4 ++-- Items/Weapons/Ranged/PristineFury.cs | 2 +- Items/Weapons/Ranged/Pumpler.cs | 2 +- Items/Weapons/Ranged/ReedBlowgun.cs | 2 +- Items/Weapons/Ranged/SeasSearing.cs | 4 ++-- Items/Weapons/Ranged/SepticSkewer.cs | 4 ++-- Items/Weapons/Ranged/Shredder.cs | 2 +- Items/Weapons/Ranged/SpeedBlaster.cs | 2 +- Items/Weapons/Ranged/Starmageddon.cs | 2 +- Items/Weapons/Ranged/StellarCannon.cs | 2 +- Items/Weapons/Ranged/StormSurge.cs | 2 +- Items/Weapons/Ranged/SulphuricAcidCannon.cs | 2 +- Items/Weapons/Ranged/SuperradiantSlaughterer.cs | 2 +- Items/Weapons/Ranged/SurgeDriver.cs | 2 +- Items/Weapons/Ranged/Svantechnical.cs | 2 +- Items/Weapons/Ranged/TheSevensStriker.cs | 2 +- Items/Weapons/Ranged/TitaniumRailgun.cs | 2 +- Items/Weapons/Rogue/AuroradicalThrow.cs | 2 +- Items/Weapons/Rogue/LeonidProgenitor.cs | 2 +- Items/Weapons/Rogue/Malachite.cs | 2 +- Items/Weapons/Summon/AquasScepter.cs | 4 ++-- Items/Weapons/Summon/BorealisBomber.cs | 2 +- Items/Weapons/Summon/BrittleStarStaff.cs | 4 ++-- Items/Weapons/Summon/IgneousExaltation.cs | 2 +- Items/Weapons/Summon/SanctifiedSpark.cs | 2 +- Items/Weapons/Summon/ViridVanguard.cs | 2 +- Items/Weapons/Typeless/RelicOfResilience.cs | 2 +- Items/Weapons/Typeless/Skynamite.cs | 4 ++-- 258 files changed, 329 insertions(+), 329 deletions(-) diff --git a/Items/Accessories/Calamity.cs b/Items/Accessories/Calamity.cs index a510018c8f..3499c1c552 100644 --- a/Items/Accessories/Calamity.cs +++ b/Items/Accessories/Calamity.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Accessories if (Main.zenithWorld) { Texture2D texture = ModContent.Request("CalamityMod/Items/Accessories/Calamity_GFB").Value; - spriteBatch.Draw(texture, Item.position - Main.screenPosition, Main.itemAnimations[Item.type].GetFrame(texture), lightColor, 0f, Vector2.Zero, 1f, 0, 0); + spriteBatch.Draw(texture, Item.position - Main.screenPosition, Main.itemAnimations[Type].GetFrame(texture), lightColor, 0f, Vector2.Zero, 1f, 0, 0); return false; } else diff --git a/Items/Accessories/RoverDrive.cs b/Items/Accessories/RoverDrive.cs index 1001393ca3..d166994650 100644 --- a/Items/Accessories/RoverDrive.cs +++ b/Items/Accessories/RoverDrive.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Accessories } // Allows item to be extractinated and specifies custom behavior instead of copying an existing item - public override void SetStaticDefaults() => ItemID.Sets.ExtractinatorMode[Item.type] = Item.type; + public override void SetStaticDefaults() => ItemID.Sets.ExtractinatorMode[Type] = Item.type; public override void SetDefaults() { diff --git a/Items/Accessories/ScuttlersJewel.cs b/Items/Accessories/ScuttlersJewel.cs index 5a24199168..e42197a607 100644 --- a/Items/Accessories/ScuttlersJewel.cs +++ b/Items/Accessories/ScuttlersJewel.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public override void SetStaticDefaults() { - ItemID.Sets.ExtractinatorMode[Item.type] = Item.type; + ItemID.Sets.ExtractinatorMode[Type] = Item.type; } public override void SetDefaults() diff --git a/Items/Accessories/TheSponge.cs b/Items/Accessories/TheSponge.cs index 173608b933..d94dd087fa 100644 --- a/Items/Accessories/TheSponge.cs +++ b/Items/Accessories/TheSponge.cs @@ -112,7 +112,7 @@ namespace CalamityMod.Items.Accessories if (Texture == "CalamityMod/Items/Accessories/TheSponge") { Texture2D tex = ModContent.Request("CalamityMod/Items/Accessories/TheSpongeShield").Value; - spriteBatch.Draw(tex, Item.Center - Main.screenPosition + new Vector2(0f, 0f), Main.itemAnimations[Item.type].GetFrame(tex), Color.Cyan * 0.5f, 0f, new Vector2(tex.Width / 2f, (tex.Height / 30f) * 0.8f), 1f, SpriteEffects.None, 0); + spriteBatch.Draw(tex, Item.Center - Main.screenPosition + new Vector2(0f, 0f), Main.itemAnimations[Type].GetFrame(tex), Color.Cyan * 0.5f, 0f, new Vector2(tex.Width / 2f, (tex.Height / 30f) * 0.8f), 1f, SpriteEffects.None, 0); } } @@ -148,7 +148,7 @@ namespace CalamityMod.Items.Accessories spriteBatch, texture: tex, position, - Main.itemAnimations[Item.type].GetFrame(tex), + Main.itemAnimations[Type].GetFrame(tex), Color.Cyan * 0.4f, itemColor, origin, diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index cfc3f82932..db81352fb6 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories.Wings { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 3)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(120, 6.25f, 1f); } diff --git a/Items/Accessories/WulfrumBattery.cs b/Items/Accessories/WulfrumBattery.cs index ea1aaca730..efa3e9f2ac 100644 --- a/Items/Accessories/WulfrumBattery.cs +++ b/Items/Accessories/WulfrumBattery.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { - ItemID.Sets.ExtractinatorMode[Item.type] = Item.type; + ItemID.Sets.ExtractinatorMode[Type] = Item.type; } public override void SetDefaults() diff --git a/Items/DraedonMisc/DraedonPowerCell.cs b/Items/DraedonMisc/DraedonPowerCell.cs index c5719725d6..28f2c4be49 100644 --- a/Items/DraedonMisc/DraedonPowerCell.cs +++ b/Items/DraedonMisc/DraedonPowerCell.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.DraedonMisc public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.ExtractinatorMode[Item.type] = Item.type; + ItemID.Sets.ExtractinatorMode[Type] = Item.type; } public override void SetDefaults() diff --git a/Items/Fishing/AstralCatches/AldebaranAlewife.cs b/Items/Fishing/AstralCatches/AldebaranAlewife.cs index 0f553d2c59..e32e189534 100644 --- a/Items/Fishing/AstralCatches/AldebaranAlewife.cs +++ b/Items/Fishing/AstralCatches/AldebaranAlewife.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/AstralCatches/ArcturusAstroidean.cs b/Items/Fishing/AstralCatches/ArcturusAstroidean.cs index 6149190827..279de4b93b 100644 --- a/Items/Fishing/AstralCatches/ArcturusAstroidean.cs +++ b/Items/Fishing/AstralCatches/ArcturusAstroidean.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/AstralCatches/ProcyonidPrawn.cs b/Items/Fishing/AstralCatches/ProcyonidPrawn.cs index a7e56c4dee..87c5acdf88 100644 --- a/Items/Fishing/AstralCatches/ProcyonidPrawn.cs +++ b/Items/Fishing/AstralCatches/ProcyonidPrawn.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/AstralCatches/TwinklingPollox.cs b/Items/Fishing/AstralCatches/TwinklingPollox.cs index 5f77a94a91..cc2d147ad8 100644 --- a/Items/Fishing/AstralCatches/TwinklingPollox.cs +++ b/Items/Fishing/AstralCatches/TwinklingPollox.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BaseQuestFish.cs b/Items/Fishing/BaseQuestFish.cs index 7e92e4d06e..c2131da27a 100644 --- a/Items/Fishing/BaseQuestFish.cs +++ b/Items/Fishing/BaseQuestFish.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 2; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs index b57a6a2576..6364413988 100644 --- a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs +++ b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/CharredLasher.cs b/Items/Fishing/BrimstoneCragCatches/CharredLasher.cs index db8bc64626..def96111da 100644 --- a/Items/Fishing/BrimstoneCragCatches/CharredLasher.cs +++ b/Items/Fishing/BrimstoneCragCatches/CharredLasher.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/CoastalDemonfish.cs b/Items/Fishing/BrimstoneCragCatches/CoastalDemonfish.cs index c4ab9435d4..dbebb21373 100644 --- a/Items/Fishing/BrimstoneCragCatches/CoastalDemonfish.cs +++ b/Items/Fishing/BrimstoneCragCatches/CoastalDemonfish.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/CragBullhead.cs b/Items/Fishing/BrimstoneCragCatches/CragBullhead.cs index e28a2df93f..d0048e03a7 100644 --- a/Items/Fishing/BrimstoneCragCatches/CragBullhead.cs +++ b/Items/Fishing/BrimstoneCragCatches/CragBullhead.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs index 892b507f4e..6d0c5df78e 100644 --- a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs +++ b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public int shotCounter = 0; public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; - Item.staff[Item.type] = true; //so it doesn't look weird af when holding it + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; + Item.staff[Type] = true; //so it doesn't look weird af when holding it } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/Havocfish.cs b/Items/Fishing/BrimstoneCragCatches/Havocfish.cs index 59f5b99abf..acf1c58c47 100644 --- a/Items/Fishing/BrimstoneCragCatches/Havocfish.cs +++ b/Items/Fishing/BrimstoneCragCatches/Havocfish.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/Shadowfish.cs b/Items/Fishing/BrimstoneCragCatches/Shadowfish.cs index c43d4f93f9..687740ed97 100644 --- a/Items/Fishing/BrimstoneCragCatches/Shadowfish.cs +++ b/Items/Fishing/BrimstoneCragCatches/Shadowfish.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/EnchantedStarfish.cs b/Items/Fishing/EnchantedStarfish.cs index cc10c2a309..ceb2c70c0d 100644 --- a/Items/Fishing/EnchantedStarfish.cs +++ b/Items/Fishing/EnchantedStarfish.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; // For some reason Life/Mana boosting items are in this set (along with Magic Mirror+) ItemID.Sets.SortingPriorityBossSpawns[Type] = 21; // Mana Crystal ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ArcaneCrystal; diff --git a/Items/Fishing/FishingRods/RiftReeler.cs b/Items/Fishing/FishingRods/RiftReeler.cs index 6bbe1e7441..4de6da68e1 100644 --- a/Items/Fishing/FishingRods/RiftReeler.cs +++ b/Items/Fishing/FishingRods/RiftReeler.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public new string LocalizationCategory => "Items.Fishing"; public override void SetStaticDefaults() { - ItemID.Sets.CanFishInLava[Item.type] = true; + ItemID.Sets.CanFishInLava[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/FishingRods/SlurperPole.cs b/Items/Fishing/FishingRods/SlurperPole.cs index b8462e6e00..cac04d7307 100644 --- a/Items/Fishing/FishingRods/SlurperPole.cs +++ b/Items/Fishing/FishingRods/SlurperPole.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public new string LocalizationCategory => "Items.Fishing"; public override void SetStaticDefaults() { - ItemID.Sets.CanFishInLava[Item.type] = true; + ItemID.Sets.CanFishInLava[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/FishingRods/TheDevourerofCods.cs b/Items/Fishing/FishingRods/TheDevourerofCods.cs index 6a4f028556..62d2e6cc12 100644 --- a/Items/Fishing/FishingRods/TheDevourerofCods.cs +++ b/Items/Fishing/FishingRods/TheDevourerofCods.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Fishing.FishingRods public new string LocalizationCategory => "Items.Fishing"; public override void SetStaticDefaults() { - ItemID.Sets.CanFishInLava[Item.type] = true; + ItemID.Sets.CanFishInLava[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/FishofEleum.cs b/Items/Fishing/FishofEleum.cs index 47d60bf462..0bb26b1e47 100644 --- a/Items/Fishing/FishofEleum.cs +++ b/Items/Fishing/FishofEleum.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/FishofFlight.cs b/Items/Fishing/FishofFlight.cs index 81edecaab0..ef3bb3740d 100644 --- a/Items/Fishing/FishofFlight.cs +++ b/Items/Fishing/FishofFlight.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/FishofLight.cs b/Items/Fishing/FishofLight.cs index 010e7fb185..f5067ca293 100644 --- a/Items/Fishing/FishofLight.cs +++ b/Items/Fishing/FishofLight.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/FishofNight.cs b/Items/Fishing/FishofNight.cs index ed055e4f83..0a5c27b862 100644 --- a/Items/Fishing/FishofNight.cs +++ b/Items/Fishing/FishofNight.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/GlimmeringGemfish.cs b/Items/Fishing/GlimmeringGemfish.cs index 9f0e775bf1..a44cd336b1 100644 --- a/Items/Fishing/GlimmeringGemfish.cs +++ b/Items/Fishing/GlimmeringGemfish.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/Gorecodile.cs b/Items/Fishing/Gorecodile.cs index dec49381cc..814fe4c4c2 100644 --- a/Items/Fishing/Gorecodile.cs +++ b/Items/Fishing/Gorecodile.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/StuffedFish.cs b/Items/Fishing/StuffedFish.cs index de2ab4cb5e..6ad7ea8f50 100644 --- a/Items/Fishing/StuffedFish.cs +++ b/Items/Fishing/StuffedFish.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/SunbeamFish.cs b/Items/Fishing/SunbeamFish.cs index dff792e6eb..ae1a6abc8a 100644 --- a/Items/Fishing/SunbeamFish.cs +++ b/Items/Fishing/SunbeamFish.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Fishing public override void SetStaticDefaults() { Item.ResearchUnlockCount = 10; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/SunkenSeaCatches/GreenwaveLoach.cs b/Items/Fishing/SunkenSeaCatches/GreenwaveLoach.cs index e245ff9a2d..9df013dc4f 100644 --- a/Items/Fishing/SunkenSeaCatches/GreenwaveLoach.cs +++ b/Items/Fishing/SunkenSeaCatches/GreenwaveLoach.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/SunkenSeaCatches/PrismaticGuppy.cs b/Items/Fishing/SunkenSeaCatches/PrismaticGuppy.cs index 66ca1687ad..e1eb2ca685 100644 --- a/Items/Fishing/SunkenSeaCatches/PrismaticGuppy.cs +++ b/Items/Fishing/SunkenSeaCatches/PrismaticGuppy.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Fishing/SunkenSeaCatches/SparklingEmpress.cs b/Items/Fishing/SunkenSeaCatches/SparklingEmpress.cs index 488478e39d..a9813f17f9 100644 --- a/Items/Fishing/SunkenSeaCatches/SparklingEmpress.cs +++ b/Items/Fishing/SunkenSeaCatches/SparklingEmpress.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches public override void SetStaticDefaults() { - Item.staff[Item.type] = true; //so it doesn't look weird af when holding it + Item.staff[Type] = true; //so it doesn't look weird af when holding it } public override void SetDefaults() diff --git a/Items/Fishing/SunkenSeaCatches/SunkenSailfish.cs b/Items/Fishing/SunkenSeaCatches/SunkenSailfish.cs index d75614f699..ad12d445a2 100644 --- a/Items/Fishing/SunkenSeaCatches/SunkenSailfish.cs +++ b/Items/Fishing/SunkenSeaCatches/SunkenSailfish.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/LoreItems/LoreItem.cs b/Items/LoreItems/LoreItem.cs index 193dde3a8f..2860d62fd6 100644 --- a/Items/LoreItems/LoreItem.cs +++ b/Items/LoreItems/LoreItem.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.LoreItems public override void SetStaticDefaults() { - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; } public override bool CanUseItem(Player player) => false; diff --git a/Items/Materials/AscendantSpiritEssence.cs b/Items/Materials/AscendantSpiritEssence.cs index 9a506c83ba..3185874d6f 100644 --- a/Items/Materials/AscendantSpiritEssence.cs +++ b/Items/Materials/AscendantSpiritEssence.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 25; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 118; } @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Materials } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D texture = TextureAssets.Item[Item.type].Value; + Texture2D texture = TextureAssets.Item[Type].Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 6, 6), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); return false; } diff --git a/Items/Materials/AshesofAnnihilation.cs b/Items/Materials/AshesofAnnihilation.cs index 8f3b474deb..36da76f8d1 100644 --- a/Items/Materials/AshesofAnnihilation.cs +++ b/Items/Materials/AshesofAnnihilation.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Materials for (int i = 0; i < 4; i++) { Vector2 drawPosition = baseDrawPosition + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * outwardness - drawPositionOffset; - spriteBatch.Draw(TextureAssets.Item[Item.type].Value, drawPosition, frame, drawColor, velocity, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(TextureAssets.Item[Type].Value, drawPosition, frame, drawColor, velocity, origin, scale, SpriteEffects.None, 0f); } } @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Materials public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Rectangle frame = Main.itemAnimations[Item.type].GetFrame(TextureAssets.Item[Item.type].Value); + Rectangle frame = Main.itemAnimations[Type].GetFrame(TextureAssets.Item[Type].Value); DrawPulsingAfterimage(spriteBatch, Item.position - Main.screenPosition + frame.Size() * 0.5f, frame, scale); return true; } diff --git a/Items/Materials/AuricBar.cs b/Items/Materials/AuricBar.cs index 1d477d4bf0..923f6f09d6 100644 --- a/Items/Materials/AuricBar.cs +++ b/Items/Materials/AuricBar.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 25; ItemID.Sets.SortingPriorityMaterials[Type] = 120; ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; Main.RegisterItemAnimation(Type, new DrawAnimationVertical(5, 12)); } diff --git a/Items/Materials/CoreofCalamity.cs b/Items/Materials/CoreofCalamity.cs index 9b57720bf2..dd1b28fec0 100644 --- a/Items/Materials/CoreofCalamity.cs +++ b/Items/Materials/CoreofCalamity.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 94; // Spectre Bar } diff --git a/Items/Materials/CoreofEleum.cs b/Items/Materials/CoreofEleum.cs index 59bc3a57e6..5875d06c39 100644 --- a/Items/Materials/CoreofEleum.cs +++ b/Items/Materials/CoreofEleum.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 94; // Spectre Bar } diff --git a/Items/Materials/CoreofHavoc.cs b/Items/Materials/CoreofHavoc.cs index 97b5764550..9362081324 100644 --- a/Items/Materials/CoreofHavoc.cs +++ b/Items/Materials/CoreofHavoc.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 94; // Spectre Bar } diff --git a/Items/Materials/CoreofSunlight.cs b/Items/Materials/CoreofSunlight.cs index 92e54600ed..a4ad47f0ed 100644 --- a/Items/Materials/CoreofSunlight.cs +++ b/Items/Materials/CoreofSunlight.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 94; // Spectre Bar } diff --git a/Items/Materials/DarkPlasma.cs b/Items/Materials/DarkPlasma.cs index 9cc97cb983..9063ad8cb1 100644 --- a/Items/Materials/DarkPlasma.cs +++ b/Items/Materials/DarkPlasma.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 5; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 4)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 108; } diff --git a/Items/Materials/DarksunFragment.cs b/Items/Materials/DarksunFragment.cs index 57e5cf78c7..751e706e87 100644 --- a/Items/Materials/DarksunFragment.cs +++ b/Items/Materials/DarksunFragment.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 100; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 8)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 117; } @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Materials public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D texture = TextureAssets.Item[Item.type].Value; + Texture2D texture = TextureAssets.Item[Type].Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 6, 8), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); return false; } diff --git a/Items/Materials/EndothermicEnergy.cs b/Items/Materials/EndothermicEnergy.cs index 4decf4a2fc..bb69407d15 100644 --- a/Items/Materials/EndothermicEnergy.cs +++ b/Items/Materials/EndothermicEnergy.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 100; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 116; } @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Materials public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D texture = TextureAssets.Item[Item.type].Value; + Texture2D texture = TextureAssets.Item[Type].Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 6, 6), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); return false; } diff --git a/Items/Materials/EssenceofEleum.cs b/Items/Materials/EssenceofEleum.cs index 48f3f88496..165eda0d72 100644 --- a/Items/Materials/EssenceofEleum.cs +++ b/Items/Materials/EssenceofEleum.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 71; // Soul of Light } @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Materials } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Item.type].Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Type].Value); } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/EssenceofHavoc.cs b/Items/Materials/EssenceofHavoc.cs index 3b630f600f..5ab267db76 100644 --- a/Items/Materials/EssenceofHavoc.cs +++ b/Items/Materials/EssenceofHavoc.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 71; // Soul of Light } @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Materials } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Item.type].Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Type].Value); } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/EssenceofSunlight.cs b/Items/Materials/EssenceofSunlight.cs index 83e7175758..a86cc1a92a 100644 --- a/Items/Materials/EssenceofSunlight.cs +++ b/Items/Materials/EssenceofSunlight.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 71; // Soul of Light } @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Materials } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Item.type].Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Type].Value); } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/ExoPrism.cs b/Items/Materials/ExoPrism.cs index 0fcf4137ce..47260e143f 100644 --- a/Items/Materials/ExoPrism.cs +++ b/Items/Materials/ExoPrism.cs @@ -37,13 +37,13 @@ namespace CalamityMod.Items.Materials for (int i = 0; i < 4; i++) { Vector2 drawPosition = baseDrawPosition + (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 4f; - spriteBatch.Draw(TextureAssets.Item[Item.type].Value, drawPosition, frame, drawColor, velocity, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(TextureAssets.Item[Type].Value, drawPosition, frame, drawColor, velocity, origin, scale, SpriteEffects.None, 0f); } } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Rectangle frame = TextureAssets.Item[Item.type].Value.Frame(); + Rectangle frame = TextureAssets.Item[Type].Value.Frame(); DrawBackAfterimage(spriteBatch, Item.position - Main.screenPosition + frame.Size() * 0.5f, frame, scale); return true; } diff --git a/Items/Materials/GalacticaSingularity.cs b/Items/Materials/GalacticaSingularity.cs index 3622917181..bfbdf59bea 100644 --- a/Items/Materials/GalacticaSingularity.cs +++ b/Items/Materials/GalacticaSingularity.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 25; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(4, 24)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 99; // Luminite } diff --git a/Items/Materials/MiracleMatter.cs b/Items/Materials/MiracleMatter.cs index 1da17fb9d9..bef053f488 100644 --- a/Items/Materials/MiracleMatter.cs +++ b/Items/Materials/MiracleMatter.cs @@ -47,14 +47,14 @@ namespace CalamityMod.Items.Materials for (int i = 0; i < 8; i++) { Vector2 drawPosition = baseDrawPosition + (MathHelper.TwoPi * i / 8f).ToRotationVector2() * drawPositionOffset; - spriteBatch.Draw(TextureAssets.Item[Item.type].Value, drawPosition, frame, drawColor, 0f, origin, baseScale, SpriteEffects.None, 0f); + spriteBatch.Draw(TextureAssets.Item[Type].Value, drawPosition, frame, drawColor, 0f, origin, baseScale, SpriteEffects.None, 0f); } } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Rectangle frame = TextureAssets.Item[Item.type].Value.Frame(); + Rectangle frame = TextureAssets.Item[Type].Value.Frame(); DrawBackAfterimage(spriteBatch, Item.position - Main.screenPosition, frame, Vector2.Zero, scale); return true; } diff --git a/Items/Materials/NightmareFuel.cs b/Items/Materials/NightmareFuel.cs index a3c3ee0a71..2da1dc54a1 100644 --- a/Items/Materials/NightmareFuel.cs +++ b/Items/Materials/NightmareFuel.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 100; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 115; } @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Materials public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D texture = TextureAssets.Item[Item.type].Value; + Texture2D texture = TextureAssets.Item[Type].Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 6, 6), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); return false; } diff --git a/Items/Materials/PlasmaDriveCore.cs b/Items/Materials/PlasmaDriveCore.cs index fc08de716f..822eb869fa 100644 --- a/Items/Materials/PlasmaDriveCore.cs +++ b/Items/Materials/PlasmaDriveCore.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Materials public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { - Texture2D tex = TextureAssets.Item[Item.type].Value; + Texture2D tex = TextureAssets.Item[Type].Value; //Give it an outline. Make it look really important and shiny. The player must not confuse this for a random material spriteBatch.End(); diff --git a/Items/Materials/SuspiciousScrap.cs b/Items/Materials/SuspiciousScrap.cs index c9d3a2aa77..ea8e02345d 100644 --- a/Items/Materials/SuspiciousScrap.cs +++ b/Items/Materials/SuspiciousScrap.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Materials } public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { - Texture2D tex = TextureAssets.Item[Item.type].Value; + Texture2D tex = TextureAssets.Item[Type].Value; Vector2 positionDisplace = new Vector2(32, 32) * scale; Rectangle variant = new Rectangle(CalamityWorld.OreTypes[0] == TileID.Tin ? 0 : 32, CalamityWorld.OreTypes[1] == TileID.Lead ? 0 : 32, 30, 30); spriteBatch.Draw(tex, position + positionDisplace, variant, drawColor, 0f, origin, scale * 2f, 0f, 0f); @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Materials public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D tex = TextureAssets.Item[Item.type].Value; + Texture2D tex = TextureAssets.Item[Type].Value; Rectangle variant = new Rectangle(CalamityWorld.OreTypes[0] == TileID.Tin ? 0 : 32, CalamityWorld.OreTypes[1] == TileID.Lead ? 0 : 32, 30, 30); Vector2 positionDisplace = new Vector2(16, 16) * scale; diff --git a/Items/Materials/TwistingNether.cs b/Items/Materials/TwistingNether.cs index b7a93afdc6..ff72bbc55b 100644 --- a/Items/Materials/TwistingNether.cs +++ b/Items/Materials/TwistingNether.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 109; } diff --git a/Items/Materials/UnholyEssence.cs b/Items/Materials/UnholyEssence.cs index fcb7a22acf..421e84e9f8 100644 --- a/Items/Materials/UnholyEssence.cs +++ b/Items/Materials/UnholyEssence.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 25; Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7)); ItemID.Sets.AnimatesAsSoul[Type] = true; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 103; } diff --git a/Items/Materials/YharonSoulFragment.cs b/Items/Materials/YharonSoulFragment.cs index 286e319e14..6a88b2cb35 100644 --- a/Items/Materials/YharonSoulFragment.cs +++ b/Items/Materials/YharonSoulFragment.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - ItemID.Sets.ItemNoGravity[Item.type] = true; + ItemID.Sets.ItemNoGravity[Type] = true; } diff --git a/Items/Placeables/Furniture/AlgalPrismTorch.cs b/Items/Placeables/Furniture/AlgalPrismTorch.cs index 30849a75a3..779246ddad 100644 --- a/Items/Placeables/Furniture/AlgalPrismTorch.cs +++ b/Items/Placeables/Furniture/AlgalPrismTorch.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; - ItemID.Sets.WaterTorches[Item.type] = true; + ItemID.Sets.WaterTorches[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/Furniture/AstralTorch.cs b/Items/Placeables/Furniture/AstralTorch.cs index 12cf515c90..cbe81b0ada 100644 --- a/Items/Placeables/Furniture/AstralTorch.cs +++ b/Items/Placeables/Furniture/AstralTorch.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/Furniture/GloomTorch.cs b/Items/Placeables/Furniture/GloomTorch.cs index 3419772747..6ec0126586 100644 --- a/Items/Placeables/Furniture/GloomTorch.cs +++ b/Items/Placeables/Furniture/GloomTorch.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/Furniture/NavyPrismTorch.cs b/Items/Placeables/Furniture/NavyPrismTorch.cs index fec0efd329..ddec59dc1a 100644 --- a/Items/Placeables/Furniture/NavyPrismTorch.cs +++ b/Items/Placeables/Furniture/NavyPrismTorch.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; - ItemID.Sets.WaterTorches[Item.type] = true; + ItemID.Sets.WaterTorches[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/Furniture/RefractivePrismTorch.cs b/Items/Placeables/Furniture/RefractivePrismTorch.cs index 732ddb12a1..b827e8c64a 100644 --- a/Items/Placeables/Furniture/RefractivePrismTorch.cs +++ b/Items/Placeables/Furniture/RefractivePrismTorch.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; - ItemID.Sets.WaterTorches[Item.type] = true; + ItemID.Sets.WaterTorches[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/Furniture/SulphurousTorch.cs b/Items/Placeables/Furniture/SulphurousTorch.cs index 2e38cc7bc7..15b65842fd 100644 --- a/Items/Placeables/Furniture/SulphurousTorch.cs +++ b/Items/Placeables/Furniture/SulphurousTorch.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; - ItemID.Sets.WaterTorches[Item.type] = true; + ItemID.Sets.WaterTorches[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/FurnitureAbyss/AbyssTorch.cs b/Items/Placeables/FurnitureAbyss/AbyssTorch.cs index f0eb32c88b..d15e77ad08 100644 --- a/Items/Placeables/FurnitureAbyss/AbyssTorch.cs +++ b/Items/Placeables/FurnitureAbyss/AbyssTorch.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Placeables.FurnitureAbyss public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; - ItemID.Sets.WaterTorches[Item.type] = true; + ItemID.Sets.WaterTorches[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/FurnitureMarnite/MarniteLight.cs b/Items/Placeables/FurnitureMarnite/MarniteLight.cs index 24c42c360d..4785695df4 100644 --- a/Items/Placeables/FurnitureMarnite/MarniteLight.cs +++ b/Items/Placeables/FurnitureMarnite/MarniteLight.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.FurnitureMarnite public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.Torches[Type] = true; ItemID.Sets.SingleUseInGamepad[Type] = true; ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; } diff --git a/Items/Placeables/FurnitureSacrilegious/LargeRitualCandle.cs b/Items/Placeables/FurnitureSacrilegious/LargeRitualCandle.cs index 92aaa77fbc..74b24a6d4a 100644 --- a/Items/Placeables/FurnitureSacrilegious/LargeRitualCandle.cs +++ b/Items/Placeables/FurnitureSacrilegious/LargeRitualCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSacrilegious public new string LocalizationCategory => "Items.Placeables"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Placeables/FurnitureSacrilegious/RitualCandle.cs b/Items/Placeables/FurnitureSacrilegious/RitualCandle.cs index f0c443626a..5ce24bbe71 100644 --- a/Items/Placeables/FurnitureSacrilegious/RitualCandle.cs +++ b/Items/Placeables/FurnitureSacrilegious/RitualCandle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables.FurnitureSacrilegious public new string LocalizationCategory => "Items.Placeables"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/RelicOfConvergence.cs b/Items/RelicOfConvergence.cs index 8d433aca1a..730651951d 100644 --- a/Items/RelicOfConvergence.cs +++ b/Items/RelicOfConvergence.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items public new string LocalizationCategory => "Items.Misc"; public override void SetStaticDefaults() { - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Tools/AxeofPurity.cs b/Items/Tools/AxeofPurity.cs index abdf5aa8d7..61320c4c85 100644 --- a/Items/Tools/AxeofPurity.cs +++ b/Items/Tools/AxeofPurity.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Tools public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index 43b4d0a156..a4ad4abbf5 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Tools public override void SetStaticDefaults() { - Item.staff[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + Item.staff[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index 05a6a1d354..4c7ee6ea98 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Tools public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Tools/SeismicHampick.cs b/Items/Tools/SeismicHampick.cs index 1146ade1fc..bd4f680f0b 100644 --- a/Items/Tools/SeismicHampick.cs +++ b/Items/Tools/SeismicHampick.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Tools public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/AquaticScourgeBag.cs b/Items/TreasureBags/AquaticScourgeBag.cs index 052a8aaabd..e3da262a9e 100644 --- a/Items/TreasureBags/AquaticScourgeBag.cs +++ b/Items/TreasureBags/AquaticScourgeBag.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/AstrumAureusBag.cs b/Items/TreasureBags/AstrumAureusBag.cs index 0b3d7925d6..2be1986093 100644 --- a/Items/TreasureBags/AstrumAureusBag.cs +++ b/Items/TreasureBags/AstrumAureusBag.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/AstrumDeusBag.cs b/Items/TreasureBags/AstrumDeusBag.cs index 0edb610266..0f587b880f 100644 --- a/Items/TreasureBags/AstrumDeusBag.cs +++ b/Items/TreasureBags/AstrumDeusBag.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/BrimstoneWaifuBag.cs b/Items/TreasureBags/BrimstoneWaifuBag.cs index 574c173543..ddf95fe025 100644 --- a/Items/TreasureBags/BrimstoneWaifuBag.cs +++ b/Items/TreasureBags/BrimstoneWaifuBag.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/CalamitasCloneBag.cs b/Items/TreasureBags/CalamitasCloneBag.cs index 45454a0eab..7f164abd13 100644 --- a/Items/TreasureBags/CalamitasCloneBag.cs +++ b/Items/TreasureBags/CalamitasCloneBag.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/CalamitasCoffer.cs b/Items/TreasureBags/CalamitasCoffer.cs index 15d59ed0f2..75ec47675e 100644 --- a/Items/TreasureBags/CalamitasCoffer.cs +++ b/Items/TreasureBags/CalamitasCoffer.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/CeaselessVoidBag.cs b/Items/TreasureBags/CeaselessVoidBag.cs index 4b7b168392..cbb29421fd 100644 --- a/Items/TreasureBags/CeaselessVoidBag.cs +++ b/Items/TreasureBags/CeaselessVoidBag.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/CrabulonBag.cs b/Items/TreasureBags/CrabulonBag.cs index 7d913160e9..1f717a1c14 100644 --- a/Items/TreasureBags/CrabulonBag.cs +++ b/Items/TreasureBags/CrabulonBag.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; - ItemID.Sets.PreHardmodeLikeBossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; + ItemID.Sets.PreHardmodeLikeBossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/CryogenBag.cs b/Items/TreasureBags/CryogenBag.cs index ac76a5f8c3..351bee872a 100644 --- a/Items/TreasureBags/CryogenBag.cs +++ b/Items/TreasureBags/CryogenBag.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/DesertScourgeBag.cs b/Items/TreasureBags/DesertScourgeBag.cs index 4f734a549f..4e757c736e 100644 --- a/Items/TreasureBags/DesertScourgeBag.cs +++ b/Items/TreasureBags/DesertScourgeBag.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; - ItemID.Sets.PreHardmodeLikeBossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; + ItemID.Sets.PreHardmodeLikeBossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/DevourerofGodsBag.cs b/Items/TreasureBags/DevourerofGodsBag.cs index c4f6fc619f..69241fccc9 100644 --- a/Items/TreasureBags/DevourerofGodsBag.cs +++ b/Items/TreasureBags/DevourerofGodsBag.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/DraedonBag.cs b/Items/TreasureBags/DraedonBag.cs index b8d2456874..d0476dfad3 100644 --- a/Items/TreasureBags/DraedonBag.cs +++ b/Items/TreasureBags/DraedonBag.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/DragonfollyBag.cs b/Items/TreasureBags/DragonfollyBag.cs index 0cccdf84d8..faac94c1ec 100644 --- a/Items/TreasureBags/DragonfollyBag.cs +++ b/Items/TreasureBags/DragonfollyBag.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/HiveMindBag.cs b/Items/TreasureBags/HiveMindBag.cs index 9a8f86fb84..20653b5de2 100644 --- a/Items/TreasureBags/HiveMindBag.cs +++ b/Items/TreasureBags/HiveMindBag.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; - ItemID.Sets.PreHardmodeLikeBossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; + ItemID.Sets.PreHardmodeLikeBossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/LeviathanBag.cs b/Items/TreasureBags/LeviathanBag.cs index c9b2d66a2f..6b7a0a2073 100644 --- a/Items/TreasureBags/LeviathanBag.cs +++ b/Items/TreasureBags/LeviathanBag.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/OldDukeBag.cs b/Items/TreasureBags/OldDukeBag.cs index 14c7d1e91d..47629b890c 100644 --- a/Items/TreasureBags/OldDukeBag.cs +++ b/Items/TreasureBags/OldDukeBag.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/PerforatorBag.cs b/Items/TreasureBags/PerforatorBag.cs index 230ebe44c3..51fdf84905 100644 --- a/Items/TreasureBags/PerforatorBag.cs +++ b/Items/TreasureBags/PerforatorBag.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; - ItemID.Sets.PreHardmodeLikeBossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; + ItemID.Sets.PreHardmodeLikeBossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/PlaguebringerGoliathBag.cs b/Items/TreasureBags/PlaguebringerGoliathBag.cs index 3faa3d015b..4e7ebd141e 100644 --- a/Items/TreasureBags/PlaguebringerGoliathBag.cs +++ b/Items/TreasureBags/PlaguebringerGoliathBag.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/PolterghastBag.cs b/Items/TreasureBags/PolterghastBag.cs index f1516c5f3c..ba7e3de128 100644 --- a/Items/TreasureBags/PolterghastBag.cs +++ b/Items/TreasureBags/PolterghastBag.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/ProvidenceBag.cs b/Items/TreasureBags/ProvidenceBag.cs index 4feb1ba07a..745495da94 100644 --- a/Items/TreasureBags/ProvidenceBag.cs +++ b/Items/TreasureBags/ProvidenceBag.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/RavagerBag.cs b/Items/TreasureBags/RavagerBag.cs index 909b7ac934..3c9c773347 100644 --- a/Items/TreasureBags/RavagerBag.cs +++ b/Items/TreasureBags/RavagerBag.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/SignusBag.cs b/Items/TreasureBags/SignusBag.cs index 32d248e425..fa8df58b4c 100644 --- a/Items/TreasureBags/SignusBag.cs +++ b/Items/TreasureBags/SignusBag.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/SlimeGodBag.cs b/Items/TreasureBags/SlimeGodBag.cs index d14f85068d..ec28535af4 100644 --- a/Items/TreasureBags/SlimeGodBag.cs +++ b/Items/TreasureBags/SlimeGodBag.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; - ItemID.Sets.PreHardmodeLikeBossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; + ItemID.Sets.PreHardmodeLikeBossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/StormWeaverBag.cs b/Items/TreasureBags/StormWeaverBag.cs index 96dcc7defe..d3407462e7 100644 --- a/Items/TreasureBags/StormWeaverBag.cs +++ b/Items/TreasureBags/StormWeaverBag.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/TreasureBags/YharonBag.cs b/Items/TreasureBags/YharonBag.cs index e56cc657c5..7e20daf682 100644 --- a/Items/TreasureBags/YharonBag.cs +++ b/Items/TreasureBags/YharonBag.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.TreasureBags public override void SetStaticDefaults() { Item.ResearchUnlockCount = 3; - ItemID.Sets.BossBag[Item.type] = true; + ItemID.Sets.BossBag[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs index 466317924c..7361d5bda7 100644 --- a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs +++ b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs index 6bcc75a4ce..8fce78b1c8 100644 --- a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs +++ b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public const float HoldoutChargeUse = 0.002f; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 04a8bd9965..544c5818aa 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/AlulaAustralis.cs b/Items/Weapons/Magic/AlulaAustralis.cs index 8cb2b562d2..7211108bdf 100644 --- a/Items/Weapons/Magic/AlulaAustralis.cs +++ b/Items/Weapons/Magic/AlulaAustralis.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/AquamarineStaff.cs b/Items/Weapons/Magic/AquamarineStaff.cs index 509e2dbefe..8eb065ffb1 100644 --- a/Items/Weapons/Magic/AquamarineStaff.cs +++ b/Items/Weapons/Magic/AquamarineStaff.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ArchAmaryllis.cs b/Items/Weapons/Magic/ArchAmaryllis.cs index bbb0031196..33419882b8 100644 --- a/Items/Weapons/Magic/ArchAmaryllis.cs +++ b/Items/Weapons/Magic/ArchAmaryllis.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/AsteroidStaff.cs b/Items/Weapons/Magic/AsteroidStaff.cs index 940eac1a88..78a029f901 100644 --- a/Items/Weapons/Magic/AsteroidStaff.cs +++ b/Items/Weapons/Magic/AsteroidStaff.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Items.Weapons.Magic #endregion public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/AstralStaff.cs b/Items/Weapons/Magic/AstralStaff.cs index 6c2ca3d064..91c599ae57 100644 --- a/Items/Weapons/Magic/AstralStaff.cs +++ b/Items/Weapons/Magic/AstralStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/AstralachneaStaff.cs b/Items/Weapons/Magic/AstralachneaStaff.cs index 7317265a11..8ffa9448aa 100644 --- a/Items/Weapons/Magic/AstralachneaStaff.cs +++ b/Items/Weapons/Magic/AstralachneaStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Atlantis.cs b/Items/Weapons/Magic/Atlantis.cs index 4181b4fa34..ffa9afe85a 100644 --- a/Items/Weapons/Magic/Atlantis.cs +++ b/Items/Weapons/Magic/Atlantis.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/BloodBath.cs b/Items/Weapons/Magic/BloodBath.cs index dd72089081..5bdcb4e06f 100644 --- a/Items/Weapons/Magic/BloodBath.cs +++ b/Items/Weapons/Magic/BloodBath.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/BrimroseStaff.cs b/Items/Weapons/Magic/BrimroseStaff.cs index 1982fc6d2e..3baf578096 100644 --- a/Items/Weapons/Magic/BrimroseStaff.cs +++ b/Items/Weapons/Magic/BrimroseStaff.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ChronomancersScythe.cs b/Items/Weapons/Magic/ChronomancersScythe.cs index a872675c83..868b82f249 100644 --- a/Items/Weapons/Magic/ChronomancersScythe.cs +++ b/Items/Weapons/Magic/ChronomancersScythe.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ClamorNoctus.cs b/Items/Weapons/Magic/ClamorNoctus.cs index 73f5b92166..a54e500163 100644 --- a/Items/Weapons/Magic/ClamorNoctus.cs +++ b/Items/Weapons/Magic/ClamorNoctus.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index cbe31237bb..36dd27dd3b 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/DivineRetribution.cs b/Items/Weapons/Magic/DivineRetribution.cs index 0eca7c1c80..2ecc083994 100644 --- a/Items/Weapons/Magic/DivineRetribution.cs +++ b/Items/Weapons/Magic/DivineRetribution.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Downpour.cs b/Items/Weapons/Magic/Downpour.cs index 871d4a0bbe..0bede5d021 100644 --- a/Items/Weapons/Magic/Downpour.cs +++ b/Items/Weapons/Magic/Downpour.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/EidolonStaff.cs b/Items/Weapons/Magic/EidolonStaff.cs index 45fa1b6e53..f3c14ab5b0 100644 --- a/Items/Weapons/Magic/EidolonStaff.cs +++ b/Items/Weapons/Magic/EidolonStaff.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Fabstaff.cs b/Items/Weapons/Magic/Fabstaff.cs index 9cf328b813..7fa02f113c 100644 --- a/Items/Weapons/Magic/Fabstaff.cs +++ b/Items/Weapons/Magic/Fabstaff.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index bb490b7a17..26f28c4056 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/GleamingMagnolia.cs b/Items/Weapons/Magic/GleamingMagnolia.cs index 6ca12ba596..8cc2defd86 100644 --- a/Items/Weapons/Magic/GleamingMagnolia.cs +++ b/Items/Weapons/Magic/GleamingMagnolia.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/HellwingStaff.cs b/Items/Weapons/Magic/HellwingStaff.cs index 8615031997..4e98d6301c 100644 --- a/Items/Weapons/Magic/HellwingStaff.cs +++ b/Items/Weapons/Magic/HellwingStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Hematemesis.cs b/Items/Weapons/Magic/Hematemesis.cs index 48b331b19b..bd132f898d 100644 --- a/Items/Weapons/Magic/Hematemesis.cs +++ b/Items/Weapons/Magic/Hematemesis.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/HyphaeRod.cs b/Items/Weapons/Magic/HyphaeRod.cs index 30bc37b713..dc7b12a637 100644 --- a/Items/Weapons/Magic/HyphaeRod.cs +++ b/Items/Weapons/Magic/HyphaeRod.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/IcicleStaff.cs b/Items/Weapons/Magic/IcicleStaff.cs index 6e5c822dab..fd481cb380 100644 --- a/Items/Weapons/Magic/IcicleStaff.cs +++ b/Items/Weapons/Magic/IcicleStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/IcicleTrident.cs b/Items/Weapons/Magic/IcicleTrident.cs index 206d0b3632..36fdb84c17 100644 --- a/Items/Weapons/Magic/IcicleTrident.cs +++ b/Items/Weapons/Magic/IcicleTrident.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index 8938becc5b..98779d3215 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs b/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs index 6715bf4deb..c43b45a6c8 100644 --- a/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs +++ b/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; flaskIDs = new int[] { ModContent.ProjectileType(), diff --git a/Items/Weapons/Magic/MagneticMeltdown.cs b/Items/Weapons/Magic/MagneticMeltdown.cs index 8d8c3687e5..0e5266cef6 100644 --- a/Items/Weapons/Magic/MagneticMeltdown.cs +++ b/Items/Weapons/Magic/MagneticMeltdown.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ManaRose.cs b/Items/Weapons/Magic/ManaRose.cs index 898c4af8d1..be441ecf19 100644 --- a/Items/Weapons/Magic/ManaRose.cs +++ b/Items/Weapons/Magic/ManaRose.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs index dc7200d341..e2d1fb0d40 100644 --- a/Items/Weapons/Magic/Miasma.cs +++ b/Items/Weapons/Magic/Miasma.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index 2b5daf1362..17811fcf7d 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/NightsRay.cs b/Items/Weapons/Magic/NightsRay.cs index 3b767eaa97..d7d5cbaf02 100644 --- a/Items/Weapons/Magic/NightsRay.cs +++ b/Items/Weapons/Magic/NightsRay.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Nucleosynthesis.cs b/Items/Weapons/Magic/Nucleosynthesis.cs index 4716ae5ff8..e6792704f4 100644 --- a/Items/Weapons/Magic/Nucleosynthesis.cs +++ b/Items/Weapons/Magic/Nucleosynthesis.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ParasiticSceptor.cs b/Items/Weapons/Magic/ParasiticSceptor.cs index 58da009461..76b8ddae47 100644 --- a/Items/Weapons/Magic/ParasiticSceptor.cs +++ b/Items/Weapons/Magic/ParasiticSceptor.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/PhantasmalFury.cs b/Items/Weapons/Magic/PhantasmalFury.cs index 75feb60590..38117c9eb1 100644 --- a/Items/Weapons/Magic/PhantasmalFury.cs +++ b/Items/Weapons/Magic/PhantasmalFury.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/PhoenixFlameBarrage.cs b/Items/Weapons/Magic/PhoenixFlameBarrage.cs index 5f47966448..1921f78eeb 100644 --- a/Items/Weapons/Magic/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Magic/PhoenixFlameBarrage.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Photosynthesis.cs b/Items/Weapons/Magic/Photosynthesis.cs index d3bb5f9161..dc4e32d222 100644 --- a/Items/Weapons/Magic/Photosynthesis.cs +++ b/Items/Weapons/Magic/Photosynthesis.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/PlagueStaff.cs b/Items/Weapons/Magic/PlagueStaff.cs index 61462b4e87..c9cd97def5 100644 --- a/Items/Weapons/Magic/PlagueStaff.cs +++ b/Items/Weapons/Magic/PlagueStaff.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index 82e8ee1d84..a7bb31498f 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/PlasmaRod.cs b/Items/Weapons/Magic/PlasmaRod.cs index 11b443fc00..904896c5ae 100644 --- a/Items/Weapons/Magic/PlasmaRod.cs +++ b/Items/Weapons/Magic/PlasmaRod.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/SHPC.cs b/Items/Weapons/Magic/SHPC.cs index 05cc5a813e..827f9848e5 100644 --- a/Items/Weapons/Magic/SHPC.cs +++ b/Items/Weapons/Magic/SHPC.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic public const float SightHomingRange = 288f; // Range of homing for Sight bombs, in pixels public const int FrightFlatDamage = 20; - public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; public override void SetDefaults() { diff --git a/Items/Weapons/Magic/SandstreamScepter.cs b/Items/Weapons/Magic/SandstreamScepter.cs index 9f1680230f..15d8ea76c8 100644 --- a/Items/Weapons/Magic/SandstreamScepter.cs +++ b/Items/Weapons/Magic/SandstreamScepter.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/SanguineFlare.cs b/Items/Weapons/Magic/SanguineFlare.cs index 23cb3d0aea..bc7827c338 100644 --- a/Items/Weapons/Magic/SanguineFlare.cs +++ b/Items/Weapons/Magic/SanguineFlare.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ShaderainStaff.cs b/Items/Weapons/Magic/ShaderainStaff.cs index 7fac680a1f..cb4d8ccff9 100644 --- a/Items/Weapons/Magic/ShaderainStaff.cs +++ b/Items/Weapons/Magic/ShaderainStaff.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index 970fa21d21..d438f5e097 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/SkyGlaze.cs b/Items/Weapons/Magic/SkyGlaze.cs index 07705ba1b5..a9bc168915 100644 --- a/Items/Weapons/Magic/SkyGlaze.cs +++ b/Items/Weapons/Magic/SkyGlaze.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/SoulPiercer.cs b/Items/Weapons/Magic/SoulPiercer.cs index 6fcc104cb2..c7c48d362a 100644 --- a/Items/Weapons/Magic/SoulPiercer.cs +++ b/Items/Weapons/Magic/SoulPiercer.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/SubsumingVortex.cs b/Items/Weapons/Magic/SubsumingVortex.cs index 59d732f8ad..84db87a52f 100644 --- a/Items/Weapons/Magic/SubsumingVortex.cs +++ b/Items/Weapons/Magic/SubsumingVortex.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ThePrince.cs b/Items/Weapons/Magic/ThePrince.cs index 5adda2791c..2cf5bc192a 100644 --- a/Items/Weapons/Magic/ThePrince.cs +++ b/Items/Weapons/Magic/ThePrince.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public const int FlameSplitCount = 6; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/TheWand.cs b/Items/Weapons/Magic/TheWand.cs index 38f0e17b33..cb2dcf2656 100644 --- a/Items/Weapons/Magic/TheWand.cs +++ b/Items/Weapons/Magic/TheWand.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ThornBlossom.cs b/Items/Weapons/Magic/ThornBlossom.cs index 0fe8425e06..005e22edf6 100644 --- a/Items/Weapons/Magic/ThornBlossom.cs +++ b/Items/Weapons/Magic/ThornBlossom.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/UltraLiquidator.cs b/Items/Weapons/Magic/UltraLiquidator.cs index 2eb4625f80..e1c2bd8c05 100644 --- a/Items/Weapons/Magic/UltraLiquidator.cs +++ b/Items/Weapons/Magic/UltraLiquidator.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/UndinesRetribution.cs b/Items/Weapons/Magic/UndinesRetribution.cs index 85490b1564..4a532b359c 100644 --- a/Items/Weapons/Magic/UndinesRetribution.cs +++ b/Items/Weapons/Magic/UndinesRetribution.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/ValkyrieRay.cs b/Items/Weapons/Magic/ValkyrieRay.cs index 7658454429..9c8c4765fe 100644 --- a/Items/Weapons/Magic/ValkyrieRay.cs +++ b/Items/Weapons/Magic/ValkyrieRay.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/VeeringWind.cs b/Items/Weapons/Magic/VeeringWind.cs index 0e4705aa56..fae81737a1 100644 --- a/Items/Weapons/Magic/VeeringWind.cs +++ b/Items/Weapons/Magic/VeeringWind.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Vehemence.cs b/Items/Weapons/Magic/Vehemence.cs index f32aa8b0bf..00f8970db7 100644 --- a/Items/Weapons/Magic/Vehemence.cs +++ b/Items/Weapons/Magic/Vehemence.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/VenusianTrident.cs b/Items/Weapons/Magic/VenusianTrident.cs index f4c89dbcc5..407eaf612a 100644 --- a/Items/Weapons/Magic/VenusianTrident.cs +++ b/Items/Weapons/Magic/VenusianTrident.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Vesuvius.cs b/Items/Weapons/Magic/Vesuvius.cs index 3ed6924f0d..c5095b7d93 100644 --- a/Items/Weapons/Magic/Vesuvius.cs +++ b/Items/Weapons/Magic/Vesuvius.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + Item.staff[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/Viscera.cs b/Items/Weapons/Magic/Viscera.cs index f7c221a071..ec75d92d53 100644 --- a/Items/Weapons/Magic/Viscera.cs +++ b/Items/Weapons/Magic/Viscera.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public const int BoomLifetime = 40; diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index d5f00474c2..19585a3893 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic public static readonly SoundStyle BeamSound = new("CalamityMod/Sounds/Item/VividClarityBeamAppear"); public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/VoidVortex.cs b/Items/Weapons/Magic/VoidVortex.cs index 05b97f47e8..a671c7c4c1 100644 --- a/Items/Weapons/Magic/VoidVortex.cs +++ b/Items/Weapons/Magic/VoidVortex.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/VoltaicClimax.cs b/Items/Weapons/Magic/VoltaicClimax.cs index 168a0c0d61..56ab2c6926 100644 --- a/Items/Weapons/Magic/VoltaicClimax.cs +++ b/Items/Weapons/Magic/VoltaicClimax.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Magic/WyvernsCall.cs b/Items/Weapons/Magic/WyvernsCall.cs index 36a2897fd8..67b618de61 100644 --- a/Items/Weapons/Magic/WyvernsCall.cs +++ b/Items/Weapons/Magic/WyvernsCall.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/AegisBlade.cs b/Items/Weapons/Melee/AegisBlade.cs index 9b76ece0bb..6607f71156 100644 --- a/Items/Weapons/Melee/AegisBlade.cs +++ b/Items/Weapons/Melee/AegisBlade.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/AirSpinner.cs b/Items/Weapons/Melee/AirSpinner.cs index 1ab080f85e..8d6208edc0 100644 --- a/Items/Weapons/Melee/AirSpinner.cs +++ b/Items/Weapons/Melee/AirSpinner.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/AmidiasTrident.cs b/Items/Weapons/Melee/AmidiasTrident.cs index 9624cbde95..36530c0bdb 100644 --- a/Items/Weapons/Melee/AmidiasTrident.cs +++ b/Items/Weapons/Melee/AmidiasTrident.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Aorta.cs b/Items/Weapons/Melee/Aorta.cs index 62b40b8710..4ccd7795d0 100644 --- a/Items/Weapons/Melee/Aorta.cs +++ b/Items/Weapons/Melee/Aorta.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/AstralPike.cs b/Items/Weapons/Melee/AstralPike.cs index d9d5da2e0a..688ef97985 100644 --- a/Items/Weapons/Melee/AstralPike.cs +++ b/Items/Weapons/Melee/AstralPike.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Azathoth.cs b/Items/Weapons/Melee/Azathoth.cs index 00083eb51a..335fbc8c4a 100644 --- a/Items/Weapons/Melee/Azathoth.cs +++ b/Items/Weapons/Melee/Azathoth.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/BansheeHook.cs b/Items/Weapons/Melee/BansheeHook.cs index 458b6276f9..0c788bd3ff 100644 --- a/Items/Weapons/Melee/BansheeHook.cs +++ b/Items/Weapons/Melee/BansheeHook.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/BotanicPiercer.cs b/Items/Weapons/Melee/BotanicPiercer.cs index 5e75b4790b..25f5f5eb42 100644 --- a/Items/Weapons/Melee/BotanicPiercer.cs +++ b/Items/Weapons/Melee/BotanicPiercer.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Brimlance.cs b/Items/Weapons/Melee/Brimlance.cs index 1666ed6820..891c17c57e 100644 --- a/Items/Weapons/Melee/Brimlance.cs +++ b/Items/Weapons/Melee/Brimlance.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/BrimstoneSword.cs b/Items/Weapons/Melee/BrimstoneSword.cs index 8407cb5eb2..78ccce24fd 100644 --- a/Items/Weapons/Melee/BrimstoneSword.cs +++ b/Items/Weapons/Melee/BrimstoneSword.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/BrinyBaron.cs b/Items/Weapons/Melee/BrinyBaron.cs index 108c8f20de..0720ced625 100644 --- a/Items/Weapons/Melee/BrinyBaron.cs +++ b/Items/Weapons/Melee/BrinyBaron.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index d11e875d7a..bdbca8b591 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -299,8 +299,8 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { - Texture2D itemTexture = TextureAssets.Item[Item.type].Value; - Rectangle itemFrame = (Main.itemAnimations[Item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[Item.type].GetFrame(itemTexture); + Texture2D itemTexture = TextureAssets.Item[Type].Value; + Rectangle itemFrame = (Main.itemAnimations[Type] == null) ? itemTexture.Frame() : Main.itemAnimations[Type].GetFrame(itemTexture); if (mainAttunement == null) return true; diff --git a/Items/Weapons/Melee/BurningRevelation.cs b/Items/Weapons/Melee/BurningRevelation.cs index 85c2b4d6e8..f3adc1195e 100644 --- a/Items/Weapons/Melee/BurningRevelation.cs +++ b/Items/Weapons/Melee/BurningRevelation.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/DeathsAscension.cs b/Items/Weapons/Melee/DeathsAscension.cs index 819a5ab932..a71bc50700 100644 --- a/Items/Weapons/Melee/DeathsAscension.cs +++ b/Items/Weapons/Melee/DeathsAscension.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/EarthenPike.cs b/Items/Weapons/Melee/EarthenPike.cs index d5cabc2e95..7db0bd93f5 100644 --- a/Items/Weapons/Melee/EarthenPike.cs +++ b/Items/Weapons/Melee/EarthenPike.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/FaultLine.cs b/Items/Weapons/Melee/FaultLine.cs index fb99d311a7..6872b878f5 100644 --- a/Items/Weapons/Melee/FaultLine.cs +++ b/Items/Weapons/Melee/FaultLine.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/GildedProboscis.cs b/Items/Weapons/Melee/GildedProboscis.cs index 45b27e9071..e278081d7e 100644 --- a/Items/Weapons/Melee/GildedProboscis.cs +++ b/Items/Weapons/Melee/GildedProboscis.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/GoldplumeSpear.cs b/Items/Weapons/Melee/GoldplumeSpear.cs index 4c86273d79..b870ed806a 100644 --- a/Items/Weapons/Melee/GoldplumeSpear.cs +++ b/Items/Weapons/Melee/GoldplumeSpear.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/HellionFlowerSpear.cs b/Items/Weapons/Melee/HellionFlowerSpear.cs index 0ea8d94c6d..d89110439a 100644 --- a/Items/Weapons/Melee/HellionFlowerSpear.cs +++ b/Items/Weapons/Melee/HellionFlowerSpear.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Hellkite.cs b/Items/Weapons/Melee/Hellkite.cs index 4cb0bcfa15..b08165f7dd 100644 --- a/Items/Weapons/Melee/Hellkite.cs +++ b/Items/Weapons/Melee/Hellkite.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly SoundStyle HitSoundBig = new("CalamityMod/Sounds/Item/HellkiteBigHit", 2); public static readonly SoundStyle ChargeSound = new("CalamityMod/Sounds/Item/HellkiteCharge"); public static readonly SoundStyle FullChargeSound = new("CalamityMod/Sounds/Item/HellkiteFullCharge"); - public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; public override void SetDefaults() { Item.width = 124; diff --git a/Items/Weapons/Melee/IridescentExcalibur.cs b/Items/Weapons/Melee/IridescentExcalibur.cs index 457c2521e4..76c749add9 100644 --- a/Items/Weapons/Melee/IridescentExcalibur.cs +++ b/Items/Weapons/Melee/IridescentExcalibur.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index 50d74118be..22b6a8c839 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Nadir.cs b/Items/Weapons/Melee/Nadir.cs index 84d1d622fd..4ba4e5d206 100644 --- a/Items/Weapons/Melee/Nadir.cs +++ b/Items/Weapons/Melee/Nadir.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Oblivion.cs b/Items/Weapons/Melee/Oblivion.cs index 14b23912fb..2dc1ec0103 100644 --- a/Items/Weapons/Melee/Oblivion.cs +++ b/Items/Weapons/Melee/Oblivion.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 4f1e694b40..8fdbf0681f 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -371,7 +371,7 @@ namespace CalamityMod.Items.Weapons.Melee position.Y -= 6f * scale; Texture2D itemTexture = Request("CalamityMod/Items/Weapons/Melee/OmegaBiomeBladeExtra").Value; - Rectangle itemFrame = (Main.itemAnimations[Item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[Item.type].GetFrame(itemTexture); + Rectangle itemFrame = (Main.itemAnimations[Type] == null) ? itemTexture.Frame() : Main.itemAnimations[Type].GetFrame(itemTexture); // Draw all particles. diff --git a/Items/Weapons/Melee/Pandemic.cs b/Items/Weapons/Melee/Pandemic.cs index d8f968505e..8ca2d50e90 100644 --- a/Items/Weapons/Melee/Pandemic.cs +++ b/Items/Weapons/Melee/Pandemic.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/PhotonRipper.cs b/Items/Weapons/Melee/PhotonRipper.cs index 5986c13bc3..067ee83e3b 100644 --- a/Items/Weapons/Melee/PhotonRipper.cs +++ b/Items/Weapons/Melee/PhotonRipper.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/PrismaticBreaker.cs b/Items/Weapons/Melee/PrismaticBreaker.cs index 39ce83d7dc..5e11627826 100644 --- a/Items/Weapons/Melee/PrismaticBreaker.cs +++ b/Items/Weapons/Melee/PrismaticBreaker.cs @@ -35,9 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Quagmire.cs b/Items/Weapons/Melee/Quagmire.cs index 8105ff2d7e..21072bdeda 100644 --- a/Items/Weapons/Melee/Quagmire.cs +++ b/Items/Weapons/Melee/Quagmire.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/RedtideSpear.cs b/Items/Weapons/Melee/RedtideSpear.cs index 3ea296e0e3..78d1e82068 100644 --- a/Items/Weapons/Melee/RedtideSpear.cs +++ b/Items/Weapons/Melee/RedtideSpear.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Riptide.cs b/Items/Weapons/Melee/Riptide.cs index 3676f8d2e5..0b6e49e50c 100644 --- a/Items/Weapons/Melee/Riptide.cs +++ b/Items/Weapons/Melee/Riptide.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/SaharaSlicers.cs b/Items/Weapons/Melee/SaharaSlicers.cs index 4ffc6f96f5..40549fec04 100644 --- a/Items/Weapons/Melee/SaharaSlicers.cs +++ b/Items/Weapons/Melee/SaharaSlicers.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public bool AltProjectile = true; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Melee/SausageMaker.cs b/Items/Weapons/Melee/SausageMaker.cs index fd0f87b89b..d43d86bd7f 100644 --- a/Items/Weapons/Melee/SausageMaker.cs +++ b/Items/Weapons/Melee/SausageMaker.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/Shimmerspark.cs b/Items/Weapons/Melee/Shimmerspark.cs index 45f7958674..7dd42299f9 100644 --- a/Items/Weapons/Melee/Shimmerspark.cs +++ b/Items/Weapons/Melee/Shimmerspark.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/SmokingComet.cs b/Items/Weapons/Melee/SmokingComet.cs index ff8fe8633e..b40665dc9d 100644 --- a/Items/Weapons/Melee/SmokingComet.cs +++ b/Items/Weapons/Melee/SmokingComet.cs @@ -10,9 +10,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/StarnightLance.cs b/Items/Weapons/Melee/StarnightLance.cs index 8e6afe25b2..8dc323f208 100644 --- a/Items/Weapons/Melee/StarnightLance.cs +++ b/Items/Weapons/Melee/StarnightLance.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/StygianShield.cs b/Items/Weapons/Melee/StygianShield.cs index 3b6b75e84f..a2c212cbd7 100644 --- a/Items/Weapons/Melee/StygianShield.cs +++ b/Items/Weapons/Melee/StygianShield.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(HeldDefense, (DisableDashDuration / 60D).ToString("N1")); - public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; public override void SetDefaults() { diff --git a/Items/Weapons/Melee/SulphurousGrabber.cs b/Items/Weapons/Melee/SulphurousGrabber.cs index d7179f663d..6480c443fd 100644 --- a/Items/Weapons/Melee/SulphurousGrabber.cs +++ b/Items/Weapons/Melee/SulphurousGrabber.cs @@ -10,9 +10,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TenebreusTides.cs b/Items/Weapons/Melee/TenebreusTides.cs index 951e07525a..f92d002223 100644 --- a/Items/Weapons/Melee/TenebreusTides.cs +++ b/Items/Weapons/Melee/TenebreusTides.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TheBurningSky.cs b/Items/Weapons/Melee/TheBurningSky.cs index abb9f7b438..1e8fa16cdf 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee { // Visually a sword, but with no true melee capability. The Burning Sky is held out like a staff. - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TheDarkMaster.cs b/Items/Weapons/Melee/TheDarkMaster.cs index fa651fd0a3..75bfd17d1c 100644 --- a/Items/Weapons/Melee/TheDarkMaster.cs +++ b/Items/Weapons/Melee/TheDarkMaster.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - Item.staff[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + Item.staff[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TheGodsGambit.cs b/Items/Weapons/Melee/TheGodsGambit.cs index d786bdcc23..a863c7e54e 100644 --- a/Items/Weapons/Melee/TheGodsGambit.cs +++ b/Items/Weapons/Melee/TheGodsGambit.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TheMicrowave.cs b/Items/Weapons/Melee/TheMicrowave.cs index c485fbbe46..eefec91cfb 100644 --- a/Items/Weapons/Melee/TheMicrowave.cs +++ b/Items/Weapons/Melee/TheMicrowave.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TheObliterator.cs b/Items/Weapons/Melee/TheObliterator.cs index a02d38ce6a..21c73a3331 100644 --- a/Items/Weapons/Melee/TheObliterator.cs +++ b/Items/Weapons/Melee/TheObliterator.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/TheOracle.cs b/Items/Weapons/Melee/TheOracle.cs index 49a98cf8dc..3eb1520ffb 100644 --- a/Items/Weapons/Melee/TheOracle.cs +++ b/Items/Weapons/Melee/TheOracle.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/VanishingPoint.cs b/Items/Weapons/Melee/VanishingPoint.cs index 52bd80efe6..a02853841d 100644 --- a/Items/Weapons/Melee/VanishingPoint.cs +++ b/Items/Weapons/Melee/VanishingPoint.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/VulcaniteLance.cs b/Items/Weapons/Melee/VulcaniteLance.cs index 98e810e120..b61b432b67 100644 --- a/Items/Weapons/Melee/VulcaniteLance.cs +++ b/Items/Weapons/Melee/VulcaniteLance.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Spears[Item.type] = true; + ItemID.Sets.Spears[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Melee/YateveoBloom.cs b/Items/Weapons/Melee/YateveoBloom.cs index 4254bd8158..0cb321f18f 100644 --- a/Items/Weapons/Melee/YateveoBloom.cs +++ b/Items/Weapons/Melee/YateveoBloom.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; // Flail already does half damage. No tooltip mutliplier required. } diff --git a/Items/Weapons/Melee/YinYo.cs b/Items/Weapons/Melee/YinYo.cs index dcf2dc5e30..6ab6275747 100644 --- a/Items/Weapons/Melee/YinYo.cs +++ b/Items/Weapons/Melee/YinYo.cs @@ -9,9 +9,9 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; - ItemID.Sets.GamepadExtraRange[Item.type] = 15; - ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; + ItemID.Sets.Yoyo[Type] = true; + ItemID.Sets.GamepadExtraRange[Type] = 15; + ItemID.Sets.GamepadSmartQuickReach[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs b/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs index 62bfe59a96..a7b9d1d5e3 100644 --- a/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs +++ b/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/Animosity.cs b/Items/Weapons/Ranged/Animosity.cs index 18e17a6d39..12c48f1fc6 100644 --- a/Items/Weapons/Ranged/Animosity.cs +++ b/Items/Weapons/Ranged/Animosity.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged public float SniperVelocityMult = 2f; public new string LocalizationCategory => "Items.Weapons.Ranged"; - public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + public override void SetStaticDefaults() => ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/BarracudaGun.cs b/Items/Weapons/Ranged/BarracudaGun.cs index 5e3de62293..87895c9b14 100644 --- a/Items/Weapons/Ranged/BarracudaGun.cs +++ b/Items/Weapons/Ranged/BarracudaGun.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 29e9f63f78..4a0f30013d 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/BlossomFlux.cs b/Items/Weapons/Ranged/BlossomFlux.cs index c01ff0e243..009dab6e38 100644 --- a/Items/Weapons/Ranged/BlossomFlux.cs +++ b/Items/Weapons/Ranged/BlossomFlux.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Buzzkill.cs b/Items/Weapons/Ranged/Buzzkill.cs index 63c52faec8..b5a9e54ea7 100644 --- a/Items/Weapons/Ranged/Buzzkill.cs +++ b/Items/Weapons/Ranged/Buzzkill.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Condemnation.cs b/Items/Weapons/Ranged/Condemnation.cs index e9397aeaca..96d14370c5 100644 --- a/Items/Weapons/Ranged/Condemnation.cs +++ b/Items/Weapons/Ranged/Condemnation.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/CorinthPrime.cs b/Items/Weapons/Ranged/CorinthPrime.cs index c080382c89..2bcfaa60db 100644 --- a/Items/Weapons/Ranged/CorinthPrime.cs +++ b/Items/Weapons/Ranged/CorinthPrime.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index a9ee5b51e5..36ca91f8d5 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 573af9b6a4..51ecdc5739 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Hellborn.cs b/Items/Weapons/Ranged/Hellborn.cs index 0a7735e92a..bada6debe5 100644 --- a/Items/Weapons/Ranged/Hellborn.cs +++ b/Items/Weapons/Ranged/Hellborn.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Hydra.cs b/Items/Weapons/Ranged/Hydra.cs index d4a5d9ffa6..521f677b7a 100644 --- a/Items/Weapons/Ranged/Hydra.cs +++ b/Items/Weapons/Ranged/Hydra.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index a3d6b48b2a..7800bd11e1 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public int SineCounter = 0; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Leviatitan.cs b/Items/Weapons/Ranged/Leviatitan.cs index a640da1b1d..61010b9c37 100644 --- a/Items/Weapons/Ranged/Leviatitan.cs +++ b/Items/Weapons/Ranged/Leviatitan.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged private int shotCounter = 1; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/MagnaCannon.cs b/Items/Weapons/Ranged/MagnaCannon.cs index 11c969a986..4b844fd37c 100644 --- a/Items/Weapons/Ranged/MagnaCannon.cs +++ b/Items/Weapons/Ranged/MagnaCannon.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; - public override void SetStaticDefaults() => ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + public override void SetStaticDefaults() => ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index 16dc0a289d..f2be5f037c 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/NullificationPistol.cs b/Items/Weapons/Ranged/NullificationPistol.cs index f0445990a4..ece748a510 100644 --- a/Items/Weapons/Ranged/NullificationPistol.cs +++ b/Items/Weapons/Ranged/NullificationPistol.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 60b4d83186..1b25904346 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged public static int RightClickCooldown = 25; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/PlagueTaintedSMG.cs b/Items/Weapons/Ranged/PlagueTaintedSMG.cs index 2f42728351..c5c81448e0 100644 --- a/Items/Weapons/Ranged/PlagueTaintedSMG.cs +++ b/Items/Weapons/Ranged/PlagueTaintedSMG.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/PolarisParrotfish.cs b/Items/Weapons/Ranged/PolarisParrotfish.cs index be98bffc27..af88025aeb 100644 --- a/Items/Weapons/Ranged/PolarisParrotfish.cs +++ b/Items/Weapons/Ranged/PolarisParrotfish.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle Squeak = new("CalamityMod/Sounds/Custom/CuteSqueak") { Volume = 0.75f }; public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; - Item.staff[Item.type] = true; //so it doesn't look weird af when holding it + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; + Item.staff[Type] = true; //so it doesn't look weird af when holding it } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index 056f567798..2c4c89a136 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Pumpler.cs b/Items/Weapons/Ranged/Pumpler.cs index bf87eb6146..36aeaafe38 100644 --- a/Items/Weapons/Ranged/Pumpler.cs +++ b/Items/Weapons/Ranged/Pumpler.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/ReedBlowgun.cs b/Items/Weapons/Ranged/ReedBlowgun.cs index fa3902328f..34a55c9613 100644 --- a/Items/Weapons/Ranged/ReedBlowgun.cs +++ b/Items/Weapons/Ranged/ReedBlowgun.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/SeasSearing.cs b/Items/Weapons/Ranged/SeasSearing.cs index 37e48e4060..11d8e3fa93 100644 --- a/Items/Weapons/Ranged/SeasSearing.cs +++ b/Items/Weapons/Ranged/SeasSearing.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/SepticSkewer.cs b/Items/Weapons/Ranged/SepticSkewer.cs index 4edc4b370d..ab572d256f 100644 --- a/Items/Weapons/Ranged/SepticSkewer.cs +++ b/Items/Weapons/Ranged/SepticSkewer.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged public bool pulled = false; public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs index 4996c2f66a..5137773712 100644 --- a/Items/Weapons/Ranged/Shredder.cs +++ b/Items/Weapons/Ranged/Shredder.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/SpeedBlaster.cs b/Items/Weapons/Ranged/SpeedBlaster.cs index aca243757d..91eb648f97 100644 --- a/Items/Weapons/Ranged/SpeedBlaster.cs +++ b/Items/Weapons/Ranged/SpeedBlaster.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/Starmageddon.cs b/Items/Weapons/Ranged/Starmageddon.cs index f7e422decd..a2c2cd6707 100644 --- a/Items/Weapons/Ranged/Starmageddon.cs +++ b/Items/Weapons/Ranged/Starmageddon.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/StellarCannon.cs b/Items/Weapons/Ranged/StellarCannon.cs index c35aae9dab..376629dbca 100644 --- a/Items/Weapons/Ranged/StellarCannon.cs +++ b/Items/Weapons/Ranged/StellarCannon.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/StormSurge.cs b/Items/Weapons/Ranged/StormSurge.cs index a55535b3a7..63a3946b24 100644 --- a/Items/Weapons/Ranged/StormSurge.cs +++ b/Items/Weapons/Ranged/StormSurge.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/SulphuricAcidCannon.cs b/Items/Weapons/Ranged/SulphuricAcidCannon.cs index 36c41d54c0..27ac2a1351 100644 --- a/Items/Weapons/Ranged/SulphuricAcidCannon.cs +++ b/Items/Weapons/Ranged/SulphuricAcidCannon.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/SuperradiantSlaughterer.cs b/Items/Weapons/Ranged/SuperradiantSlaughterer.cs index e48e8b1315..b68329a75a 100644 --- a/Items/Weapons/Ranged/SuperradiantSlaughterer.cs +++ b/Items/Weapons/Ranged/SuperradiantSlaughterer.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/SurgeDriver.cs b/Items/Weapons/Ranged/SurgeDriver.cs index 2f824d95de..a344d60962 100644 --- a/Items/Weapons/Ranged/SurgeDriver.cs +++ b/Items/Weapons/Ranged/SurgeDriver.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index e304c42a43..234dd933ce 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public int SineCounter = 0; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Ranged/TheSevensStriker.cs b/Items/Weapons/Ranged/TheSevensStriker.cs index 724da47d7b..347ed65b3a 100644 --- a/Items/Weapons/Ranged/TheSevensStriker.cs +++ b/Items/Weapons/Ranged/TheSevensStriker.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/TitaniumRailgun.cs b/Items/Weapons/Ranged/TitaniumRailgun.cs index 02fd415f1e..34ad55a974 100644 --- a/Items/Weapons/Ranged/TitaniumRailgun.cs +++ b/Items/Weapons/Ranged/TitaniumRailgun.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { - ItemID.Sets.IsRangedSpecialistWeapon[Item.type] = true; + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; } public override void SetDefaults() { diff --git a/Items/Weapons/Rogue/AuroradicalThrow.cs b/Items/Weapons/Rogue/AuroradicalThrow.cs index 3bc3e7e79c..04409f3752 100644 --- a/Items/Weapons/Rogue/AuroradicalThrow.cs +++ b/Items/Weapons/Rogue/AuroradicalThrow.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Item.type].Value); + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, TextureAssets.Item[Type].Value); } } } diff --git a/Items/Weapons/Rogue/LeonidProgenitor.cs b/Items/Weapons/Rogue/LeonidProgenitor.cs index 16a3c08fb4..7918e2eded 100644 --- a/Items/Weapons/Rogue/LeonidProgenitor.cs +++ b/Items/Weapons/Rogue/LeonidProgenitor.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Rogue/Malachite.cs b/Items/Weapons/Rogue/Malachite.cs index 9c6d8c5165..63e63fc0cd 100644 --- a/Items/Weapons/Rogue/Malachite.cs +++ b/Items/Weapons/Rogue/Malachite.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Rogue { public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Summon/AquasScepter.cs b/Items/Weapons/Summon/AquasScepter.cs index 40ac018f06..748b39fe52 100644 --- a/Items/Weapons/Summon/AquasScepter.cs +++ b/Items/Weapons/Summon/AquasScepter.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetStaticDefaults() { - ItemID.Sets.GamepadWholeScreenUseRange[Item.type] = true; - ItemID.Sets.LockOnIgnoresCollision[Item.type] = true; + ItemID.Sets.GamepadWholeScreenUseRange[Type] = true; + ItemID.Sets.LockOnIgnoresCollision[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Summon/BorealisBomber.cs b/Items/Weapons/Summon/BorealisBomber.cs index d91e61997f..7acf178e45 100644 --- a/Items/Weapons/Summon/BorealisBomber.cs +++ b/Items/Weapons/Summon/BorealisBomber.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Summon/BrittleStarStaff.cs b/Items/Weapons/Summon/BrittleStarStaff.cs index fc1033d1ca..5102e7442a 100644 --- a/Items/Weapons/Summon/BrittleStarStaff.cs +++ b/Items/Weapons/Summon/BrittleStarStaff.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Items.Weapons.Summon } public override void SetStaticDefaults() { - Item.staff[Item.type] = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + Item.staff[Type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index 12ca3a20af..7db24c614d 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Summon/SanctifiedSpark.cs b/Items/Weapons/Summon/SanctifiedSpark.cs index b7c19db16a..70f63705a3 100644 --- a/Items/Weapons/Summon/SanctifiedSpark.cs +++ b/Items/Weapons/Summon/SanctifiedSpark.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Summon/ViridVanguard.cs b/Items/Weapons/Summon/ViridVanguard.cs index 70a121b995..0da9bba37e 100644 --- a/Items/Weapons/Summon/ViridVanguard.cs +++ b/Items/Weapons/Summon/ViridVanguard.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetStaticDefaults() { - Item.staff[Item.type] = true; + Item.staff[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Typeless/RelicOfResilience.cs b/Items/Weapons/Typeless/RelicOfResilience.cs index 0e975a0ab3..3ac122a0b0 100644 --- a/Items/Weapons/Typeless/RelicOfResilience.cs +++ b/Items/Weapons/Typeless/RelicOfResilience.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Typeless public const float WeaknessDR = 0.45f; public override void SetStaticDefaults() { - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() diff --git a/Items/Weapons/Typeless/Skynamite.cs b/Items/Weapons/Typeless/Skynamite.cs index 289b56d692..7b1727b9b0 100644 --- a/Items/Weapons/Typeless/Skynamite.cs +++ b/Items/Weapons/Typeless/Skynamite.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Typeless public override void SetStaticDefaults() { Item.ResearchUnlockCount = 99; - ItemID.Sets.ItemsThatCountAsBombsForDemolitionistToSpawn[Item.type] = true; - ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true; + ItemID.Sets.ItemsThatCountAsBombsForDemolitionistToSpawn[Type] = true; + ItemID.Sets.CanBePlacedOnWeaponRacks[Type] = true; } public override void SetDefaults() From ed8c5444d55d58c3bb0fb2979331071273fc6a25 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:46:20 +0700 Subject: [PATCH 20/21] Type (npc) --- NPCs/Abyss/BabyCannonballJellyfish.cs | 14 +++++----- NPCs/Abyss/Bloatfish.cs | 4 +-- NPCs/Abyss/BobbitWormHead.cs | 4 +-- NPCs/Abyss/BoxJellyfish.cs | 4 +-- NPCs/Abyss/CannonballJellyfish.cs | 12 ++++----- NPCs/Abyss/ChaoticPuffer.cs | 2 +- NPCs/Abyss/ColossalSquid.cs | 6 ++--- NPCs/Abyss/Cuttlefish.cs | 4 +-- NPCs/Abyss/DevilFish.cs | 2 +- NPCs/Abyss/DevilFishAlt.cs | 2 +- NPCs/Abyss/EidolonWyrmBody.cs | 4 +-- NPCs/Abyss/EidolonWyrmBodyAlt.cs | 4 +-- NPCs/Abyss/EidolonWyrmHead.cs | 4 +-- NPCs/Abyss/EidolonWyrmTail.cs | 4 +-- NPCs/Abyss/GiantSquid.cs | 4 +-- NPCs/Abyss/GulperEelBody.cs | 4 +-- NPCs/Abyss/GulperEelBodyAlt.cs | 4 +-- NPCs/Abyss/GulperEelHead.cs | 4 +-- NPCs/Abyss/GulperEelTail.cs | 4 +-- NPCs/Abyss/Laserfish.cs | 6 ++--- NPCs/Abyss/LuminousCorvina.cs | 2 +- NPCs/Abyss/MirageJelly.cs | 4 +-- NPCs/Abyss/MorayEel.cs | 4 +-- NPCs/Abyss/ReaperShark.cs | 10 +++---- NPCs/Abyss/SlabCrab.cs | 2 +- NPCs/Abyss/ToxicMinnow.cs | 4 +-- NPCs/Abyss/Viperfish.cs | 4 +-- NPCs/AcidRain/AcidEel.cs | 10 +++---- NPCs/AcidRain/BabyFlakCrab.cs | 8 +++--- NPCs/AcidRain/BloodwormFleeing.cs | 4 +-- NPCs/AcidRain/BloodwormNormal.cs | 8 +++--- NPCs/AcidRain/CragmawMire.cs | 2 +- NPCs/AcidRain/FlakCrab.cs | 4 +-- NPCs/AcidRain/GammaSlime.cs | 6 ++--- NPCs/AcidRain/IrradiatedSlime.cs | 2 +- NPCs/AcidRain/Mauler.cs | 12 ++++----- NPCs/AcidRain/NuclearTerror.cs | 8 +++--- NPCs/AcidRain/NuclearToad.cs | 4 +-- NPCs/AcidRain/Orthocera.cs | 4 +-- NPCs/AcidRain/Radiator.cs | 2 +- NPCs/AcidRain/Skyfin.cs | 4 +-- NPCs/AcidRain/SulphurousSkater.cs | 8 +++--- NPCs/AcidRain/Trilobite.cs | 8 +++--- NPCs/AquaticScourge/AquaticScourgeBody.cs | 4 +-- NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 4 +-- NPCs/AquaticScourge/AquaticScourgeHead.cs | 4 +-- NPCs/AquaticScourge/AquaticScourgeTail.cs | 4 +-- NPCs/Astral/Aries.cs | 2 +- NPCs/Astral/Astraglomerate.cs | 4 +-- NPCs/Astral/AstralProbe.cs | 6 ++--- NPCs/Astral/AstralSlime.cs | 2 +- NPCs/Astral/AstralachneaGround.cs | 2 +- NPCs/Astral/AstralachneaWall.cs | 4 +-- NPCs/Astral/Atlas.cs | 4 +-- NPCs/Astral/FusionFeeder.cs | 4 +-- NPCs/Astral/Glomerling.cs | 2 +- NPCs/Astral/Hadarian.cs | 4 +-- NPCs/Astral/Mantis.cs | 2 +- NPCs/Astral/Nova.cs | 2 +- NPCs/Astral/SightseerCollider.cs | 2 +- NPCs/Astral/SightseerSpitter.cs | 2 +- NPCs/Astral/StellarCulex.cs | 2 +- NPCs/Astral/Twinkler.cs | 6 ++--- NPCs/AstrumAureus/AstrumAureus.cs | 18 ++++++------- NPCs/AstrumAureus/AureusSpawn.cs | 16 ++++++------ NPCs/AstrumDeus/AstrumDeusBody.cs | 6 ++--- NPCs/AstrumDeus/AstrumDeusHead.cs | 6 ++--- NPCs/AstrumDeus/AstrumDeusTail.cs | 6 ++--- NPCs/BrimstoneElemental/Brimling.cs | 4 +-- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 8 +++--- NPCs/Bumblebirb/Bumblefuck.cs | 18 ++++++------- NPCs/Bumblebirb/Bumblefuck2.cs | 12 ++++----- NPCs/CalClone/CalamitasClone.cs | 16 ++++++------ NPCs/CalClone/Cataclysm.cs | 16 ++++++------ NPCs/CalClone/Catastrophe.cs | 16 ++++++------ NPCs/CalClone/SoulSeeker.cs | 18 ++++++------- NPCs/CeaselessVoid/CeaselessVoid.cs | 16 ++++++------ NPCs/CeaselessVoid/DarkEnergy.cs | 16 ++++++------ NPCs/Crabulon/CrabShroom.cs | 10 +++---- NPCs/Crabulon/Crabulon.cs | 16 ++++++------ NPCs/Crags/CalamityEye.cs | 2 +- NPCs/Crags/HeatSpirit.cs | 4 +-- NPCs/Crags/InfernalCongealment.cs | 2 +- NPCs/Crags/RenegadeWarlock.cs | 2 +- NPCs/Crags/Scryllar.cs | 2 +- NPCs/Crags/ScryllarRage.cs | 2 +- NPCs/Crags/SoulSlurper.cs | 6 ++--- NPCs/Cryogen/Cryogen.cs | 8 +++--- NPCs/Cryogen/CryogenShield.cs | 4 +-- NPCs/DesertScourge/DesertNuisanceBody.cs | 4 +-- NPCs/DesertScourge/DesertNuisanceBodyYoung.cs | 4 +-- NPCs/DesertScourge/DesertNuisanceHead.cs | 6 ++--- NPCs/DesertScourge/DesertNuisanceHeadYoung.cs | 6 ++--- NPCs/DesertScourge/DesertScourgeBody.cs | 4 +-- NPCs/DesertScourge/DesertScourgeHead.cs | 6 ++--- NPCs/DevourerofGods/CosmicGuardianBody.cs | 4 +-- NPCs/DevourerofGods/CosmicGuardianHead.cs | 4 +-- NPCs/DevourerofGods/CosmicGuardianTail.cs | 4 +-- NPCs/DevourerofGods/DevourerofGodsBody.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 2 +- NPCs/DevourerofGods/DevourerofGodsTail.cs | 2 +- NPCs/DraedonLabThings/Androomba.cs | 8 +++--- NPCs/DraedonLabThings/Nanodroid.cs | 10 +++---- .../NanodroidDysfunctional.cs | 10 +++---- NPCs/DraedonLabThings/NanodroidPlagueGreen.cs | 10 +++---- NPCs/DraedonLabThings/NanodroidPlagueRed.cs | 10 +++---- NPCs/DraedonLabThings/RepairUnitCritter.cs | 10 +++---- NPCs/ExoMechs/Apollo/Apollo.cs | 6 ++--- NPCs/ExoMechs/Ares/AresBody.cs | 6 ++--- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 6 ++--- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 6 ++--- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 6 ++--- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 6 ++--- NPCs/ExoMechs/Artemis/Artemis.cs | 6 ++--- NPCs/ExoMechs/Draedon.cs | 16 ++++++------ NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 10 +++---- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 10 +++---- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 12 ++++----- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 10 +++---- NPCs/GreatSandShark/GreatSandShark.cs | 14 +++++----- NPCs/HiveMind/DarkHeart.cs | 6 ++--- NPCs/HiveMind/HiveBlob.cs | 6 ++--- NPCs/HiveMind/HiveBlob2.cs | 6 ++--- NPCs/HiveMind/HiveMind.cs | 6 ++--- NPCs/HiveMind/HiveTumor.cs | 4 +-- NPCs/Leviathan/Anahita.cs | 12 ++++----- NPCs/Leviathan/AquaticAberration.cs | 4 +-- NPCs/Leviathan/Leviathan.cs | 4 +-- NPCs/Leviathan/LeviathanStart.cs | 8 +++--- NPCs/NormalNPCs/AeroSlime.cs | 2 +- NPCs/NormalNPCs/AuroraSpirit.cs | 8 +++--- NPCs/NormalNPCs/BloodlettingServant.cs | 4 +-- NPCs/NormalNPCs/BloomSlime.cs | 2 +- NPCs/NormalNPCs/BucketZombie.cs | 2 +- NPCs/NormalNPCs/CladCrab.cs | 6 ++--- NPCs/NormalNPCs/Cnidrion.cs | 6 ++--- NPCs/NormalNPCs/CrawlerAmber.cs | 2 +- NPCs/NormalNPCs/CrawlerAmethyst.cs | 2 +- NPCs/NormalNPCs/CrawlerCrystal.cs | 2 +- NPCs/NormalNPCs/CrawlerDiamond.cs | 2 +- NPCs/NormalNPCs/CrawlerEmerald.cs | 2 +- NPCs/NormalNPCs/CrawlerRuby.cs | 2 +- NPCs/NormalNPCs/CrawlerSapphire.cs | 2 +- NPCs/NormalNPCs/CrawlerTopaz.cs | 2 +- NPCs/NormalNPCs/CrimulanBlightSlime.cs | 2 +- NPCs/NormalNPCs/CryoSlime.cs | 2 +- NPCs/NormalNPCs/Cryon.cs | 2 +- NPCs/NormalNPCs/EbonianBlightSlime.cs | 2 +- NPCs/NormalNPCs/Eidolist.cs | 6 ++--- NPCs/NormalNPCs/FearlessGoldfishWarrior.cs | 2 +- NPCs/NormalNPCs/Foveanator.cs | 4 +-- NPCs/NormalNPCs/Frogfish.cs | 4 +-- NPCs/NormalNPCs/Horse.cs | 4 +-- NPCs/NormalNPCs/IceClasper.cs | 14 +++++----- NPCs/NormalNPCs/ImpiousImmolator.cs | 6 ++--- NPCs/NormalNPCs/KingSlimeJewelRuby.cs | 2 +- NPCs/NormalNPCs/KingSlimeJewelSapphire.cs | 2 +- NPCs/NormalNPCs/LavaSlimeNoLavaDrop.cs | 2 +- NPCs/NormalNPCs/MantisShrimp.cs | 4 +-- NPCs/NormalNPCs/OverloadedSoldier.cs | 2 +- NPCs/NormalNPCs/PerennialSlime.cs | 2 +- NPCs/NormalNPCs/PhantomSpirit.cs | 2 +- NPCs/NormalNPCs/PhantomSpiritL.cs | 4 +-- NPCs/NormalNPCs/PhantomSpiritM.cs | 4 +-- NPCs/NormalNPCs/PhantomSpiritS.cs | 4 +-- NPCs/NormalNPCs/Piggy.cs | 8 +++--- NPCs/NormalNPCs/PlanterasFreeTentacle.cs | 4 +-- NPCs/NormalNPCs/ProfanedEnergyBody.cs | 2 +- NPCs/NormalNPCs/ProfanedEnergyLantern.cs | 4 +-- NPCs/NormalNPCs/Rimehound.cs | 2 +- NPCs/NormalNPCs/Rotdog.cs | 2 +- NPCs/NormalNPCs/ScornEater.cs | 2 +- NPCs/NormalNPCs/ShockstormShuttle.cs | 6 ++--- NPCs/NormalNPCs/Shroomble.cs | 10 +++---- NPCs/NormalNPCs/SkeletronPrime2.cs | 2 +- NPCs/NormalNPCs/Stormlion.cs | 2 +- NPCs/NormalNPCs/Sunskater.cs | 4 +-- NPCs/NormalNPCs/SuperDummyNPC.cs | 2 +- NPCs/NormalNPCs/ThiccWaifu.cs | 4 +-- NPCs/NormalNPCs/WildBumblefuck.cs | 12 ++++----- NPCs/NormalNPCs/WulfrumAmplifier.cs | 6 ++--- NPCs/NormalNPCs/WulfrumDrone.cs | 6 ++--- NPCs/NormalNPCs/WulfrumGyrator.cs | 6 ++--- NPCs/NormalNPCs/WulfrumHovercraft.cs | 6 ++--- NPCs/NormalNPCs/WulfrumRover.cs | 6 ++--- NPCs/OldDuke/OldDuke.cs | 18 ++++++------- NPCs/OldDuke/SulphurousSharkron.cs | 10 +++---- NPCs/Other/CalamitasEnchantDemon.cs | 4 +-- NPCs/Other/DemonPortal.cs | 2 +- NPCs/Other/ExhumedHeart.cs | 4 +-- NPCs/Other/LecherousOrb.cs | 2 +- NPCs/Other/THELORDE.cs | 4 +-- NPCs/Perforator/PerforatorBodyLarge.cs | 4 +-- NPCs/Perforator/PerforatorBodyMedium.cs | 4 +-- NPCs/Perforator/PerforatorBodySmall.cs | 4 +-- NPCs/Perforator/PerforatorCyst.cs | 10 +++---- NPCs/Perforator/PerforatorHeadLarge.cs | 4 +-- NPCs/Perforator/PerforatorHeadMedium.cs | 4 +-- NPCs/Perforator/PerforatorHeadSmall.cs | 4 +-- NPCs/Perforator/PerforatorHive.cs | 10 +++---- NPCs/Perforator/PerforatorTailLarge.cs | 4 +-- NPCs/Perforator/PerforatorTailMedium.cs | 4 +-- NPCs/Perforator/PerforatorTailSmall.cs | 4 +-- NPCs/PlagueEnemies/Melter.cs | 2 +- NPCs/PlagueEnemies/PestilentSlime.cs | 4 +-- NPCs/PlagueEnemies/PlagueCharger.cs | 14 +++++----- NPCs/PlagueEnemies/PlagueChargerLarge.cs | 14 +++++----- NPCs/PlagueEnemies/PlaguebringerMiniboss.cs | 12 ++++----- NPCs/PlagueEnemies/Plagueshell.cs | 2 +- NPCs/PlagueEnemies/Viruling.cs | 4 +-- .../PlagueHomingMissile.cs | 16 ++++++------ NPCs/PlaguebringerGoliath/PlagueMine.cs | 10 +++---- .../PlaguebringerGoliath.cs | 6 ++--- NPCs/Polterghast/PhantomFuckYou.cs | 8 +++--- NPCs/Polterghast/PolterPhantom.cs | 14 +++++----- NPCs/Polterghast/Polterghast.cs | 14 +++++----- NPCs/Polterghast/PolterghastHook.cs | 14 +++++----- NPCs/PrimordialWyrm/PrimordialWyrmBody.cs | 6 ++--- NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs | 6 ++--- NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 6 ++--- NPCs/PrimordialWyrm/PrimordialWyrmTail.cs | 6 ++--- .../ProfanedGuardianCommander.cs | 16 ++++++------ .../ProfanedGuardianDefender.cs | 16 ++++++------ .../ProfanedGuardianHealer.cs | 16 ++++++------ NPCs/ProfanedGuardians/ProfanedRocks.cs | 2 +- NPCs/Providence/ProvSpawnDefense.cs | 18 ++++++------- NPCs/Providence/ProvSpawnHealer.cs | 18 ++++++------- NPCs/Providence/ProvSpawnOffense.cs | 18 ++++++------- NPCs/Providence/Providence.cs | 12 ++++----- NPCs/Ravager/FlamePillar.cs | 10 +++---- NPCs/Ravager/RavagerBody.cs | 8 +++--- NPCs/Ravager/RavagerHead.cs | 2 +- NPCs/Ravager/RavagerHead2.cs | 2 +- NPCs/Ravager/RavagerLegLeft.cs | 2 +- NPCs/Ravager/RavagerLegRight.cs | 2 +- NPCs/Signus/CosmicLantern.cs | 16 ++++++------ NPCs/Signus/CosmicMine.cs | 6 ++--- NPCs/Signus/Signus.cs | 10 +++---- NPCs/SlimeGod/CorruptSlimeSpawn.cs | 2 +- NPCs/SlimeGod/CorruptSlimeSpawn2.cs | 2 +- NPCs/SlimeGod/CrimsonSlimeSpawn.cs | 2 +- NPCs/SlimeGod/CrimsonSlimeSpawn2.cs | 8 +++--- NPCs/SlimeGod/SlimeGodCore.cs | 8 +++--- NPCs/StormWeaver/StormWeaverBody.cs | 4 +-- NPCs/StormWeaver/StormWeaverHead.cs | 4 +-- NPCs/StormWeaver/StormWeaverTail.cs | 4 +-- NPCs/SulphurousSea/AnthozoanCrab.cs | 4 +-- NPCs/SulphurousSea/BelchingCoral.cs | 2 +- NPCs/SulphurousSea/Gnasher.cs | 4 +-- NPCs/SulphurousSea/Sulflounder.cs | 6 ++--- NPCs/SulphurousSea/Toxicatfish.cs | 4 +-- NPCs/SulphurousSea/Trasher.cs | 2 +- NPCs/SunkenSea/AlphaSeaMinnow.cs | 14 +++++----- NPCs/SunkenSea/BabyGhostBell.cs | 14 +++++----- NPCs/SunkenSea/BlindedAngler.cs | 8 +++--- NPCs/SunkenSea/Clam.cs | 2 +- NPCs/SunkenSea/EutrophicRay.cs | 8 +++--- NPCs/SunkenSea/GhostBell.cs | 8 +++--- NPCs/SunkenSea/GiantClam.cs | 10 +++---- NPCs/SunkenSea/HauntedChum.cs | 2 +- NPCs/SunkenSea/Jellyghoul.cs | 10 +++---- NPCs/SunkenSea/KelpieSeadragon.cs | 2 +- NPCs/SunkenSea/LostShoal.cs | 16 ++++++------ NPCs/SunkenSea/Pearlpod.cs | 8 +++--- NPCs/SunkenSea/PolypPanasea.cs | 16 ++++++------ NPCs/SunkenSea/PrismBack.cs | 8 +++--- NPCs/SunkenSea/SandProwlerNested.cs | 6 ++--- NPCs/SunkenSea/SeaFloaty.cs | 4 +-- NPCs/SunkenSea/SeaMinnow.cs | 14 +++++----- NPCs/SupremeCalamitas/BrimstoneHeart.cs | 10 +++---- NPCs/SupremeCalamitas/SepulcherArm.cs | 2 +- NPCs/SupremeCalamitas/SepulcherBody.cs | 4 +-- .../SepulcherBodyEnergyBall.cs | 4 +-- NPCs/SupremeCalamitas/SepulcherHead.cs | 4 +-- NPCs/SupremeCalamitas/SepulcherTail.cs | 4 +-- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 18 ++++++------- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 14 +++++----- NPCs/SupremeCalamitas/SupremeCataclysm.cs | 12 ++++----- NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 12 ++++----- NPCs/TownNPCs/AndroombaFriendly.cs | 6 ++--- NPCs/TownNPCs/DILF.cs | 14 +++++----- NPCs/TownNPCs/FAP.cs | 26 +++++++++---------- NPCs/TownNPCs/SEAHOE.cs | 16 ++++++------ NPCs/TownNPCs/THIEF.cs | 16 ++++++------ NPCs/TownNPCs/WITCH.cs | 24 ++++++++--------- NPCs/Yharon/Yharon.cs | 18 ++++++------- 286 files changed, 936 insertions(+), 936 deletions(-) diff --git a/NPCs/Abyss/BabyCannonballJellyfish.cs b/NPCs/Abyss/BabyCannonballJellyfish.cs index b9dad300de..4d8cf93946 100644 --- a/NPCs/Abyss/BabyCannonballJellyfish.cs +++ b/NPCs/Abyss/BabyCannonballJellyfish.cs @@ -23,9 +23,9 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 7; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -140,12 +140,12 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)TextureAssets.Npc[NPC.type].Value.Width, (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)TextureAssets.Npc[Type].Value.Width, (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(new Color(67, 218, 166)); - Main.spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, vector, + Main.spriteBatch.Draw(TextureAssets.Npc[Type].Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/Bloatfish.cs b/NPCs/Abyss/Bloatfish.cs index 443f800147..5e122c2e57 100644 --- a/NPCs/Abyss/Bloatfish.cs +++ b/NPCs/Abyss/Bloatfish.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.Abyss { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() @@ -179,7 +179,7 @@ namespace CalamityMod.NPCs.Abyss return; } NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/BobbitWormHead.cs b/NPCs/Abyss/BobbitWormHead.cs index 17fbd96707..7d28b94911 100644 --- a/NPCs/Abyss/BobbitWormHead.cs +++ b/NPCs/Abyss/BobbitWormHead.cs @@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.Abyss { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { //Preferably would have its head animated, but this will do for now @@ -215,7 +215,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/BoxJellyfish.cs b/NPCs/Abyss/BoxJellyfish.cs index 7dad04530e..3852e1e332 100644 --- a/NPCs/Abyss/BoxJellyfish.cs +++ b/NPCs/Abyss/BoxJellyfish.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.Abyss { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y += 10; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; @@ -183,7 +183,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/CannonballJellyfish.cs b/NPCs/Abyss/CannonballJellyfish.cs index 0cf3d9f2ca..c8ec90492a 100644 --- a/NPCs/Abyss/CannonballJellyfish.cs +++ b/NPCs/Abyss/CannonballJellyfish.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; } public override void SetDefaults() @@ -254,14 +254,14 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - var texture = TextureAssets.Npc[NPC.type]; - Vector2 halfSizeTexture = new Vector2((float)(texture.Value.Width / 2), (float)(texture.Value.Height / Main.npcFrameCount[NPC.type] / 2)); + var texture = TextureAssets.Npc[Type]; + Vector2 halfSizeTexture = new Vector2((float)(texture.Value.Width / 2), (float)(texture.Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - var glowTexture = TextureAssets.Npc[NPC.type]; - vector -= new Vector2((float)glowTexture.Value.Width, (float)(glowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + var glowTexture = TextureAssets.Npc[Type]; + vector -= new Vector2((float)glowTexture.Value.Width, (float)(glowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(new Color(67, 218, 166)); - Main.spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, vector, + Main.spriteBatch.Draw(TextureAssets.Npc[Type].Value, vector, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index 30908f86b4..db902d9ae9 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 11; + Main.npcFrameCount[Type] = 11; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index e44d689057..569955cea9 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 11; + Main.npcFrameCount[Type] = 11; } public override void SetDefaults() @@ -590,7 +590,7 @@ namespace CalamityMod.NPCs.Abyss { spriteEffects |= SpriteEffects.FlipVertically; } - Main.spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, + Main.spriteBatch.Draw(TextureAssets.Npc[Type].Value, new Vector2((float)(player.direction * 4), player.gfxOffY) + ((player.gravDir == 1f) ? player.Top : player.Bottom) - screenPos, new Microsoft.Xna.Framework.Rectangle?(NPC.frame), NPC.GetAlpha(color), NPC.rotation, NPC.frame.Size() / 2f, NPC.scale, spriteEffects, 0f); } @@ -608,7 +608,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { NPC.frameCounter += hasBeenHit ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/Cuttlefish.cs b/NPCs/Abyss/Cuttlefish.cs index 8aea6c09e2..62edc486a5 100644 --- a/NPCs/Abyss/Cuttlefish.cs +++ b/NPCs/Abyss/Cuttlefish.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.Abyss public static Asset GlowTexture; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -345,7 +345,7 @@ namespace CalamityMod.NPCs.Abyss return; } NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index 9801471135..fccbfdd872 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 16; + Main.npcFrameCount[Type] = 16; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionXOverride = 5f diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index 1bd0141029..4c3a37908c 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 16; + Main.npcFrameCount[Type] = 16; this.HideFromBestiary(); if (!Main.dedServ) { diff --git a/NPCs/Abyss/EidolonWyrmBody.cs b/NPCs/Abyss/EidolonWyrmBody.cs index 3e9c9058ea..748681ebdf 100644 --- a/NPCs/Abyss/EidolonWyrmBody.cs +++ b/NPCs/Abyss/EidolonWyrmBody.cs @@ -139,9 +139,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/EidolonWyrmBodyAlt.cs b/NPCs/Abyss/EidolonWyrmBodyAlt.cs index b2ce430dea..bbbceef33f 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAlt.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAlt.cs @@ -139,9 +139,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 2f16beb288..658b2aad26 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -437,9 +437,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/EidolonWyrmTail.cs b/NPCs/Abyss/EidolonWyrmTail.cs index 6cc97cb4ce..817986fec7 100644 --- a/NPCs/Abyss/EidolonWyrmTail.cs +++ b/NPCs/Abyss/EidolonWyrmTail.cs @@ -139,9 +139,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index 5d2b56da3e..837864953c 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -219,7 +219,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { NPC.frameCounter += hasBeenHit ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index f5b5530c64..eacba128be 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -147,9 +147,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/GulperEelBodyAlt.cs b/NPCs/Abyss/GulperEelBodyAlt.cs index 83b1c8f2ea..6a2b05e6f8 100644 --- a/NPCs/Abyss/GulperEelBodyAlt.cs +++ b/NPCs/Abyss/GulperEelBodyAlt.cs @@ -147,9 +147,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index 0187373ba6..113d4a54f1 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -358,9 +358,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/GulperEelTail.cs b/NPCs/Abyss/GulperEelTail.cs index b19d2c37e4..b2104ecf9f 100644 --- a/NPCs/Abyss/GulperEelTail.cs +++ b/NPCs/Abyss/GulperEelTail.cs @@ -147,9 +147,9 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/Abyss/Laserfish.cs b/NPCs/Abyss/Laserfish.cs index 9e492a9e95..c5d30564ce 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.Abyss public static Asset GlowTexture; public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 6; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 6; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.Abyss return; } NPC.frameCounter += NPC.chaseable ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index 84cb4701f0..dede2a9f66 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index c6f9f4720e..5147891755 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionYOverride = 20 @@ -209,7 +209,7 @@ Block: public override void FindFrame(int frameHeight) { NPC.frameCounter += hasBeenHit ? 0.15f : 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index da176e194b..43324d7bdc 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.Abyss { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.75f, @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.Abyss public override void FindFrame(int frameHeight) { NPC.frameCounter += NPC.chaseable || NPC.IsABestiaryIconDummy ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/ReaperShark.cs b/NPCs/Abyss/ReaperShark.cs index e7ef0e456f..57d5e59a7b 100644 --- a/NPCs/Abyss/ReaperShark.cs +++ b/NPCs/Abyss/ReaperShark.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Abyss public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; if (!Main.dedServ) { ManTexture = ModContent.Request(Texture + "Man", AssetRequestMode.ImmediateLoad); @@ -681,7 +681,7 @@ namespace CalamityMod.NPCs.Abyss value.Position.Y -= 50f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; NPC.frameCounter += hasBeenHit || NPC.IsABestiaryIconDummy ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * newFrameHeight; } @@ -694,11 +694,11 @@ namespace CalamityMod.NPCs.Abyss SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Asset npcTexture = Main.zenithWorld ? ManTexture : TextureAssets.Npc[NPC.type]; + Asset npcTexture = Main.zenithWorld ? ManTexture : TextureAssets.Npc[Type]; Rectangle nframe = npcTexture.Frame(1, 4, 0, (int)NPC.frameCounter); - Vector2 origin = new Vector2((float)(npcTexture.Value.Width / 2), (float)(npcTexture.Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 origin = new Vector2((float)(npcTexture.Value.Width / 2), (float)(npcTexture.Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2((float)npcTexture.Value.Width, (float)(npcTexture.Value.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset -= new Vector2((float)npcTexture.Value.Width, (float)(npcTexture.Value.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(npcTexture.Value, npcOffset, nframe, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Abyss/SlabCrab.cs b/NPCs/Abyss/SlabCrab.cs index 6d932379ea..d1d6862d54 100644 --- a/NPCs/Abyss/SlabCrab.cs +++ b/NPCs/Abyss/SlabCrab.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Abyss public static Asset GlowTexture; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 23; + Main.npcFrameCount[Type] = 23; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index a597cdd249..c1aa1563e4 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Abyss public static Asset GlowTexture; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.8f, @@ -164,7 +164,7 @@ namespace CalamityMod.NPCs.Abyss else { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index bd2e0017c9..d6a26f7d9d 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Abyss public static Asset GlowTexture; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionXOverride = 0 @@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.Abyss else { NPC.frameCounter += NPC.chaseable ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index e1744f92d8..195f3ad3d0 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -30,9 +30,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; - NPCID.Sets.TrailCacheLength[NPC.type] = 12; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.TrailCacheLength[Type] = 12; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionXOverride = 0 @@ -183,7 +183,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = 0; } } @@ -201,7 +201,7 @@ namespace CalamityMod.NPCs.AcidRain return false; } - Texture2D headTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D headTexture = TextureAssets.Npc[Type].Value; Texture2D tailTexture = TailTexture.Value; Vector2[] segmentPositions = (Vector2[])NPC.oldPos.Clone(); diff --git a/NPCs/AcidRain/BabyFlakCrab.cs b/NPCs/AcidRain/BabyFlakCrab.cs index b712830a88..7c5ee432ec 100644 --- a/NPCs/AcidRain/BabyFlakCrab.cs +++ b/NPCs/AcidRain/BabyFlakCrab.cs @@ -15,9 +15,9 @@ namespace CalamityMod.NPCs.AcidRain { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 6; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frame.Y += frameHeight; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.frame.Y = frameHeight * 2; } diff --git a/NPCs/AcidRain/BloodwormFleeing.cs b/NPCs/AcidRain/BloodwormFleeing.cs index 95483b5893..8670ed3870 100644 --- a/NPCs/AcidRain/BloodwormFleeing.cs +++ b/NPCs/AcidRain/BloodwormFleeing.cs @@ -11,7 +11,7 @@ namespace CalamityMod.NPCs.AcidRain public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.BloodwormNormal.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; this.HideFromBestiary(); } @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = 0; } } diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index 8894e09d34..3d61fbbac8 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -14,9 +14,9 @@ namespace CalamityMod.NPCs.AcidRain { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 7; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) { NPC.frame.Y = 0; } diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index e3bfeb7bab..1271b5a888 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -57,7 +57,7 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; NPCID.Sets.BossBestiaryPriority.Add(Type); if (!Main.dedServ) { diff --git a/NPCs/AcidRain/FlakCrab.cs b/NPCs/AcidRain/FlakCrab.cs index b7980242e2..873132f844 100644 --- a/NPCs/AcidRain/FlakCrab.cs +++ b/NPCs/AcidRain/FlakCrab.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AcidRain public const int TotalHitsNeededToDoDamage = 10; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; } public override void SetDefaults() @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frame.Y += frameHeight; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.frame.Y = frameHeight * 3; // Frames 1 and 2 are for transitioning. Frame 0 is sitting still, and the rest are walking frames } diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index 1bff89c624..9d06ba61bc 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.AcidRain NPC.TargetClosest(false); - if (NPC.velocity.Y == 0f && LaserShootCountdown <= 0f && !Target.npcTypeNoAggro[NPC.type]) + if (NPC.velocity.Y == 0f && LaserShootCountdown <= 0f && !Target.npcTypeNoAggro[Type]) { NPC.velocity.X *= 0.8f; @@ -182,7 +182,7 @@ namespace CalamityMod.NPCs.AcidRain // Randomly prepare to shoot a laser. if (Main.netMode != NetmodeID.MultiplayerClient && Math.Abs(Target.Center.X - NPC.Center.X) < 250f && Target.Center.X < NPC.Center.X && - LaserShootCountdown == 0f && Main.rand.NextBool(110) && !Target.npcTypeNoAggro[NPC.type]) + LaserShootCountdown == 0f && Main.rand.NextBool(110) && !Target.npcTypeNoAggro[Type]) { LaserShootCountdown = 600f; NPC.netUpdate = true; diff --git a/NPCs/AcidRain/IrradiatedSlime.cs b/NPCs/AcidRain/IrradiatedSlime.cs index f87cbec471..dfb1a632f8 100644 --- a/NPCs/AcidRain/IrradiatedSlime.cs +++ b/NPCs/AcidRain/IrradiatedSlime.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/AcidRain/Mauler.cs b/NPCs/AcidRain/Mauler.cs index 0f071d3313..1f9307fc45 100644 --- a/NPCs/AcidRain/Mauler.cs +++ b/NPCs/AcidRain/Mauler.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.AcidRain NPC.frameCounter++; if (NPC.frameCounter >= 5) { - CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[NPC.type]; + CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[Type]; NPC.frameCounter = 0; } @@ -228,7 +228,7 @@ namespace CalamityMod.NPCs.AcidRain NPC.frameCounter++; if (NPC.frameCounter >= 5) { - CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[NPC.type]; + CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[Type]; NPC.frameCounter = 0; } @@ -331,7 +331,7 @@ namespace CalamityMod.NPCs.AcidRain NPC.frameCounter++; if (NPC.frameCounter >= (hasCharged ? 4 : 7)) { - CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[NPC.type]; + CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[Type]; NPC.frameCounter = 0; } @@ -423,7 +423,7 @@ namespace CalamityMod.NPCs.AcidRain public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; Vector2 origin = NPC.frame.Size() * 0.5f; @@ -447,7 +447,7 @@ namespace CalamityMod.NPCs.AcidRain NPC.frameCounter++; if (NPC.frameCounter >= 5) { - CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[NPC.type]; + CurrentFrame = (CurrentFrame + 1) % Main.npcFrameCount[Type]; NPC.frameCounter = 0; } } diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index 40ebfeb51d..fb0e57b70f 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -87,9 +87,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 14; - NPCID.Sets.TrailCacheLength[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 14; + NPCID.Sets.TrailCacheLength[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -606,7 +606,7 @@ Continue: NPC.frame.Y = frameHeight * 8; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type] && Main.netMode != NetmodeID.MultiplayerClient) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type] && Main.netMode != NetmodeID.MultiplayerClient) NPC.StrikeInstantKill(); } else if (NPC.frame.Y >= (Walking ? 8 : 4) * frameHeight) diff --git a/NPCs/AcidRain/NuclearToad.cs b/NPCs/AcidRain/NuclearToad.cs index a6bb31d97e..89a6358da2 100644 --- a/NPCs/AcidRain/NuclearToad.cs +++ b/NPCs/AcidRain/NuclearToad.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y += 8; value.PortraitPositionYOverride = 28f; @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = 0; } } diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index 0e8b645054..56bd5315f8 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.AcidRain } public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -244,7 +244,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = 0; } } diff --git a/NPCs/AcidRain/Radiator.cs b/NPCs/AcidRain/Radiator.cs index fe08379888..5fa6b6b717 100644 --- a/NPCs/AcidRain/Radiator.cs +++ b/NPCs/AcidRain/Radiator.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.AcidRain { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs index a4b07f269c..8066f0a2cc 100644 --- a/NPCs/AcidRain/Skyfin.cs +++ b/NPCs/AcidRain/Skyfin.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Rotation = MathHelper.Pi @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = 0; } } diff --git a/NPCs/AcidRain/SulphurousSkater.cs b/NPCs/AcidRain/SulphurousSkater.cs index 83466a2efc..333d378eec 100644 --- a/NPCs/AcidRain/SulphurousSkater.cs +++ b/NPCs/AcidRain/SulphurousSkater.cs @@ -32,9 +32,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; - NPCID.Sets.TrailingMode[NPC.type] = 1; - NPCID.Sets.TrailCacheLength[NPC.type] = 6; + Main.npcFrameCount[Type] = 5; + NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.TrailCacheLength[Type] = 6; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -225,7 +225,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = frameHeight; } } diff --git a/NPCs/AcidRain/Trilobite.cs b/NPCs/AcidRain/Trilobite.cs index bea6a87290..f6a51dac40 100644 --- a/NPCs/AcidRain/Trilobite.cs +++ b/NPCs/AcidRain/Trilobite.cs @@ -25,9 +25,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.TrailingMode[NPC.type] = 1; - NPCID.Sets.TrailCacheLength[NPC.type] = 5; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.TrailCacheLength[Type] = 5; } public override void SetDefaults() @@ -189,7 +189,7 @@ namespace CalamityMod.NPCs.AcidRain { NPC.frameCounter = 0; NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= Main.npcFrameCount[NPC.type] * frameHeight) + if (NPC.frame.Y >= Main.npcFrameCount[Type] * frameHeight) NPC.frame.Y = 0; } } diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 493e6e225d..87686af096 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -100,8 +100,8 @@ namespace CalamityMod.NPCs.AquaticScourge if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 scaledDraw = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 scaledDraw = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 1aa346b1e3..d1bf9bc88f 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -99,8 +99,8 @@ namespace CalamityMod.NPCs.AquaticScourge if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 scaledDraw = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 scaledDraw = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index b2f01f0710..1f879be849 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -144,8 +144,8 @@ namespace CalamityMod.NPCs.AquaticScourge if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 scaledDraw = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 scaledDraw = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 51b0581331..7d9a757ca1 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -99,8 +99,8 @@ namespace CalamityMod.NPCs.AquaticScourge if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 scaledDraw = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 scaledDraw = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; diff --git a/NPCs/Astral/Aries.cs b/NPCs/Astral/Aries.cs index aa9dcdefac..55856d0640 100644 --- a/NPCs/Astral/Aries.cs +++ b/NPCs/Astral/Aries.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/AriesGlow", AssetRequestMode.AsyncLoad); } diff --git a/NPCs/Astral/Astraglomerate.cs b/NPCs/Astral/Astraglomerate.cs index c96dd91f18..0d611c3384 100644 --- a/NPCs/Astral/Astraglomerate.cs +++ b/NPCs/Astral/Astraglomerate.cs @@ -25,10 +25,10 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/AstraglomerateGlow", AssetRequestMode.AsyncLoad); - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override void SetDefaults() diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index d2225dbf57..36b0aa784c 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -241,8 +241,8 @@ namespace CalamityMod.NPCs.Astral if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawPosition = NPC.Center - screenPos; drawPosition -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; drawPosition += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); diff --git a/NPCs/Astral/AstralSlime.cs b/NPCs/Astral/AstralSlime.cs index 4ca16953c3..573a6b45a8 100644 --- a/NPCs/Astral/AstralSlime.cs +++ b/NPCs/Astral/AstralSlime.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.Astral { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() diff --git a/NPCs/Astral/AstralachneaGround.cs b/NPCs/Astral/AstralachneaGround.cs index c73ded94b1..1fb2da6802 100644 --- a/NPCs/Astral/AstralachneaGround.cs +++ b/NPCs/Astral/AstralachneaGround.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/AstralachneaGroundGlow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/Astral/AstralachneaWall.cs b/NPCs/Astral/AstralachneaWall.cs index 3cd1da8ea0..5d7d5d3d00 100644 --- a/NPCs/Astral/AstralachneaWall.cs +++ b/NPCs/Astral/AstralachneaWall.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Astral public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.AstralachneaGround.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/AstralachneaWallGlow", AssetRequestMode.AsyncLoad); @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.Astral if (NPC.IsABestiaryIconDummy) { NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; NPC.frame.Y = (int)NPC.frameCounter * frameHeight; return; } diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 6b3506c7f9..5036e8b734 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; //not really important seeing as custom drawing, but for heights sake, 6 //also it's visuals are messed up on npc spawners etc. because the sheet is 3 wide. //not much we can do. looks fine in-game so /shrug @@ -584,7 +584,7 @@ namespace CalamityMod.NPCs.Astral SpriteEffects effect = NPC.direction == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; //draw actual sprite - spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, position, NPC.frame, + spriteBatch.Draw(TextureAssets.Npc[Type].Value, position, NPC.frame, drawColor, 0f, default, 1f, //color, rotation, origin, scale effect, 0f); //effect, drawlayer diff --git a/NPCs/Astral/FusionFeeder.cs b/NPCs/Astral/FusionFeeder.cs index da14fee88e..3900de95b6 100644 --- a/NPCs/Astral/FusionFeeder.cs +++ b/NPCs/Astral/FusionFeeder.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.Astral value.Position.X += 40f; value.Position.Y -= 6f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() @@ -293,7 +293,7 @@ namespace CalamityMod.NPCs.Astral drawColor = Color.White; //draw shark - spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, NPC.Center - screenPos + offset, NPC.frame, drawColor, NPC.rotation, origin, 1f, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + spriteBatch.Draw(TextureAssets.Npc[Type].Value, NPC.Center - screenPos + offset, NPC.frame, drawColor, NPC.rotation, origin, 1f, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); //draw glowmask spriteBatch.Draw(glowmask.Value, NPC.Center - screenPos + offset, NPC.frame, Color.White * 0.6f, NPC.rotation, origin, 1f, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); diff --git a/NPCs/Astral/Glomerling.cs b/NPCs/Astral/Glomerling.cs index 4c4c7b3a57..282113e9cd 100644 --- a/NPCs/Astral/Glomerling.cs +++ b/NPCs/Astral/Glomerling.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Astral { if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/GlomerlingGlow", AssetRequestMode.AsyncLoad); - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y -= 8; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; diff --git a/NPCs/Astral/Hadarian.cs b/NPCs/Astral/Hadarian.cs index 4285e7dcbf..1d50003cf1 100644 --- a/NPCs/Astral/Hadarian.cs +++ b/NPCs/Astral/Hadarian.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Astral value.Position.X += 10f; value.Position.Y += 10f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; } public override void SetDefaults() @@ -158,7 +158,7 @@ namespace CalamityMod.NPCs.Astral Vector2 position = NPC.Bottom - new Vector2(19f, 42f); //20 34 38 42 Rectangle src = new Rectangle(20, 34, 38, 42); - spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, position - screenPos, src, drawColor, NPC.rotation, default, 1f, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + spriteBatch.Draw(TextureAssets.Npc[Type].Value, position - screenPos, src, drawColor, NPC.rotation, default, 1f, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); //draw glowmask spriteBatch.Draw(glowmask.Value, position - screenPos, src, Color.White * 0.6f, NPC.rotation, default, 1f, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); return false; diff --git a/NPCs/Astral/Mantis.cs b/NPCs/Astral/Mantis.cs index 19c0124778..de94ff79cf 100644 --- a/NPCs/Astral/Mantis.cs +++ b/NPCs/Astral/Mantis.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 14; + Main.npcFrameCount[Type] = 14; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionYOverride = 0 diff --git a/NPCs/Astral/Nova.cs b/NPCs/Astral/Nova.cs index f95173b076..0f8ba1f673 100644 --- a/NPCs/Astral/Nova.cs +++ b/NPCs/Astral/Nova.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/NovaGlow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/Astral/SightseerCollider.cs b/NPCs/Astral/SightseerCollider.cs index 6bb7b11bb1..aa5b562749 100644 --- a/NPCs/Astral/SightseerCollider.cs +++ b/NPCs/Astral/SightseerCollider.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/SightseerColliderGlow", AssetRequestMode.AsyncLoad); diff --git a/NPCs/Astral/SightseerSpitter.cs b/NPCs/Astral/SightseerSpitter.cs index a3203c862c..44d62a6bdf 100644 --- a/NPCs/Astral/SightseerSpitter.cs +++ b/NPCs/Astral/SightseerSpitter.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Astral public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/SightseerSpitterGlow", AssetRequestMode.AsyncLoad); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() diff --git a/NPCs/Astral/StellarCulex.cs b/NPCs/Astral/StellarCulex.cs index 1080554504..ccfc0dcac6 100644 --- a/NPCs/Astral/StellarCulex.cs +++ b/NPCs/Astral/StellarCulex.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Astral { if (!Main.dedServ) glowmask = ModContent.Request("CalamityMod/NPCs/Astral/StellarCulexGlow", AssetRequestMode.AsyncLoad); - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionXOverride = 10f diff --git a/NPCs/Astral/Twinkler.cs b/NPCs/Astral/Twinkler.cs index 236659fd72..c7ae6c354e 100644 --- a/NPCs/Astral/Twinkler.cs +++ b/NPCs/Astral/Twinkler.cs @@ -13,9 +13,9 @@ namespace CalamityMod.NPCs.Astral { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 52f6a659f9..eceed127a2 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -60,8 +60,8 @@ namespace CalamityMod.NPCs.AstrumAureus public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -251,15 +251,15 @@ namespace CalamityMod.NPCs.AstrumAureus float lifeRatio = NPC.life / (float)NPC.lifeMax; bool slimePhaseHP = lifeRatio <= 0.1f || (lifeRatio > 0.6f && lifeRatio <= 0.7f); - Texture2D NPCTexture = TextureAssets.Npc[NPC.type].Value; - Texture2D GlowMaskTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D NPCTexture = TextureAssets.Npc[Type].Value; + Texture2D GlowMaskTexture = TextureAssets.Npc[Type].Value; SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; if (NPC.ai[0] == 0f || (slimePhaseHP && Main.zenithWorld)) { - NPCTexture = TextureAssets.Npc[NPC.type].Value; + NPCTexture = TextureAssets.Npc[Type].Value; GlowMaskTexture = Texture_Glow.Value; } else if (NPC.ai[0] == 1f) //nothing special done here @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.AstrumAureus { if (NPC.velocity.Y == 0f && NPC.ai[1] >= 0f && NPC.ai[0] == 3f) //idle before jump { - NPCTexture = TextureAssets.Npc[NPC.type].Value; //idle frames + NPCTexture = TextureAssets.Npc[Type].Value; //idle frames GlowMaskTexture = Texture_Glow.Value; } else if (NPC.velocity.Y <= 0f || NPC.ai[1] < 0f) //jump frames if flying upward or if about to jump @@ -293,7 +293,7 @@ namespace CalamityMod.NPCs.AstrumAureus { if (NPC.velocity.Y == 0f) //idle before teleport { - NPCTexture = TextureAssets.Npc[NPC.type].Value; //idle frames + NPCTexture = TextureAssets.Npc[Type].Value; //idle frames GlowMaskTexture = Texture_Glow.Value; } else //in-air frames @@ -303,8 +303,8 @@ namespace CalamityMod.NPCs.AstrumAureus } } - int frameCount = Main.npcFrameCount[NPC.type]; - Vector2 originalDrawSize = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / frameCount / 2); + int frameCount = Main.npcFrameCount[Type]; + Vector2 originalDrawSize = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / frameCount / 2); Rectangle frame = NPC.frame; float scale = NPC.scale; float rotation = NPC.rotation; diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index eaecff22bf..321b286524 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -24,8 +24,8 @@ namespace CalamityMod.NPCs.AstrumAureus public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -239,8 +239,8 @@ namespace CalamityMod.NPCs.AstrumAureus if (NPC.ai[0] >= 60f) NPC.DrawBackglow(Color.Lerp(Color.Cyan, Color.Orange, (float)Math.Sin(Main.GlobalTimeWrappedHourly) / 2f + 0.5f) with { A = 0 }, 2f + 8f * ((float)Math.Sin(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi) + 1f), spriteEffects, NPC.frame, screenPos); - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 originalDrawSize = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 originalDrawSize = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Color whiteColor = Color.White; int afterimageAmt = 10; @@ -253,14 +253,14 @@ namespace CalamityMod.NPCs.AstrumAureus afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += originalDrawSize * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, originalDrawSize, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += originalDrawSize * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, originalDrawSize, NPC.scale, spriteEffects, 0f); @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.AstrumAureus secondAfterimageColor = Color.Lerp(secondAfterimageColor, whiteColor, 0.5f); secondAfterimageColor *= (afterimageAmt - j) / 15f; Vector2 secondAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - secondAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + secondAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; secondAfterimagePos += originalDrawSize * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, secondAfterimagePos, NPC.frame, secondAfterimageColor, NPC.rotation, originalDrawSize, NPC.scale, spriteEffects, 0f); } @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.Opacity = 1f; NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 834c4561b7..c90499907a 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { AltTexture = ModContent.Request(Texture + "AltSpectral", AssetRequestMode.AsyncLoad); @@ -122,9 +122,9 @@ namespace CalamityMod.NPCs.AstrumDeus bool deathModeEnragePhase = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] == 3f; bool doubleWormPhase = NPC.Calamity().newAI[0] != 0f && !deathModeEnragePhase; - Texture2D mainWormTex = altBodyTextures ? AltTexture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D mainWormTex = altBodyTextures ? AltTexture.Value : TextureAssets.Npc[Type].Value; Texture2D secondWormTex = TextureGlow2.Value; - Vector2 halfSizeTex = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Vector2 halfSizeTex = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(mainWormTex.Width, mainWormTex.Height) * NPC.scale / 2f; diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 7c22798e6f..d15f166851 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -170,9 +170,9 @@ namespace CalamityMod.NPCs.AstrumDeus bool deathModeEnragePhase = NPC.Calamity().newAI[0] == 3f; bool doubleWormPhase = NPC.Calamity().newAI[0] != 0f && !deathModeEnragePhase; - Texture2D mainWormTex = TextureAssets.Npc[NPC.type].Value; + Texture2D mainWormTex = TextureAssets.Npc[Type].Value; Texture2D secondWormTex = TextureGlow2.Value; - Vector2 halfSizeTex = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Vector2 halfSizeTex = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(mainWormTex.Width, mainWormTex.Height) * NPC.scale / 2f; diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 5456d6e375..1cbb9ac13d 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -109,8 +109,8 @@ namespace CalamityMod.NPCs.AstrumDeus bool deathModeEnragePhase = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] == 3f; bool doubleWormPhase = NPC.Calamity().newAI[0] != 0f && !deathModeEnragePhase; - Texture2D wormTexture = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTex = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D wormTexture = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTex = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(wormTexture.Width, wormTexture.Height) * NPC.scale / 2f; diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index 853b2a0c18..478a14704b 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -22,8 +22,8 @@ namespace CalamityMod.NPCs.BrimstoneElemental public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 8; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 8; NPCID.Sets.BossBestiaryPriority.Add(Type); } diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 4b93e2182c..b08b15d0a9 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 12; + Main.npcFrameCount[Type] = 12; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -311,10 +311,10 @@ namespace CalamityMod.NPCs.BrimstoneElemental SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D npcTexture = TextureAssets.Npc[NPC.type].Value; - Vector2 frameLocation = new Vector2((float)(npcTexture.Width / 2), (float)(npcTexture.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D npcTexture = TextureAssets.Npc[Type].Value; + Vector2 frameLocation = new Vector2((float)(npcTexture.Width / 2), (float)(npcTexture.Height / Main.npcFrameCount[Type] / 2)); Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2((float)npcTexture.Width, (float)(npcTexture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset -= new Vector2((float)npcTexture.Width, (float)(npcTexture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; npcOffset += frameLocation * NPC.scale + new Vector2(0f, NPC.gfxOffY); // Give brimmy an outline based on current elemental mode diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index c91bb8cd8a..3f0f8faf89 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -38,8 +38,8 @@ namespace CalamityMod.NPCs.Bumblebirb public static Asset GlowTexture; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -236,8 +236,8 @@ namespace CalamityMod.NPCs.Bumblebirb if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Color color = drawColor; Color altColor = Color.White; @@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.Bumblebirb afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.Bumblebirb extraAfterimageColor = NPC.GetAlpha(extraAfterimageColor); extraAfterimageColor *= 1f - extraAfterimageDampener; Vector2 extraAfterimageDrawPos = NPC.Center + ((float)j / (float)extraAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScaler * extraAfterimageDampener - screenPos; - extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; extraAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, extraAfterimageDrawPos, NPC.frame, extraAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -352,7 +352,7 @@ namespace CalamityMod.NPCs.Bumblebirb mainDrawingColor = Color.Lerp(mainDrawingColor, altColor, lerpDrawTransition); mainDrawingColor = NPC.GetAlpha(mainDrawingColor); Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, (phase3 && calamityGlobalNPC.newAI[3] == 1f ? mainDrawingColor : NPC.GetAlpha(altColor)), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -383,7 +383,7 @@ namespace CalamityMod.NPCs.Bumblebirb glowmaskAfterimageColor = Color.Lerp(glowmaskAfterimageColor, altColor, lerpDrawTransition); glowmaskAfterimageColor *= (float)(afterimageAmt - k) / 15f; Vector2 glowmaskAfterimageDrawPos = NPC.oldPos[k] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - glowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + glowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; glowmaskAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, glowmaskAfterimageDrawPos, NPC.frame, glowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -395,7 +395,7 @@ namespace CalamityMod.NPCs.Bumblebirb extraGlowmaskAfterimageColor = NPC.GetAlpha(extraGlowmaskAfterimageColor); extraGlowmaskAfterimageColor *= 1f - extraAfterimageDampener; Vector2 extraGlowmaskAfterimageDrawPos = NPC.Center + ((float)l / (float)extraAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScaler * extraAfterimageDampener - screenPos; - extraGlowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + extraGlowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; extraGlowmaskAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, extraGlowmaskAfterimageDrawPos, NPC.frame, extraGlowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index b3db2d2a5e..ef8f02eaf5 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -16,8 +16,8 @@ namespace CalamityMod.NPCs.Bumblebirb { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 5; + NPCID.Sets.TrailingMode[Type] = 1; this.HideFromBestiary(); } @@ -100,8 +100,8 @@ namespace CalamityMod.NPCs.Bumblebirb if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; if (CalamityClientConfig.Instance.Afterimages) @@ -113,14 +113,14 @@ namespace CalamityMod.NPCs.Bumblebirb afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimageDrawPos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 5a495cc59f..1ae8a7732a 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -44,8 +44,8 @@ namespace CalamityMod.NPCs.CalClone public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.CalClone public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -143,8 +143,8 @@ namespace CalamityMod.NPCs.CalClone if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[Type] / 2)); Color white = Color.White; float colorLerpAmt = 0.5f; int afterimageAmt = 7; @@ -158,14 +158,14 @@ namespace CalamityMod.NPCs.CalClone afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 offset = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - offset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + offset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; offset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, offset, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } } Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, npcOffset, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.CalClone extraAfterimageColor = Color.Lerp(extraAfterimageColor, white, colorLerpAmt); extraAfterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 offset = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - offset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + offset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; offset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, offset, NPC.frame, extraAfterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index b9b30e4821..405b07e95f 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -31,8 +31,8 @@ namespace CalamityMod.NPCs.CalClone public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.CalClone public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -118,8 +118,8 @@ namespace CalamityMod.NPCs.CalClone if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 7; if (CalamityClientConfig.Instance.Afterimages) @@ -131,14 +131,14 @@ namespace CalamityMod.NPCs.CalClone afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -153,7 +153,7 @@ namespace CalamityMod.NPCs.CalClone extraAfterimageColor = Color.Lerp(extraAfterimageColor, Color.White, 0.5f); extraAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 extraAfterimageDrawPos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; extraAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, extraAfterimageDrawPos, NPC.frame, extraAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index 6c37e6c00b..9f2ad19fd1 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -25,8 +25,8 @@ namespace CalamityMod.NPCs.CalClone public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.CalClone public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -112,8 +112,8 @@ namespace CalamityMod.NPCs.CalClone if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 7; if (CalamityClientConfig.Instance.Afterimages) @@ -125,14 +125,14 @@ namespace CalamityMod.NPCs.CalClone afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.CalClone extraAfterimageColor = Color.Lerp(extraAfterimageColor, Color.White, 0.5f); extraAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 extraAfterimageDrawPos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; extraAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, extraAfterimageDrawPos, NPC.frame, extraAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/CalClone/SoulSeeker.cs b/NPCs/CalClone/SoulSeeker.cs index 42fc4b91c2..6915fac89a 100644 --- a/NPCs/CalClone/SoulSeeker.cs +++ b/NPCs/CalClone/SoulSeeker.cs @@ -22,9 +22,9 @@ namespace CalamityMod.NPCs.CalClone public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 5; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); if (!Main.dedServ) { @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.CalClone public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -188,8 +188,8 @@ namespace CalamityMod.NPCs.CalClone if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 origin = new Vector2(texture.Width / 2f, texture.Height / Main.npcFrameCount[NPC.type] / 2f); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 origin = new Vector2(texture.Width / 2f, texture.Height / Main.npcFrameCount[Type] / 2f); Color white = Color.White; float colorLerpAmt = 0.5f; int afterImageAmt = 5; @@ -203,14 +203,14 @@ namespace CalamityMod.NPCs.CalClone afterImageColor = NPC.GetAlpha(afterImageColor); afterImageColor *= (afterImageAmt - a) / 15f; Vector2 afterimagePos = NPC.oldPos[a] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimagePos, NPC.frame, afterImageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } } Vector2 drawPos = NPC.Center - screenPos; - drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); @@ -225,7 +225,7 @@ namespace CalamityMod.NPCs.CalClone glowColor = Color.Lerp(glowColor, white, colorLerpAmt); glowColor *= (afterImageAmt - a) / 15f; Vector2 afterimagePos = NPC.oldPos[a] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimagePos, NPC.frame, glowColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 7e5300e4cd..6fb3d01529 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -41,8 +41,8 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -160,8 +160,8 @@ namespace CalamityMod.NPCs.CeaselessVoid if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 7; if (CalamityClientConfig.Instance.Afterimages) @@ -173,14 +173,14 @@ namespace CalamityMod.NPCs.CeaselessVoid afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -195,7 +195,7 @@ namespace CalamityMod.NPCs.CeaselessVoid extraAfterimageColor = Color.Lerp(extraAfterimageColor, Color.White, 0.5f); extraAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 extraAfterimageDrawPos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; extraAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, extraAfterimageDrawPos, NPC.frame, extraAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 0d9e18a7a9..52c4728c43 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -32,8 +32,8 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = FrameCount; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = FrameCount; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); if (!Main.dedServ) { @@ -99,7 +99,7 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -207,10 +207,10 @@ namespace CalamityMod.NPCs.CeaselessVoid public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D mainTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D mainTexture = TextureAssets.Npc[Type].Value; Vector2 drawPos = NPC.Center - screenPos; SpriteEffects spriteEffects = SpriteEffects.None; - Vector2 drawOrigin = new Vector2(mainTexture.Width / 2, mainTexture.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 drawOrigin = new Vector2(mainTexture.Width / 2, mainTexture.Height / Main.npcFrameCount[Type] / 2); if (NPC.IsABestiaryIconDummy) { @@ -225,7 +225,7 @@ namespace CalamityMod.NPCs.CeaselessVoid Color white = Color.White * NPC.Opacity; int trailCount = 5; - drawPos -= new Vector2(mainTexture.Width, mainTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(mainTexture.Width, mainTexture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); if (CalamityClientConfig.Instance.Afterimages) @@ -237,7 +237,7 @@ namespace CalamityMod.NPCs.CeaselessVoid trailColor = NPC.GetAlpha(trailColor); trailColor *= (trailCount - i) / 15f; Vector2 trailPos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - trailPos -= new Vector2(mainTexture.Width, mainTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + trailPos -= new Vector2(mainTexture.Width, mainTexture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; trailPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(mainTexture, trailPos, NPC.frame, trailColor, NPC.rotation, drawOrigin, NPC.scale, spriteEffects, 0f); } @@ -260,7 +260,7 @@ namespace CalamityMod.NPCs.CeaselessVoid trailColor2 = NPC.GetAlpha(trailColor2); trailColor2 *= (trailCount - i) / 15f; Vector2 trailPos2 = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - trailPos2 -= new Vector2(glowTexture.Width, glowTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + trailPos2 -= new Vector2(glowTexture.Width, glowTexture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; trailPos2 += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(glowTexture, trailPos2, NPC.frame, trailColor2, NPC.rotation, drawOrigin, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index d97ac27fe5..2e5c6b89cb 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.Crabulon public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.BossBestiaryPriority.Add(Type); if (!Main.dedServ) { @@ -57,7 +57,7 @@ namespace CalamityMod.NPCs.Crabulon public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.Crabulon if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D glow = GlowTexture.Value; Color colorToShift = Main.zenithWorld ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) : Color.Cyan; Color glowColor = Color.Lerp(Color.White, colorToShift, 0.5f); @@ -143,9 +143,9 @@ namespace CalamityMod.NPCs.Crabulon int ClonesAroundShroom = Main.zenithWorld ? 4 : 0; for (int c = 0; c < 1 + ClonesAroundShroom; c++) { - Vector2 drawOrigin = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 drawOrigin = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[Type] / 2); Vector2 drawPos = NPC.Center - screenPos + (Vector2.UnitX * texture.Width * c).RotatedByRandom(c); - drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, drawOrigin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 15b69796dc..b5d537b98a 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.Crabulon public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -739,7 +739,7 @@ namespace CalamityMod.NPCs.Crabulon stomping = false; NPC.frameCounter += 0.15; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -778,7 +778,7 @@ namespace CalamityMod.NPCs.Crabulon stomping = false; NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -792,7 +792,7 @@ namespace CalamityMod.NPCs.Crabulon if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D textureIdle = TextureAssets.Npc[NPC.type].Value; + Texture2D textureIdle = TextureAssets.Npc[Type].Value; Texture2D glowIdle = Texture_Glow.Value; Texture2D textureWalk = AltTexture.Value; Texture2D glowWalk = AltTexture_Glow.Value; @@ -804,13 +804,13 @@ namespace CalamityMod.NPCs.Crabulon int ClonesOnEachSide = Main.zenithWorld ? 2 : 0; for (int c = 0 - ClonesOnEachSide; c < 1 + ClonesOnEachSide; c++) { - Vector2 drawOrigin = new Vector2(textureIdle.Width / 2, textureIdle.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 drawOrigin = new Vector2(textureIdle.Width / 2, textureIdle.Height / Main.npcFrameCount[Type] / 2); Vector2 drawPos = NPC.Center - screenPos + (Vector2.UnitX * textureIdle.Width * c * 1.6f); // Jumping if (NPC.ai[0] > 2f && NPC.velocity.Y != 0f) { drawOrigin = new Vector2(textureAttack.Width / 2, textureAttack.Height / 2); - drawPos -= new Vector2(textureAttack.Width, textureAttack.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(textureAttack.Width, textureAttack.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(textureAttack, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, drawOrigin, NPC.scale, spriteEffects, 0f); @@ -820,7 +820,7 @@ namespace CalamityMod.NPCs.Crabulon else if (NPC.ai[0] == 1f) { drawOrigin = new Vector2(textureWalk.Width / 2, textureWalk.Height / 2); - drawPos -= new Vector2(textureWalk.Width, textureWalk.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(textureWalk.Width, textureWalk.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(textureWalk, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, drawOrigin, NPC.scale, spriteEffects, 0f); @@ -829,7 +829,7 @@ namespace CalamityMod.NPCs.Crabulon // Standing still else { - drawPos -= new Vector2(textureIdle.Width, textureIdle.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(textureIdle.Width, textureIdle.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += drawOrigin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(textureIdle, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, drawOrigin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Crags/CalamityEye.cs b/NPCs/Crags/CalamityEye.cs index ae45a2ad6d..3a5430ba14 100644 --- a/NPCs/Crags/CalamityEye.cs +++ b/NPCs/Crags/CalamityEye.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.Crags { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y -= 10f; value.PortraitPositionYOverride = -36f; diff --git a/NPCs/Crags/HeatSpirit.cs b/NPCs/Crags/HeatSpirit.cs index f2837be0e0..92d7ff59fb 100644 --- a/NPCs/Crags/HeatSpirit.cs +++ b/NPCs/Crags/HeatSpirit.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.Crags { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = -1, @@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.Crags NPC.rotation = (float)Math.Atan2((double)(NPC.velocity.Y * (float)NPC.direction), (double)(NPC.velocity.X * (float)NPC.direction)); } NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Crags/InfernalCongealment.cs b/NPCs/Crags/InfernalCongealment.cs index a3a5de90d7..99a577e956 100644 --- a/NPCs/Crags/InfernalCongealment.cs +++ b/NPCs/Crags/InfernalCongealment.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.Crags { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() diff --git a/NPCs/Crags/RenegadeWarlock.cs b/NPCs/Crags/RenegadeWarlock.cs index 0a10f3ec50..034ca0b0ae 100644 --- a/NPCs/Crags/RenegadeWarlock.cs +++ b/NPCs/Crags/RenegadeWarlock.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.Crags { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() diff --git a/NPCs/Crags/Scryllar.cs b/NPCs/Crags/Scryllar.cs index 65acb40774..05d844cff5 100644 --- a/NPCs/Crags/Scryllar.cs +++ b/NPCs/Crags/Scryllar.cs @@ -134,7 +134,7 @@ namespace CalamityMod.NPCs.Crags break; } } - if (Main.player[NPC.target].npcTypeNoAggro[NPC.type]) + if (Main.player[NPC.target].npcTypeNoAggro[Type]) { bool inTileNoAggro = false; for (int loopInc2 = npcTileY; loopInc2 < npcTileY + tileCheckLoopAmt - 2; loopInc2++) diff --git a/NPCs/Crags/ScryllarRage.cs b/NPCs/Crags/ScryllarRage.cs index 99d700fe1a..e73be83f5c 100644 --- a/NPCs/Crags/ScryllarRage.cs +++ b/NPCs/Crags/ScryllarRage.cs @@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.Crags break; } } - if (Main.player[NPC.target].npcTypeNoAggro[NPC.type]) + if (Main.player[NPC.target].npcTypeNoAggro[Type]) { bool inTileNoAggro = false; for (int loopInc2 = npcTileY; loopInc2 < npcTileY + tileCheckLoopAmt - 2; loopInc2++) diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 3497368010..de9995a56b 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.Crags public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -248,7 +248,7 @@ namespace CalamityMod.NPCs.Crags if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / 2)); int afterimageAmt = 5; diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 0163d84fff..c887e6d6c4 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1298,7 +1298,7 @@ namespace CalamityMod.NPCs.Cryogen FireDrawer = null; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; switch (currentPhase) { case 2: @@ -1317,7 +1317,7 @@ namespace CalamityMod.NPCs.Cryogen texture = Phase6Texture.Value; break; default: - texture = TextureAssets.Npc[NPC.type].Value; + texture = TextureAssets.Npc[Type].Value; break; } @@ -1327,9 +1327,9 @@ namespace CalamityMod.NPCs.Cryogen NPC.DrawBackglow(Main.zenithWorld ? Color.Red : BackglowColor, 4f, spriteEffects, NPC.frame, screenPos); - Vector2 origin = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 origin = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 drawPos = NPC.Center - screenPos; - drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); Color overlay = Main.zenithWorld ? Color.Red : drawColor; spriteBatch.Draw(texture, drawPos, NPC.frame, NPC.GetAlpha(overlay), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index 9b1e75d0c2..532154de8c 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -133,9 +133,9 @@ namespace CalamityMod.NPCs.Cryogen NPC.DrawBackglow(Main.zenithWorld ? Color.Red : Cryogen.BackglowColor, 4f, SpriteEffects.None, NPC.frame, screenPos); - Vector2 origin = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 origin = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 drawPos = NPC.Center - screenPos; - drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); Color overlay = Main.zenithWorld ? Color.Red : drawColor; spriteBatch.Draw(texture, drawPos, NPC.frame, NPC.GetAlpha(overlay), NPC.rotation, origin, NPC.scale, SpriteEffects.None, 0f); diff --git a/NPCs/DesertScourge/DesertNuisanceBody.cs b/NPCs/DesertScourge/DesertNuisanceBody.cs index 174272a1d0..ca4fb0570f 100644 --- a/NPCs/DesertScourge/DesertNuisanceBody.cs +++ b/NPCs/DesertScourge/DesertNuisanceBody.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; this.HideFromBestiary(); @@ -281,7 +281,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) NPC.frame.Y = 0; } } diff --git a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs index 383854dca3..5a24a228c4 100644 --- a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; this.HideFromBestiary(); @@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) NPC.frame.Y = 0; } } diff --git a/NPCs/DesertScourge/DesertNuisanceHead.cs b/NPCs/DesertScourge/DesertNuisanceHead.cs index d2d203833e..b72b17ecaf 100644 --- a/NPCs/DesertScourge/DesertNuisanceHead.cs +++ b/NPCs/DesertScourge/DesertNuisanceHead.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() @@ -550,7 +550,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.ai[3] = 2f; NPC.netUpdate = true; @@ -575,7 +575,7 @@ namespace CalamityMod.NPCs.DesertScourge { if (NPC.frame.Y > 0) { - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.frame.Y = 0; NPC.ai[3] = 0f; diff --git a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs index 8c14010ac6..deb6591e6b 100644 --- a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; this.HideFromBestiary(); NPCID.Sets.MPAllowedEnemies[Type] = true; NPCID.Sets.CantTakeLunchMoney[Type] = true; @@ -593,7 +593,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.ai[3] = 2f; NPC.netUpdate = true; @@ -618,7 +618,7 @@ namespace CalamityMod.NPCs.DesertScourge { if (NPC.frame.Y > 0) { - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.frame.Y = 0; NPC.ai[3] = 0f; diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index 8f0e37ccec..55f6cd07e7 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; this.HideFromBestiary(); @@ -323,7 +323,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) NPC.frame.Y = 0; } } diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 9d000c8cf8..fc57caf6b7 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -67,7 +67,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() @@ -867,7 +867,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.ai[3] = 2f; NPC.netUpdate = true; @@ -892,7 +892,7 @@ namespace CalamityMod.NPCs.DesertScourge { if (NPC.frame.Y > 0) { - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) { NPC.frame.Y = 0; NPC.ai[3] = 0f; diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.cs b/NPCs/DevourerofGods/CosmicGuardianBody.cs index bace8225f8..43c9f062f9 100644 --- a/NPCs/DevourerofGods/CosmicGuardianBody.cs +++ b/NPCs/DevourerofGods/CosmicGuardianBody.cs @@ -164,8 +164,8 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.cs b/NPCs/DevourerofGods/CosmicGuardianHead.cs index bc2501a11f..6f9825e6d1 100644 --- a/NPCs/DevourerofGods/CosmicGuardianHead.cs +++ b/NPCs/DevourerofGods/CosmicGuardianHead.cs @@ -361,8 +361,8 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); if (NPC.IsABestiaryIconDummy) diff --git a/NPCs/DevourerofGods/CosmicGuardianTail.cs b/NPCs/DevourerofGods/CosmicGuardianTail.cs index 089734c575..24469b1616 100644 --- a/NPCs/DevourerofGods/CosmicGuardianTail.cs +++ b/NPCs/DevourerofGods/CosmicGuardianTail.cs @@ -161,8 +161,8 @@ namespace CalamityMod.NPCs.DevourerofGods if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index b78344a2d5..3523335b13 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -398,7 +398,7 @@ namespace CalamityMod.NPCs.DevourerofGods spriteEffects = SpriteEffects.FlipHorizontally; bool useOtherTextures = phase2Started && Main.npc[(int)NPC.ai[2]].localAI[2] <= 60f; - Texture2D texture2D15 = useOtherTextures ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = useOtherTextures ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index dd77980711..2f25030781 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -2626,7 +2626,7 @@ namespace CalamityMod.NPCs.DevourerofGods spriteEffects = SpriteEffects.FlipHorizontally; bool useOtherTextures = (Phase2Started && NPC.localAI[2] <= 60f) || NPC.IsABestiaryIconDummy; - Texture2D texture2D15 = useOtherTextures ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = useOtherTextures ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); if (NPC.IsABestiaryIconDummy) { diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index fe52904f8a..2dcd798415 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -361,7 +361,7 @@ namespace CalamityMod.NPCs.DevourerofGods spriteEffects = SpriteEffects.FlipHorizontally; bool useOtherTextures = phase2Started && Main.npc[(int)NPC.ai[2]].localAI[2] <= 60f; - Texture2D texture2D15 = useOtherTextures ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = useOtherTextures ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); Vector2 drawPosition = NPC.Center - screenPos; diff --git a/NPCs/DraedonLabThings/Androomba.cs b/NPCs/DraedonLabThings/Androomba.cs index 012e36788c..0685a9f629 100644 --- a/NPCs/DraedonLabThings/Androomba.cs +++ b/NPCs/DraedonLabThings/Androomba.cs @@ -22,9 +22,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 22; - NPCID.Sets.CountsAsCritter[NPC.type] = true; - Main.npcCatchable[NPC.type] = true; + Main.npcFrameCount[Type] = 22; + NPCID.Sets.CountsAsCritter[Type] = true; + Main.npcCatchable[Type] = true; NPCID.Sets.NormalGoldCritterBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y += 18; @@ -256,7 +256,7 @@ namespace CalamityMod.NPCs.DraedonLabThings public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; drawPosition.Y += DrawOffsetY; diff --git a/NPCs/DraedonLabThings/Nanodroid.cs b/NPCs/DraedonLabThings/Nanodroid.cs index 5730109ccb..bc9a1f74ee 100644 --- a/NPCs/DraedonLabThings/Nanodroid.cs +++ b/NPCs/DraedonLabThings/Nanodroid.cs @@ -17,9 +17,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.CountsAsCritter[NPC.type] = true; - Main.npcCatchable[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.CountsAsCritter[Type] = true; + Main.npcCatchable[Type] = true; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "_Glow", AssetRequestMode.AsyncLoad); @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.DraedonLabThings { NPC.spriteDirection = NPC.direction; NPC.frameCounter += 0.3f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.DraedonLabThings public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/NPCs/DraedonLabThings/NanodroidDysfunctional.cs b/NPCs/DraedonLabThings/NanodroidDysfunctional.cs index c2ffabf81f..c8fda4b19b 100644 --- a/NPCs/DraedonLabThings/NanodroidDysfunctional.cs +++ b/NPCs/DraedonLabThings/NanodroidDysfunctional.cs @@ -17,9 +17,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.CountsAsCritter[NPC.type] = true; - Main.npcCatchable[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.CountsAsCritter[Type] = true; + Main.npcCatchable[Type] = true; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "_Glow", AssetRequestMode.AsyncLoad); @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.DraedonLabThings { NPC.spriteDirection = NPC.direction; NPC.frameCounter += 0.3f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.DraedonLabThings public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs b/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs index 5ff3367eba..2a009ae63f 100644 --- a/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs +++ b/NPCs/DraedonLabThings/NanodroidPlagueGreen.cs @@ -17,9 +17,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.CountsAsCritter[NPC.type] = true; - Main.npcCatchable[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.CountsAsCritter[Type] = true; + Main.npcCatchable[Type] = true; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "_Glow", AssetRequestMode.AsyncLoad); @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.DraedonLabThings { NPC.spriteDirection = NPC.direction; NPC.frameCounter += 0.3f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.DraedonLabThings public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/NPCs/DraedonLabThings/NanodroidPlagueRed.cs b/NPCs/DraedonLabThings/NanodroidPlagueRed.cs index 59c47a71f4..094e9cc3f4 100644 --- a/NPCs/DraedonLabThings/NanodroidPlagueRed.cs +++ b/NPCs/DraedonLabThings/NanodroidPlagueRed.cs @@ -17,9 +17,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.CountsAsCritter[NPC.type] = true; - Main.npcCatchable[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.CountsAsCritter[Type] = true; + Main.npcCatchable[Type] = true; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "_Glow", AssetRequestMode.AsyncLoad); @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.DraedonLabThings { NPC.spriteDirection = NPC.direction; NPC.frameCounter += 0.3f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -78,7 +78,7 @@ namespace CalamityMod.NPCs.DraedonLabThings public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/NPCs/DraedonLabThings/RepairUnitCritter.cs b/NPCs/DraedonLabThings/RepairUnitCritter.cs index 0edf8ef94a..8c425427dd 100644 --- a/NPCs/DraedonLabThings/RepairUnitCritter.cs +++ b/NPCs/DraedonLabThings/RepairUnitCritter.cs @@ -55,9 +55,9 @@ namespace CalamityMod.NPCs.DraedonLabThings public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 17; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 17; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; NPCID.Sets.CantTakeLunchMoney[Type] = true; NPCID.Sets.NormalGoldCritterBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); @@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.DraedonLabThings if (CurrentFrame < 9) CurrentFrame = 9f; CurrentFrame++; - if (CurrentFrame >= Main.npcFrameCount[NPC.type]) + if (CurrentFrame >= Main.npcFrameCount[Type]) CurrentFrame = 9f; NPC.frameCounter = 0; } @@ -369,7 +369,7 @@ namespace CalamityMod.NPCs.DraedonLabThings public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 5398646667..3b0399f151 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -123,8 +123,8 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = 15; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = 15; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -1516,7 +1516,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); int numAfterimages = ChargeComboFlash > 0f ? 0 : 5; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 origin = NPC.Size * 0.5f; Vector2 center = NPC.Center - screenPos; diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 3b36ec5768..865d154ccf 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -182,8 +182,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = NPC.oldPos.Length; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = NPC.oldPos.Length; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -1237,7 +1237,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares DrawArm(spriteBatch, NPC.Center + NPC.scale * new Vector2(400f, 300f), screenPos, armGlowmaskColor, 1, false); } - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); int numAfterimages = 5; diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index e6290d2bf7..2590e97a5a 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -76,8 +76,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = NPC.oldPos.Length; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = NPC.oldPos.Length; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -546,7 +546,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 50e90dd8ee..71b77c28f0 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -79,8 +79,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = NPC.oldPos.Length; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = NPC.oldPos.Length; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -594,7 +594,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 3cd116c063..27af6cc19e 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -73,8 +73,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = NPC.oldPos.Length; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = NPC.oldPos.Length; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -545,7 +545,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index f98d292391..9934fbdb21 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -74,8 +74,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = NPC.oldPos.Length; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = NPC.oldPos.Length; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 vector = new Vector2(NPC.width / 2, NPC.height / 2); Color afterimageBaseColor = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? Color.Red : Color.White; diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index cbd0ba8e18..c24b5dfb85 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -156,8 +156,8 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 3; - NPCID.Sets.TrailCacheLength[NPC.type] = 15; + NPCID.Sets.TrailingMode[Type] = 3; + NPCID.Sets.TrailCacheLength[Type] = 15; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -1411,7 +1411,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); int numAfterimages = ChargeFlash > 0f ? 0 : 5; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height); Vector2 origin = NPC.Size * 0.5f; Vector2 center = NPC.Center - screenPos; diff --git a/NPCs/ExoMechs/Draedon.cs b/NPCs/ExoMechs/Draedon.cs index 5754b9db54..3bfd6b266f 100644 --- a/NPCs/ExoMechs/Draedon.cs +++ b/NPCs/ExoMechs/Draedon.cs @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.ExoMechs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 12; + Main.npcFrameCount[Type] = 12; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionYOverride = 40f, @@ -101,8 +101,8 @@ namespace CalamityMod.NPCs.ExoMechs }; value.Position.Y += 45f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - NPCID.Sets.ShouldBeCountedAsBoss[NPC.type] = true; - NPCID.Sets.MustAlwaysDraw[NPC.type] = true; + NPCID.Sets.ShouldBeCountedAsBoss[Type] = true; + NPCID.Sets.MustAlwaysDraw[Type] = true; if (!Main.dedServ) { Texture_Glow = ModContent.Request(Texture + "Glowmask", AssetRequestMode.AsyncLoad); @@ -741,7 +741,7 @@ namespace CalamityMod.NPCs.ExoMechs int xFrame = NPC.frame.X / NPC.frame.Width; int yFrame = NPC.frame.Y / frameHeight; - int frame = xFrame * Main.npcFrameCount[NPC.type] + yFrame; + int frame = xFrame * Main.npcFrameCount[Type] + yFrame; // Prepare to stand up if called for and not already doing so. if (ShouldStartStandingUp && frame > 23) @@ -771,8 +771,8 @@ namespace CalamityMod.NPCs.ExoMechs NPC.frameCounter = 0; } - NPC.frame.X = frame / Main.npcFrameCount[NPC.type] * NPC.frame.Width; - NPC.frame.Y = frame % Main.npcFrameCount[NPC.type] * frameHeight; + NPC.frame.X = frame / Main.npcFrameCount[Type] * NPC.frame.Width; + NPC.frame.Y = frame % Main.npcFrameCount[Type] * frameHeight; // Handle framing for the projector ProjFrameChangeCounter++; @@ -841,7 +841,7 @@ namespace CalamityMod.NPCs.ExoMechs spriteBatch.EnterShaderRegion(); bool holo = HasBeenKilled && KillReappearDelay <= 0; bool leaving = HasBeenKilled && DefeatTimer > DelayBeforeDefeatStandup + TalkDelay * 8f + 200f; - Texture2D texture = HasBeenKilled && KillReappearDelay <= 0f ? HoloTexture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture = HasBeenKilled && KillReappearDelay <= 0f ? HoloTexture.Value : TextureAssets.Npc[Type].Value; Texture2D glowmask = Texture_Glow.Value; Texture2D projector = ProjectorTexture.Value; Texture2D projectorglow = ProjectorTexture_Glow.Value; @@ -871,7 +871,7 @@ namespace CalamityMod.NPCs.ExoMechs GameShaders.Misc["CalamityMod:TeleportDisplacement"].UseOpacity(MathHelper.Clamp(1f - HologramEffectTimer / HologramFadeinTime, 0f, 1f) * 0.38f); GameShaders.Misc["CalamityMod:TeleportDisplacement"].UseSecondaryColor(color); GameShaders.Misc["CalamityMod:TeleportDisplacement"].UseSaturation(color.A / 255f); - GameShaders.Misc["CalamityMod:TeleportDisplacement"].Shader.Parameters["frameCount"].SetValue(new Vector2(16f, Main.npcFrameCount[NPC.type])); + GameShaders.Misc["CalamityMod:TeleportDisplacement"].Shader.Parameters["frameCount"].SetValue(new Vector2(16f, Main.npcFrameCount[Type])); GameShaders.Misc["CalamityMod:TeleportDisplacement"].Apply(); } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index acf7edb991..414df945d7 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -54,7 +54,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -593,7 +593,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - int finalFrame = Main.npcFrameCount[NPC.type] - 1; + int finalFrame = Main.npcFrameCount[Type] - 1; if (NPC.frame.Y > frameHeight * finalFrame) NPC.frame.Y = frameHeight * finalFrame; } @@ -615,11 +615,11 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 60dfba869b..63def90f4a 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -596,7 +596,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - int finalFrame = Main.npcFrameCount[NPC.type] - 1; + int finalFrame = Main.npcFrameCount[Type] - 1; if (NPC.frame.Y > frameHeight * finalFrame) NPC.frame.Y = frameHeight * finalFrame; } @@ -618,11 +618,11 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 546ab85673..c857c2b0ae 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -132,10 +132,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; // Ensure that the reticle is not culled due to the player being very far from Thanatos. - NPCID.Sets.MustAlwaysDraw[NPC.type] = true; + NPCID.Sets.MustAlwaysDraw[Type] = true; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -1094,7 +1094,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - int finalFrame = Main.npcFrameCount[NPC.type] - 1; + int finalFrame = Main.npcFrameCount[Type] - 1; if (NPC.frame.Y >= frameHeight * finalFrame) NPC.frame.Y = frameHeight * finalFrame; } @@ -1109,8 +1109,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); // Reimplementation of CalamityUtils.DrawAnimatedBestiaryWorm but tweaked due to Thanatos' animations if (NPC.IsABestiaryIconDummy) @@ -1139,7 +1139,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 05054f02de..a1dcf46bdf 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -594,7 +594,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos NPC.frame.Y += frameHeight; NPC.frameCounter = 0D; } - int finalFrame = Main.npcFrameCount[NPC.type] - 1; + int finalFrame = Main.npcFrameCount[Type] - 1; if (NPC.frame.Y > frameHeight * finalFrame) NPC.frame.Y = frameHeight * finalFrame; } @@ -616,11 +616,11 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 05e4e6f881..afcdb80d2f 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.GreatSandShark public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -57,8 +57,8 @@ namespace CalamityMod.NPCs.GreatSandShark AIType = -1; NPC.knockBackResist = 0f; NPC.value = Item.buyPrice(0, 5, 0, 0); - NPCID.Sets.TrailCacheLength[NPC.type] = 8; - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailCacheLength[Type] = 8; + NPCID.Sets.TrailingMode[Type] = 1; NPC.behindTiles = true; NPC.netAlways = true; NPC.DeathSound = DeathSound; @@ -582,7 +582,7 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.spriteDirection = -NPC.direction; } NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -601,8 +601,8 @@ namespace CalamityMod.NPCs.GreatSandShark mainAfterimageColor = Color.Silver; extraAfterimageColor = Color.Orange; } - Texture2D texture2D3 = TextureAssets.Npc[NPC.type].Value; - int currentFrame = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; + Texture2D texture2D3 = TextureAssets.Npc[Type].Value; + int currentFrame = TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type]; int y3 = currentFrame * (int)NPC.frameCounter; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, currentFrame); Vector2 halfRectSize = rectangle.Size() / 2f; @@ -624,7 +624,7 @@ IL_6899: { afterimagesRemaining = (float)(1 - afterimageCounter); } - alphaAfterimageColor *= afterimagesRemaining / ((float)NPCID.Sets.TrailCacheLength[NPC.type] * 1.5f); + alphaAfterimageColor *= afterimagesRemaining / ((float)NPCID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 afterimagePos = NPC.oldPos[afterimageCounter]; float afterimageRotation = NPC.rotation; Main.spriteBatch.Draw(texture2D3, afterimagePos + NPC.Size / 2f - screenPos + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), alphaAfterimageColor, afterimageRotation + NPC.rotation * 0f * (float)(afterimageCounter - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), halfRectSize, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index 9e86ce677f..cdeeb11c93 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -14,8 +14,8 @@ namespace CalamityMod.NPCs.HiveMind { public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 4; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 4; NPCID.Sets.BossBestiaryPriority.Add(Type); } @@ -56,7 +56,7 @@ namespace CalamityMod.NPCs.HiveMind public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/HiveMind/HiveBlob.cs b/NPCs/HiveMind/HiveBlob.cs index c3f3c4bf4a..195befe9ea 100644 --- a/NPCs/HiveMind/HiveBlob.cs +++ b/NPCs/HiveMind/HiveBlob.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.HiveMind public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() @@ -219,8 +219,8 @@ namespace CalamityMod.NPCs.HiveMind if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 vector2 = NPC.Center - screenPos; vector2 -= new Vector2(texture.Width, texture.Height) * NPC.scale / 2f; diff --git a/NPCs/HiveMind/HiveBlob2.cs b/NPCs/HiveMind/HiveBlob2.cs index dd63f62274..0587b8edb2 100644 --- a/NPCs/HiveMind/HiveBlob2.cs +++ b/NPCs/HiveMind/HiveBlob2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.HiveMind public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() @@ -213,8 +213,8 @@ namespace CalamityMod.NPCs.HiveMind if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 vector2 = NPC.Center - screenPos; vector2 -= new Vector2(texture.Width, texture.Height) * NPC.scale / 2f; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 0e851ee1b4..58e4c32496 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -113,8 +113,8 @@ namespace CalamityMod.NPCs.HiveMind public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 1; - NPCID.Sets.TrailCacheLength[NPC.type] = NPC.oldPos.Length; + NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.TrailCacheLength[Type] = NPC.oldPos.Length; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -322,7 +322,7 @@ namespace CalamityMod.NPCs.HiveMind if (Main.dedServ) return true; - Texture2D texture = IsPhaseTwo ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture = IsPhaseTwo ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; SpriteEffects spriteEffects = NPC.direction == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Vector2 origin = new Vector2(NPC.width / 2, NPC.height); Vector2 center = NPC.position - screenPos + origin; diff --git a/NPCs/HiveMind/HiveTumor.cs b/NPCs/HiveMind/HiveTumor.cs index 0aec6bbfe8..8a3269a23c 100644 --- a/NPCs/HiveMind/HiveTumor.cs +++ b/NPCs/HiveMind/HiveTumor.cs @@ -11,7 +11,7 @@ namespace CalamityMod.NPCs.HiveMind { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.CantTakeLunchMoney[Type] = true; NPCID.Sets.BossBestiaryPriority.Add(Type); } @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.HiveMind public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index efefcb1d32..6fd7dc0568 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.Leviathan public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -889,11 +889,11 @@ namespace CalamityMod.NPCs.Leviathan public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; switch (frameUsed) { case 0: - texture = TextureAssets.Npc[NPC.type].Value; + texture = TextureAssets.Npc[Type].Value; break; case 1: texture = ChargeTexture.Value; @@ -901,7 +901,7 @@ namespace CalamityMod.NPCs.Leviathan } bool charging = NPC.ai[0] > 2f || forceChargeFrames; - int height = texture.Height / Main.npcFrameCount[NPC.type]; + int height = texture.Height / Main.npcFrameCount[Type]; int width = texture.Width; SpriteEffects spriteEffects = charging ? SpriteEffects.None : SpriteEffects.FlipHorizontally; if (NPC.spriteDirection == -1) @@ -919,11 +919,11 @@ namespace CalamityMod.NPCs.Leviathan int timeBetweenFrames = 8; NPC.frameCounter++; - if (NPC.frameCounter > timeBetweenFrames * Main.npcFrameCount[NPC.type]) + if (NPC.frameCounter > timeBetweenFrames * Main.npcFrameCount[Type]) NPC.frameCounter = 0; NPC.frame.Y = frameHeight * (int)(NPC.frameCounter / timeBetweenFrames); - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) NPC.frame.Y = 0; //100x1140 diff --git a/NPCs/Leviathan/AquaticAberration.cs b/NPCs/Leviathan/AquaticAberration.cs index e469609631..8a7e1f5543 100644 --- a/NPCs/Leviathan/AquaticAberration.cs +++ b/NPCs/Leviathan/AquaticAberration.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.Leviathan public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.X += 25; @@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.Leviathan public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 856db1d813..4daf1c4db5 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.Leviathan public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 3; + Main.npcFrameCount[Type] = 3; NPCID.Sets.BossBestiaryPriority.Add(Type); if (!Main.dedServ) AttackTexture = ModContent.Request("CalamityMod/NPCs/Leviathan/LeviathanAttack", AssetRequestMode.AsyncLoad); @@ -929,7 +929,7 @@ namespace CalamityMod.NPCs.Leviathan Texture2D texture = AttackTexture.Value; if (NPC.ai[0] == 1f || NPC.Calamity().newAI[3] < 180f) { - texture = TextureAssets.Npc[NPC.type].Value; + texture = TextureAssets.Npc[Type].Value; } SpriteEffects spriteEffects = SpriteEffects.FlipHorizontally; float xOffset = -50f; diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index f53a972388..19205bd748 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.Leviathan public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.CantTakeLunchMoney[Type] = true; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() @@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Opacity = 1f; NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -124,7 +124,7 @@ namespace CalamityMod.NPCs.Leviathan if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D drawTex = Main.zenithWorld ? TextureAssets.Npc[ModContent.NPCType()].Value : TextureAssets.Npc[NPC.type].Value; + Texture2D drawTex = Main.zenithWorld ? TextureAssets.Npc[ModContent.NPCType()].Value : TextureAssets.Npc[Type].Value; Rectangle frame = Main.zenithWorld ? drawTex.Frame(2, 3, 0, 0) : NPC.frame; Vector2 origin = new Vector2(drawTex.Width / 2, drawTex.Height / 2); @@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.Leviathan } else { - drawPos -= new Vector2(drawTex.Width, drawTex.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawPos -= new Vector2(drawTex.Width, drawTex.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); } Color color = Main.zenithWorld ? Color.Purple : drawColor; diff --git a/NPCs/NormalNPCs/AeroSlime.cs b/NPCs/NormalNPCs/AeroSlime.cs index 9658663e8e..a72b4648a6 100644 --- a/NPCs/NormalNPCs/AeroSlime.cs +++ b/NPCs/NormalNPCs/AeroSlime.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y -= 6; value.PortraitPositionYOverride = -36f; diff --git a/NPCs/NormalNPCs/AuroraSpirit.cs b/NPCs/NormalNPCs/AuroraSpirit.cs index 46a0ab6dcc..0e177cee4c 100644 --- a/NPCs/NormalNPCs/AuroraSpirit.cs +++ b/NPCs/NormalNPCs/AuroraSpirit.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = -1, @@ -63,9 +63,9 @@ namespace CalamityMod.NPCs.NormalNPCs int currentFrame = 1; if (!Main.dedServ) { - if (TextureAssets.Npc[NPC.type].Value == null) + if (TextureAssets.Npc[Type].Value == null) return; - currentFrame = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; + currentFrame = TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type]; } if (!NPC.IsABestiaryIconDummy) @@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y += currentFrame; NPC.frameCounter = 0; } - if (NPC.frame.Y / currentFrame >= Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y / currentFrame >= Main.npcFrameCount[Type]) NPC.frame.Y = 0; } diff --git a/NPCs/NormalNPCs/BloodlettingServant.cs b/NPCs/NormalNPCs/BloodlettingServant.cs index 65b90c9359..3e052a1098 100644 --- a/NPCs/NormalNPCs/BloodlettingServant.cs +++ b/NPCs/NormalNPCs/BloodlettingServant.cs @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.NormalNPCs { if (NPC.ai[0] >= ChargeTelegraphGateValue) { - Texture2D npcTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D npcTexture = TextureAssets.Npc[Type].Value; Color originalColor = NPC.GetAlpha(drawColor); Color newColor = new Color(192, 0, 0, 255 - NPC.alpha); Vector2 drawPosition = NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY); @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.NormalNPCs afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmount - j) / 15f; Vector2 afterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(npcTexture.Width, npcTexture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(npcTexture.Width, npcTexture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(npcTexture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/NormalNPCs/BloomSlime.cs b/NPCs/NormalNPCs/BloomSlime.cs index 12357273e6..bc4f8c9849 100644 --- a/NPCs/NormalNPCs/BloomSlime.cs +++ b/NPCs/NormalNPCs/BloomSlime.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/BucketZombie.cs b/NPCs/NormalNPCs/BucketZombie.cs index 783ac033c7..17873f340f 100644 --- a/NPCs/NormalNPCs/BucketZombie.cs +++ b/NPCs/NormalNPCs/BucketZombie.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 3; + Main.npcFrameCount[Type] = 3; NPCID.Sets.Zombies[Type] = true; } diff --git a/NPCs/NormalNPCs/CladCrab.cs b/NPCs/NormalNPCs/CladCrab.cs index 9a644b624a..fb8dfb1cd1 100644 --- a/NPCs/NormalNPCs/CladCrab.cs +++ b/NPCs/NormalNPCs/CladCrab.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -262,7 +262,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y = NPC.frame.Y + frameHeight; NPC.frameCounter = 0.0; } - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type] - 1) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) { NPC.frame.Y = frameHeight; } @@ -270,7 +270,7 @@ namespace CalamityMod.NPCs.NormalNPCs else { NPC.frameCounter = 0.0; - NPC.frame.Y = frameHeight * (Main.npcFrameCount[NPC.type] - 1); + NPC.frame.Y = frameHeight * (Main.npcFrameCount[Type] - 1); } } diff --git a/NPCs/NormalNPCs/Cnidrion.cs b/NPCs/NormalNPCs/Cnidrion.cs index 94d8317100..f2bd31073a 100644 --- a/NPCs/NormalNPCs/Cnidrion.cs +++ b/NPCs/NormalNPCs/Cnidrion.cs @@ -15,8 +15,8 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 10; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 10; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.8f, @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/CrawlerAmber.cs b/NPCs/NormalNPCs/CrawlerAmber.cs index cad696b1e9..17192a95df 100644 --- a/NPCs/NormalNPCs/CrawlerAmber.cs +++ b/NPCs/NormalNPCs/CrawlerAmber.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerAmethyst.cs b/NPCs/NormalNPCs/CrawlerAmethyst.cs index 27fdd41d35..402b5e213f 100644 --- a/NPCs/NormalNPCs/CrawlerAmethyst.cs +++ b/NPCs/NormalNPCs/CrawlerAmethyst.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerCrystal.cs b/NPCs/NormalNPCs/CrawlerCrystal.cs index b7e5c9677b..528a2c090b 100644 --- a/NPCs/NormalNPCs/CrawlerCrystal.cs +++ b/NPCs/NormalNPCs/CrawlerCrystal.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerDiamond.cs b/NPCs/NormalNPCs/CrawlerDiamond.cs index 798baa08b1..cd13945757 100644 --- a/NPCs/NormalNPCs/CrawlerDiamond.cs +++ b/NPCs/NormalNPCs/CrawlerDiamond.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerEmerald.cs b/NPCs/NormalNPCs/CrawlerEmerald.cs index 9674c5aae5..9cda2fb1aa 100644 --- a/NPCs/NormalNPCs/CrawlerEmerald.cs +++ b/NPCs/NormalNPCs/CrawlerEmerald.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerRuby.cs b/NPCs/NormalNPCs/CrawlerRuby.cs index f436933247..09f52c7060 100644 --- a/NPCs/NormalNPCs/CrawlerRuby.cs +++ b/NPCs/NormalNPCs/CrawlerRuby.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerSapphire.cs b/NPCs/NormalNPCs/CrawlerSapphire.cs index 5de70493ae..a75e5b20fd 100644 --- a/NPCs/NormalNPCs/CrawlerSapphire.cs +++ b/NPCs/NormalNPCs/CrawlerSapphire.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrawlerTopaz.cs b/NPCs/NormalNPCs/CrawlerTopaz.cs index 3fbabfb2c8..347d6d546c 100644 --- a/NPCs/NormalNPCs/CrawlerTopaz.cs +++ b/NPCs/NormalNPCs/CrawlerTopaz.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index c1ab53b4b6..18f99bbfbf 100644 --- a/NPCs/NormalNPCs/CrimulanBlightSlime.cs +++ b/NPCs/NormalNPCs/CrimulanBlightSlime.cs @@ -11,7 +11,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/CryoSlime.cs b/NPCs/NormalNPCs/CryoSlime.cs index d22b2c070c..677e543ea6 100644 --- a/NPCs/NormalNPCs/CryoSlime.cs +++ b/NPCs/NormalNPCs/CryoSlime.cs @@ -12,7 +12,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index fffd6ff45b..1467b1f3b6 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index 4b4400f72f..0511fb85cf 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -11,7 +11,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index 9e6fb65fd4..9a4cab62f1 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 6; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.75f, @@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.Opacity = 1f; NPC.frameCounter += hasBeenHit ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index 65cf22f33e..e5eca4bb8e 100644 --- a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs +++ b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; + Main.npcFrameCount[Type] = 10; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/Foveanator.cs b/NPCs/NormalNPCs/Foveanator.cs index 367f7445bd..8a94dd7c66 100644 --- a/NPCs/NormalNPCs/Foveanator.cs +++ b/NPCs/NormalNPCs/Foveanator.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); @@ -906,7 +906,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - spriteBatch.Draw(TextureAssets.Npc[NPC.type].Value, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(TextureAssets.Npc[Type].Value, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0f); Texture2D glowTexture = GlowTexture.Value; spriteBatch.Draw(glowTexture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, Color.White, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/NormalNPCs/Frogfish.cs b/NPCs/NormalNPCs/Frogfish.cs index 1af02ef5ec..616cabe023 100644 --- a/NPCs/NormalNPCs/Frogfish.cs +++ b/NPCs/NormalNPCs/Frogfish.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.NormalNPCs return; } NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index 45b580ff0a..6d7b54958e 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.4f, @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frameCounter++; if (NPC.frameCounter >= 8) { - NPC.frame.Y = (NPC.frame.Y + frameHeight) % (Main.npcFrameCount[NPC.type] * frameHeight); + NPC.frame.Y = (NPC.frame.Y + frameHeight) % (Main.npcFrameCount[Type] * frameHeight); NPC.frameCounter = 0; } } diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index 0780d19d8c..bf70ac2606 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -65,12 +65,12 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Rotation = MathHelper.ToRadians(135); NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - NPCID.Sets.TrailingMode[NPC.type] = 0; - NPCID.Sets.TrailCacheLength[NPC.type] = 6; + NPCID.Sets.TrailingMode[Type] = 0; + NPCID.Sets.TrailCacheLength[Type] = 6; } public override void SetDefaults() @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += (isDashing) ? 0.4f : 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -330,10 +330,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Vector2 position = NPC.Center - screenPos; - Vector2 origin = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); - position -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + Vector2 origin = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); + position -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; position += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); // If the enemy is preparing to dash, it'll fade in afterimages. diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index f7bbddab06..4d87a1dcc2 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -21,8 +21,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() @@ -248,7 +248,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += hasBeenHit ? 0.25f : 0.125f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/KingSlimeJewelRuby.cs b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs index e652a93458..9a644aa5ae 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelRuby.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); } diff --git a/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs index 3b34725efb..fc02f5133c 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); } diff --git a/NPCs/NormalNPCs/LavaSlimeNoLavaDrop.cs b/NPCs/NormalNPCs/LavaSlimeNoLavaDrop.cs index ca5764da80..38cd0a6c25 100644 --- a/NPCs/NormalNPCs/LavaSlimeNoLavaDrop.cs +++ b/NPCs/NormalNPCs/LavaSlimeNoLavaDrop.cs @@ -10,7 +10,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; this.HideFromBestiary(); } diff --git a/NPCs/NormalNPCs/MantisShrimp.cs b/NPCs/NormalNPCs/MantisShrimp.cs index befc565936..721b6b923f 100644 --- a/NPCs/NormalNPCs/MantisShrimp.cs +++ b/NPCs/NormalNPCs/MantisShrimp.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -109,7 +109,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index bb1ec40ec3..f9a42d6e5e 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 14; + Main.npcFrameCount[Type] = 14; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/PerennialSlime.cs b/NPCs/NormalNPCs/PerennialSlime.cs index a11bb7bedb..eb62be6480 100644 --- a/NPCs/NormalNPCs/PerennialSlime.cs +++ b/NPCs/NormalNPCs/PerennialSlime.cs @@ -12,7 +12,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/PhantomSpirit.cs b/NPCs/NormalNPCs/PhantomSpirit.cs index 8572ab6c32..1f94654c10 100644 --- a/NPCs/NormalNPCs/PhantomSpirit.cs +++ b/NPCs/NormalNPCs/PhantomSpirit.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 3; + Main.npcFrameCount[Type] = 3; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/PhantomSpiritL.cs b/NPCs/NormalNPCs/PhantomSpiritL.cs index b9680816b4..2f7849b747 100644 --- a/NPCs/NormalNPCs/PhantomSpiritL.cs +++ b/NPCs/NormalNPCs/PhantomSpiritL.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.PhantomSpirit.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/PhantomSpiritM.cs b/NPCs/NormalNPCs/PhantomSpiritM.cs index d0f6151698..5d35236eba 100644 --- a/NPCs/NormalNPCs/PhantomSpiritM.cs +++ b/NPCs/NormalNPCs/PhantomSpiritM.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.PhantomSpirit.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/PhantomSpiritS.cs b/NPCs/NormalNPCs/PhantomSpiritS.cs index 997044d162..9608b72321 100644 --- a/NPCs/NormalNPCs/PhantomSpiritS.cs +++ b/NPCs/NormalNPCs/PhantomSpiritS.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.PhantomSpirit.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/Piggy.cs b/NPCs/NormalNPCs/Piggy.cs index c92aebd1e2..4b2106e519 100644 --- a/NPCs/NormalNPCs/Piggy.cs +++ b/NPCs/NormalNPCs/Piggy.cs @@ -12,9 +12,9 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 5; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y = NPC.frame.Y + frameHeight; NPC.frameCounter = 0.0; } - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type] - 1) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) { NPC.frame.Y = frameHeight; } diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs index 8da9b99ebb..8640f341e9 100644 --- a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); } @@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y += frameHeight; NPC.frameCounter = 0.0; } - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) NPC.frame.Y = 0; } diff --git a/NPCs/NormalNPCs/ProfanedEnergyBody.cs b/NPCs/NormalNPCs/ProfanedEnergyBody.cs index d5f9bc16ec..d5f8bfb1e1 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyBody.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyBody.cs @@ -12,7 +12,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { //Preferably would have two animated lanterns, but this static one-headded wiki image will do for now diff --git a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs index cdbdc9cfa4..e0754ab0c7 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; if (!Main.dedServ) { ChainTexture = ModContent.Request("CalamityMod/NPCs/NormalNPCs/ProfanedEnergySegment", AssetRequestMode.AsyncLoad); @@ -195,7 +195,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/Rimehound.cs b/NPCs/NormalNPCs/Rimehound.cs index bfe02b311f..b997458456 100644 --- a/NPCs/NormalNPCs/Rimehound.cs +++ b/NPCs/NormalNPCs/Rimehound.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 9; + Main.npcFrameCount[Type] = 9; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.7f, diff --git a/NPCs/NormalNPCs/Rotdog.cs b/NPCs/NormalNPCs/Rotdog.cs index b1087fa587..bb0141847c 100644 --- a/NPCs/NormalNPCs/Rotdog.cs +++ b/NPCs/NormalNPCs/Rotdog.cs @@ -12,7 +12,7 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; + Main.npcFrameCount[Type] = 10; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 81771de67c..0e7eb4dfae 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.4f, diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index bd28e4214c..161238d44f 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -17,8 +17,8 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() @@ -376,7 +376,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/Shroomble.cs b/NPCs/NormalNPCs/Shroomble.cs index 6b5e14dc13..ce2e765f3d 100644 --- a/NPCs/NormalNPCs/Shroomble.cs +++ b/NPCs/NormalNPCs/Shroomble.cs @@ -16,9 +16,9 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y = NPC.frame.Y + frameHeight; NPC.frameCounter = 0.0; } - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type] - 1) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) { NPC.frame.Y = frameHeight; } @@ -149,7 +149,7 @@ namespace CalamityMod.NPCs.NormalNPCs else { NPC.frameCounter = 0.0; - NPC.frame.Y = frameHeight * (Main.npcFrameCount[NPC.type] - 1); + NPC.frame.Y = frameHeight * (Main.npcFrameCount[Type] - 1); } } diff --git a/NPCs/NormalNPCs/SkeletronPrime2.cs b/NPCs/NormalNPCs/SkeletronPrime2.cs index a972525f2a..508c8a2260 100644 --- a/NPCs/NormalNPCs/SkeletronPrime2.cs +++ b/NPCs/NormalNPCs/SkeletronPrime2.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); if (!Main.dedServ) diff --git a/NPCs/NormalNPCs/Stormlion.cs b/NPCs/NormalNPCs/Stormlion.cs index d66dede29c..dd3131cb42 100644 --- a/NPCs/NormalNPCs/Stormlion.cs +++ b/NPCs/NormalNPCs/Stormlion.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.NormalNPCs public static readonly SoundStyle DeathSound = new("CalamityMod/Sounds/NPCKilled/StormlionDeath"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override void SetDefaults() diff --git a/NPCs/NormalNPCs/Sunskater.cs b/NPCs/NormalNPCs/Sunskater.cs index 7bf84fb89b..f4776d4331 100644 --- a/NPCs/NormalNPCs/Sunskater.cs +++ b/NPCs/NormalNPCs/Sunskater.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; } public override void SetDefaults() @@ -211,7 +211,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter += hasBeenHit ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/SuperDummyNPC.cs b/NPCs/NormalNPCs/SuperDummyNPC.cs index d263335bc5..68fda674cb 100644 --- a/NPCs/NormalNPCs/SuperDummyNPC.cs +++ b/NPCs/NormalNPCs/SuperDummyNPC.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 11; + Main.npcFrameCount[Type] = 11; NPCID.Sets.CantTakeLunchMoney[Type] = true; } diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index 7350d5cef0..ebc0f80eb6 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Position = new Vector2(28f, 20f), @@ -422,7 +422,7 @@ namespace CalamityMod.NPCs.NormalNPCs Main.EntitySpriteDraw(texture, NPC.Center - screenPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() * 0.5f, NPC.scale, direction, 0); else { - texture = TextureAssets.Npc[NPC.type].Value; + texture = TextureAssets.Npc[Type].Value; Main.EntitySpriteDraw(texture, NPC.Center - screenPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() * 0.5f, NPC.scale, direction, 0); } if (Main.zenithWorld) diff --git a/NPCs/NormalNPCs/WildBumblefuck.cs b/NPCs/NormalNPCs/WildBumblefuck.cs index 67a58e66d8..b0be162495 100644 --- a/NPCs/NormalNPCs/WildBumblefuck.cs +++ b/NPCs/NormalNPCs/WildBumblefuck.cs @@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.NormalNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 5; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Position = Vector2.UnitX * 36f @@ -128,8 +128,8 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; if (CalamityClientConfig.Instance.Afterimages) @@ -141,14 +141,14 @@ namespace CalamityMod.NPCs.NormalNPCs afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/NormalNPCs/WulfrumAmplifier.cs b/NPCs/NormalNPCs/WulfrumAmplifier.cs index 8aecccb50c..135d2d0b9c 100644 --- a/NPCs/NormalNPCs/WulfrumAmplifier.cs +++ b/NPCs/NormalNPCs/WulfrumAmplifier.cs @@ -32,8 +32,8 @@ namespace CalamityMod.NPCs.NormalNPCs public int laserDelay = 150; public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 6; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -205,7 +205,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter++; - int frame = (int)(NPC.frameCounter / 8) % Main.npcFrameCount[NPC.type]; + int frame = (int)(NPC.frameCounter / 8) % Main.npcFrameCount[Type]; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index 2e18e0251a..69e1abcaa6 100644 --- a/NPCs/NormalNPCs/WulfrumDrone.cs +++ b/NPCs/NormalNPCs/WulfrumDrone.cs @@ -54,7 +54,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -222,9 +222,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter++; - int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[NPC.type] / 2); + int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[Type] / 2); if (Supercharged) - frame += Main.npcFrameCount[NPC.type] / 2; + frame += Main.npcFrameCount[Type] / 2; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/WulfrumGyrator.cs b/NPCs/NormalNPCs/WulfrumGyrator.cs index 0b8e1f15ca..5ac2e3eceb 100644 --- a/NPCs/NormalNPCs/WulfrumGyrator.cs +++ b/NPCs/NormalNPCs/WulfrumGyrator.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; + Main.npcFrameCount[Type] = 10; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -87,9 +87,9 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.frameCounter += 1; } - int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[NPC.type] / 2); + int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[Type] / 2); if (Supercharged) - frame += Main.npcFrameCount[NPC.type] / 2; + frame += Main.npcFrameCount[Type] / 2; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/WulfrumHovercraft.cs b/NPCs/NormalNPCs/WulfrumHovercraft.cs index e863963a87..222778641e 100644 --- a/NPCs/NormalNPCs/WulfrumHovercraft.cs +++ b/NPCs/NormalNPCs/WulfrumHovercraft.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 12; + Main.npcFrameCount[Type] = 12; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -119,9 +119,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter++; - int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[NPC.type] / 2); + int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[Type] / 2); if (Supercharged) - frame += Main.npcFrameCount[NPC.type] / 2; + frame += Main.npcFrameCount[Type] / 2; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index 41f3110dfb..b8605d39e1 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 16; + Main.npcFrameCount[Type] = 16; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -87,9 +87,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { NPC.frameCounter++; - int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[NPC.type] / 2); + int frame = (int)(NPC.frameCounter / 5) % (Main.npcFrameCount[Type] / 2); if (Supercharged) - frame += Main.npcFrameCount[NPC.type] / 2; + frame += Main.npcFrameCount[Type] / 2; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 9a80f8a56c..bc34705496 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -47,8 +47,8 @@ namespace CalamityMod.NPCs.OldDuke public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 7; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -215,8 +215,8 @@ namespace CalamityMod.NPCs.OldDuke { spriteEffects = SpriteEffects.FlipHorizontally; } - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2, texture2D15.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2, texture2D15.Height / Main.npcFrameCount[Type] / 2); Color color = drawColor; Color drawLerpColor = Color.White; float drawLerpValue = 0f; @@ -268,7 +268,7 @@ namespace CalamityMod.NPCs.OldDuke afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -319,7 +319,7 @@ namespace CalamityMod.NPCs.OldDuke secondAfterimageColor = NPC.GetAlpha(secondAfterimageColor); secondAfterimageColor *= 1f - afterimageOpacity; Vector2 secondAfterimagePos = NPC.Center + (j / (float)secondAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScale * afterimageOpacity - screenPos; - secondAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + secondAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; secondAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, secondAfterimagePos, NPC.frame, secondAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.OldDuke finalDrawColor = Color.Lerp(finalDrawColor, drawLerpColor, drawLerpValue); finalDrawColor = NPC.GetAlpha(finalDrawColor); Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, (NPC.ai[0] > 9f ? finalDrawColor : NPC.GetAlpha(drawColor)), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -374,7 +374,7 @@ namespace CalamityMod.NPCs.OldDuke yellowAfterimageColor = Color.Lerp(yellowAfterimageColor, drawLerpColor, drawLerpValue); yellowAfterimageColor *= (afterimageAmt - k) / 15f; Vector2 yellowAfterimagePos = NPC.oldPos[k] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - yellowAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + yellowAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; yellowAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, yellowAfterimagePos, NPC.frame, yellowAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -386,7 +386,7 @@ namespace CalamityMod.NPCs.OldDuke secondYellowAfterimageColor = NPC.GetAlpha(secondYellowAfterimageColor); secondYellowAfterimageColor *= 1f - afterimageOpacity; Vector2 secondYellowAfterimagePos = NPC.Center + (l / (float)secondAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScale * afterimageOpacity - screenPos; - secondYellowAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + secondYellowAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; secondYellowAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, secondYellowAfterimagePos, NPC.frame, secondYellowAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index 8058d64f08..85ec66d493 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.OldDuke public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -239,8 +239,8 @@ namespace CalamityMod.NPCs.OldDuke if (NPC.spriteDirection == -1) spriteEffects = SpriteEffects.None; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = 10; if (CalamityClientConfig.Instance.Afterimages) @@ -252,14 +252,14 @@ namespace CalamityMod.NPCs.OldDuke afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Other/CalamitasEnchantDemon.cs b/NPCs/Other/CalamitasEnchantDemon.cs index 1096142fb6..831470fdd5 100644 --- a/NPCs/Other/CalamitasEnchantDemon.cs +++ b/NPCs/Other/CalamitasEnchantDemon.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.Other public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.Other if (NPC.frameCounter % 5f == 4f) NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) NPC.frame.Y = 0; } diff --git a/NPCs/Other/DemonPortal.cs b/NPCs/Other/DemonPortal.cs index 630cd48ca1..4c870617d8 100644 --- a/NPCs/Other/DemonPortal.cs +++ b/NPCs/Other/DemonPortal.cs @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.Other { spriteBatch.SetBlendState(BlendState.AlphaBlend); - Texture2D portalTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D portalTexture = TextureAssets.Npc[Type].Value; Vector2 drawPosition = NPC.Center - screenPos; Vector2 origin = portalTexture.Size() * 0.5f; Color baseColor = Color.White; diff --git a/NPCs/Other/ExhumedHeart.cs b/NPCs/Other/ExhumedHeart.cs index d92df384c7..dd0a285bbe 100644 --- a/NPCs/Other/ExhumedHeart.cs +++ b/NPCs/Other/ExhumedHeart.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.Other public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Other public override void FindFrame(int frameHeight) { NPC.frameCounter++; - NPC.frame.Y = (int)(NPC.frameCounter / 5) % Main.npcFrameCount[NPC.type] * frameHeight; + NPC.frame.Y = (int)(NPC.frameCounter / 5) % Main.npcFrameCount[Type] * frameHeight; } public override Color? GetAlpha(Color drawColor) diff --git a/NPCs/Other/LecherousOrb.cs b/NPCs/Other/LecherousOrb.cs index e1d2d20113..09396c24f6 100644 --- a/NPCs/Other/LecherousOrb.cs +++ b/NPCs/Other/LecherousOrb.cs @@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.Other public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Vector2 drawPosition = NPC.Center - screenPos; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/NPCs/Other/THELORDE.cs b/NPCs/Other/THELORDE.cs index a970175053..c197d7f2b7 100644 --- a/NPCs/Other/THELORDE.cs +++ b/NPCs/Other/THELORDE.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Other NPCID.Sets.ImmuneToRegularBuffs[Type] = true; NPCID.Sets.ShouldBeCountedAsBoss[Type] = true; this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; if (!Main.dedServ) { DeathAnimationTexture = ModContent.Request(Texture + "DEATH", AssetRequestMode.AsyncLoad); @@ -422,7 +422,7 @@ namespace CalamityMod.NPCs.Other SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Rectangle frameUsed = texture.Frame(2, 7, 0, 1); // the idle frame by default Rectangle squintFrame = texture.Frame(2, 7, 0, 0); diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index 70e2aee6eb..31a00fe8ff 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -175,8 +175,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = NPC.localAI[3] == 1f ? AltTexture.Value : TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = NPC.localAI[3] == 1f ? AltTexture.Value : TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 21d7c36c67..7cf12cca7c 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -207,8 +207,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index d3e4ebb0a0..af7efbb936 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -171,8 +171,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorCyst.cs b/NPCs/Perforator/PerforatorCyst.cs index eaf3858d0e..4121184f96 100644 --- a/NPCs/Perforator/PerforatorCyst.cs +++ b/NPCs/Perforator/PerforatorCyst.cs @@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.Perforator public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.CantTakeLunchMoney[Type] = true; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.Perforator public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -73,11 +73,11 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 44935f2b57..6896dab446 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -541,8 +541,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 4f5ffd2b01..abe6f138cd 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -466,8 +466,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index ceda2e5f25..be6d04386d 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -500,8 +500,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 glowmaskDrawLocation = NPC.Center - screenPos; glowmaskDrawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 62d60329dd..7204d26ec2 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.Perforator public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; + Main.npcFrameCount[Type] = 10; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.Perforator public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -517,11 +517,11 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 38fbe5d285..99ea4c7dbd 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -171,8 +171,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 631c740b7d..ddc46d0d16 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -178,8 +178,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index d27f3e875c..43453de572 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -172,8 +172,8 @@ namespace CalamityMod.NPCs.Perforator if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/PlagueEnemies/Melter.cs b/NPCs/PlagueEnemies/Melter.cs index 8539add457..1c30016023 100644 --- a/NPCs/PlagueEnemies/Melter.cs +++ b/NPCs/PlagueEnemies/Melter.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.PlagueEnemies { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.PortraitPositionYOverride = -32f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; diff --git a/NPCs/PlagueEnemies/PestilentSlime.cs b/NPCs/PlagueEnemies/PestilentSlime.cs index 7d3bb8889e..8e662822ae 100644 --- a/NPCs/PlagueEnemies/PestilentSlime.cs +++ b/NPCs/PlagueEnemies/PestilentSlime.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.NPCs.PlagueEnemies { spikeTimer -= 1f; } - if (!NPC.wet && !Main.player[NPC.target].npcTypeNoAggro[NPC.type]) + if (!NPC.wet && !Main.player[NPC.target].npcTypeNoAggro[Type]) { Vector2 slimePosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); float targetXDist = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - slimePosition.X; diff --git a/NPCs/PlagueEnemies/PlagueCharger.cs b/NPCs/PlagueEnemies/PlagueCharger.cs index 052ba40201..0b5fe1a1b1 100644 --- a/NPCs/PlagueEnemies/PlagueCharger.cs +++ b/NPCs/PlagueEnemies/PlagueCharger.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -73,8 +73,8 @@ namespace CalamityMod.NPCs.PlagueEnemies if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -86,14 +86,14 @@ namespace CalamityMod.NPCs.PlagueEnemies afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -108,7 +108,7 @@ namespace CalamityMod.NPCs.PlagueEnemies redEyeAfterimageColor = Color.Lerp(redEyeAfterimageColor, Color.White, 0.5f); redEyeAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 redEyeAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - redEyeAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + redEyeAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; redEyeAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, redEyeAfterimagePos, NPC.frame, redEyeAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/PlagueEnemies/PlagueChargerLarge.cs b/NPCs/PlagueEnemies/PlagueChargerLarge.cs index 20c01a8a90..3511ff8ffc 100644 --- a/NPCs/PlagueEnemies/PlagueChargerLarge.cs +++ b/NPCs/PlagueEnemies/PlagueChargerLarge.cs @@ -22,8 +22,8 @@ namespace CalamityMod.NPCs.PlagueEnemies public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.PlagueCharger.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -68,8 +68,8 @@ namespace CalamityMod.NPCs.PlagueEnemies if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -81,14 +81,14 @@ namespace CalamityMod.NPCs.PlagueEnemies afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.PlagueEnemies redEyeAfterimageColor = Color.Lerp(redEyeAfterimageColor, Color.White, 0.5f); redEyeAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 redEyeAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - redEyeAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + redEyeAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; redEyeAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, redEyeAfterimagePos, NPC.frame, redEyeAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index 959a9b51c0..42aaffb6f7 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.PlagueEnemies { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 12; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 12; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { Scale = 0.7f, @@ -380,8 +380,8 @@ namespace CalamityMod.NPCs.PlagueEnemies if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); if (CalamityClientConfig.Instance.Afterimages) { @@ -395,7 +395,7 @@ namespace CalamityMod.NPCs.PlagueEnemies afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(chargeAfterimageAmount - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -403,7 +403,7 @@ namespace CalamityMod.NPCs.PlagueEnemies } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PlagueEnemies/Plagueshell.cs b/NPCs/PlagueEnemies/Plagueshell.cs index b718bdcb14..c13bcb2203 100644 --- a/NPCs/PlagueEnemies/Plagueshell.cs +++ b/NPCs/PlagueEnemies/Plagueshell.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.PlagueEnemies { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; } public override void SetDefaults() diff --git a/NPCs/PlagueEnemies/Viruling.cs b/NPCs/PlagueEnemies/Viruling.cs index 2047db9df4..c3ea3971ac 100644 --- a/NPCs/PlagueEnemies/Viruling.cs +++ b/NPCs/PlagueEnemies/Viruling.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.PlagueEnemies { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index a229e8f164..a65955b46d 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -21,8 +21,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { GlowTexture = ModContent.Request("CalamityMod/NPCs/PlaguebringerGoliath/PlagueHomingMissileGlow", AssetRequestMode.AsyncLoad); @@ -164,8 +164,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; Vector2 drawLocation = NPC.Center - screenPos; @@ -185,13 +185,13 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - drawLocation -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -206,7 +206,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath secondAfterimageColor = Color.Lerp(secondAfterimageColor, Color.White, 0.5f); secondAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 secondAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - secondAfterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + secondAfterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; secondAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, secondAfterimagePos, NPC.frame, secondAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/PlaguebringerGoliath/PlagueMine.cs b/NPCs/PlaguebringerGoliath/PlagueMine.cs index 6d3571c909..e95079f7ee 100644 --- a/NPCs/PlaguebringerGoliath/PlagueMine.cs +++ b/NPCs/PlaguebringerGoliath/PlagueMine.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; if (!Main.dedServ) { GlowTexture = ModContent.Request("CalamityMod/NPCs/PlaguebringerGoliath/PlagueMineGlow", AssetRequestMode.AsyncLoad); @@ -113,7 +113,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (NPC.frameCounter % 6 == 5) NPC.frame.Y += frameHeight; - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type]) NPC.frame.Y = 0; } @@ -123,10 +123,10 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); Color backAfterimageColor = PlaguebringerGoliath.BackglowColor * NPC.Opacity; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index be03794148..f30c1fad8d 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -62,8 +62,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -1241,7 +1241,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D glowTexture = Texture_Glow.Value; if (curTex != (charging ? 2 : 1)) { diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 7f7cc5a745..2b5200c888 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -19,8 +19,8 @@ namespace CalamityMod.NPCs.Polterghast public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -145,8 +145,8 @@ namespace CalamityMod.NPCs.Polterghast if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index d8246eedc2..5364fb0369 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -24,8 +24,8 @@ namespace CalamityMod.NPCs.Polterghast public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); if (!Main.dedServ) @@ -450,8 +450,8 @@ namespace CalamityMod.NPCs.Polterghast float colorChangeTime = 180f; float changeColorGateValue = chargePhaseGateValue - colorChangeTime; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Color lightRed = new Color(255, 100, 100, 255) * NPC.Opacity; int afterimageAmt = 7; @@ -468,7 +468,7 @@ namespace CalamityMod.NPCs.Polterghast afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -480,7 +480,7 @@ namespace CalamityMod.NPCs.Polterghast color = Color.Lerp(color, lightRed, MathHelper.Clamp((Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] - changeColorGateValue) / timeToReachFullColor, 0f, 1f)); Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, color, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -495,7 +495,7 @@ namespace CalamityMod.NPCs.Polterghast for (int j = 1; j < afterimageAmt; j++) { Vector2 otherAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - otherAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + otherAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; otherAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); Color otherAfterimageColor = blackWhiteLerp; otherAfterimageColor = Color.Lerp(otherAfterimageColor, Color.White, 0.5f); diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 6b81a6a10f..28b62e6587 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -92,8 +92,8 @@ namespace CalamityMod.NPCs.Polterghast public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 12; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 12; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.MPAllowedEnemies[Type] = true; if (!Main.dedServ) @@ -1161,9 +1161,9 @@ namespace CalamityMod.NPCs.Polterghast if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; Texture2D texture2D16 = Texture_Glow2.Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = 7; if (CalamityClientConfig.Instance.Afterimages) @@ -1175,14 +1175,14 @@ namespace CalamityMod.NPCs.Polterghast afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; vector43 += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); Color c = NPC.IsABestiaryIconDummy ? Color.White : NPC.GetAlpha(drawColor); spriteBatch.Draw(texture2D15, vector43, NPC.frame, c, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -1219,7 +1219,7 @@ namespace CalamityMod.NPCs.Polterghast otherAfterimageColor = NPC.GetAlpha(otherAfterimageColor); otherAfterimageColor *= (afterimageAmt - j) / 15f; Vector2 otherAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - otherAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + otherAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; otherAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, otherAfterimagePos, NPC.frame, otherAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index be8e568245..f83679ac0b 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.Polterghast public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 2; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 2; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -371,8 +371,8 @@ namespace CalamityMod.NPCs.Polterghast if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -384,14 +384,14 @@ namespace CalamityMod.NPCs.Polterghast afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -410,7 +410,7 @@ namespace CalamityMod.NPCs.Polterghast otherAfterimageColor = NPC.GetAlpha(otherAfterimageColor); otherAfterimageColor *= (afterimageAmt - j) / 15f; Vector2 otherAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - otherAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + otherAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; otherAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, otherAfterimagePos, NPC.frame, otherAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs b/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs index 7d2661965f..eaf87ad7e4 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmBody.cs @@ -168,11 +168,11 @@ namespace CalamityMod.NPCs.PrimordialWyrm if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs b/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs index eca355a095..c6b9ee2bd8 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmBodyAlt.cs @@ -167,11 +167,11 @@ namespace CalamityMod.NPCs.PrimordialWyrm if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index adf88847c4..690eb437ff 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -1435,11 +1435,11 @@ namespace CalamityMod.NPCs.PrimordialWyrm if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs b/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs index 5568ef9a0b..b77c37a7da 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmTail.cs @@ -129,11 +129,11 @@ namespace CalamityMod.NPCs.PrimordialWyrm if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 vector = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 center = NPC.Center - screenPos; - center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; center += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, center, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index 449a83a0c7..4a1010d253 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -45,8 +45,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.12f + NPC.velocity.Length() / 120f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -1025,9 +1025,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; Vector2 drawPos = NPC.Center - screenPos; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = 5; if (NPC.ai[0] == 2f) afterimageAmt = 10; @@ -1044,14 +1044,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians afterimageColor = colorOverride.Value; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = drawPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, colorOverride ?? NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -1082,7 +1082,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians timeBasedAfterimageColor = colorOverride.Value; Vector2 timeBasedAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - timeBasedAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + timeBasedAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; timeBasedAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, timeBasedAfterimagePos, NPC.frame, timeBasedAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs index a6e03f68e7..8639908070 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs @@ -35,8 +35,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.12f + NPC.velocity.Length() / 120f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -745,9 +745,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; Vector2 drawPos = NPC.Center - screenPos; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = 5; if (NPC.ai[0] == 2f) afterimageAmt = 10; @@ -764,14 +764,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians afterimageColor = colorOverride.Value; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = drawPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, colorOverride ?? NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -802,7 +802,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians timeBasedAfterimageColor = colorOverride.Value; Vector2 timeBasedAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - timeBasedAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + timeBasedAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; timeBasedAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, timeBasedAfterimagePos, NPC.frame, timeBasedAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs index 2688f01f1c..090bc5367e 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs @@ -47,8 +47,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 10; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -125,7 +125,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.12f + NPC.velocity.Length() / 120f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -437,9 +437,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; Texture2D texture2D16 = Texture_Glow2.Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -454,14 +454,14 @@ namespace CalamityMod.NPCs.ProfanedGuardians afterimageColor = colorOverride.Value; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, colorOverride ?? NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -496,7 +496,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians timeBasedAfterimageColor = colorOverride.Value; Vector2 timeBasedAfterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - timeBasedAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + timeBasedAfterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; timeBasedAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture2D15, timeBasedAfterimagePos, NPC.frame, timeBasedAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ProfanedGuardians/ProfanedRocks.cs b/NPCs/ProfanedGuardians/ProfanedRocks.cs index 6a8c0f70ef..a2a6edb15e 100644 --- a/NPCs/ProfanedGuardians/ProfanedRocks.cs +++ b/NPCs/ProfanedGuardians/ProfanedRocks.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { for (int i = 0; i < 6; i++) diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 15f6e2eae4..a5e8989db5 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -21,9 +21,9 @@ namespace CalamityMod.NPCs.Providence public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 10; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.Providence else NPC.frameCounter += 0.12f + Main.npc[CalamityGlobalNPC.holyBoss].velocity.Length() / 120f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -114,8 +114,8 @@ namespace CalamityMod.NPCs.Providence if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -127,14 +127,14 @@ namespace CalamityMod.NPCs.Providence afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; vector43 += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.Providence yellowAfterimageColor = NPC.GetAlpha(yellowAfterimageColor); yellowAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 yellowAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - yellowAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + yellowAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; yellowAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, yellowAfterimagePos, NPC.frame, yellowAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 1cc6651765..bf8a0db736 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -21,9 +21,9 @@ namespace CalamityMod.NPCs.Providence public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 10; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.NPCs.Providence else NPC.frameCounter += 0.12f + Main.npc[CalamityGlobalNPC.holyBoss].velocity.Length() / 120f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -113,9 +113,9 @@ namespace CalamityMod.NPCs.Providence if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; Texture2D texture2D16 = ProfanedGuardianHealer.Texture_Glow2.Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -127,14 +127,14 @@ namespace CalamityMod.NPCs.Providence afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -151,7 +151,7 @@ namespace CalamityMod.NPCs.Providence yellowAfterimageColor = NPC.GetAlpha(yellowAfterimageColor); yellowAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 yellowAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - yellowAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + yellowAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; yellowAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, yellowAfterimagePos, NPC.frame, yellowAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index e430b70422..9e8ea1d4b1 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -21,9 +21,9 @@ namespace CalamityMod.NPCs.Providence public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 10; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.Providence else NPC.frameCounter += 0.12f + Main.npc[CalamityGlobalNPC.holyBoss].velocity.Length() / 120f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -114,8 +114,8 @@ namespace CalamityMod.NPCs.Providence if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; if (NPC.ai[0] == 2f) afterimageAmt = 10; @@ -129,14 +129,14 @@ namespace CalamityMod.NPCs.Providence afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -152,7 +152,7 @@ namespace CalamityMod.NPCs.Providence yellowAfterimageColor = NPC.GetAlpha(yellowAfterimageColor); yellowAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 yellowAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - yellowAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + yellowAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; yellowAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, yellowAfterimagePos, NPC.frame, yellowAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index da6fd80bba..5b1460b0bf 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -168,8 +168,8 @@ namespace CalamityMod.NPCs.Providence public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 3; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 3; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -2216,7 +2216,7 @@ namespace CalamityMod.NPCs.Providence spriteEffects = SpriteEffects.FlipHorizontally; // Draw the main boss texture + its afterimages - Vector2 RotationCenter = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 RotationCenter = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Color BaseColor = Color.White; float Brightness = 0.5f; // Ranges from 0 (full vibrance) to 1 (pure white) int maxAfterimages = 5; @@ -2233,14 +2233,14 @@ namespace CalamityMod.NPCs.Providence AfterimageColor = colorOverride.Value; Vector2 AfterimageBodyPosition = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - AfterimageBodyPosition -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + AfterimageBodyPosition -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; AfterimageBodyPosition += RotationCenter * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture, AfterimageBodyPosition, NPC.frame, AfterimageColor.MultiplyRGBA(Lighting.GetColor((int)NPC.Center.X / 16, (int)NPC.Center.Y / 16)), NPC.rotation, RotationCenter, NPC.scale, spriteEffects, 0f); } } Vector2 BasePosition = NPC.Center - screenPos; - BasePosition -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + BasePosition -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; BasePosition += RotationCenter * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; Color finalDrawColor = NPC.IsABestiaryIconDummy ? Color.White : (colorOverride ?? Lighting.GetColor((int)NPC.Center.X / 16, (int)NPC.Center.Y / 16)) * NPC.Opacity; spriteBatch.Draw(texture, BasePosition, NPC.frame, finalDrawColor, NPC.rotation, RotationCenter, NPC.scale, spriteEffects, 0f); @@ -2309,7 +2309,7 @@ namespace CalamityMod.NPCs.Providence AfterimageWingColor = colorOverride.Value; Vector2 AfterimageGlowPosition = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - AfterimageGlowPosition -= new Vector2(textureGlow.Width, textureGlow.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + AfterimageGlowPosition -= new Vector2(textureGlow.Width, textureGlow.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; AfterimageGlowPosition += RotationCenter * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(textureGlow, AfterimageGlowPosition, NPC.frame, AfterimageWingColor, NPC.rotation, RotationCenter, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index 1da01e7aa9..748b5f8f15 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.Ravager public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.Ravager public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -150,10 +150,10 @@ namespace CalamityMod.NPCs.Ravager if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index b488418a3e..55c78cf3b1 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.Ravager public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; + Main.npcFrameCount[Type] = 7; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.Ravager NPC.Opacity = 1f; NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -878,9 +878,9 @@ namespace CalamityMod.NPCs.Ravager spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); Vector2 glowmaskPosition = center - screenPos; - glowmaskPosition -= new Vector2(GlowTexture.Value.Width, GlowTexture.Value.Height / Main.npcFrameCount[NPC.type]) * 1f / 2f; + glowmaskPosition -= new Vector2(GlowTexture.Value.Width, GlowTexture.Value.Height / Main.npcFrameCount[Type]) * 1f / 2f; glowmaskPosition += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color glowmaskColor = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.Blue); spriteBatch.Draw(GlowTexture.Value, glowmaskPosition, diff --git a/NPCs/Ravager/RavagerHead.cs b/NPCs/Ravager/RavagerHead.cs index e88c1a501d..e181a9e65d 100644 --- a/NPCs/Ravager/RavagerHead.cs +++ b/NPCs/Ravager/RavagerHead.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.Ravager public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() diff --git a/NPCs/Ravager/RavagerHead2.cs b/NPCs/Ravager/RavagerHead2.cs index 2d13521641..376ffdb2d5 100644 --- a/NPCs/Ravager/RavagerHead2.cs +++ b/NPCs/Ravager/RavagerHead2.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.Ravager public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() diff --git a/NPCs/Ravager/RavagerLegLeft.cs b/NPCs/Ravager/RavagerLegLeft.cs index 44183292d9..f344ab45ce 100644 --- a/NPCs/Ravager/RavagerLegLeft.cs +++ b/NPCs/Ravager/RavagerLegLeft.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.Ravager public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() diff --git a/NPCs/Ravager/RavagerLegRight.cs b/NPCs/Ravager/RavagerLegRight.cs index 58c8cf5991..31aed5da5b 100644 --- a/NPCs/Ravager/RavagerLegRight.cs +++ b/NPCs/Ravager/RavagerLegRight.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.Ravager public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; } public override void SetDefaults() diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 1fe444ffe1..2e21538a8d 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -18,8 +18,8 @@ namespace CalamityMod.NPCs.Signus public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); if (!Main.dedServ) { @@ -79,7 +79,7 @@ namespace CalamityMod.NPCs.Signus NPC.Opacity = 1f; NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -127,8 +127,8 @@ namespace CalamityMod.NPCs.Signus if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) @@ -140,14 +140,14 @@ namespace CalamityMod.NPCs.Signus afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.Signus flameAfterimageColor = NPC.GetAlpha(flameAfterimageColor); flameAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 flameAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - flameAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + flameAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; flameAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, flameAfterimagePos, NPC.frame, flameAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/Signus/CosmicMine.cs b/NPCs/Signus/CosmicMine.cs index ee24a26581..69af4f8c13 100644 --- a/NPCs/Signus/CosmicMine.cs +++ b/NPCs/Signus/CosmicMine.cs @@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.Signus { public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -182,8 +182,8 @@ namespace CalamityMod.NPCs.Signus if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / 2); int afterimageAmt = 5; if (CalamityClientConfig.Instance.Afterimages) diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 0403c5cdd5..764e71dba2 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -46,8 +46,8 @@ namespace CalamityMod.NPCs.Signus public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -809,7 +809,7 @@ namespace CalamityMod.NPCs.Signus public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D NPCTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D NPCTexture = TextureAssets.Npc[Type].Value; Texture2D glowMaskTexture = Texture_Glow.Value; SpriteEffects spriteEffects = SpriteEffects.None; @@ -818,7 +818,7 @@ namespace CalamityMod.NPCs.Signus int afterimageAmt = 5; Rectangle frame = NPC.frame; - int frameCount = Main.npcFrameCount[NPC.type]; + int frameCount = Main.npcFrameCount[Type]; if (NPC.ai[0] == 4f) { @@ -838,7 +838,7 @@ namespace CalamityMod.NPCs.Signus } else { - NPCTexture = TextureAssets.Npc[NPC.type].Value; + NPCTexture = TextureAssets.Npc[Type].Value; glowMaskTexture = Texture_Glow.Value; } diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn.cs b/NPCs/SlimeGod/CorruptSlimeSpawn.cs index 0ad84b5084..bb36b36aca 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.SlimeGod { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.PortraitPositionYOverride = -32f; diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn2.cs b/NPCs/SlimeGod/CorruptSlimeSpawn2.cs index 104f91d53a..535de4f3b2 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn2.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; } public override void SetDefaults() diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs index 71a15d5a27..d080f997f1 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.SlimeGod { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 2; + Main.npcFrameCount[Type] = 2; NPCID.Sets.BossBestiaryPriority.Add(Type); } diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs index 9ceec3977c..2f75e80e5b 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.SlimeGod public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.CrimsonSlimeSpawn.DisplayName"); public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.BossBestiaryPriority.Add(Type); } @@ -63,9 +63,9 @@ namespace CalamityMod.NPCs.SlimeGod int frameY = 1; if (!Main.dedServ) { - if (TextureAssets.Npc[NPC.type].Value is null) + if (TextureAssets.Npc[Type].Value is null) return; - frameY = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; + frameY = TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type]; } int aiState = 0; if (NPC.aiAction == 0) @@ -83,7 +83,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.frame.Y += frameY; NPC.frameCounter = 0f; } - if (NPC.frame.Y >= frameY * Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y >= frameY * Main.npcFrameCount[Type]) NPC.frame.Y = 0; } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 7ecd43f60f..1571ac865e 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -90,8 +90,8 @@ namespace CalamityMod.NPCs.SlimeGod NPC.defense = 6; NPC.LifeMaxNERB(420); - NPCID.Sets.TrailCacheLength[NPC.type] = 8; - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailCacheLength[Type] = 8; + NPCID.Sets.TrailingMode[Type] = 1; NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; @@ -666,7 +666,7 @@ namespace CalamityMod.NPCs.SlimeGod Vector2 origin = NPC.frame.Size() * 0.5f; Vector2 halfSize = NPC.Size * 0.5f; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D eyeTexture = EyeTexture.Value; Texture2D overlayTexture = OverlayTexture.Value; Texture2D pog = ZenithSeedEyeTexture.Value; @@ -698,7 +698,7 @@ namespace CalamityMod.NPCs.SlimeGod if (!Main.zenithWorld) { Vector2 drawPositionAdjustment = halfSize - screenPos + new Vector2(0f, NPC.gfxOffY); - float colorAlphaDivisor = NPCID.Sets.TrailCacheLength[NPC.type] * 1.5f; + float colorAlphaDivisor = NPCID.Sets.TrailCacheLength[Type] * 1.5f; int twoConst = 2; int coreID = 1; diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 5a7063bc11..409b7a4294 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.StormWeaver public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { Phase2Texture = ModContent.Request(Texture + "Naked", AssetRequestMode.AsyncLoad); @@ -276,7 +276,7 @@ namespace CalamityMod.NPCs.StormWeaver if (!phase3) chargePhaseGateValue *= 0.5f; - Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture.Width / 2, texture.Height / 2); float chargeTelegraphTime = 120f; float chargeTelegraphGateValue = chargePhaseGateValue - chargeTelegraphTime; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 5fa90eca1c..505cc3219a 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.StormWeaver public override void SetStaticDefaults() { - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -848,7 +848,7 @@ namespace CalamityMod.NPCs.StormWeaver if (!phase3) chargePhaseGateValue *= 0.5f; - Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture.Width / 2, texture.Height / 2); float chargeTelegraphTime = 120f; float chargeTelegraphGateValue = chargePhaseGateValue - chargeTelegraphTime; diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 41496ffbd5..d2bb8f811a 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.StormWeaver public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 1; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { Phase2Texture = ModContent.Request(Texture + "Naked", AssetRequestMode.AsyncLoad); @@ -272,7 +272,7 @@ namespace CalamityMod.NPCs.StormWeaver if (!phase3) chargePhaseGateValue *= 0.5f; - Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[NPC.type].Value; + Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture.Width / 2, texture.Height / 2); float chargeTelegraphTime = 120f; float chargeTelegraphGateValue = chargePhaseGateValue - chargeTelegraphTime; diff --git a/NPCs/SulphurousSea/AnthozoanCrab.cs b/NPCs/SulphurousSea/AnthozoanCrab.cs index 80ae0d2363..bcbe51c764 100644 --- a/NPCs/SulphurousSea/AnthozoanCrab.cs +++ b/NPCs/SulphurousSea/AnthozoanCrab.cs @@ -20,8 +20,8 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 16; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + Main.npcFrameCount[Type] = 16; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 diff --git a/NPCs/SulphurousSea/BelchingCoral.cs b/NPCs/SulphurousSea/BelchingCoral.cs index 4f806404e4..8a8a865748 100644 --- a/NPCs/SulphurousSea/BelchingCoral.cs +++ b/NPCs/SulphurousSea/BelchingCoral.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.SulphurousSea public const float CheckDistance = 480f; public override void SetStaticDefaults() { - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y += 4; value.PortraitPositionYOverride = 24f; diff --git a/NPCs/SulphurousSea/Gnasher.cs b/NPCs/SulphurousSea/Gnasher.cs index 9ebd137f18..d5b8fa1c15 100644 --- a/NPCs/SulphurousSea/Gnasher.cs +++ b/NPCs/SulphurousSea/Gnasher.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.SulphurousSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -149,7 +149,7 @@ namespace CalamityMod.NPCs.SulphurousSea } NPC.frameCounter += NPC.chaseable ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/SulphurousSea/Sulflounder.cs b/NPCs/SulphurousSea/Sulflounder.cs index ab9a4ac6da..8caf72e232 100644 --- a/NPCs/SulphurousSea/Sulflounder.cs +++ b/NPCs/SulphurousSea/Sulflounder.cs @@ -15,8 +15,8 @@ namespace CalamityMod.NPCs.SulphurousSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; + Main.npcFrameCount[Type] = 4; + NPCID.Sets.NeedsExpertScaling[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y -= 10f; value.PortraitPositionYOverride = -36f; @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.SulphurousSea else { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/SulphurousSea/Toxicatfish.cs b/NPCs/SulphurousSea/Toxicatfish.cs index 93de02fe43..10f1f085e9 100644 --- a/NPCs/SulphurousSea/Toxicatfish.cs +++ b/NPCs/SulphurousSea/Toxicatfish.cs @@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.SulphurousSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 4; + Main.npcFrameCount[Type] = 4; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.X += 10f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; @@ -89,7 +89,7 @@ namespace CalamityMod.NPCs.SulphurousSea return; } NPC.frameCounter += NPC.chaseable ? 0.15f : 0.075f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/SulphurousSea/Trasher.cs b/NPCs/SulphurousSea/Trasher.cs index fb4afc37b8..d289e3d104 100644 --- a/NPCs/SulphurousSea/Trasher.cs +++ b/NPCs/SulphurousSea/Trasher.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.SulphurousSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; + Main.npcFrameCount[Type] = 8; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1, diff --git a/NPCs/SunkenSea/AlphaSeaMinnow.cs b/NPCs/SunkenSea/AlphaSeaMinnow.cs index dd4fca62ae..58d3a2aeff 100644 --- a/NPCs/SunkenSea/AlphaSeaMinnow.cs +++ b/NPCs/SunkenSea/AlphaSeaMinnow.cs @@ -16,9 +16,9 @@ namespace CalamityMod.NPCs.SunkenSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -168,7 +168,7 @@ namespace CalamityMod.NPCs.SunkenSea return; } NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -194,9 +194,9 @@ namespace CalamityMod.NPCs.SunkenSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; this.HideFromBestiary(); } public override void SetDefaults() diff --git a/NPCs/SunkenSea/BabyGhostBell.cs b/NPCs/SunkenSea/BabyGhostBell.cs index 4e4e07ada1..bfa05e9ab3 100644 --- a/NPCs/SunkenSea/BabyGhostBell.cs +++ b/NPCs/SunkenSea/BabyGhostBell.cs @@ -51,9 +51,9 @@ namespace CalamityMod.NPCs.SunkenSea RedTexture = ModContent.Request("CalamityMod/NPCs/SunkenSea/BabyGhostBellRed", AssetRequestMode.ImmediateLoad).Value; GoldTexture = ModContent.Request("CalamityMod/NPCs/SunkenSea/BabyGhostBellGold", AssetRequestMode.ImmediateLoad).Value; } - Main.npcFrameCount[NPC.type] = 6; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 6; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -245,7 +245,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.SunkenSea if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; switch (Variant) { case (int)JellyColor.Red: @@ -311,9 +311,9 @@ namespace CalamityMod.NPCs.SunkenSea texture = GoldTexture; break; } - Vector2 origin = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[NPC.type] / 2); + Vector2 origin = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[Type] / 2); Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + npcOffset -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, npcOffset, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/BlindedAngler.cs b/NPCs/SunkenSea/BlindedAngler.cs index 9c25ad171b..d0e74c7310 100644 --- a/NPCs/SunkenSea/BlindedAngler.cs +++ b/NPCs/SunkenSea/BlindedAngler.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += (NPC.wet || NPC.IsABestiaryIconDummy) ? 0.15f : 0f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -97,9 +97,9 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/SunkenSea/Clam.cs b/NPCs/SunkenSea/Clam.cs index 8dab8e3ca5..8676d3664c 100644 --- a/NPCs/SunkenSea/Clam.cs +++ b/NPCs/SunkenSea/Clam.cs @@ -18,7 +18,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 diff --git a/NPCs/SunkenSea/EutrophicRay.cs b/NPCs/SunkenSea/EutrophicRay.cs index 334bda0bf2..d220440e7f 100644 --- a/NPCs/SunkenSea/EutrophicRay.cs +++ b/NPCs/SunkenSea/EutrophicRay.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.X += 24f; NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; @@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += (hasBeenHit || NPC.IsABestiaryIconDummy) ? 0.15f : 0f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -189,9 +189,9 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/SunkenSea/GhostBell.cs b/NPCs/SunkenSea/GhostBell.cs index 576696982a..156617ae6c 100644 --- a/NPCs/SunkenSea/GhostBell.cs +++ b/NPCs/SunkenSea/GhostBell.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; if (!Main.dedServ) { GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -151,9 +151,9 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index 081310a693..73b8adda9e 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 12; + Main.npcFrameCount[Type] = 12; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -516,20 +516,20 @@ namespace CalamityMod.NPCs.SunkenSea public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Main.EntitySpriteDraw(texture, NPC.Center - screenPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() * 0.5f, NPC.scale, 0, 0); return false; } public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D glowmask = GlowTexture.Value; SpriteEffects spriteEffects = SpriteEffects.None; Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)glowmask.Width, (float)(glowmask.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)glowmask.Width, (float)(glowmask.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.EntitySpriteDraw(glowmask, vector, NPC.frame, color, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0); diff --git a/NPCs/SunkenSea/HauntedChum.cs b/NPCs/SunkenSea/HauntedChum.cs index 68ee6f28cc..57434671d4 100644 --- a/NPCs/SunkenSea/HauntedChum.cs +++ b/NPCs/SunkenSea/HauntedChum.cs @@ -300,7 +300,7 @@ namespace CalamityMod.NPCs.SunkenSea } // Draw the chum itself and its jaw, rotated by localai[0] - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Vector2 origin = new Vector2(texture.Width / 2, texture.Height / 2); Vector2 jawOrigin = new Vector2(NPC.spriteDirection == 1 ? jawTexture.Width - 22 : 22, 4); Vector2 npcOffset = NPC.Center - screenPos; diff --git a/NPCs/SunkenSea/Jellyghoul.cs b/NPCs/SunkenSea/Jellyghoul.cs index 278b088890..881e89594a 100644 --- a/NPCs/SunkenSea/Jellyghoul.cs +++ b/NPCs/SunkenSea/Jellyghoul.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 1; + Main.npcFrameCount[Type] = 1; } public override void SetDefaults() @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -225,14 +225,14 @@ namespace CalamityMod.NPCs.SunkenSea spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[Type] / 2)); // Rotate back and forth like a bell float rotation = NPC.rotation + MathF.Sin(Main.GlobalTimeWrappedHourly + NPC.localAI[1]) * rotationMultiplier; Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); // Draws transparent clones around itself to look woozy diff --git a/NPCs/SunkenSea/KelpieSeadragon.cs b/NPCs/SunkenSea/KelpieSeadragon.cs index 10b9e74b71..7b5bcf3b6c 100644 --- a/NPCs/SunkenSea/KelpieSeadragon.cs +++ b/NPCs/SunkenSea/KelpieSeadragon.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.SunkenSea public ref float SquishY => ref NPC.localAI[1]; public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 13; + Main.npcFrameCount[Type] = 13; } public override void SetDefaults() diff --git a/NPCs/SunkenSea/LostShoal.cs b/NPCs/SunkenSea/LostShoal.cs index f2133fabec..637c73092e 100644 --- a/NPCs/SunkenSea/LostShoal.cs +++ b/NPCs/SunkenSea/LostShoal.cs @@ -37,15 +37,15 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.TrailingMode[Type] = 1; if (!Main.dedServ) { RedTexture = ModContent.Request("CalamityMod/NPCs/SunkenSea/LostShoalRed", AssetRequestMode.ImmediateLoad).Value; BlueTexture = ModContent.Request("CalamityMod/NPCs/SunkenSea/LostShoalBlue", AssetRequestMode.ImmediateLoad).Value; GoldTexture = ModContent.Request("CalamityMod/NPCs/SunkenSea/LostShoalGold", AssetRequestMode.ImmediateLoad).Value; } - NPCID.Sets.CountsAsCritter[NPC.type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() { @@ -328,7 +328,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.2f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -396,7 +396,7 @@ namespace CalamityMod.NPCs.SunkenSea spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); // Regular stuff for drawing the actual fish and its afterimages - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; switch (Variant) { case (int)ShoalColor.Blue: @@ -409,7 +409,7 @@ namespace CalamityMod.NPCs.SunkenSea texture = GoldTexture; break; } - Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[Type] / 2)); Color white = Color.White; float colorLerpAmt = 0.5f; int afterimageAmt = 7; @@ -423,7 +423,7 @@ namespace CalamityMod.NPCs.SunkenSea afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 offset = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - offset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + offset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; offset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, offset, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } @@ -432,7 +432,7 @@ namespace CalamityMod.NPCs.SunkenSea float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 3f + RandomOpacityOffset) / 2f + 0.5f; Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, npcOffset, NPC.frame, drawColor * MathHelper.Lerp(0.4f, 0.8f, sine), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/Pearlpod.cs b/NPCs/SunkenSea/Pearlpod.cs index 960a0cf244..e69ffade75 100644 --- a/NPCs/SunkenSea/Pearlpod.cs +++ b/NPCs/SunkenSea/Pearlpod.cs @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.SunkenSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override int PearlType => ItemID.WhitePearl; public override float SpawnRate => 0.6f; @@ -161,7 +161,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override int PearlType => ItemID.PinkPearl; @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override int PearlType => ItemID.BlackPearl; public override float SpawnRate => 0.05f; @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; } public override void SetDefaults() { diff --git a/NPCs/SunkenSea/PolypPanasea.cs b/NPCs/SunkenSea/PolypPanasea.cs index a4a814c1d0..fb5c240400 100644 --- a/NPCs/SunkenSea/PolypPanasea.cs +++ b/NPCs/SunkenSea/PolypPanasea.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.SunkenSea } public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; if (!Main.dedServ) { RadiantTexture = ModContent.Request("CalamityMod/NPCs/SunkenSea/PolypPanaseaRadiant", AssetRequestMode.ImmediateLoad).Value; @@ -58,8 +58,8 @@ namespace CalamityMod.NPCs.SunkenSea PurpleTextureCoated = ModContent.Request("CalamityMod/NPCs/SunkenSea/PolypPanaseaPurpleCoated", AssetRequestMode.ImmediateLoad).Value; TurquoiseTextureCoated = ModContent.Request("CalamityMod/NPCs/SunkenSea/PolypPanaseaTurquoiseCoated", AssetRequestMode.ImmediateLoad).Value; } - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -162,7 +162,7 @@ namespace CalamityMod.NPCs.SunkenSea return; } NPC.frameCounter += 0.1f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; NPC.ai[3] = frame; @@ -190,7 +190,7 @@ namespace CalamityMod.NPCs.SunkenSea if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; switch (Variant) { case (int)FishColor.Radiant: @@ -209,12 +209,12 @@ namespace CalamityMod.NPCs.SunkenSea texture = NPC.ai[2] >= 61 ? TurquoiseTextureCoated : TurquoiseTexture; break; case (int)FishColor.Red: - texture = NPC.ai[2] >= 61 ? TextureCoated : TextureAssets.Npc[NPC.type].Value; + texture = NPC.ai[2] >= 61 ? TextureCoated : TextureAssets.Npc[Type].Value; break; } - Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 origin = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[Type] / 2)); Vector2 npcOffset = NPC.Center - screenPos; - npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + npcOffset -= new Vector2((float)texture.Width, (float)(texture.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; npcOffset += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); Rectangle frame = texture.Frame(1, 6, 0, (int)NPC.ai[3]); spriteBatch.Draw(texture, npcOffset, frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/SunkenSea/PrismBack.cs b/NPCs/SunkenSea/PrismBack.cs index c83b9bfeee..93cf5411c5 100644 --- a/NPCs/SunkenSea/PrismBack.cs +++ b/NPCs/SunkenSea/PrismBack.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { PortraitPositionXOverride = 0 @@ -131,7 +131,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += (NPC.wet || NPC.IsABestiaryIconDummy) ? 0.1f : 0f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -144,9 +144,9 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); Vector2 vector = center - screenPos; - vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; + vector -= new Vector2((float)GlowTexture.Value.Width, (float)(GlowTexture.Value.Height / Main.npcFrameCount[Type])) * 1f / 2f; vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Blue); Main.spriteBatch.Draw(GlowTexture.Value, vector, diff --git a/NPCs/SunkenSea/SandProwlerNested.cs b/NPCs/SunkenSea/SandProwlerNested.cs index d93447a217..bcee5bc704 100644 --- a/NPCs/SunkenSea/SandProwlerNested.cs +++ b/NPCs/SunkenSea/SandProwlerNested.cs @@ -56,9 +56,9 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.TrailingMode[NPC.type] = 0; - NPCID.Sets.TrailCacheLength[NPC.type] = 60; - NPCID.Sets.UsesNewTargetting[NPC.type] = true; + NPCID.Sets.TrailingMode[Type] = 0; + NPCID.Sets.TrailCacheLength[Type] = 60; + NPCID.Sets.UsesNewTargetting[Type] = true; NPCID.Sets.CantTakeLunchMoney[Type] = true; Main.npcFrameCount[Type] = 11; } diff --git a/NPCs/SunkenSea/SeaFloaty.cs b/NPCs/SunkenSea/SeaFloaty.cs index 5d1d30a8af..5446f78115 100644 --- a/NPCs/SunkenSea/SeaFloaty.cs +++ b/NPCs/SunkenSea/SeaFloaty.cs @@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; + Main.npcFrameCount[Type] = 6; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { SpriteDirection = 1 @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void FindFrame(int frameHeight) { NPC.frameCounter += hasBeenHit ? 0.3f : 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/SunkenSea/SeaMinnow.cs b/NPCs/SunkenSea/SeaMinnow.cs index e18cf5ffc4..c753fb8f07 100644 --- a/NPCs/SunkenSea/SeaMinnow.cs +++ b/NPCs/SunkenSea/SeaMinnow.cs @@ -17,9 +17,9 @@ namespace CalamityMod.NPCs.SunkenSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; } public override void SetDefaults() @@ -327,7 +327,7 @@ namespace CalamityMod.NPCs.SunkenSea return; } NPC.frameCounter += 0.15f; - NPC.frameCounter %= Main.npcFrameCount[NPC.type]; + NPC.frameCounter %= Main.npcFrameCount[Type]; int frame = (int)NPC.frameCounter; NPC.frame.Y = frame * frameHeight; } @@ -344,9 +344,9 @@ namespace CalamityMod.NPCs.SunkenSea { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - Main.npcCatchable[NPC.type] = true; - NPCID.Sets.CountsAsCritter[NPC.type] = true; + Main.npcFrameCount[Type] = 8; + Main.npcCatchable[Type] = true; + NPCID.Sets.CountsAsCritter[Type] = true; this.HideFromBestiary(); } public override void SetDefaults() diff --git a/NPCs/SupremeCalamitas/BrimstoneHeart.cs b/NPCs/SupremeCalamitas/BrimstoneHeart.cs index 7ed262a922..bae53cbcbc 100644 --- a/NPCs/SupremeCalamitas/BrimstoneHeart.cs +++ b/NPCs/SupremeCalamitas/BrimstoneHeart.cs @@ -19,8 +19,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetStaticDefaults() { this.HideFromBestiary(); - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - Main.npcFrameCount[NPC.type] = 6; + NPCID.Sets.NeedsExpertScaling[Type] = true; + Main.npcFrameCount[Type] = 6; } public override void SetDefaults() @@ -100,9 +100,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.IsABestiaryIconDummy) NPC.Opacity = 1f; - int frame = (int)Math.Round((float)Math.Pow(Math.Sin(Main.GlobalTimeWrappedHourly * 2.6f + NPC.whoAmI * 1.3f), 6D) * Main.npcFrameCount[NPC.type]); - if (frame >= Main.npcFrameCount[NPC.type]) - frame = Main.npcFrameCount[NPC.type] - 1; + int frame = (int)Math.Round((float)Math.Pow(Math.Sin(Main.GlobalTimeWrappedHourly * 2.6f + NPC.whoAmI * 1.3f), 6D) * Main.npcFrameCount[Type]); + if (frame >= Main.npcFrameCount[Type]) + frame = Main.npcFrameCount[Type] - 1; NPC.frame.Y = frame * frameHeight; } diff --git a/NPCs/SupremeCalamitas/SepulcherArm.cs b/NPCs/SupremeCalamitas/SepulcherArm.cs index 4c7d0be1fa..e68ca7c25f 100644 --- a/NPCs/SupremeCalamitas/SepulcherArm.cs +++ b/NPCs/SupremeCalamitas/SepulcherArm.cs @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor_Unused) { - Texture2D armTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D armTexture = TextureAssets.Npc[Type].Value; Texture2D foreArmTexture = ForearmTexture.Value; Texture2D handTexture = HandTexture.Value; diff --git a/NPCs/SupremeCalamitas/SepulcherBody.cs b/NPCs/SupremeCalamitas/SepulcherBody.cs index e42d75f428..6778daf3d9 100644 --- a/NPCs/SupremeCalamitas/SepulcherBody.cs +++ b/NPCs/SupremeCalamitas/SepulcherBody.cs @@ -128,8 +128,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = NPC.localAI[3] / 2f % 2f == 0f ? AltTexture.Value : TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = NPC.localAI[3] / 2f % 2f == 0f ? AltTexture.Value : TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs b/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs index 86b4d8ba2b..32fd48411e 100644 --- a/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs +++ b/NPCs/SupremeCalamitas/SepulcherBodyEnergyBall.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetStaticDefaults() { this.HideFromBestiary(); - Main.npcFrameCount[NPC.type] = 5; + Main.npcFrameCount[Type] = 5; } public override void SetDefaults() @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void FindFrame(int frameHeight) { NPC.frameCounter++; - NPC.frame.Y = ((int)(NPC.frameCounter / 5) + NPC.whoAmI) % Main.npcFrameCount[NPC.type] * frameHeight; + NPC.frame.Y = ((int)(NPC.frameCounter / 5) + NPC.whoAmI) % Main.npcFrameCount[Type] * frameHeight; } public override void HitEffect(NPC.HitInfo hit) diff --git a/NPCs/SupremeCalamitas/SepulcherHead.cs b/NPCs/SupremeCalamitas/SepulcherHead.cs index 691de2e505..4be779a2fb 100644 --- a/NPCs/SupremeCalamitas/SepulcherHead.cs +++ b/NPCs/SupremeCalamitas/SepulcherHead.cs @@ -371,8 +371,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/SupremeCalamitas/SepulcherTail.cs b/NPCs/SupremeCalamitas/SepulcherTail.cs index 53cc0fd247..ea920d025f 100644 --- a/NPCs/SupremeCalamitas/SepulcherTail.cs +++ b/NPCs/SupremeCalamitas/SepulcherTail.cs @@ -162,8 +162,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index f5a4aad638..2bf50c9b9c 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -36,9 +36,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 6; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 6; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.frameCounter++; if (NPC.frameCounter % 5 == 4) NPC.frame.Y += frameHeight; - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type]) NPC.frame.Y = 0; } @@ -268,8 +268,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); int afterimageAmt = 2; if (CalamityClientConfig.Instance.Afterimages) @@ -281,14 +281,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (float)(afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -303,7 +303,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas redAfterimageColor = Color.Lerp(redAfterimageColor, Color.White, 0.5f); redAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 redAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - redAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + redAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; redAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, redAfterimagePos, NPC.frame, redAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index cf1ea60778..c7a2c4ffe1 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -241,8 +241,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 21; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 21; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -3609,18 +3609,18 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture2D15 = DownedBossSystem.downedCalamitas && !BossRushEvent.BossRushActive ? TextureAssets.Npc[NPC.type].Value : HoodedTexture.Value; + Texture2D texture2D15 = DownedBossSystem.downedCalamitas && !BossRushEvent.BossRushActive ? TextureAssets.Npc[Type].Value : HoodedTexture.Value; Texture2D pony = ModContent.Request("CalamityMod/Items/Mounts/AlicornMount_Front").Value; bool inPhase2 = NPC.ai[0] >= 3f && (NPC.life > NPC.lifeMax * 0.01 || cirrus); if (cirrus) texture2D15 = inPhase2 ? CirrusTexture2.Value : CirrusTexture.Value; - Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type] / 2f); + Vector2 halfSizeTexture = new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[Type] / 2f); Vector2 ponyOrigin = new Vector2(pony.Width / 2f, pony.Height / 30f); int afterimageAmt = 7; - Rectangle frame = texture2D15.Frame(2, Main.npcFrameCount[NPC.type], NPC.frame.Y / Main.npcFrameCount[NPC.type], NPC.frame.Y % Main.npcFrameCount[NPC.type]); + Rectangle frame = texture2D15.Frame(2, Main.npcFrameCount[Type], NPC.frame.Y / Main.npcFrameCount[Type], NPC.frame.Y % Main.npcFrameCount[Type]); Rectangle ponyFrame = pony.Frame(1, 15, 0, alicornFrame); Vector2 ponyPos = NPC.Center - screenPos; ponyPos -= new Vector2(pony.Width / 2f, pony.Height / 15) * NPC.scale / 2f; @@ -3635,14 +3635,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, afterimagePos, frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); if (!(cirrus && NPC.ai[1] == 2f)) diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index a414b15acd..bf96e5dac6 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -58,9 +58,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 9; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 9; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -138,8 +138,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas CurrentFrame = (int)Math.Round(MathHelper.Lerp(12f, 21f, punchInterpolant)); } - int xFrame = CurrentFrame / Main.npcFrameCount[NPC.type]; - int yFrame = CurrentFrame % Main.npcFrameCount[NPC.type]; + int xFrame = CurrentFrame / Main.npcFrameCount[Type]; + int yFrame = CurrentFrame % Main.npcFrameCount[Type]; NPC.frame.Width = 212; NPC.frame.Height = 208; @@ -471,7 +471,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Vector2 origin = NPC.frame.Size() * 0.5f; int afterimageCount = 4; diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index 57e9701d1f..34f058b979 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -51,9 +51,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 8; - NPCID.Sets.NeedsExpertScaling[NPC.type] = true; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 8; + NPCID.Sets.NeedsExpertScaling[Type] = true; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -132,8 +132,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas CurrentFrame = (int)Math.Round(MathHelper.Lerp(6f, 15f, slashInterpolant)); } - int xFrame = CurrentFrame / Main.npcFrameCount[NPC.type]; - int yFrame = CurrentFrame % Main.npcFrameCount[NPC.type]; + int xFrame = CurrentFrame / Main.npcFrameCount[Type]; + int yFrame = CurrentFrame % Main.npcFrameCount[Type]; NPC.frame.Width = 400; NPC.frame.Height = 230; @@ -508,7 +508,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; + Texture2D texture = TextureAssets.Npc[Type].Value; Vector2 origin = NPC.frame.Size() * 0.5f; int afterimageCount = 4; diff --git a/NPCs/TownNPCs/AndroombaFriendly.cs b/NPCs/TownNPCs/AndroombaFriendly.cs index 30516e97c9..f8837a9a2a 100644 --- a/NPCs/TownNPCs/AndroombaFriendly.cs +++ b/NPCs/TownNPCs/AndroombaFriendly.cs @@ -24,8 +24,8 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 9; - Main.npcCatchable[NPC.type] = true; + Main.npcFrameCount[Type] = 9; + Main.npcCatchable[Type] = true; NPCID.Sets.NoTownNPCHappiness[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(); value.Position.Y += 16; @@ -256,7 +256,7 @@ namespace CalamityMod.NPCs.TownNPCs public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; + Texture2D critterTexture = TextureAssets.Npc[Type].Value; Texture2D glowmask = FaceTextures[0].Value; // If the solution is from Calamity or vanilla, set the glowmask to grab the appropriate texture from the texture array if (NPC.ai[3] <= 8) diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index cd5fa24b15..57c2faef6d 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -27,13 +27,13 @@ namespace CalamityMod.NPCs.TownNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 25; - NPCID.Sets.ExtraFramesCount[NPC.type] = 9; - NPCID.Sets.AttackFrameCount[NPC.type] = 4; - NPCID.Sets.DangerDetectRange[NPC.type] = 700; - NPCID.Sets.AttackType[NPC.type] = 0; - NPCID.Sets.AttackTime[NPC.type] = 90; - NPCID.Sets.AttackAverageChance[NPC.type] = 30; + Main.npcFrameCount[Type] = 25; + NPCID.Sets.ExtraFramesCount[Type] = 9; + NPCID.Sets.AttackFrameCount[Type] = 4; + NPCID.Sets.DangerDetectRange[Type] = 700; + NPCID.Sets.AttackType[Type] = 0; + NPCID.Sets.AttackTime[Type] = 90; + NPCID.Sets.AttackAverageChance[Type] = 30; NPCID.Sets.ShimmerTownTransform[Type] = false; NPC.Happiness .SetBiomeAffection(AffectionLevel.Like) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index dfca0c5809..8b615ae941 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -33,13 +33,13 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 27; - NPCID.Sets.ExtraFramesCount[NPC.type] = 9; - NPCID.Sets.AttackFrameCount[NPC.type] = 4; - NPCID.Sets.DangerDetectRange[NPC.type] = 400; - NPCID.Sets.AttackType[NPC.type] = 0; - NPCID.Sets.AttackTime[NPC.type] = 60; - NPCID.Sets.AttackAverageChance[NPC.type] = 15; + Main.npcFrameCount[Type] = 27; + NPCID.Sets.ExtraFramesCount[Type] = 9; + NPCID.Sets.AttackFrameCount[Type] = 4; + NPCID.Sets.DangerDetectRange[Type] = 400; + NPCID.Sets.AttackType[Type] = 0; + NPCID.Sets.AttackTime[Type] = 60; + NPCID.Sets.AttackAverageChance[Type] = 15; NPCID.Sets.ShimmerTownTransform[Type] = false; NPC.Happiness .SetBiomeAffection(AffectionLevel.Love) @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.TownNPCs public override void FindFrame(int frameHeight) { - int extraFrameAmt = (NPC.isLikeATownNPC ? NPCID.Sets.ExtraFramesCount[NPC.type] : 0); + int extraFrameAmt = (NPC.isLikeATownNPC ? NPCID.Sets.ExtraFramesCount[Type] : 0); if (NPC.velocity.Y == 0f) { if (NPC.direction == 1) @@ -101,7 +101,7 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.direction == -1) NPC.spriteDirection = -1; - int nonAttackFrames = Main.npcFrameCount[NPC.type] - NPCID.Sets.AttackFrameCount[NPC.type]; + int nonAttackFrames = Main.npcFrameCount[Type] - NPCID.Sets.AttackFrameCount[Type]; if (NPC.ai[0] == 23f) { NPC.frameCounter += 1D; @@ -287,7 +287,7 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.ai[1] < 10f) num254 = 0; - num254 = Main.npcFrameCount[NPC.type] - 2; + num254 = Main.npcFrameCount[Type] - 2; NPC.frame.Y = frameHeight * num254; } else if (NPC.ai[0] == 10f || NPC.ai[0] == 13f) // Attacking @@ -323,7 +323,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.frameCounter = 0D; } - float num260 = NPC.ai[1] / (float)NPCID.Sets.AttackTime[NPC.type]; + float num260 = NPC.ai[1] / (float)NPCID.Sets.AttackTime[Type]; int num261 = 0; num261 = ((num260 > 0.65f) ? nonAttackFrames : ((num260 > 0.5f) ? @@ -632,7 +632,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.frameCounter = 0D; } - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type] - extraFrameAmt) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - extraFrameAmt) NPC.frame.Y = walkFrameHeightLimit; } @@ -814,7 +814,7 @@ namespace CalamityMod.NPCs.TownNPCs return false; var something = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - spriteBatch.Draw(BirthdayParty.PartyIsUp ? AltTexture.Value : TextureAssets.Npc[NPC.type].Value, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY) - new Vector2(0f, 6f), NPC.frame, drawColor, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); + spriteBatch.Draw(BirthdayParty.PartyIsUp ? AltTexture.Value : TextureAssets.Npc[Type].Value, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY) - new Vector2(0f, 6f), NPC.frame, drawColor, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); return false; } diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index 34086a10c7..7ad7960bd0 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -24,14 +24,14 @@ namespace CalamityMod.NPCs.TownNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 25; - NPCID.Sets.ExtraFramesCount[NPC.type] = 5; - NPCID.Sets.AttackFrameCount[NPC.type] = 4; - NPCID.Sets.DangerDetectRange[NPC.type] = 700; - NPCID.Sets.AttackType[NPC.type] = 0; - NPCID.Sets.AttackTime[NPC.type] = 90; - NPCID.Sets.AttackAverageChance[NPC.type] = 30; - NPCID.Sets.HatOffsetY[NPC.type] = 16; + Main.npcFrameCount[Type] = 25; + NPCID.Sets.ExtraFramesCount[Type] = 5; + NPCID.Sets.AttackFrameCount[Type] = 4; + NPCID.Sets.DangerDetectRange[Type] = 700; + NPCID.Sets.AttackType[Type] = 0; + NPCID.Sets.AttackTime[Type] = 90; + NPCID.Sets.AttackAverageChance[Type] = 30; + NPCID.Sets.HatOffsetY[Type] = 16; NPCID.Sets.ShimmerTownTransform[Type] = false; NPC.Happiness .SetBiomeAffection(AffectionLevel.Like) diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 92759994da..5285782aa9 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -30,13 +30,13 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 23; - NPCID.Sets.ExtraFramesCount[NPC.type] = 9; - NPCID.Sets.AttackFrameCount[NPC.type] = 4; - NPCID.Sets.DangerDetectRange[NPC.type] = 500; - NPCID.Sets.AttackType[NPC.type] = 0; - NPCID.Sets.AttackTime[NPC.type] = 60; - NPCID.Sets.AttackAverageChance[NPC.type] = 10; + Main.npcFrameCount[Type] = 23; + NPCID.Sets.ExtraFramesCount[Type] = 9; + NPCID.Sets.AttackFrameCount[Type] = 4; + NPCID.Sets.DangerDetectRange[Type] = 500; + NPCID.Sets.AttackType[Type] = 0; + NPCID.Sets.AttackTime[Type] = 60; + NPCID.Sets.AttackAverageChance[Type] = 10; NPCID.Sets.ShimmerTownTransform[Type] = false; NPC.Happiness .SetBiomeAffection(AffectionLevel.Like) @@ -276,7 +276,7 @@ namespace CalamityMod.NPCs.TownNPCs return false; var something = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - spriteBatch.Draw(BirthdayParty.PartyIsUp ? AltTexture.Value : TextureAssets.Npc[NPC.type].Value, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY) - new Vector2(0f, 6f), NPC.frame, drawColor, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); + spriteBatch.Draw(BirthdayParty.PartyIsUp ? AltTexture.Value : TextureAssets.Npc[Type].Value, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY) - new Vector2(0f, 6f), NPC.frame, drawColor, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); return false; } diff --git a/NPCs/TownNPCs/WITCH.cs b/NPCs/TownNPCs/WITCH.cs index 13c9dec43a..bf23526d8f 100644 --- a/NPCs/TownNPCs/WITCH.cs +++ b/NPCs/TownNPCs/WITCH.cs @@ -26,13 +26,13 @@ namespace CalamityMod.NPCs.TownNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 27; - NPCID.Sets.ExtraFramesCount[NPC.type] = 11; - NPCID.Sets.AttackFrameCount[NPC.type] = 6; - NPCID.Sets.DangerDetectRange[NPC.type] = 700; - NPCID.Sets.AttackType[NPC.type] = 1; - NPCID.Sets.AttackTime[NPC.type] = 30; - NPCID.Sets.AttackAverageChance[NPC.type] = 5; + Main.npcFrameCount[Type] = 27; + NPCID.Sets.ExtraFramesCount[Type] = 11; + NPCID.Sets.AttackFrameCount[Type] = 6; + NPCID.Sets.DangerDetectRange[Type] = 700; + NPCID.Sets.AttackType[Type] = 1; + NPCID.Sets.AttackTime[Type] = 30; + NPCID.Sets.AttackAverageChance[Type] = 5; NPCID.Sets.ShimmerTownTransform[Type] = false; NPC.Happiness .SetBiomeAffection(AffectionLevel.Like) @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.TownNPCs public override void FindFrame(int frameHeight) { - int extraFrameAmt = (NPC.isLikeATownNPC ? NPCID.Sets.ExtraFramesCount[NPC.type] : 0); + int extraFrameAmt = (NPC.isLikeATownNPC ? NPCID.Sets.ExtraFramesCount[Type] : 0); if (NPC.velocity.Y == 0f) { if (NPC.direction == 1) @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.direction == -1) NPC.spriteDirection = -1; - int nonAttackFrames = Main.npcFrameCount[NPC.type] - NPCID.Sets.AttackFrameCount[NPC.type]; + int nonAttackFrames = Main.npcFrameCount[Type] - NPCID.Sets.AttackFrameCount[Type]; if (NPC.ai[0] == 23f) { NPC.frameCounter += 1D; @@ -276,7 +276,7 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.ai[1] < 10f) num254 = 0; - num254 = Main.npcFrameCount[NPC.type] - 2; + num254 = Main.npcFrameCount[Type] - 2; NPC.frame.Y = frameHeight * num254; } else if (NPC.ai[0] == 10f || NPC.ai[0] == 13f) // Attacking @@ -312,7 +312,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.frameCounter = 0D; } - float num260 = NPC.ai[1] / (float)NPCID.Sets.AttackTime[NPC.type]; + float num260 = NPC.ai[1] / (float)NPCID.Sets.AttackTime[Type]; int num261 = 0; num261 = ((num260 > 0.65f) ? nonAttackFrames : ((num260 > 0.5f) ? @@ -621,7 +621,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.frameCounter = 0D; } - if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[NPC.type] - extraFrameAmt) + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - extraFrameAmt) NPC.frame.Y = walkFrameHeightLimit; } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index c5a60530b0..b23d3bc8cd 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -77,8 +77,8 @@ namespace CalamityMod.NPCs.Yharon public override void SetStaticDefaults() { - Main.npcFrameCount[NPC.type] = 7; - NPCID.Sets.TrailingMode[NPC.type] = 1; + Main.npcFrameCount[Type] = 7; + NPCID.Sets.TrailingMode[Type] = 1; NPCID.Sets.BossBestiaryPriority.Add(Type); NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { @@ -2729,8 +2729,8 @@ namespace CalamityMod.NPCs.Yharon if (NPC.spriteDirection == 1) spriteEffects = ai2 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 halfSizeTexture = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[NPC.type] / 2); + Texture2D texture = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[Type] / 2); Color color = drawColor; Color invincibleColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); Color lerpEndColor = Color.White; @@ -2782,7 +2782,7 @@ namespace CalamityMod.NPCs.Yharon afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (afterimageAmt - i) / 15f; Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } @@ -2831,14 +2831,14 @@ namespace CalamityMod.NPCs.Yharon additionalAfterimageColor = NPC.GetAlpha(additionalAfterimageColor); additionalAfterimageColor *= 1f - additionalAfterimageOpacity; Vector2 additionalAfterimagePos = NPC.Center + (k / (float)additionalAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScale * additionalAfterimageOpacity - screenPos; - additionalAfterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + additionalAfterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; additionalAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, additionalAfterimagePos, NPC.frame, additionalAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, drawLocation, NPC.frame, invincible ? invincibleColor : NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -2907,7 +2907,7 @@ namespace CalamityMod.NPCs.Yharon orangeAfterimageColor = Color.Lerp(orangeAfterimageColor, lerpEndColor, lerpInterpolateValue); orangeAfterimageColor *= (afterimageAmt - l) / 15f; Vector2 glowmaskAfterimagePos = NPC.oldPos[l] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - glowmaskAfterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + glowmaskAfterimagePos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; glowmaskAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, glowmaskAfterimagePos, NPC.frame, orangeAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); @@ -2935,7 +2935,7 @@ namespace CalamityMod.NPCs.Yharon additionalOrangeColor = NPC.GetAlpha(additionalOrangeColor); additionalOrangeColor *= 1f - additionalAfterimageOpacity; Vector2 additionalGlowmaskPos = NPC.Center + (m / (float)additionalAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScale * additionalAfterimageOpacity - screenPos; - additionalGlowmaskPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + additionalGlowmaskPos -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; additionalGlowmaskPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, additionalGlowmaskPos, NPC.frame, additionalOrangeColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); From c4df4a342f53ac378ae5a3280e157c2d1c09eb18 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:48:00 +0700 Subject: [PATCH 21/21] Type (projectile) --- .../BaseLaserbeamProjectile.cs | 8 +- .../BaseProjectiles/BaseSpearProjectile.cs | 2 +- .../BaseProjectiles/BaseWhipProjectile.cs | 2 +- Projectiles/Boss/ApolloChargeTelegraph.cs | 2 +- Projectiles/Boss/ApolloFireball.cs | 8 +- Projectiles/Boss/ApolloRocket.cs | 12 +-- Projectiles/Boss/AresDeathBeamStart.cs | 14 ++-- Projectiles/Boss/AresDeathBeamTelegraph.cs | 2 +- Projectiles/Boss/AresGaussNukeProjectile.cs | 12 +-- .../Boss/AresGaussNukeProjectileBoom.cs | 2 +- .../Boss/AresGaussNukeProjectileSpark.cs | 8 +- Projectiles/Boss/AresLaserBeamStart.cs | 4 +- Projectiles/Boss/AresPlasmaBolt.cs | 8 +- Projectiles/Boss/AresPlasmaFireball.cs | 8 +- Projectiles/Boss/AresTeslaOrb.cs | 10 +-- Projectiles/Boss/ArtemisChargeTelegraph.cs | 2 +- Projectiles/Boss/ArtemisDeathrayTelegraph.cs | 2 +- Projectiles/Boss/ArtemisLaser.cs | 6 +- Projectiles/Boss/ArtemisSpinLaserbeam.cs | 8 +- Projectiles/Boss/AstralFlame.cs | 8 +- Projectiles/Boss/AstralGodRay.cs | 4 +- Projectiles/Boss/AstralLaser.cs | 8 +- Projectiles/Boss/AstralShot2.cs | 8 +- Projectiles/Boss/BigFlare.cs | 8 +- Projectiles/Boss/BigFlare2.cs | 8 +- Projectiles/Boss/BirbAura.cs | 4 +- Projectiles/Boss/BloodGeyser.cs | 6 +- Projectiles/Boss/BrimstoneBarrage.cs | 8 +- Projectiles/Boss/BrimstoneFire.cs | 2 +- Projectiles/Boss/BrimstoneHellblast.cs | 8 +- Projectiles/Boss/BrimstoneHellblast2.cs | 6 +- Projectiles/Boss/BrimstoneHellfireball.cs | 8 +- Projectiles/Boss/BrimstoneMonster.cs | 2 +- Projectiles/Boss/BrimstoneRay.cs | 4 +- Projectiles/Boss/BrimstoneTargetRay.cs | 4 +- Projectiles/Boss/BrimstoneWave.cs | 6 +- Projectiles/Boss/CirrusBlast.cs | 10 +-- .../Boss/CirrusPhotonRipperPrismTooth.cs | 4 +- .../Boss/CirrusPhotonRipperProjectile.cs | 2 +- Projectiles/Boss/CirrusVolatileVodkaBottle.cs | 2 +- Projectiles/Boss/CursedFire.cs | 2 +- Projectiles/Boss/DarkEnergyBall.cs | 12 +-- Projectiles/Boss/DarkEnergyBall2.cs | 12 +-- Projectiles/Boss/DarkOrb.cs | 6 +- Projectiles/Boss/DesertScourgeDiveSplash.cs | 6 +- Projectiles/Boss/DesertScourgeSpit.cs | 10 +-- Projectiles/Boss/DeusRitualDrama.cs | 2 +- Projectiles/Boss/DoGBeam.cs | 2 +- Projectiles/Boss/DoGBeamPortal.cs | 2 +- Projectiles/Boss/DoGDeath.cs | 2 +- Projectiles/Boss/DoGDeathBoom.cs | 2 +- Projectiles/Boss/DoGFire.cs | 8 +- Projectiles/Boss/DoGP1EndPortal.cs | 2 +- Projectiles/Boss/DoGTeleportRift.cs | 2 +- Projectiles/Boss/DraedonSummonLaser.cs | 2 +- Projectiles/Boss/DyingSun.cs | 2 +- Projectiles/Boss/Flare.cs | 8 +- Projectiles/Boss/FlareBomb.cs | 8 +- Projectiles/Boss/FlareDust.cs | 8 +- Projectiles/Boss/FlareDust2.cs | 8 +- Projectiles/Boss/Flarenado.cs | 8 +- Projectiles/Boss/FoveanatorEnergyBomb.cs | 2 +- Projectiles/Boss/FoveanatorFlamethrower.cs | 2 +- Projectiles/Boss/FoveanatorLaser.cs | 8 +- Projectiles/Boss/FrostMist.cs | 10 +-- Projectiles/Boss/GreatSandBlast.cs | 6 +- Projectiles/Boss/HiveBombGoliath.cs | 14 ++-- Projectiles/Boss/HolyAura.cs | 4 +- Projectiles/Boss/HolyBlast.cs | 6 +- Projectiles/Boss/HolyBomb.cs | 6 +- Projectiles/Boss/HolyBurnOrb.cs | 2 +- Projectiles/Boss/HolyExplosionBoom.cs | 2 +- Projectiles/Boss/HolyFire.cs | 6 +- Projectiles/Boss/HolyFire2.cs | 6 +- Projectiles/Boss/HolyFlare.cs | 6 +- Projectiles/Boss/HolyLight.cs | 2 +- Projectiles/Boss/HolySpear.cs | 6 +- Projectiles/Boss/HomingGasBulb.cs | 6 +- Projectiles/Boss/HomingGasBulbSporeGas.cs | 8 +- Projectiles/Boss/HomingLaserDart.cs | 8 +- Projectiles/Boss/IchorBlob.cs | 8 +- Projectiles/Boss/IchorShot.cs | 8 +- Projectiles/Boss/Infernado.cs | 8 +- Projectiles/Boss/Infernado2.cs | 8 +- Projectiles/Boss/InfernadoRevenge.cs | 2 +- Projectiles/Boss/JewelProjectile.cs | 6 +- Projectiles/Boss/LeviathanBomb.cs | 2 +- Projectiles/Boss/LeviathanSpawner.cs | 2 +- Projectiles/Boss/MajesticSparkle.cs | 2 +- Projectiles/Boss/MoltenBlast.cs | 6 +- Projectiles/Boss/MoltenBlob.cs | 6 +- Projectiles/Boss/MushBomb.cs | 10 +-- Projectiles/Boss/MushBombFall.cs | 10 +-- Projectiles/Boss/OldDukeGore.cs | 6 +- Projectiles/Boss/OldDukeSummonDrop.cs | 6 +- Projectiles/Boss/OldDukeVortex.cs | 6 +- .../Boss/OverlyDramaticDukeSummoner.cs | 8 +- Projectiles/Boss/PeanutRocket.cs | 6 +- Projectiles/Boss/PlagueStingerGoliath.cs | 6 +- Projectiles/Boss/PlagueStingerGoliathV2.cs | 6 +- Projectiles/Boss/ProfanedSpear.cs | 8 +- Projectiles/Boss/ProvidenceCrystal.cs | 4 +- Projectiles/Boss/ProvidenceCrystalShard.cs | 4 +- Projectiles/Boss/ProvidenceHolyRay.cs | 2 +- Projectiles/Boss/RavagerBlast.cs | 10 +-- Projectiles/Boss/RedLightning.cs | 4 +- Projectiles/Boss/RedLightningFeather.cs | 8 +- Projectiles/Boss/SCalBrimstoneFireblast.cs | 6 +- Projectiles/Boss/SCalBrimstoneGigablast.cs | 6 +- Projectiles/Boss/SCalRitualDrama.cs | 2 +- Projectiles/Boss/SandBlast.cs | 6 +- Projectiles/Boss/SandPoisonCloud.cs | 10 +-- Projectiles/Boss/SandPoisonCloudOldDuke.cs | 10 +-- Projectiles/Boss/SandTooth.cs | 2 +- Projectiles/Boss/ScavengerNuke.cs | 2 +- Projectiles/Boss/ShadeNimbusHostile.cs | 2 +- Projectiles/Boss/Shadowflamethrower.cs | 2 +- Projectiles/Boss/SignusScythe.cs | 6 +- Projectiles/Boss/SirenSong.cs | 6 +- Projectiles/Boss/SkyFlare.cs | 6 +- Projectiles/Boss/SkyFlareRevenge.cs | 6 +- Projectiles/Boss/SporeGasPlantera.cs | 8 +- Projectiles/Boss/SupremeCataclysmFist.cs | 8 +- Projectiles/Boss/SupremeCatastropheSlash.cs | 8 +- Projectiles/Boss/THanosSideLaser.cs | 6 +- Projectiles/Boss/ThanatosBeamStart.cs | 16 ++-- Projectiles/Boss/ThanatosBeamTelegraph.cs | 2 +- Projectiles/Boss/ThanatosLaser.cs | 6 +- Projectiles/Boss/ThornBallSpike.cs | 6 +- Projectiles/Boss/ToxicCloud.cs | 10 +-- Projectiles/Boss/UnstableCrimulanGlob.cs | 2 +- Projectiles/Boss/UnstableEbonianGlob.cs | 2 +- Projectiles/Boss/WaterSpear.cs | 6 +- Projectiles/Boss/YharonBulletHellVortex.cs | 2 +- Projectiles/Boss/YharonFireball.cs | 12 +-- Projectiles/Boss/YharonFireball2.cs | 10 +-- .../AnomalysNanogunMPFBDevastator.cs | 4 +- .../AnomalysNanogunPlasmaBeam.cs | 8 +- .../FrequencyManipulatorEnergy.cs | 4 +- .../GalvanizingGlaiveProjectile.cs | 6 +- .../DraedonsArsenal/GatlingLaserProj.cs | 4 +- .../DraedonsArsenal/GaussPistolShot.cs | 4 +- .../HydraulicVoltCrasherProjectile.cs | 8 +- .../DraedonsArsenal/MassivePlasmaExplosion.cs | 2 +- .../DraedonsArsenal/MountedScannerLaser.cs | 2 +- .../DraedonsArsenal/MountedScannerSummon.cs | 6 +- .../DraedonsArsenal/PhaseslayerBeam.cs | 4 +- .../DraedonsArsenal/PhaseslayerProjectile.cs | 6 +- .../PlasmaGrenadeSmallExplosion.cs | 2 +- .../DraedonsArsenal/PoleWarperSummon.cs | 8 +- .../DraedonsArsenal/PulsePistolShot.cs | 4 +- Projectiles/DraedonsArsenal/PulseTurret.cs | 4 +- .../DraedonsArsenal/PulseTurretShot.cs | 2 +- .../DraedonsArsenal/SnakeEyesProjectile.cs | 2 +- .../DraedonsArsenal/SnakeEyesSummon.cs | 2 +- .../DraedonsArsenal/StarSwallowerAcid.cs | 8 +- .../DraedonsArsenal/StarSwallowerSummon.cs | 10 +-- .../DraedonsArsenal/SystemBaneLightning.cs | 8 +- .../DraedonsArsenal/SystemBaneProjectile.cs | 2 +- Projectiles/DraedonsArsenal/TaserHook.cs | 2 +- .../DraedonsArsenal/TrackingDiskProjectile.cs | 6 +- Projectiles/Enemy/AstralMeteorProj.cs | 6 +- Projectiles/Enemy/BelchingCoralSpike.cs | 6 +- Projectiles/Enemy/CrabBoulder.cs | 6 +- Projectiles/Enemy/CragmawVibeCheckChain.cs | 2 +- Projectiles/Enemy/CrimsonSpike.cs | 2 +- Projectiles/Enemy/EarthRockBig.cs | 2 +- Projectiles/Enemy/EarthRockSmall.cs | 2 +- Projectiles/Enemy/FlakAcid.cs | 6 +- Projectiles/Enemy/GammRayBurst.cs | 8 +- Projectiles/Enemy/GammaAcid.cs | 6 +- .../Enemy/IceClasperEnemyProjectile.cs | 6 +- Projectiles/Enemy/InkBombHostile.cs | 4 +- Projectiles/Enemy/InkPoisonCloud.cs | 8 +- Projectiles/Enemy/JellyghoulBolt.cs | 8 +- Projectiles/Enemy/LightningCloud.cs | 2 +- Projectiles/Enemy/MantisRing.cs | 8 +- Projectiles/Enemy/MaulerAcidBubble.cs | 8 +- Projectiles/Enemy/NuclearToadGoo.cs | 2 +- Projectiles/Enemy/PearlBurst.cs | 2 +- Projectiles/Enemy/PearlRain.cs | 2 +- Projectiles/Enemy/StormMarkHostile.cs | 4 +- Projectiles/Enemy/SulphuricAcidBubble.cs | 6 +- Projectiles/Enemy/SulphuricAcidMist.cs | 4 +- Projectiles/Enemy/TornadoHostile.cs | 4 +- Projectiles/Enemy/ToxicMinnowCloud.cs | 6 +- Projectiles/Environment/AcidDrop.cs | 6 +- Projectiles/Environment/HotSteam.cs | 2 +- Projectiles/Environment/LavaChunk.cs | 6 +- Projectiles/Environment/MurkySteam.cs | 2 +- Projectiles/Environment/ThermalSteam.cs | 2 +- Projectiles/Environment/WaterAlgae.cs | 6 +- Projectiles/Healing/EssenceFlame.cs | 2 +- Projectiles/Healing/GladiatorHealOrb.cs | 4 +- Projectiles/Healing/PhantomicHeart.cs | 6 +- Projectiles/Magic/AcidicSaxBubble.cs | 6 +- Projectiles/Magic/AcidicSaxMist.cs | 2 +- Projectiles/Magic/AnahitasArpeggioNote.cs | 6 +- Projectiles/Magic/Ancient2.cs | 8 +- Projectiles/Magic/ApotheosisEnergy.cs | 4 +- Projectiles/Magic/ApotheosisWorm.cs | 6 +- Projectiles/Magic/AquamarineBolt.cs | 6 +- Projectiles/Magic/ArtAttackStar.cs | 6 +- Projectiles/Magic/Asteroid.cs | 6 +- Projectiles/Magic/AsteroidMolten.cs | 8 +- Projectiles/Magic/AstralCrystal.cs | 8 +- Projectiles/Magic/AstralStarMagic.cs | 6 +- Projectiles/Magic/AstralachneaFang.cs | 6 +- Projectiles/Magic/AtlantisSpear.cs | 2 +- Projectiles/Magic/BeamStar.cs | 6 +- Projectiles/Magic/BeamingBolt.cs | 2 +- Projectiles/Magic/BeamingBolt2.cs | 2 +- Projectiles/Magic/BeastScythe.cs | 6 +- Projectiles/Magic/BlackAnurianPlankton.cs | 2 +- Projectiles/Magic/BlueBubble.cs | 6 +- .../Magic/BrimstoneHellfireballFriendly.cs | 8 +- Projectiles/Magic/CauldronProj.cs | 6 +- Projectiles/Magic/CauldronProjSmall.cs | 6 +- .../Magic/ChronomancersScytheHoldout.cs | 2 +- Projectiles/Magic/ChronomancersScytheSwing.cs | 4 +- Projectiles/Magic/ClamorNoctusStar.cs | 6 +- Projectiles/Magic/ClamorNoctusWyvern.cs | 2 +- Projectiles/Magic/ClimaxProj.cs | 6 +- Projectiles/Magic/CryoBlast.cs | 8 +- Projectiles/Magic/DarkSparkBeam.cs | 2 +- Projectiles/Magic/DarkSparkPrism.cs | 10 +-- .../Magic/DeathValleyDusterProjectile.cs | 10 +-- Projectiles/Magic/DivineRetributionSpear.cs | 6 +- Projectiles/Magic/EelDrop.cs | 6 +- Projectiles/Magic/EidolicWailSoundwave.cs | 6 +- Projectiles/Magic/EternityBook.cs | 8 +- Projectiles/Magic/EternityCrystal.cs | 6 +- Projectiles/Magic/EternityHex.cs | 4 +- Projectiles/Magic/EventHorizonBlackhole.cs | 4 +- Projectiles/Magic/EventHorizonStar.cs | 8 +- Projectiles/Magic/EvergladeSprayProjectile.cs | 2 +- Projectiles/Magic/ExoVortex.cs | 4 +- Projectiles/Magic/ExoVortex2.cs | 4 +- Projectiles/Magic/FabBolt.cs | 4 +- Projectiles/Magic/FabRay.cs | 4 +- Projectiles/Magic/FatesRevealFlame.cs | 2 +- Projectiles/Magic/FlareBoltProjectile.cs | 6 +- Projectiles/Magic/ForbiddenAxeBlade.cs | 6 +- Projectiles/Magic/ForbiddenSunProjectile.cs | 4 +- .../Magic/FrigidflashBoltProjectile.cs | 6 +- Projectiles/Magic/FrostBoltProjectile.cs | 6 +- Projectiles/Magic/GammaLaser.cs | 6 +- Projectiles/Magic/GhastlyBlast.cs | 6 +- Projectiles/Magic/GhastlyVisageProj.cs | 6 +- Projectiles/Magic/GranitePulse.cs | 8 +- Projectiles/Magic/HadalUrnIsopod.cs | 2 +- Projectiles/Magic/HadalUrnJellyfish.cs | 8 +- Projectiles/Magic/HadalUrnLamprey.cs | 12 +-- Projectiles/Magic/HadalUrnStarfish.cs | 4 +- Projectiles/Magic/HellwingBat.cs | 10 +-- Projectiles/Magic/HeresyProj.cs | 12 +-- Projectiles/Magic/HolyFlame.cs | 2 +- Projectiles/Magic/IceCluster.cs | 6 +- Projectiles/Magic/IncineratingFireball.cs | 4 +- Projectiles/Magic/InfernadoFriendly.cs | 8 +- Projectiles/Magic/InfernalBlade.cs | 8 +- Projectiles/Magic/InfernalBlade2.cs | 8 +- Projectiles/Magic/IonBlast.cs | 6 +- Projectiles/Magic/KeelhaulGeyserBottom.cs | 2 +- Projectiles/Magic/KeelhaulGeyserTop.cs | 2 +- Projectiles/Magic/LightBlade.cs | 6 +- Projectiles/Magic/LiquidBlade.cs | 8 +- Projectiles/Magic/LiquidBlade2.cs | 8 +- Projectiles/Magic/LuxorsGiftMagic.cs | 6 +- Projectiles/Magic/MagneticOrb.cs | 6 +- Projectiles/Magic/ManaChargedCoral.cs | 4 +- Projectiles/Magic/ManaMonster.cs | 6 +- Projectiles/Magic/MelterAmp.cs | 2 +- Projectiles/Magic/MeteorStar.cs | 12 +-- Projectiles/Magic/MeteorStarExplosion.cs | 4 +- Projectiles/Magic/MiasmaGas.cs | 6 +- Projectiles/Magic/NanoPurgeHoldout.cs | 2 +- Projectiles/Magic/NebulaCloud.cs | 4 +- Projectiles/Magic/NebulaCloudCore.cs | 14 ++-- Projectiles/Magic/NebulaNova.cs | 2 +- Projectiles/Magic/NebulousCataclysm_Held.cs | 2 +- Projectiles/Magic/NettleRight.cs | 2 +- Projectiles/Magic/NuclearFuryProjectile.cs | 6 +- Projectiles/Magic/OmicronWingman.cs | 2 +- Projectiles/Magic/PartySparkle.cs | 2 +- Projectiles/Magic/PhantasmalFuryProj.cs | 10 +-- Projectiles/Magic/PhasedGodRay.cs | 4 +- Projectiles/Magic/PoseidonTyphoon.cs | 2 +- .../Magic/PrimordialAncientProjectile.cs | 10 +-- .../Magic/PrimordialEarthProjectile.cs | 10 +-- Projectiles/Magic/PrinceFlameLarge.cs | 8 +- Projectiles/Magic/PrinceFlameSmall.cs | 10 +-- Projectiles/Magic/RainbowComet.cs | 12 +-- Projectiles/Magic/RainbowRocket.cs | 12 +-- Projectiles/Magic/RancorArm.cs | 8 +- Projectiles/Magic/RancorFog.cs | 2 +- Projectiles/Magic/RancorHoldout.cs | 4 +- Projectiles/Magic/RancorMagicCircle.cs | 2 +- Projectiles/Magic/RancorSmallCinder.cs | 4 +- Projectiles/Magic/RedirectingGildedSoul.cs | 10 +-- Projectiles/Magic/RedirectingLostSoul.cs | 10 +-- Projectiles/Magic/RedirectingVengefulSoul.cs | 10 +-- Projectiles/Magic/RougeSlashLarge.cs | 6 +- Projectiles/Magic/RougeSlashMedium.cs | 6 +- Projectiles/Magic/RougeSlashSmall.cs | 6 +- Projectiles/Magic/SHPB.cs | 2 +- Projectiles/Magic/SanguineFlareProj.cs | 6 +- .../SeethingDischargeBrimstoneBarrage.cs | 8 +- .../SeethingDischargeBrimstoneHellblast.cs | 8 +- Projectiles/Magic/SerpentineBody.cs | 2 +- Projectiles/Magic/SerpentineHead.cs | 2 +- Projectiles/Magic/SerpentineTail.cs | 2 +- Projectiles/Magic/ShadeNimbusCloud.cs | 4 +- Projectiles/Magic/ShadecrystalProjectile.cs | 6 +- Projectiles/Magic/Shadowbolt.cs | 2 +- Projectiles/Magic/ShiftingSandsProj.cs | 6 +- Projectiles/Magic/SlitheringEelProjectile.cs | 4 +- Projectiles/Magic/SmallSpirit.cs | 4 +- Projectiles/Magic/Snowflake.cs | 6 +- Projectiles/Magic/SnowflakeIceStar.cs | 6 +- Projectiles/Magic/SparklingLaser.cs | 10 +-- Projectiles/Magic/SpiritCongregation.cs | 6 +- Projectiles/Magic/Starblast.cs | 6 +- Projectiles/Magic/StickyFeather.cs | 6 +- Projectiles/Magic/TacticiansTrumpCardProj.cs | 2 +- Projectiles/Magic/TearsofHeavenProjectile.cs | 6 +- Projectiles/Magic/Teslabeam.cs | 2 +- Projectiles/Magic/ThunderboltHoldout.cs | 2 +- Projectiles/Magic/ThunderboltOrb.cs | 4 +- Projectiles/Magic/TradewindsProjectile.cs | 6 +- Projectiles/Magic/UndinesRetributionSpear.cs | 8 +- Projectiles/Magic/ValkyrieRayBeam.cs | 2 +- Projectiles/Magic/VeeringWindAirWave.cs | 6 +- Projectiles/Magic/VeeringWindFrostWave.cs | 6 +- Projectiles/Magic/VehemenceBolt.cs | 6 +- Projectiles/Magic/VehemenceSkull.cs | 4 +- Projectiles/Magic/VenusianBolt.cs | 6 +- Projectiles/Magic/VenusianFlame.cs | 12 +-- Projectiles/Magic/VisceraBeam.cs | 4 +- Projectiles/Magic/VitriolicViperFang.cs | 6 +- Projectiles/Magic/VoidVortexProj.cs | 12 +-- Projectiles/Magic/VolatileStarcore.cs | 2 +- Projectiles/Magic/VortexElementalBeam.cs | 8 +- Projectiles/Magic/WaterLeechProj.cs | 12 +-- Projectiles/Magic/WingmanHoldout.cs | 2 +- Projectiles/Magic/WingmanShot.cs | 6 +- Projectiles/Magic/WulfrumBolt.cs | 4 +- Projectiles/Magic/WyvernFeatherGreen.cs | 6 +- Projectiles/Magic/WyvernFeatherPink.cs | 6 +- Projectiles/Magic/WyvernFeatherPurple.cs | 6 +- Projectiles/Magic/WyvernProjectile.cs | 2 +- Projectiles/Magic/YharimsCrystalBeam.cs | 2 +- Projectiles/Magic/YharimsCrystalPrism.cs | 8 +- Projectiles/Melee/AbyssBladeProjectile.cs | 4 +- Projectiles/Melee/AmidiasWhirlpool.cs | 4 +- Projectiles/Melee/AncientBeam.cs | 6 +- Projectiles/Melee/AncientStar.cs | 6 +- .../Melee/ArkOfTheAncients_SwungBlade.cs | 6 +- .../Melee/ArkOfTheCosmos_SwungBlade.cs | 8 +- .../Melee/ArkOfTheElements_SwungBlade.cs | 8 +- .../Melee/ArkoftheCosmos_Constellation.cs | 4 +- Projectiles/Melee/AstralScytheProjectile.cs | 8 +- Projectiles/Melee/AtaraxiaMain.cs | 2 +- Projectiles/Melee/AtaraxiaSide.cs | 2 +- .../Melee/BalefulHarvesterProjectile.cs | 6 +- Projectiles/Melee/BiomeBladeHoldout.cs | 2 +- Projectiles/Melee/BladecrestOathswordProj.cs | 4 +- Projectiles/Melee/BlazingPhantomBlade.cs | 10 +-- Projectiles/Melee/BloodScythe.cs | 2 +- Projectiles/Melee/BonebreakerProjectile.cs | 2 +- Projectiles/Melee/BotanicSpear.cs | 6 +- Projectiles/Melee/Brimlash2.cs | 6 +- Projectiles/Melee/BrimlashProj.cs | 6 +- Projectiles/Melee/BrimstoneSwordProj.cs | 2 +- Projectiles/Melee/BrinySpout.cs | 6 +- Projectiles/Melee/BrinyTyphoonBubble.cs | 2 +- Projectiles/Melee/BrokenBiomeBladeHoldout.cs | 2 +- .../Melee/BrokenBiomeBlade_BitingEmbrace.cs | 4 +- .../BrokenBiomeBlade_PurityProjection.cs | 6 +- Projectiles/Melee/BurningMeteor.cs | 6 +- Projectiles/Melee/CausticEdgeProjectile.cs | 6 +- Projectiles/Melee/CometQuasherMeteor.cs | 8 +- Projectiles/Melee/CosmicDischargeFlail.cs | 2 +- Projectiles/Melee/CosmicIceBurst.cs | 12 +-- Projectiles/Melee/CosmicShivBlade.cs | 4 +- Projectiles/Melee/CrescentMoonProj.cs | 6 +- Projectiles/Melee/CrystylCrusherRay.cs | 2 +- Projectiles/Melee/Cyclone.cs | 6 +- Projectiles/Melee/DarkBeam.cs | 6 +- Projectiles/Melee/DarkMasterBeam.cs | 8 +- .../Melee/DeathsAscensionProjectile.cs | 6 +- Projectiles/Melee/DeathsAscensionSwing.cs | 2 +- Projectiles/Melee/DemonBlast.cs | 6 +- Projectiles/Melee/DepthCrusherProjectile.cs | 4 +- Projectiles/Melee/DevilsSunriseCyclone.cs | 6 +- Projectiles/Melee/DevilsSunriseProj.cs | 4 +- Projectiles/Melee/DivineHatchetBoomerang.cs | 6 +- Projectiles/Melee/DracoBeam.cs | 6 +- Projectiles/Melee/DracoBeam2.cs | 6 +- Projectiles/Melee/DragonRageFireball.cs | 8 +- Projectiles/Melee/DragonRageStaff.cs | 2 +- Projectiles/Melee/EarthMeteor.cs | 2 +- Projectiles/Melee/ElementalGlassStar.cs | 6 +- Projectiles/Melee/EmpyreanKnife.cs | 6 +- Projectiles/Melee/EonBolt.cs | 4 +- Projectiles/Melee/EssenceFlame2.cs | 2 +- Projectiles/Melee/EssenceScythe.cs | 8 +- Projectiles/Melee/ExcelsusBlue.cs | 2 +- Projectiles/Melee/ExcelsusMain.cs | 2 +- Projectiles/Melee/ExcelsusPink.cs | 2 +- Projectiles/Melee/Exobeam.cs | 6 +- Projectiles/Melee/ExobladeProj.cs | 6 +- Projectiles/Melee/FallenPaladinsHammerEcho.cs | 6 +- Projectiles/Melee/FallenPaladinsHammerProj.cs | 6 +- .../Melee/ForbiddenOathbladeProjectile.cs | 6 +- Projectiles/Melee/GaelSkull.cs | 10 +-- Projectiles/Melee/GaelSkull2.cs | 10 +-- Projectiles/Melee/GalacticaComet.cs | 6 +- Projectiles/Melee/GalaxiaBolt.cs | 6 +- Projectiles/Melee/Galaxia_AriesWrath.cs | 4 +- .../Melee/Galaxia_AriesWrathConstellation.cs | 4 +- Projectiles/Melee/Galaxia_PhoenixsPride.cs | 4 +- Projectiles/Melee/GalaxyBlast.cs | 4 +- Projectiles/Melee/GalaxyBlastType2.cs | 4 +- Projectiles/Melee/GalaxyBlastType3.cs | 4 +- Projectiles/Melee/GalaxySmasherEcho.cs | 6 +- Projectiles/Melee/GalaxySmasherHammer.cs | 6 +- Projectiles/Melee/GalileosMoon.cs | 6 +- Projectiles/Melee/GalileosPlanet.cs | 6 +- Projectiles/Melee/GayBeam.cs | 8 +- Projectiles/Melee/GelWave.cs | 6 +- Projectiles/Melee/GhastlySoulLarge.cs | 10 +-- Projectiles/Melee/GhastlySoulMedium.cs | 10 +-- Projectiles/Melee/GhastlySoulSmall.cs | 10 +-- Projectiles/Melee/HellionSpike.cs | 6 +- Projectiles/Melee/HolyColliderHolyFire.cs | 6 +- Projectiles/Melee/IllustriousKnife.cs | 6 +- Projectiles/Melee/InsidiousHarpoon.cs | 6 +- Projectiles/Melee/IridescentExcaliburSlash.cs | 4 +- .../Melee/IridescentExcaliburSlash2.cs | 4 +- .../Melee/IridescentExcaliburSlash3.cs | 4 +- Projectiles/Melee/LifeScythe.cs | 6 +- Projectiles/Melee/LightBeam.cs | 6 +- Projectiles/Melee/LuxorsGiftMelee.cs | 6 +- Projectiles/Melee/MantisClawJet.cs | 4 +- Projectiles/Melee/MarniteDeconstructorProj.cs | 2 +- Projectiles/Melee/MarniteObliteratorProj.cs | 2 +- ...endedBiomeBlade_GestureForTheDrownedOrb.cs | 6 +- .../Melee/MendedBiomeBlade_HeavensMight.cs | 4 +- .../MendedBiomeBlade_PurityProjectionSigil.cs | 6 +- .../MendedBiomeBlade_TrueBitingEmbrace.cs | 2 +- .../MendedBiomeBlade_TruePurityProjection.cs | 6 +- Projectiles/Melee/MirrorBlast.cs | 6 +- Projectiles/Melee/MourningSkull.cs | 6 +- Projectiles/Melee/MurasamaSlash.cs | 4 +- Projectiles/Melee/NeptunesBountyProjectile.cs | 6 +- Projectiles/Melee/Oathblade.cs | 6 +- Projectiles/Melee/OldLordClaymoreProj.cs | 4 +- Projectiles/Melee/OmnibladeSwing.cs | 4 +- Projectiles/Melee/Orbacle.cs | 2 +- Projectiles/Melee/OrderbringerBeam.cs | 6 +- .../Melee/PhosphorescentGauntletPunches.cs | 8 +- Projectiles/Melee/PhotonRipperProjectile.cs | 2 +- Projectiles/Melee/PlagueSeeker.cs | 2 +- Projectiles/Melee/PrismRay.cs | 6 +- Projectiles/Melee/PrismTooth.cs | 4 +- Projectiles/Melee/PrismaticRay.cs | 2 +- Projectiles/Melee/PrismaticWave.cs | 6 +- Projectiles/Melee/PwnagehammerEcho.cs | 8 +- Projectiles/Melee/PwnagehammerProj.cs | 6 +- Projectiles/Melee/RSSolarFlare.cs | 6 +- Projectiles/Melee/Razorwind.cs | 6 +- Projectiles/Melee/RedtideWhirlpool.cs | 2 +- Projectiles/Melee/RendingNeedle.cs | 4 +- Projectiles/Melee/RespiteblockHoldout.cs | 2 +- Projectiles/Melee/RoxcaliburProj.cs | 2 +- Projectiles/Melee/SaharaSlicersBolt.cs | 6 +- Projectiles/Melee/SandBlade.cs | 6 +- Projectiles/Melee/ScourgeoftheCosmosMini.cs | 6 +- Projectiles/Melee/ScourgeoftheCosmosProj.cs | 6 +- Projectiles/Melee/SeashineSwordProj.cs | 6 +- Projectiles/Melee/SolarNeedle.cs | 6 +- Projectiles/Melee/SolsticeBeam.cs | 2 +- Projectiles/Melee/SoulScythe.cs | 6 +- Projectiles/Melee/SpatialSpear.cs | 6 +- Projectiles/Melee/SpatialSpear2.cs | 6 +- Projectiles/Melee/SpatialSpear3.cs | 6 +- Projectiles/Melee/SpatialSpear4.cs | 6 +- Projectiles/Melee/Spears/BansheeHookProj.cs | 2 +- .../Melee/Spears/RedtideSpearProjectile.cs | 2 +- Projectiles/Melee/Spears/StreamGougeProj.cs | 2 +- Projectiles/Melee/StarburstSHIV.cs | 6 +- Projectiles/Melee/StarnightBeam.cs | 6 +- Projectiles/Melee/StarofJudgement.cs | 6 +- Projectiles/Melee/StellarContemptEcho.cs | 8 +- Projectiles/Melee/StellarContemptHammer.cs | 6 +- Projectiles/Melee/StellarStrikerMeteor.cs | 8 +- Projectiles/Melee/StormBeam.cs | 6 +- Projectiles/Melee/StormMark.cs | 4 +- Projectiles/Melee/StormRulerProj.cs | 6 +- Projectiles/Melee/StygianShieldAttack.cs | 6 +- Projectiles/Melee/StygianShieldThrown.cs | 4 +- Projectiles/Melee/SwordsplosionBlue.cs | 2 +- Projectiles/Melee/SwordsplosionGreen.cs | 2 +- Projectiles/Melee/SwordsplosionPurple.cs | 2 +- Projectiles/Melee/SwordsplosionRed.cs | 2 +- Projectiles/Melee/TaintedBladeSlasher.cs | 4 +- .../Melee/TenebreusTidesWaterProjectile.cs | 6 +- Projectiles/Melee/TenebreusTidesWaterSpear.cs | 6 +- Projectiles/Melee/TenebreusTidesWaterSword.cs | 2 +- Projectiles/Melee/TerratomereExplosion.cs | 2 +- Projectiles/Melee/TerratomereHoldoutProj.cs | 2 +- Projectiles/Melee/TerrorBeam.cs | 6 +- Projectiles/Melee/ThornBase.cs | 2 +- Projectiles/Melee/Tornado.cs | 2 +- Projectiles/Melee/TriactisHammerProj.cs | 6 +- Projectiles/Melee/TrueAncientBeam.cs | 6 +- Projectiles/Melee/TrueAncientBlast.cs | 4 +- .../Melee/TrueArkOfTheAncients_SwungBlade.cs | 6 +- Projectiles/Melee/TrueBiomeBladeHoldout.cs | 4 +- .../Melee/TrueBiomeBlade_SwordsmithsPride.cs | 4 +- .../TrueBiomeBlade_SwordsmithsPrideBeam.cs | 8 +- Projectiles/Melee/TyphonsGreedBubble.cs | 6 +- Projectiles/Melee/UrchinMaceProjectile.cs | 2 +- Projectiles/Melee/UrchinSpikeFugu.cs | 4 +- Projectiles/Melee/ViolenceSlashProjectile.cs | 6 +- Projectiles/Melee/ViolenceThrownProjectile.cs | 6 +- Projectiles/Melee/VirulentWave.cs | 8 +- Projectiles/Melee/VoidEssence.cs | 8 +- Projectiles/Melee/VolcanicFireball.cs | 4 +- Projectiles/Melee/VolcanicFireballLarge.cs | 4 +- Projectiles/Melee/WulfrumScrew.cs | 6 +- Projectiles/Melee/WulfrumScrewdriverProj.cs | 2 +- Projectiles/Melee/YinYoDark.cs | 6 +- Projectiles/Melee/YinYoLight.cs | 6 +- Projectiles/Melee/Yoyos/AirSpinnerYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/AortaYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/AzathothYoyo.cs | 12 +-- .../Melee/Yoyos/BurningRevelationYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/FaultLineYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/GodsGambitYoyo.cs | 8 +- Projectiles/Melee/Yoyos/LaceratorYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/MicrowaveYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/ObliteratorYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/OblivionYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/OracleYoyo.cs | 12 +-- Projectiles/Melee/Yoyos/PandemicYoyo.cs | 8 +- Projectiles/Melee/Yoyos/QuagmireYoyo.cs | 8 +- Projectiles/Melee/Yoyos/RiptideYoyo.cs | 6 +- Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs | 8 +- Projectiles/Melee/Yoyos/SmokingCometYoyo.cs | 12 +-- .../Melee/Yoyos/SulphurousGrabberYoyo.cs | 14 ++-- Projectiles/Melee/Yoyos/YinYoyo.cs | 8 +- Projectiles/Pets/Akato.cs | 6 +- Projectiles/Pets/Astrophage.cs | 6 +- Projectiles/Pets/BabyGhostBell.cs | 6 +- Projectiles/Pets/Bear.cs | 6 +- Projectiles/Pets/BendyPet.cs | 14 ++-- Projectiles/Pets/BrimlingPet.cs | 6 +- Projectiles/Pets/ChibiiDoggo.cs | 16 ++-- Projectiles/Pets/ChibiiDoggoFly.cs | 12 +-- Projectiles/Pets/DannyDevitoPet.cs | 6 +- Projectiles/Pets/EidolonSnail.cs | 10 +-- Projectiles/Pets/FlakPet.cs | 6 +- Projectiles/Pets/FoxPet.cs | 6 +- Projectiles/Pets/GoldiePet.cs | 8 +- Projectiles/Pets/KendraPet.cs | 10 +-- Projectiles/Pets/LadShark.cs | 4 +- Projectiles/Pets/LeviPet.cs | 6 +- Projectiles/Pets/LittleLightProj.cs | 8 +- Projectiles/Pets/LordePet.cs | 4 +- Projectiles/Pets/MiniHiveMind.cs | 12 +-- Projectiles/Pets/OceanSpirit.cs | 6 +- Projectiles/Pets/PerforaMini.cs | 6 +- Projectiles/Pets/PineapplePetProj.cs | 8 +- Projectiles/Pets/PlaguebringerBab.cs | 6 +- Projectiles/Pets/PrimroseKeepsakeDisplay.cs | 4 +- Projectiles/Pets/RadiatorPet.cs | 6 +- Projectiles/Pets/RotomPet.cs | 10 +-- Projectiles/Pets/SCalPet.cs | 8 +- Projectiles/Pets/Sparks.cs | 10 +-- Projectiles/Pets/ThirdSage.cs | 6 +- Projectiles/Pets/YharonSonPet.cs | 6 +- Projectiles/Ranged/AdamAcceleratorBeam.cs | 2 +- Projectiles/Ranged/AnimosityBullet.cs | 6 +- Projectiles/Ranged/AquaBlast.cs | 4 +- Projectiles/Ranged/ArcherfishRing.cs | 2 +- Projectiles/Ranged/AstralCannonProjectile.cs | 8 +- Projectiles/Ranged/AstralRound.cs | 6 +- Projectiles/Ranged/AstrealArrow.cs | 6 +- Projectiles/Ranged/AstrealFlame.cs | 2 +- Projectiles/Ranged/AuricBullet.cs | 4 +- Projectiles/Ranged/AuroraFire.cs | 2 +- Projectiles/Ranged/BallistaGreatArrow.cs | 6 +- Projectiles/Ranged/BarinadeArrow.cs | 6 +- Projectiles/Ranged/BlightFlames.cs | 2 +- Projectiles/Ranged/BloodClotFriendly.cs | 4 +- Projectiles/Ranged/BloodfireArrowProj.cs | 6 +- Projectiles/Ranged/BloodfireBulletProj.cs | 4 +- Projectiles/Ranged/BloodflareSoul.cs | 8 +- Projectiles/Ranged/Bolt.cs | 6 +- Projectiles/Ranged/BrimstoneFireFriendly.cs | 2 +- Projectiles/Ranged/BubonicRoundProj.cs | 4 +- Projectiles/Ranged/BuzzkillHoldout.cs | 2 +- Projectiles/Ranged/BuzzkillSaw.cs | 8 +- Projectiles/Ranged/CardClub.cs | 6 +- Projectiles/Ranged/CardClubSplit.cs | 6 +- Projectiles/Ranged/CardDiamond.cs | 6 +- Projectiles/Ranged/CardHeart.cs | 6 +- Projectiles/Ranged/CardSpade.cs | 6 +- Projectiles/Ranged/ChargedBlast.cs | 6 +- Projectiles/Ranged/ChargedBlastSplit.cs | 6 +- Projectiles/Ranged/ChickenCannonHeld.cs | 4 +- Projectiles/Ranged/ChromaticFlare.cs | 6 +- Projectiles/Ranged/CinderArrowProj.cs | 8 +- Projectiles/Ranged/ClaretCannonProj.cs | 6 +- Projectiles/Ranged/CondemnationArrow.cs | 6 +- Projectiles/Ranged/CondemnationArrowHoming.cs | 6 +- Projectiles/Ranged/ContagionArrow.cs | 6 +- .../Ranged/CorinthPrimeAirburstGrenade.cs | 2 +- Projectiles/Ranged/DaemonsFlameBow.cs | 6 +- Projectiles/Ranged/DragonsBreathHoldout.cs | 2 +- Projectiles/Ranged/DragonsBreathMag.cs | 6 +- Projectiles/Ranged/DrataliornusFlame.cs | 2 +- Projectiles/Ranged/DrizzlefishFire.cs | 10 +-- Projectiles/Ranged/DrizzlefishFireSplit.cs | 8 +- Projectiles/Ranged/DrizzlefishFireball.cs | 10 +-- Projectiles/Ranged/DryadsTearMain.cs | 4 +- Projectiles/Ranged/DryadsTearSplit.cs | 4 +- Projectiles/Ranged/ElysianArrowRain.cs | 4 +- Projectiles/Ranged/EssenceFire.cs | 2 +- Projectiles/Ranged/ExoCrystalArrow.cs | 6 +- Projectiles/Ranged/ExoLight.cs | 4 +- Projectiles/Ranged/ExoLightningBolt.cs | 4 +- Projectiles/Ranged/FeatherLarge.cs | 6 +- Projectiles/Ranged/FlakKrakenProjectile.cs | 2 +- .../Ranged/FlakToxicannonProjectile.cs | 4 +- Projectiles/Ranged/FlareBat.cs | 2 +- Projectiles/Ranged/FlashRoundProj.cs | 4 +- .../Ranged/FlurrystormCannonShooting.cs | 2 +- Projectiles/Ranged/FreedomStarBeam.cs | 2 +- Projectiles/Ranged/GemTechGreenFlechette.cs | 8 +- Projectiles/Ranged/GodSlayerSlugProj.cs | 6 +- Projectiles/Ranged/HailstormBulletProj.cs | 4 +- Projectiles/Ranged/HallowPointRoundProj.cs | 4 +- Projectiles/Ranged/HeavenlyGaleProj.cs | 2 +- Projectiles/Ranged/HellbornHoldout.cs | 4 +- Projectiles/Ranged/HellbornProj.cs | 2 +- .../Ranged/HighExplosivePeanutShell.cs | 6 +- Projectiles/Ranged/HiveMissile.cs | 2 +- Projectiles/Ranged/HiveNuke.cs | 8 +- Projectiles/Ranged/HolyFireBulletProj.cs | 4 +- Projectiles/Ranged/HydraHead.cs | 6 +- Projectiles/Ranged/HydrasBlood.cs | 4 +- Projectiles/Ranged/HyperiusBulletProj.cs | 4 +- Projectiles/Ranged/HyperiusSplit.cs | 8 +- Projectiles/Ranged/KingsbaneHoldout.cs | 4 +- Projectiles/Ranged/LeafArrow.cs | 6 +- Projectiles/Ranged/LeviatitanAberration.cs | 4 +- Projectiles/Ranged/LeviatitanMeteor.cs | 6 +- Projectiles/Ranged/LuxorsGiftRanged.cs | 6 +- Projectiles/Ranged/MagnaShot.cs | 6 +- Projectiles/Ranged/MagnomalyRocket.cs | 10 +-- Projectiles/Ranged/MarksmanShot.cs | 2 +- Projectiles/Ranged/MechanicalBarracuda.cs | 2 +- Projectiles/Ranged/MeowCreature.cs | 6 +- Projectiles/Ranged/MineralMortarHoldout.cs | 2 +- Projectiles/Ranged/MineralMortarProjectile.cs | 2 +- Projectiles/Ranged/MiniSharkron.cs | 2 +- Projectiles/Ranged/MiniatureFolly.cs | 2 +- Projectiles/Ranged/MistArrow.cs | 2 +- Projectiles/Ranged/MistArrowFrostMist.cs | 2 +- Projectiles/Ranged/MortarRoundProj.cs | 2 +- Projectiles/Ranged/NorfleetComet.cs | 6 +- Projectiles/Ranged/NovaChargedShot.cs | 6 +- Projectiles/Ranged/NovaShot.cs | 6 +- Projectiles/Ranged/Nuke.cs | 8 +- Projectiles/Ranged/NullShot.cs | 8 +- .../Ranged/OntologicalDespoilerGrenade.cs | 8 +- .../Ranged/OntologicalDespoilerShot.cs | 8 +- Projectiles/Ranged/OpalChargedStrike.cs | 6 +- Projectiles/Ranged/OpalStrike.cs | 6 +- Projectiles/Ranged/PhotovisceratorHoldout.cs | 2 +- Projectiles/Ranged/PlagueArrow.cs | 6 +- Projectiles/Ranged/PlagueTaintedDrone.cs | 12 +-- Projectiles/Ranged/PlagueTaintedProjectile.cs | 4 +- Projectiles/Ranged/PlanarRipperBolt.cs | 10 +-- Projectiles/Ranged/PlasmaBlast.cs | 6 +- Projectiles/Ranged/PrismComet.cs | 10 +-- Projectiles/Ranged/PrismEnergyBullet.cs | 2 +- Projectiles/Ranged/PrismExplosionLarge.cs | 2 +- Projectiles/Ranged/PrismExplosionSmall.cs | 8 +- Projectiles/Ranged/PrismMine.cs | 2 +- Projectiles/Ranged/PrismaticEnergyBlast.cs | 12 +-- Projectiles/Ranged/PristineSecondary.cs | 2 +- Projectiles/Ranged/PumplerHoldout.cs | 8 +- Projectiles/Ranged/RealmRavagerBullet.cs | 4 +- Projectiles/Ranged/RicoshotCoin.cs | 12 +-- Projectiles/Ranged/RocketFire.cs | 12 +-- Projectiles/Ranged/RubberMortarRoundProj.cs | 2 +- Projectiles/Ranged/SandblasterBullet.cs | 6 +- Projectiles/Ranged/ScorchedEarthRocket.cs | 10 +-- Projectiles/Ranged/ScorpioHoldout.cs | 2 +- Projectiles/Ranged/ScorpioLargeRocket.cs | 2 +- Projectiles/Ranged/ScorpioRocket.cs | 2 +- Projectiles/Ranged/SeasSearingBubble.cs | 6 +- Projectiles/Ranged/SeasSearingSpout.cs | 6 +- Projectiles/Ranged/SepticSkewerHarpoon.cs | 4 +- Projectiles/Ranged/SevensStrikerHoldout.cs | 8 +- Projectiles/Ranged/ShockblastRound.cs | 6 +- Projectiles/Ranged/Shroom.cs | 6 +- Projectiles/Ranged/SicknessRound.cs | 6 +- Projectiles/Ranged/SicknessRound2.cs | 6 +- Projectiles/Ranged/SlagRound.cs | 4 +- Projectiles/Ranged/SlimeBolt.cs | 6 +- Projectiles/Ranged/SpeedBlasterShot.cs | 4 +- Projectiles/Ranged/SporeBomb.cs | 6 +- Projectiles/Ranged/SputterComet.cs | 6 +- Projectiles/Ranged/SputterCometBig.cs | 6 +- Projectiles/Ranged/SpykerProj.cs | 6 +- .../Ranged/StarmageddonBinaryStarCenter.cs | 4 +- Projectiles/Ranged/StarmageddonHeld.cs | 10 +-- Projectiles/Ranged/StarmageddonStar.cs | 10 +-- Projectiles/Ranged/StarmageddonStar2.cs | 10 +-- Projectiles/Ranged/StormSurgeTornado.cs | 6 +- Projectiles/Ranged/SulphuricBlast.cs | 8 +- Projectiles/Ranged/SuperradiantBolt.cs | 6 +- Projectiles/Ranged/SuperradiantSaw.cs | 6 +- .../Ranged/SuperradiantSawLingering.cs | 6 +- .../Ranged/SuperradiantSlaughtererHoldout.cs | 2 +- Projectiles/Ranged/TelluricGlareArrow.cs | 4 +- Projectiles/Ranged/TheHiveHoldout.cs | 2 +- Projectiles/Ranged/TheMaelstromExplosion.cs | 6 +- Projectiles/Ranged/TheMaelstromShark.cs | 12 +-- Projectiles/Ranged/ThePackMinissile.cs | 2 +- Projectiles/Ranged/ThePackMissile.cs | 8 +- Projectiles/Ranged/TitaniumRailgunScope.cs | 2 +- Projectiles/Ranged/TyphoonBubble.cs | 2 +- Projectiles/Ranged/UltimaBolt.cs | 6 +- Projectiles/Ranged/UniversalGenesisStar.cs | 6 +- .../Ranged/UniversalGenesisStarcaller.cs | 8 +- Projectiles/Ranged/VanquisherArrowProj.cs | 8 +- Projectiles/Ranged/VeriumBoltProj.cs | 4 +- Projectiles/Ranged/Voidragon.cs | 6 +- Projectiles/Ranged/WaterSpout.cs | 6 +- Projectiles/Ranged/WildfireBloomFlare.cs | 6 +- Projectiles/Ranged/WulfrumScrapBullet.cs | 4 +- Projectiles/Rogue/AbyssalMirrorProjectile.cs | 2 +- Projectiles/Rogue/AcidBarrelDrop.cs | 6 +- Projectiles/Rogue/AcidShrapnel.cs | 2 +- .../Rogue/AdamantiteThrowingAxeProjectile.cs | 2 +- Projectiles/Rogue/ApoctolithProj.cs | 6 +- Projectiles/Rogue/ApoctolithShard.cs | 6 +- Projectiles/Rogue/AshenStalactiteDebris.cs | 2 +- Projectiles/Rogue/AshenStalactiteProj.cs | 2 +- Projectiles/Rogue/AshenStalagmiteProj.cs | 2 +- Projectiles/Rogue/AuroradicalSplitter.cs | 6 +- Projectiles/Rogue/AuroradicalStar.cs | 6 +- Projectiles/Rogue/BallisticPoisonCloud.cs | 4 +- Projectiles/Rogue/BarrelShrapnel.cs | 2 +- Projectiles/Rogue/BlastBarrelProjectile.cs | 6 +- Projectiles/Rogue/BlazingStarProj.cs | 6 +- Projectiles/Rogue/BloodsoakedCrashax.cs | 6 +- Projectiles/Rogue/BlueFlamePillar.cs | 2 +- Projectiles/Rogue/BlunderBoosterLightning.cs | 4 +- .../Rogue/BouncingEyeballProjectile.cs | 6 +- .../BouncingEyeballProjectileStealthStrike.cs | 6 +- Projectiles/Rogue/ButcherKnife.cs | 6 +- Projectiles/Rogue/CarvingFork.cs | 6 +- Projectiles/Rogue/CelestusMiniScythe.cs | 6 +- Projectiles/Rogue/CelestusProj.cs | 6 +- Projectiles/Rogue/CinquedeaProj.cs | 6 +- Projectiles/Rogue/CircletMark.cs | 4 +- Projectiles/Rogue/CircletTornado.cs | 2 +- Projectiles/Rogue/CobaltEnergy.cs | 2 +- Projectiles/Rogue/CobaltKunaiProjectile.cs | 2 +- Projectiles/Rogue/CorpusAvertorClone.cs | 6 +- Projectiles/Rogue/CorpusAvertorProj.cs | 6 +- Projectiles/Rogue/CorpusAvertorStealth.cs | 6 +- Projectiles/Rogue/Corrocloud1.cs | 2 +- Projectiles/Rogue/Corrocloud2.cs | 2 +- Projectiles/Rogue/Corrocloud3.cs | 2 +- Projectiles/Rogue/CosmicScythe.cs | 6 +- Projectiles/Rogue/Crushax.cs | 2 +- Projectiles/Rogue/CrystalPiercerProjectile.cs | 6 +- Projectiles/Rogue/Crystalline2.cs | 2 +- Projectiles/Rogue/CrystallineProj.cs | 2 +- Projectiles/Rogue/CursedDaggerProj.cs | 2 +- Projectiles/Rogue/DeepWounderProjectile.cs | 2 +- Projectiles/Rogue/DeepWounderWater.cs | 2 +- Projectiles/Rogue/DesecratedWaterProj.cs | 2 +- Projectiles/Rogue/DestructionBolt.cs | 2 +- Projectiles/Rogue/DragonScalesInfernado.cs | 8 +- Projectiles/Rogue/DragonShit.cs | 10 +-- Projectiles/Rogue/DukesDecapitatorProj.cs | 6 +- Projectiles/Rogue/DuststormCloud.cs | 4 +- .../Rogue/DynamicPursuerElectricity.cs | 4 +- Projectiles/Rogue/DynamicPursuerProjectile.cs | 8 +- Projectiles/Rogue/EclipseMirrorBurst.cs | 2 +- Projectiles/Rogue/EclipsesSmol.cs | 2 +- Projectiles/Rogue/EnchantedAxe2.cs | 2 +- Projectiles/Rogue/EnchantedAxeProj.cs | 8 +- Projectiles/Rogue/EquanimityProj.cs | 6 +- Projectiles/Rogue/EradicatorProjectile.cs | 6 +- Projectiles/Rogue/ExecutionersBladeProj.cs | 6 +- .../Rogue/ExecutionersBladeStealthProj.cs | 6 +- Projectiles/Rogue/ExorcismProj.cs | 2 +- Projectiles/Rogue/ExorcismStar.cs | 6 +- Projectiles/Rogue/FantasyTalismanProj.cs | 6 +- Projectiles/Rogue/FantasyTalismanStealth.cs | 6 +- Projectiles/Rogue/FeatherKnifeProjectile.cs | 2 +- Projectiles/Rogue/FinalDawnFireSlash.cs | 4 +- Projectiles/Rogue/FinalDawnFireball.cs | 8 +- Projectiles/Rogue/FinalDawnFlame.cs | 6 +- Projectiles/Rogue/FinalDawnHorizontalSlash.cs | 6 +- Projectiles/Rogue/FinalDawnProjectile.cs | 6 +- Projectiles/Rogue/FinalDawnReticle.cs | 2 +- Projectiles/Rogue/FinalDawnThrow.cs | 8 +- Projectiles/Rogue/FinalDawnThrow2.cs | 8 +- .../Rogue/FishboneBoomerangProjectile.cs | 4 +- Projectiles/Rogue/Fork.cs | 6 +- Projectiles/Rogue/FrostShardFriendly.cs | 2 +- Projectiles/Rogue/GelDartProjectile.cs | 2 +- Projectiles/Rogue/GhoulishGougerBoomerang.cs | 6 +- Projectiles/Rogue/GildedDaggerProj.cs | 2 +- Projectiles/Rogue/GlaiveProj.cs | 6 +- Projectiles/Rogue/GleamingDaggerProj.cs | 2 +- Projectiles/Rogue/GodsParanoiaDart.cs | 6 +- Projectiles/Rogue/GodsParanoiaProj.cs | 6 +- .../Rogue/GraveGrimreaverProjectile.cs | 6 +- Projectiles/Rogue/GreenDonkeyKongReference.cs | 6 +- Projectiles/Rogue/GrimreaverBat.cs | 4 +- Projectiles/Rogue/GrimreaverSkull.cs | 10 +-- .../Rogue/HeavenfallenStardiskBoomerang.cs | 6 +- Projectiles/Rogue/Honeycomb.cs | 2 +- Projectiles/Rogue/HypothermiaChunk.cs | 6 +- Projectiles/Rogue/HypothermiaShard.cs | 2 +- Projectiles/Rogue/IcebreakerHammer.cs | 2 +- Projectiles/Rogue/IchorSpearProj.cs | 2 +- Projectiles/Rogue/InfernalKrisCinder.cs | 2 +- Projectiles/Rogue/InfernalKrisProjectile.cs | 8 +- Projectiles/Rogue/InfestedClawmerangProj.cs | 2 +- Projectiles/Rogue/IronFranciscaProj.cs | 6 +- Projectiles/Rogue/JawsProjectile.cs | 6 +- Projectiles/Rogue/KelvinCatalystBoomerang.cs | 6 +- Projectiles/Rogue/Knife.cs | 6 +- Projectiles/Rogue/LanceofDestiny.cs | 2 +- Projectiles/Rogue/LeadTomahawkProj.cs | 6 +- Projectiles/Rogue/LeonidCometBig.cs | 6 +- Projectiles/Rogue/LeonidCometSmall.cs | 2 +- .../Rogue/LeonidProgenitorBombshell.cs | 2 +- Projectiles/Rogue/LeviathanTooth.cs | 6 +- Projectiles/Rogue/LionfishProj.cs | 2 +- Projectiles/Rogue/LostSoulFriendly.cs | 12 +-- Projectiles/Rogue/LunarKunaiProj.cs | 8 +- Projectiles/Rogue/LuxorsGiftRogue.cs | 6 +- Projectiles/Rogue/MalachiteBolt.cs | 6 +- Projectiles/Rogue/MalachiteProj.cs | 6 +- Projectiles/Rogue/MalachiteStealth.cs | 6 +- .../Rogue/MangroveChakramProjectile.cs | 2 +- Projectiles/Rogue/MoltenAmputatorProj.cs | 6 +- Projectiles/Rogue/MoltenBlobThrown.cs | 2 +- Projectiles/Rogue/MonkeyDart.cs | 6 +- Projectiles/Rogue/MoonSigil.cs | 2 +- Projectiles/Rogue/MycorootProj.cs | 2 +- Projectiles/Rogue/MythrilKnifeProjectile.cs | 2 +- Projectiles/Rogue/NanoblackMain.cs | 6 +- Projectiles/Rogue/NanoblackSplit.cs | 6 +- Projectiles/Rogue/NanoblackStealthSplit.cs | 6 +- Projectiles/Rogue/NiceCock.cs | 6 +- Projectiles/Rogue/NightsGazeProjectile.cs | 6 +- Projectiles/Rogue/NightsGazeStar.cs | 6 +- Projectiles/Rogue/NychthemeronOrb.cs | 2 +- Projectiles/Rogue/NychthemeronProjectile.cs | 2 +- .../OrichalcumSpikedGemstoneProjectile.cs | 2 +- .../Rogue/PalladiumJavelinProjectile.cs | 2 +- Projectiles/Rogue/PanSpark.cs | 12 +-- Projectiles/Rogue/PenumbraBomb.cs | 6 +- Projectiles/Rogue/PenumbraSoul.cs | 6 +- Projectiles/Rogue/PhantasmalRuinProj.cs | 6 +- Projectiles/Rogue/PhantasmalSoul.cs | 8 +- Projectiles/Rogue/PhantasmalSoulBlue.cs | 8 +- Projectiles/Rogue/PlaguenadeBee.cs | 8 +- Projectiles/Rogue/PlaguenadeProj.cs | 2 +- Projectiles/Rogue/PrismShurikenBlade.cs | 2 +- Projectiles/Rogue/Prismalline2.cs | 2 +- Projectiles/Rogue/Prismalline3.cs | 2 +- Projectiles/Rogue/PrismallineProj.cs | 2 +- Projectiles/Rogue/ProfanedPartisanProj.cs | 6 +- Projectiles/Rogue/ProfanedPartisanSpear.cs | 2 +- Projectiles/Rogue/RadiantStar2.cs | 6 +- Projectiles/Rogue/RadiantStarKnife.cs | 6 +- Projectiles/Rogue/RealityRuptureLance.cs | 4 +- Projectiles/Rogue/RealityRuptureStealth.cs | 4 +- Projectiles/Rogue/ReaperProjectile.cs | 6 +- Projectiles/Rogue/ReboundingRainbowProj.cs | 6 +- Projectiles/Rogue/ReboundingRainbowSplit.cs | 6 +- .../Rogue/RefractionRotorProjectile.cs | 4 +- Projectiles/Rogue/RegulusRiotProj.cs | 6 +- Projectiles/Rogue/RotBallProjectile.cs | 2 +- Projectiles/Rogue/SacrificeProjectile.cs | 6 +- Projectiles/Rogue/SamsaraSlicerProjectile.cs | 6 +- Projectiles/Rogue/SamsaraSlicerSmallDisk.cs | 6 +- Projectiles/Rogue/ScarletDevilProjectile.cs | 10 +-- Projectiles/Rogue/ScourgeVenomCloud.cs | 4 +- Projectiles/Rogue/ScourgeoftheDesertProj.cs | 6 +- .../Rogue/ScourgeoftheSeasProjectile.cs | 6 +- .../Rogue/SealedSingularityBlackhole.cs | 6 +- Projectiles/Rogue/SealedSingularityGore.cs | 2 +- Projectiles/Rogue/SearedPanProjectile.cs | 6 +- Projectiles/Rogue/SeraphimAngelicLight.cs | 4 +- Projectiles/Rogue/SeraphimAngelicLight2.cs | 4 +- Projectiles/Rogue/SeraphimBeamLarge.cs | 10 +-- Projectiles/Rogue/SeraphimDagger.cs | 2 +- Projectiles/Rogue/SeraphimProjectile.cs | 2 +- Projectiles/Rogue/ShatteredSunKnife.cs | 6 +- .../Rogue/ShatteredSunScorchedBlade.cs | 6 +- Projectiles/Rogue/ShinobiBladeProjectile.cs | 6 +- Projectiles/Rogue/ShockGrenadeBolt.cs | 4 +- Projectiles/Rogue/ShockGrenadeProjectile.cs | 2 +- Projectiles/Rogue/ShockTeslaAura.cs | 2 +- Projectiles/Rogue/SlickCaneProjectile.cs | 2 +- Projectiles/Rogue/SludgeSplotchProj2.cs | 2 +- Projectiles/Rogue/SnapClamProj.cs | 2 +- Projectiles/Rogue/SnapClamStealth.cs | 2 +- Projectiles/Rogue/SpearofDestinyProjectile.cs | 4 +- Projectiles/Rogue/SpearofDestinyStealth.cs | 4 +- Projectiles/Rogue/SpearofPaleolithProj.cs | 6 +- Projectiles/Rogue/SphereBladed.cs | 6 +- Projectiles/Rogue/SphereBlue.cs | 6 +- Projectiles/Rogue/SphereSpiked.cs | 6 +- Projectiles/Rogue/SphereYellow.cs | 6 +- Projectiles/Rogue/StealthNimbus.cs | 6 +- Projectiles/Rogue/StealthNimbusCloud.cs | 6 +- Projectiles/Rogue/StellarKnifeProj.cs | 6 +- Projectiles/Rogue/StormfrontLightning.cs | 4 +- .../Rogue/StormfrontRazorProjectile.cs | 8 +- Projectiles/Rogue/SubductionFlameburst.cs | 2 +- Projectiles/Rogue/SubductionSlicerProj.cs | 2 +- Projectiles/Rogue/SupernovaBomb.cs | 6 +- Projectiles/Rogue/SupernovaBoom.cs | 2 +- Projectiles/Rogue/TalonLargeProj.cs | 6 +- Projectiles/Rogue/TalonSmallProj.cs | 2 +- Projectiles/Rogue/TarraThornRight.cs | 2 +- .../Rogue/TarragonThrowingDartProjectile.cs | 2 +- Projectiles/Rogue/TheAtomSplitterDuplicate.cs | 6 +- Projectiles/Rogue/TheSyringeCinder.cs | 2 +- Projectiles/Rogue/TheSyringeProj.cs | 6 +- Projectiles/Rogue/TheSyringeS1.cs | 2 +- Projectiles/Rogue/TimeBoltKnife.cs | 6 +- Projectiles/Rogue/TitaniumClone.cs | 6 +- .../Rogue/TitaniumShurikenProjectile.cs | 8 +- Projectiles/Rogue/ToothBallProjectile.cs | 2 +- Projectiles/Rogue/TotalMeltdown.cs | 4 +- Projectiles/Rogue/TotalityFire.cs | 12 +-- Projectiles/Rogue/ToxicantTwisterProj.cs | 6 +- Projectiles/Rogue/TurbulanceProjectile.cs | 6 +- Projectiles/Rogue/TurbulanceWindSlash.cs | 8 +- Projectiles/Rogue/TwistingThunderProj.cs | 10 +-- Projectiles/Rogue/UrchinStingerProj.cs | 2 +- Projectiles/Rogue/ValedictionBoomerang.cs | 6 +- Projectiles/Rogue/VeneratedKnife.cs | 10 +-- Projectiles/Rogue/WaveSkipperProjectile.cs | 6 +- Projectiles/Rogue/WhitewaterProj.cs | 2 +- Projectiles/Rogue/WrathwingCinder.cs | 10 +-- Projectiles/Rogue/WrathwingFireball.cs | 12 +-- Projectiles/Rogue/WrathwingSpear.cs | 8 +- Projectiles/Rogue/WulfrumKnifeProj.cs | 6 +- .../Summon/AmphibiansGuitarProjectile.cs | 6 +- Projectiles/Summon/AndromedaDeathRay.cs | 2 +- Projectiles/Summon/AndromedaRegislash.cs | 8 +- .../AndromedaUI/AndromedaUI_Background.cs | 2 +- Projectiles/Summon/AngelBolt.cs | 2 +- Projectiles/Summon/AngelOrb.cs | 2 +- Projectiles/Summon/AngelRay.cs | 2 +- .../Summon/AngelicAllianceArchangel.cs | 10 +-- Projectiles/Summon/ApexShark.cs | 6 +- Projectiles/Summon/ApparatusExplosion.cs | 6 +- Projectiles/Summon/AquasScepterRaindrop.cs | 2 +- Projectiles/Summon/AquasScepterTeslaAura.cs | 2 +- Projectiles/Summon/AquaticStarMinion.cs | 4 +- Projectiles/Summon/AstrageldonLaser.cs | 10 +-- Projectiles/Summon/AstrageldonSummon.cs | 10 +-- Projectiles/Summon/AstralProbeRound.cs | 12 +-- Projectiles/Summon/AstralProbeSummon.cs | 4 +- .../Summon/AtlasMunitionsAutocannon.cs | 4 +- Projectiles/Summon/AtlasMunitionsDropPod.cs | 12 +-- .../Summon/AtlasMunitionsDropPodUpper.cs | 2 +- Projectiles/Summon/AtlasMunitionsLaser.cs | 4 +- .../Summon/AtlasMunitionsLaserOverdrive.cs | 6 +- Projectiles/Summon/AureusBomber.cs | 12 +-- Projectiles/Summon/BabyBloodCrawler.cs | 6 +- Projectiles/Summon/BabyPlaguebringer.cs | 8 +- Projectiles/Summon/BelladonnaPetal.cs | 8 +- Projectiles/Summon/BelladonnaSpirit.cs | 2 +- Projectiles/Summon/BetterHornetStinger.cs | 2 +- Projectiles/Summon/BlackDragonHead.cs | 6 +- Projectiles/Summon/BlackHawkBullet.cs | 2 +- Projectiles/Summon/BlackHawkSummon.cs | 2 +- Projectiles/Summon/BloodBreath.cs | 2 +- Projectiles/Summon/BloodRain.cs | 2 +- Projectiles/Summon/BloodSpit.cs | 6 +- Projectiles/Summon/BoneMatter.cs | 6 +- Projectiles/Summon/BoneMatter2.cs | 6 +- Projectiles/Summon/BrimseekerAuraBall.cs | 2 +- Projectiles/Summon/BrimstoneDartMinion.cs | 12 +-- Projectiles/Summon/BrimstoneDartSummon.cs | 12 +-- .../Summon/BrimstoneElementalMinion.cs | 6 +- .../Summon/BrimstoneExplosionMinion.cs | 2 +- Projectiles/Summon/BrimstoneFireSummon.cs | 2 +- Projectiles/Summon/BrimstoneFireballMinion.cs | 10 +-- Projectiles/Summon/BrimstoneLaserSummon.cs | 2 +- Projectiles/Summon/CalamarisLamentMinion.cs | 2 +- .../Summon/CalamarisLamentProjectile.cs | 2 +- Projectiles/Summon/Calamitamini.cs | 10 +-- Projectiles/Summon/Cataclymini.cs | 10 +-- Projectiles/Summon/CataclysmSummon.cs | 12 +-- Projectiles/Summon/Catastromini.cs | 10 +-- Projectiles/Summon/CatastropheSummon.cs | 12 +-- Projectiles/Summon/CausticStaffProjectile.cs | 2 +- Projectiles/Summon/CausticStaffSummon.cs | 8 +- Projectiles/Summon/CelestialAxeMinion.cs | 6 +- Projectiles/Summon/Cinder.cs | 2 +- Projectiles/Summon/CinderBlossom.cs | 4 +- Projectiles/Summon/CloudElementalMinion.cs | 6 +- .../Summon/CnidarianJellyfishOnTheString.cs | 2 +- Projectiles/Summon/CorroslimeMinion.cs | 10 +-- .../Summon/CorruptionSlimeGodMinion.cs | 6 +- Projectiles/Summon/CosmicBlast.cs | 8 +- Projectiles/Summon/CosmicBlastBig.cs | 2 +- Projectiles/Summon/CosmicEnergySpiral.cs | 6 +- .../Summon/CosmicViperConcussionMissile.cs | 12 +-- Projectiles/Summon/CosmicViperHomingRocket.cs | 12 +-- Projectiles/Summon/CosmicViperSplitRocket1.cs | 2 +- .../Summon/CosmicViperSplittingRocket.cs | 12 +-- Projectiles/Summon/CosmicViperSummon.cs | 12 +-- Projectiles/Summon/CosmilampBeam.cs | 6 +- Projectiles/Summon/CosmilampMinion.cs | 10 +-- Projectiles/Summon/CrimslimeMinion.cs | 10 +-- Projectiles/Summon/CrimsonSlimeGodMinion.cs | 6 +- Projectiles/Summon/DaedalusCrystal.cs | 4 +- Projectiles/Summon/DaedalusCrystalShot.cs | 2 +- Projectiles/Summon/DaedalusGolem.cs | 8 +- Projectiles/Summon/DaedalusLightning.cs | 6 +- Projectiles/Summon/DaedalusPellet.cs | 10 +-- Projectiles/Summon/DankCreeperMinion.cs | 6 +- Projectiles/Summon/DazzlingStabber.cs | 12 +-- Projectiles/Summon/DeathstareBeam.cs | 4 +- Projectiles/Summon/DeathstareEyeball.cs | 2 +- Projectiles/Summon/DormantBrimseekerAura.cs | 4 +- Projectiles/Summon/DormantBrimseekerBab.cs | 14 ++-- .../Summon/DormantBrimseekerSummoner.cs | 4 +- Projectiles/Summon/Dreadmine.cs | 2 +- Projectiles/Summon/DreadmineTurret.cs | 6 +- Projectiles/Summon/EXPLODINGFROG.cs | 8 +- Projectiles/Summon/EndoBeam.cs | 2 +- Projectiles/Summon/EndoCooperBody.cs | 10 +-- Projectiles/Summon/EndoCooperLimbs.cs | 10 +-- Projectiles/Summon/EndoFire.cs | 2 +- Projectiles/Summon/EndoHydraBody.cs | 8 +- Projectiles/Summon/EndoHydraHead.cs | 22 +++--- Projectiles/Summon/EndoHydraRay.cs | 2 +- Projectiles/Summon/EndoIceShard.cs | 8 +- Projectiles/Summon/EyeOfNightCell.cs | 2 +- Projectiles/Summon/EyeOfNightSummon.cs | 4 +- Projectiles/Summon/FieryDraconid.cs | 12 +-- Projectiles/Summon/FlameBlast.cs | 2 +- Projectiles/Summon/FlameBurst.cs | 2 +- Projectiles/Summon/FleshBlood.cs | 2 +- Projectiles/Summon/FlowersOfMortalityPetal.cs | 10 +-- Projectiles/Summon/FlyingOrthocera.cs | 6 +- Projectiles/Summon/FlyingOrthoceraStream.cs | 2 +- Projectiles/Summon/ForbiddenCircletEater.cs | 2 +- Projectiles/Summon/FrogGore1.cs | 2 +- Projectiles/Summon/FrogGore2.cs | 2 +- Projectiles/Summon/FrogGore3.cs | 2 +- Projectiles/Summon/FrogGore4.cs | 2 +- Projectiles/Summon/FrogGore5.cs | 2 +- Projectiles/Summon/FrostBeam.cs | 2 +- Projectiles/Summon/FrostBlossom.cs | 4 +- Projectiles/Summon/FrostMistFriendly.cs | 10 +-- Projectiles/Summon/GammaCanister.cs | 2 +- Projectiles/Summon/GammaHead.cs | 14 ++-- Projectiles/Summon/GastricBelcher.cs | 12 +-- Projectiles/Summon/GastricBelcherBubble.cs | 2 +- Projectiles/Summon/GastricBelcherVomit.cs | 4 +- Projectiles/Summon/GhostFire.cs | 6 +- Projectiles/Summon/GiantIbanRobotOfDoom.cs | 2 +- .../Summon/GlacialEmbracePointyThing.cs | 8 +- Projectiles/Summon/HallowedStarSummon.cs | 8 +- Projectiles/Summon/HarvestStaffSentry.cs | 2 +- Projectiles/Summon/HauntedDishes.cs | 6 +- Projectiles/Summon/HermitCrabMinion.cs | 6 +- Projectiles/Summon/HerringAI.cs | 4 +- Projectiles/Summon/HerringMinion.cs | 6 +- Projectiles/Summon/Hive.cs | 4 +- Projectiles/Summon/Hiveling.cs | 10 +-- Projectiles/Summon/HomingGammaBullet.cs | 2 +- Projectiles/Summon/HowlsHeartCalcifer.cs | 8 +- Projectiles/Summon/HowlsHeartFireball.cs | 6 +- Projectiles/Summon/HowlsHeartHowl.cs | 8 +- Projectiles/Summon/HowlsHeartTurnipHead.cs | 6 +- Projectiles/Summon/HydrothermicVent.cs | 8 +- Projectiles/Summon/IceClasperMinion.cs | 2 +- Projectiles/Summon/IceSentry.cs | 4 +- Projectiles/Summon/IceSentryFrostBolt.cs | 8 +- Projectiles/Summon/IceSentryShard.cs | 2 +- Projectiles/Summon/IgneousBlade.cs | 4 +- Projectiles/Summon/IgneousBladeStrike.cs | 2 +- Projectiles/Summon/LanternFlame.cs | 4 +- Projectiles/Summon/LanternSoul.cs | 4 +- Projectiles/Summon/LiliesOfFinalityAriane.cs | 2 +- Projectiles/Summon/LiliesOfFinalityElster.cs | 2 +- Projectiles/Summon/LostSoulGiant.cs | 12 +-- Projectiles/Summon/LostSoulGold.cs | 12 +-- Projectiles/Summon/LostSoulLarge.cs | 12 +-- Projectiles/Summon/LostSoulSmall.cs | 12 +-- Projectiles/Summon/LuxorsGiftSummon.cs | 8 +- Projectiles/Summon/MK2FlaskSummon.cs | 4 +- Projectiles/Summon/MK2RocketHoming.cs | 6 +- Projectiles/Summon/MK2RocketNormal.cs | 6 +- Projectiles/Summon/MechwormBody.cs | 6 +- Projectiles/Summon/MechwormHead.cs | 8 +- Projectiles/Summon/MechwormLaser.cs | 2 +- Projectiles/Summon/MechwormTail.cs | 6 +- Projectiles/Summon/MechwormTeleportRift.cs | 4 +- Projectiles/Summon/MidnightSunBeaconProj.cs | 4 +- Projectiles/Summon/MidnightSunBeam.cs | 2 +- Projectiles/Summon/MidnightSunShot.cs | 6 +- Projectiles/Summon/MidnightSunUFO.cs | 8 +- Projectiles/Summon/MiniGuardianAttack.cs | 14 ++-- Projectiles/Summon/MiniGuardianDefense.cs | 14 ++-- Projectiles/Summon/MiniGuardianHealer.cs | 12 +-- Projectiles/Summon/MiniGuardianHolyRay.cs | 2 +- Projectiles/Summon/MiniGuardianRock.cs | 8 +- Projectiles/Summon/MiniGuardianStars.cs | 2 +- Projectiles/Summon/MiniSandShark.cs | 2 +- .../AtzirisDisfavor.cs | 2 +- .../MirrorofKalandraMinions/HopeShredder.cs | 4 +- .../HopeShredderArrow.cs | 2 +- .../MirrorofKalandraMinions/Paradoxica.cs | 6 +- .../MirrorofKalandraMinions/Starforge.cs | 2 +- .../MirrorofKalandraMinions/WindRipper.cs | 4 +- .../WindRipperArrow.cs | 2 +- Projectiles/Summon/MoonFist.cs | 6 +- Projectiles/Summon/MoonFistTeleportVisual.cs | 2 +- Projectiles/Summon/MortalityBeam.cs | 6 +- Projectiles/Summon/MortalityBolt.cs | 2 +- Projectiles/Summon/MutatedTruffleMinion.cs | 2 +- Projectiles/Summon/OldDukeHeadCorpse.cs | 4 +- Projectiles/Summon/OldDukeSharkVomit.cs | 4 +- Projectiles/Summon/PhantomGuy.cs | 4 +- Projectiles/Summon/PhantomicDagger.cs | 8 +- Projectiles/Summon/PhantomicShield.cs | 2 +- Projectiles/Summon/PinkButterfly.cs | 10 +-- Projectiles/Summon/PlagueBeeSmall.cs | 8 +- Projectiles/Summon/PlaguePrincess.cs | 6 +- Projectiles/Summon/PlaguebringerMK2.cs | 6 +- Projectiles/Summon/PlaguebringerSummon.cs | 6 +- Projectiles/Summon/PlantationStaffSeed.cs | 2 +- .../Summon/PlantationStaffSporeCloud.cs | 2 +- Projectiles/Summon/PlantationStaffSummon.cs | 2 +- Projectiles/Summon/PlateProjectile.cs | 4 +- Projectiles/Summon/PolypLauncherProjectile.cs | 2 +- Projectiles/Summon/PolypLauncherSentry.cs | 6 +- Projectiles/Summon/PolypLauncherShrapnel.cs | 4 +- Projectiles/Summon/PowerfulRaven.cs | 12 +-- Projectiles/Summon/ProfanedEnergy.cs | 4 +- .../Summon/ProfanedSoulCrystalProjectiles.cs | 74 +++++++++---------- Projectiles/Summon/PuffCloud.cs | 6 +- Projectiles/Summon/PuffWarrior.cs | 14 ++-- Projectiles/Summon/PurpleButterfly.cs | 10 +-- Projectiles/Summon/RustyBeaconPulse.cs | 2 +- Projectiles/Summon/RustyDrone.cs | 8 +- Projectiles/Summon/SageNeedle.cs | 2 +- Projectiles/Summon/SageSpirit.cs | 12 +-- Projectiles/Summon/SakuraBullet.cs | 2 +- Projectiles/Summon/SandBolt.cs | 2 +- Projectiles/Summon/SandElementalHealer.cs | 8 +- Projectiles/Summon/SandElementalMinion.cs | 6 +- Projectiles/Summon/SandMark.cs | 6 +- Projectiles/Summon/SandTornado.cs | 4 +- Projectiles/Summon/SandnadoMinion.cs | 8 +- Projectiles/Summon/SarosAura.cs | 2 +- Projectiles/Summon/SarosMicrosun.cs | 10 +-- Projectiles/Summon/SarosSunfire.cs | 2 +- Projectiles/Summon/SeekerSummonProj.cs | 8 +- Projectiles/Summon/SepulcherMinion.cs | 8 +- Projectiles/Summon/Shellfish.cs | 6 +- Projectiles/Summon/SilvaCrystal.cs | 8 +- Projectiles/Summon/SilvaCrystalExplosion.cs | 6 +- Projectiles/Summon/SiriusBeam.cs | 2 +- Projectiles/Summon/SiriusExplosion.cs | 6 +- Projectiles/Summon/SiriusMinion.cs | 4 +- Projectiles/Summon/SkeletalDragonChild.cs | 6 +- Projectiles/Summon/SkeletalDragonMother.cs | 8 +- Projectiles/Summon/SlimePuppet.cs | 10 +-- .../Summon/SmallAresArms/CannonLaserbeam.cs | 12 +-- .../Summon/SmallAresArms/ExoskeletonCannon.cs | 2 +- .../ExoskeletonGaussNukeCannon.cs | 2 +- .../Summon/SmallAresArms/ExoskeletonPanel.cs | 2 +- .../Summon/SmallAresArms/MinionGaussBoom.cs | 2 +- .../Summon/SmallAresArms/MinionGaussNuke.cs | 2 +- .../Summon/SmallAresArms/MinionLaserBurst.cs | 10 +-- .../Summon/SmallAresArms/MinionPlasmaBlast.cs | 10 +-- .../Summon/SmallAresArms/MinionPlasmaGas.cs | 4 +- .../Summon/SmallAresArms/MinionTeslaOrb.cs | 14 ++-- Projectiles/Summon/SmallSkeletonMinion.cs | 10 +-- Projectiles/Summon/SolarBeam.cs | 2 +- Projectiles/Summon/SolarGod.cs | 4 +- Projectiles/Summon/SolarPixie.cs | 4 +- Projectiles/Summon/Spikecrag.cs | 4 +- Projectiles/Summon/SpikecragSpike.cs | 2 +- Projectiles/Summon/StellarTorusSummon.cs | 2 +- Projectiles/Summon/StormjawBaby.cs | 6 +- Projectiles/Summon/StormjawSpark.cs | 2 +- Projectiles/Summon/SummonAstralExplosion.cs | 6 +- .../Summon/SummonBrimstoneExplosion.cs | 6 +- .../Summon/SummonBrimstoneExplosionSmall.cs | 6 +- Projectiles/Summon/TacticalPlagueJet.cs | 8 +- Projectiles/Summon/TundraFlameBlossom.cs | 4 +- Projectiles/Summon/TundraFlameBlossomsOrb.cs | 8 +- Projectiles/Summon/Umbrella/MagicArrow.cs | 2 +- Projectiles/Summon/Umbrella/MagicAxe.cs | 6 +- Projectiles/Summon/Umbrella/MagicBird.cs | 10 +-- Projectiles/Summon/Umbrella/MagicBullet.cs | 10 +-- Projectiles/Summon/Umbrella/MagicBulletBig.cs | 10 +-- Projectiles/Summon/Umbrella/MagicBunny.cs | 6 +- Projectiles/Summon/Umbrella/MagicHammer.cs | 6 +- Projectiles/Summon/Umbrella/MagicHat.cs | 10 +-- Projectiles/Summon/Umbrella/MagicRifle.cs | 6 +- Projectiles/Summon/Umbrella/MagicTree.cs | 4 +- Projectiles/Summon/Umbrella/MagicUmbrella.cs | 6 +- .../Summon/UniverseSplitterHugeBeam.cs | 2 +- .../Summon/UniverseSplitterSmallBeam.cs | 2 +- Projectiles/Summon/UrchinSpike.cs | 2 +- Projectiles/Summon/Valkyrie.cs | 10 +-- Projectiles/Summon/VictideSeaSnail.cs | 6 +- Projectiles/Summon/VileFeederSummon.cs | 10 +-- Projectiles/Summon/ViridVanguardBlade.cs | 2 +- Projectiles/Summon/VoidConcentrationAura.cs | 2 +- .../Summon/VoidConcentrationBlackhole.cs | 12 +-- Projectiles/Summon/VoidConcentrationOrb.cs | 8 +- Projectiles/Summon/VolcanicFireballSummon.cs | 12 +-- Projectiles/Summon/WaterElementalMinion.cs | 6 +- Projectiles/Summon/WaterElementalSong.cs | 2 +- Projectiles/Summon/WaterSpearFriendly.cs | 4 +- Projectiles/Summon/WhiteDragonHead.cs | 6 +- Projectiles/Summon/WitherBolt.cs | 2 +- Projectiles/Summon/WulfrumDroid.cs | 12 +-- Projectiles/Summon/WulfrumEnergyBurst.cs | 8 +- Projectiles/Summon/WulfrumFusionBolt.cs | 4 +- Projectiles/Summon/YharonMinionFireball.cs | 14 ++-- Projectiles/Turret/FireShot.cs | 4 +- Projectiles/Turret/IceExplosion.cs | 2 +- Projectiles/Turret/LaserShot.cs | 12 +-- Projectiles/Turret/OnyxShot.cs | 4 +- Projectiles/Turret/PlagueExplosionGas.cs | 2 +- Projectiles/Turret/WaterShot.cs | 4 +- Projectiles/Typeless/ArcZap.cs | 4 +- .../Typeless/ArtifactOfResilienceShards.cs | 12 +-- Projectiles/Typeless/AstralStar.cs | 6 +- Projectiles/Typeless/BasicPlagueBee.cs | 8 +- Projectiles/Typeless/BlazingStarHeal.cs | 2 +- .../Typeless/BlazingStarThatDoesNotHeal.cs | 2 +- Projectiles/Typeless/BlunderBoosterAura.cs | 4 +- Projectiles/Typeless/ChaoticGeyser.cs | 2 +- Projectiles/Typeless/ChlorophyteLifePulse.cs | 2 +- Projectiles/Typeless/ChronoClock.cs | 2 +- Projectiles/Typeless/CoralBubble.cs | 2 +- Projectiles/Typeless/CoralBubbleSmall.cs | 2 +- Projectiles/Typeless/CryonicShield.cs | 2 +- Projectiles/Typeless/CursorProj.cs | 6 +- Projectiles/Typeless/CursorProjSplit.cs | 6 +- Projectiles/Typeless/CyanLabSeeker.cs | 6 +- Projectiles/Typeless/DemonshadeRedDevil.cs | 10 +-- .../Typeless/EmpyreanStellarDetritus.cs | 2 +- Projectiles/Typeless/EnergyShell.cs | 2 +- Projectiles/Typeless/FlameLickedBarrage.cs | 8 +- Projectiles/Typeless/FlameLickedHellblast.cs | 8 +- Projectiles/Typeless/FuckYou.cs | 6 +- Projectiles/Typeless/FungalClumpMinion.cs | 8 +- Projectiles/Typeless/GemTechArmorGem.cs | 8 +- Projectiles/Typeless/GodKiller.cs | 6 +- Projectiles/Typeless/GreenLabSeeker.cs | 6 +- Projectiles/Typeless/JewelSpike.cs | 2 +- Projectiles/Typeless/KelvinCatalystStar.cs | 6 +- Projectiles/Typeless/MagnusBeam.cs | 6 +- Projectiles/Typeless/MythrilFlare.cs | 4 +- Projectiles/Typeless/Nanotech.cs | 2 +- Projectiles/Typeless/NebulaDust.cs | 2 +- Projectiles/Typeless/NebulaStar.cs | 2 +- Projectiles/Typeless/OmegaBlueTentacle.cs | 2 +- Projectiles/Typeless/OnyxLabSeeker.cs | 6 +- Projectiles/Typeless/ReaverThornBase.cs | 2 +- Projectiles/Typeless/RedLabSeeker.cs | 6 +- .../Typeless/RelicOfConvergenceCrystal.cs | 2 +- .../Typeless/RelicOfDeliveranceSpear.cs | 10 +-- Projectiles/Typeless/SandCloakVeil.cs | 2 +- Projectiles/Typeless/SepulcherSoul.cs | 4 +- Projectiles/Typeless/ShadeNimbus.cs | 4 +- Projectiles/Typeless/SkyFlareFriendly.cs | 8 +- Projectiles/Typeless/SuicideBomberDemon.cs | 10 +-- .../Typeless/SulphuricAcidBubbleFriendly.cs | 6 +- Projectiles/Typeless/TarraEnergy.cs | 2 +- Projectiles/Typeless/TerminusHoldout.cs | 2 +- Projectiles/Typeless/TeslaAura.cs | 4 +- Projectiles/Typeless/WhiteLabSeeker.cs | 6 +- Projectiles/Typeless/WulfrumDrillProj.cs | 2 +- Projectiles/Typeless/WulfrumHook.cs | 2 +- .../Typeless/WulfrumScaffoldKitHoldout.cs | 2 +- Projectiles/Typeless/XykDeathAnim.cs | 4 +- Projectiles/Typeless/YanmeisKnifeSlash.cs | 4 +- Projectiles/Typeless/YellowLabSeeker.cs | 6 +- 1314 files changed, 3617 insertions(+), 3617 deletions(-) diff --git a/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs b/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs index 2a9b9923a2..d9834046f1 100644 --- a/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseLaserbeamProjectile.cs @@ -120,9 +120,9 @@ namespace CalamityMod.Projectiles.BaseProjectiles protected internal void DrawBeamWithColor(Color beamColor, float scale, int startFrame = 0, int middleFrame = 0, int endFrame = 0) { - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, startFrame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, middleFrame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, endFrame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, startFrame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, middleFrame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, endFrame); // Start texture drawing. Main.EntitySpriteDraw(LaserBeginTexture, @@ -182,7 +182,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles #region Hook Overrides public override void AI() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; Behavior(); ExtraBehavior(); diff --git a/Projectiles/BaseProjectiles/BaseSpearProjectile.cs b/Projectiles/BaseProjectiles/BaseSpearProjectile.cs index 46700c42b6..99815b550c 100644 --- a/Projectiles/BaseProjectiles/BaseSpearProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSpearProjectile.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles { if (SpearAiType == SpearType.TypicalSpear) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Vector2 origin = Vector2.Zero; Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, 0, 0); diff --git a/Projectiles/BaseProjectiles/BaseWhipProjectile.cs b/Projectiles/BaseProjectiles/BaseWhipProjectile.cs index a35e02a794..d237f39f70 100644 --- a/Projectiles/BaseProjectiles/BaseWhipProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseWhipProjectile.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles Behavior(); ExtraBehavior(); } - public Texture2D FlailTexture => Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + public Texture2D FlailTexture => Terraria.GameContent.TextureAssets.Projectile[Type].Value; #region Virtual Values public virtual Color SpecialDrawColor => new Color(255, 200, 0); diff --git a/Projectiles/Boss/ApolloChargeTelegraph.cs b/Projectiles/Boss/ApolloChargeTelegraph.cs index 143df6a6d3..b038018e4c 100644 --- a/Projectiles/Boss/ApolloChargeTelegraph.cs +++ b/Projectiles/Boss/ApolloChargeTelegraph.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/ApolloFireball.cs b/Projectiles/Boss/ApolloFireball.cs index d86f5eec5a..f89f8ea341 100644 --- a/Projectiles/Boss/ApolloFireball.cs +++ b/Projectiles/Boss/ApolloFireball.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/ApolloRocket.cs b/Projectiles/Boss/ApolloRocket.cs index 01673d9b36..252450cd0d 100644 --- a/Projectiles/Boss/ApolloRocket.cs +++ b/Projectiles/Boss/ApolloRocket.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -190,14 +190,14 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/ApolloRocketGlow").Value, Projectile.Center - Main.screenPosition, new Rectangle(0, drawStart, texture.Width, height), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/AresDeathBeamStart.cs b/Projectiles/Boss/AresDeathBeamStart.cs index b08a03cdca..e548b9246c 100644 --- a/Projectiles/Boss/AresDeathBeamStart.cs +++ b/Projectiles/Boss/AresDeathBeamStart.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { // Ares' eight-pointed-star (more on higher difficulties) laser beams - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; // This is its serious name } @@ -163,7 +163,7 @@ namespace CalamityMod.Projectiles.Boss // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 0f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public override bool PreDraw(ref Color lightColor) @@ -178,9 +178,9 @@ namespace CalamityMod.Projectiles.Boss return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. Main.EntitySpriteDraw(LaserBeginTexture, @@ -215,7 +215,7 @@ namespace CalamityMod.Projectiles.Boss 0); incrementalBodyLength += laserOffset; centerOnLaser += Projectile.velocity * laserOffset; - middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[Projectile.type]; + middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[Type]; if (middleFrameArea.Y + middleFrameArea.Height > LaserMiddleTexture.Height) middleFrameArea.Y = 0; } diff --git a/Projectiles/Boss/AresDeathBeamTelegraph.cs b/Projectiles/Boss/AresDeathBeamTelegraph.cs index d447922d4a..52458b6833 100644 --- a/Projectiles/Boss/AresDeathBeamTelegraph.cs +++ b/Projectiles/Boss/AresDeathBeamTelegraph.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { // Telegraph for Ares' eight-pointed-star laser beams - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/AresGaussNukeProjectile.cs b/Projectiles/Boss/AresGaussNukeProjectile.cs index 89aa0ed04a..32f0663f36 100644 --- a/Projectiles/Boss/AresGaussNukeProjectile.cs +++ b/Projectiles/Boss/AresGaussNukeProjectile.cs @@ -22,9 +22,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 12; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -162,15 +162,15 @@ namespace CalamityMod.Projectiles.Boss Main.EntitySpriteDraw(telegraphBase, drawPosition, null, lightColor, 0, telegraphBase.Size() / 2f, 1480f, 0, 0); Main.spriteBatch.ExitShaderRegion(); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/AresGaussNukeProjectileGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/AresGaussNukeProjectileBoom.cs b/Projectiles/Boss/AresGaussNukeProjectileBoom.cs index a8c411f3be..fabc0a19b7 100644 --- a/Projectiles/Boss/AresGaussNukeProjectileBoom.cs +++ b/Projectiles/Boss/AresGaussNukeProjectileBoom.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/AresGaussNukeProjectileSpark.cs b/Projectiles/Boss/AresGaussNukeProjectileSpark.cs index 2cebb4d08e..dc29973504 100644 --- a/Projectiles/Boss/AresGaussNukeProjectileSpark.cs +++ b/Projectiles/Boss/AresGaussNukeProjectileSpark.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/AresLaserBeamStart.cs b/Projectiles/Boss/AresLaserBeamStart.cs index 79dae329f9..fd96c14180 100644 --- a/Projectiles/Boss/AresLaserBeamStart.cs +++ b/Projectiles/Boss/AresLaserBeamStart.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.velocity == Vector2.Zero) return false; - Texture2D beamStart = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D beamStart = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D beamMiddle = ModContent.Request("CalamityMod/ExtraTextures/Lasers/AresLaserBeamMiddle", AssetRequestMode.ImmediateLoad).Value; Texture2D beamEnd = ModContent.Request("CalamityMod/ExtraTextures/Lasers/AresLaserBeamEnd", AssetRequestMode.ImmediateLoad).Value; diff --git a/Projectiles/Boss/AresPlasmaBolt.cs b/Projectiles/Boss/AresPlasmaBolt.cs index d291c6718e..adba705b56 100644 --- a/Projectiles/Boss/AresPlasmaBolt.cs +++ b/Projectiles/Boss/AresPlasmaBolt.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/AresPlasmaFireball.cs b/Projectiles/Boss/AresPlasmaFireball.cs index 15676d5635..c214b13881 100644 --- a/Projectiles/Boss/AresPlasmaFireball.cs +++ b/Projectiles/Boss/AresPlasmaFireball.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/AresTeslaOrb.cs b/Projectiles/Boss/AresTeslaOrb.cs index 3ccee65e4c..4878f29a10 100644 --- a/Projectiles/Boss/AresTeslaOrb.cs +++ b/Projectiles/Boss/AresTeslaOrb.cs @@ -21,10 +21,10 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/ArtemisChargeTelegraph.cs b/Projectiles/Boss/ArtemisChargeTelegraph.cs index 6b3648880b..0ec7ee0a8d 100644 --- a/Projectiles/Boss/ArtemisChargeTelegraph.cs +++ b/Projectiles/Boss/ArtemisChargeTelegraph.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/ArtemisDeathrayTelegraph.cs b/Projectiles/Boss/ArtemisDeathrayTelegraph.cs index 132f4c959f..8baf69fb39 100644 --- a/Projectiles/Boss/ArtemisDeathrayTelegraph.cs +++ b/Projectiles/Boss/ArtemisDeathrayTelegraph.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/ArtemisLaser.cs b/Projectiles/Boss/ArtemisLaser.cs index 8232a47fdc..454670d01a 100644 --- a/Projectiles/Boss/ArtemisLaser.cs +++ b/Projectiles/Boss/ArtemisLaser.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -217,7 +217,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.B = (byte)(255 * Projectile.Opacity); Vector2 drawOffset = Projectile.velocity.SafeNormalize(Vector2.Zero) * -30f; Projectile.Center += drawOffset; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Projectile.Center -= drawOffset; return false; } diff --git a/Projectiles/Boss/ArtemisSpinLaserbeam.cs b/Projectiles/Boss/ArtemisSpinLaserbeam.cs index 45d346d659..08b27e1575 100644 --- a/Projectiles/Boss/ArtemisSpinLaserbeam.cs +++ b/Projectiles/Boss/ArtemisSpinLaserbeam.cs @@ -30,15 +30,15 @@ namespace CalamityMod.Projectiles.Boss public override float Lifetime => 600; public override Color LaserOverlayColor => new Color(250, 180, 100, 100); public override Color LightCastColor => Color.White; - public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Type].Value; public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/AresLaserBeamMiddle", AssetRequestMode.ImmediateLoad).Value; public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/AresLaserBeamEnd", AssetRequestMode.ImmediateLoad).Value; public override string Texture => "CalamityMod/Projectiles/Boss/AresLaserBeamStart"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; // This is its serious name } @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Boss // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 0f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public float LaserWidthFunction(float _) => Projectile.scale * Projectile.width; diff --git a/Projectiles/Boss/AstralFlame.cs b/Projectiles/Boss/AstralFlame.cs index 3738d2946f..99629bc81a 100644 --- a/Projectiles/Boss/AstralFlame.cs +++ b/Projectiles/Boss/AstralFlame.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/AstralGodRay.cs b/Projectiles/Boss/AstralGodRay.cs index d84d7ad212..bca3fb8b44 100644 --- a/Projectiles/Boss/AstralGodRay.cs +++ b/Projectiles/Boss/AstralGodRay.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Boss/AstralLaser.cs b/Projectiles/Boss/AstralLaser.cs index fbc21c0d28..f81ffeeeac 100644 --- a/Projectiles/Boss/AstralLaser.cs +++ b/Projectiles/Boss/AstralLaser.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/AstralShot2.cs b/Projectiles/Boss/AstralShot2.cs index a07a287af0..82f15bd2a2 100644 --- a/Projectiles/Boss/AstralShot2.cs +++ b/Projectiles/Boss/AstralShot2.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/BigFlare.cs b/Projectiles/Boss/BigFlare.cs index 48ca50b2c9..af1f3b5f90 100644 --- a/Projectiles/Boss/BigFlare.cs +++ b/Projectiles/Boss/BigFlare.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Boss public static readonly SoundStyle FlareSound = new("CalamityMod/Sounds/Custom/Yharon/YharonInfernado"); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/BigFlare2.cs b/Projectiles/Boss/BigFlare2.cs index 32cd12277f..85a99f9a3f 100644 --- a/Projectiles/Boss/BigFlare2.cs +++ b/Projectiles/Boss/BigFlare2.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Boss public static readonly SoundStyle FlareSound = new("CalamityMod/Sounds/Custom/Yharon/YharonInfernado"); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/BirbAura.cs b/Projectiles/Boss/BirbAura.cs index 5f6e1b731e..bf325251d8 100644 --- a/Projectiles/Boss/BirbAura.cs +++ b/Projectiles/Boss/BirbAura.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.velocity == Vector2.Zero) return false; - Texture2D middleTex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D middleTex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D endpointTex = ModContent.Request("CalamityMod/ExtraTextures/Lasers/BirbAuraEndpoints", AssetRequestMode.ImmediateLoad).Value; // Used to track the animation of the segments diff --git a/Projectiles/Boss/BloodGeyser.cs b/Projectiles/Boss/BloodGeyser.cs index c6d458821e..a821b4b885 100644 --- a/Projectiles/Boss/BloodGeyser.cs +++ b/Projectiles/Boss/BloodGeyser.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index 344dee7f5e..b69a56ddd3 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Boss public int time = 0; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Boss } } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 10 * Projectile.scale, targetHitbox); diff --git a/Projectiles/Boss/BrimstoneFire.cs b/Projectiles/Boss/BrimstoneFire.cs index 42b6e2b860..2fb7384d2e 100644 --- a/Projectiles/Boss/BrimstoneFire.cs +++ b/Projectiles/Boss/BrimstoneFire.cs @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index c30a023c2f..a0abed02ee 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Boss } } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index 2056239802..81d2d736db 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -75,8 +75,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int drawStart = frameHeight * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Boss/BrimstoneHellfireball.cs b/Projectiles/Boss/BrimstoneHellfireball.cs index 28eb48be39..c35f3e1f66 100644 --- a/Projectiles/Boss/BrimstoneHellfireball.cs +++ b/Projectiles/Boss/BrimstoneHellfireball.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index 661c9fd3d7..bf47477ee5 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -371,7 +371,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; lightColor.R = (byte)(255 * Projectile.Opacity); Main.spriteBatch.End(); Effect shieldEffect = Filters.Scene["CalamityMod:HellBall"].GetShader().Shader; diff --git a/Projectiles/Boss/BrimstoneRay.cs b/Projectiles/Boss/BrimstoneRay.cs index 7e18a2f859..860895fc39 100644 --- a/Projectiles/Boss/BrimstoneRay.cs +++ b/Projectiles/Boss/BrimstoneRay.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.Boss { return false; } - Texture2D texture2D19 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D19 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D texture2D20 = ModContent.Request("CalamityMod/ExtraTextures/Lasers/BrimstoneRayMid", AssetRequestMode.ImmediateLoad).Value; Texture2D texture2D21 = ModContent.Request("CalamityMod/ExtraTextures/Lasers/BrimstoneRayEnd", AssetRequestMode.ImmediateLoad).Value; float rayDrawLength = Projectile.localAI[1]; //length of laser diff --git a/Projectiles/Boss/BrimstoneTargetRay.cs b/Projectiles/Boss/BrimstoneTargetRay.cs index 8d402eab10..02cfc656a3 100644 --- a/Projectiles/Boss/BrimstoneTargetRay.cs +++ b/Projectiles/Boss/BrimstoneTargetRay.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Boss { return false; } - Texture2D texture2D19 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D19 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D texture2D20 = ModContent.Request("CalamityMod/ExtraTextures/Lasers/BrimstoneRayMid", AssetRequestMode.ImmediateLoad).Value; Texture2D texture2D21 = ModContent.Request("CalamityMod/ExtraTextures/Lasers/BrimstoneRayEnd", AssetRequestMode.ImmediateLoad).Value; float rayDrawLength = Projectile.localAI[1]; //length of laser diff --git a/Projectiles/Boss/BrimstoneWave.cs b/Projectiles/Boss/BrimstoneWave.cs index abb32499e3..b55aad687d 100644 --- a/Projectiles/Boss/BrimstoneWave.cs +++ b/Projectiles/Boss/BrimstoneWave.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -78,8 +78,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Boss/CirrusBlast.cs b/Projectiles/Boss/CirrusBlast.cs index 3f0496de0d..37c926aaa8 100644 --- a/Projectiles/Boss/CirrusBlast.cs +++ b/Projectiles/Boss/CirrusBlast.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 4f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public override bool CanHitPlayer(Player target) => Projectile.scale >= 0.5f; @@ -105,9 +105,9 @@ namespace CalamityMod.Projectiles.Boss return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. Vector2 centerOnLaser = Projectile.Center + Projectile.velocity * Projectile.scale * 116f; diff --git a/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs b/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs index 7465dfea8a..dd0beddb11 100644 --- a/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs +++ b/Projectiles/Boss/CirrusPhotonRipperPrismTooth.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 36; } public override void SetDefaults() diff --git a/Projectiles/Boss/CirrusPhotonRipperProjectile.cs b/Projectiles/Boss/CirrusPhotonRipperProjectile.cs index 8e5c509e28..c7363796be 100644 --- a/Projectiles/Boss/CirrusPhotonRipperProjectile.cs +++ b/Projectiles/Boss/CirrusPhotonRipperProjectile.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowmaskTexture = ModContent.Request("CalamityMod/Projectiles/Melee/PhotonRipperGlowmask").Value; Rectangle glowmaskRectangle = glowmaskTexture.Frame(1, 6, 0, Projectile.frame); Vector2 origin = texture.Size() * 0.5f; diff --git a/Projectiles/Boss/CirrusVolatileVodkaBottle.cs b/Projectiles/Boss/CirrusVolatileVodkaBottle.cs index b4efe39513..e4dc7f5c1c 100644 --- a/Projectiles/Boss/CirrusVolatileVodkaBottle.cs +++ b/Projectiles/Boss/CirrusVolatileVodkaBottle.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Boss/CursedFire.cs b/Projectiles/Boss/CursedFire.cs index cf3185f8ab..cf1555fc68 100644 --- a/Projectiles/Boss/CursedFire.cs +++ b/Projectiles/Boss/CursedFire.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through diff --git a/Projectiles/Boss/DarkEnergyBall.cs b/Projectiles/Boss/DarkEnergyBall.cs index b9e79f2352..ad7fa65911 100644 --- a/Projectiles/Boss/DarkEnergyBall.cs +++ b/Projectiles/Boss/DarkEnergyBall.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = DarkEnergy.FrameCount; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = DarkEnergy.FrameCount; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -70,14 +70,14 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(ModContent.Request($"{Texture}Glow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White * Projectile.Opacity, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/DarkEnergyBall2.cs b/Projectiles/Boss/DarkEnergyBall2.cs index 7ad6d26771..17076168fc 100644 --- a/Projectiles/Boss/DarkEnergyBall2.cs +++ b/Projectiles/Boss/DarkEnergyBall2.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = DarkEnergy.FrameCount; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = DarkEnergy.FrameCount; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -68,14 +68,14 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(ModContent.Request($"{Texture}Glow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/DarkOrb.cs b/Projectiles/Boss/DarkOrb.cs index 3fbd229136..07d6295347 100644 --- a/Projectiles/Boss/DarkOrb.cs +++ b/Projectiles/Boss/DarkOrb.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -557,7 +557,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/DesertScourgeDiveSplash.cs b/Projectiles/Boss/DesertScourgeDiveSplash.cs index 39d9946a5f..42f310eac0 100644 --- a/Projectiles/Boss/DesertScourgeDiveSplash.cs +++ b/Projectiles/Boss/DesertScourgeDiveSplash.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 14; + Main.projFrames[Type] = 14; } public override void SetDefaults() @@ -37,13 +37,13 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } } diff --git a/Projectiles/Boss/DesertScourgeSpit.cs b/Projectiles/Boss/DesertScourgeSpit.cs index 66d6e6d8e8..a7e4915e0e 100644 --- a/Projectiles/Boss/DesertScourgeSpit.cs +++ b/Projectiles/Boss/DesertScourgeSpit.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Projectile.tileCollide = Projectile.timeLeft < (Projectile.aiStyle == ProjAIStyleID.Arrow ? 540 : 300); @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/DeusRitualDrama.cs b/Projectiles/Boss/DeusRitualDrama.cs index 0ba41b6cb2..8ff63ebb1e 100644 --- a/Projectiles/Boss/DeusRitualDrama.cs +++ b/Projectiles/Boss/DeusRitualDrama.cs @@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Boss public void DrawStars(SpriteBatch spriteBatch, Vector2 offset) { - Texture2D starTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D starTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < 6; i++) { float angle = MathHelper.TwoPi * i / 6f + Time / 15f; diff --git a/Projectiles/Boss/DoGBeam.cs b/Projectiles/Boss/DoGBeam.cs index 109c0b94bf..6be31c977f 100644 --- a/Projectiles/Boss/DoGBeam.cs +++ b/Projectiles/Boss/DoGBeam.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Boss/DoGBeamPortal.cs b/Projectiles/Boss/DoGBeamPortal.cs index 8b54b531b6..dca2e08b29 100644 --- a/Projectiles/Boss/DoGBeamPortal.cs +++ b/Projectiles/Boss/DoGBeamPortal.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() diff --git a/Projectiles/Boss/DoGDeath.cs b/Projectiles/Boss/DoGDeath.cs index f3b3d87ad7..b1ff1dcefa 100644 --- a/Projectiles/Boss/DoGDeath.cs +++ b/Projectiles/Boss/DoGDeath.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/DoGDeathBoom.cs b/Projectiles/Boss/DoGDeathBoom.cs index 8ffe85d908..7cf01dd3ac 100644 --- a/Projectiles/Boss/DoGDeathBoom.cs +++ b/Projectiles/Boss/DoGDeathBoom.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/DoGFire.cs b/Projectiles/Boss/DoGFire.cs index cf979d61ab..315a98ac61 100644 --- a/Projectiles/Boss/DoGFire.cs +++ b/Projectiles/Boss/DoGFire.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/DoGP1EndPortal.cs b/Projectiles/Boss/DoGP1EndPortal.cs index 0a12f1f6e9..cd920619f3 100644 --- a/Projectiles/Boss/DoGP1EndPortal.cs +++ b/Projectiles/Boss/DoGP1EndPortal.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/DoGTeleportRift.cs b/Projectiles/Boss/DoGTeleportRift.cs index a57fd76e88..bf28c53f02 100644 --- a/Projectiles/Boss/DoGTeleportRift.cs +++ b/Projectiles/Boss/DoGTeleportRift.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss { float lerpMult = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * (MathHelper.Pi * 2f) * 3f)) * 0.8f; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color baseColor = new Color(150, 100, 255, 255) * Projectile.Opacity; baseColor *= 0.5f; diff --git a/Projectiles/Boss/DraedonSummonLaser.cs b/Projectiles/Boss/DraedonSummonLaser.cs index 173b3f3adf..2326b291de 100644 --- a/Projectiles/Boss/DraedonSummonLaser.cs +++ b/Projectiles/Boss/DraedonSummonLaser.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/DyingSun.cs b/Projectiles/Boss/DyingSun.cs index bf24ecdc3e..ebd8996414 100644 --- a/Projectiles/Boss/DyingSun.cs +++ b/Projectiles/Boss/DyingSun.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/Flare.cs b/Projectiles/Boss/Flare.cs index c187276e6b..5341af3da0 100644 --- a/Projectiles/Boss/Flare.cs +++ b/Projectiles/Boss/Flare.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Boss public static readonly SoundStyle FlareSound = new("CalamityMod/Sounds/Custom/Yharon/YharonInfernado"); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/FlareBomb.cs b/Projectiles/Boss/FlareBomb.cs index a77545e689..b46e89914d 100644 --- a/Projectiles/Boss/FlareBomb.cs +++ b/Projectiles/Boss/FlareBomb.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.25f, 0f); @@ -104,8 +104,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture.Width, framing), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/FlareDust.cs b/Projectiles/Boss/FlareDust.cs index 82112ea89f..29eca0fc93 100644 --- a/Projectiles/Boss/FlareDust.cs +++ b/Projectiles/Boss/FlareDust.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.25f, 0f); @@ -112,8 +112,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/FlareDust2.cs b/Projectiles/Boss/FlareDust2.cs index afb50d3182..0627b6fd6b 100644 --- a/Projectiles/Boss/FlareDust2.cs +++ b/Projectiles/Boss/FlareDust2.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.25f, 0f); @@ -52,8 +52,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/Flarenado.cs b/Projectiles/Boss/Flarenado.cs index f3e4b4c37a..e8e1ce6b58 100644 --- a/Projectiles/Boss/Flarenado.cs +++ b/Projectiles/Boss/Flarenado.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; + Main.projFrames[Type] = 12; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -146,8 +146,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/FoveanatorEnergyBomb.cs b/Projectiles/Boss/FoveanatorEnergyBomb.cs index 43f47f9196..246e80bfb4 100644 --- a/Projectiles/Boss/FoveanatorEnergyBomb.cs +++ b/Projectiles/Boss/FoveanatorEnergyBomb.cs @@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - Texture2D texture = TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() / new Vector2(TotalXFrames, TotalYFrames) * 0.5f; Rectangle frame = texture.Frame(TotalXFrames, TotalYFrames, frameX, frameY); diff --git a/Projectiles/Boss/FoveanatorFlamethrower.cs b/Projectiles/Boss/FoveanatorFlamethrower.cs index 91cdcfcef5..6583bef428 100644 --- a/Projectiles/Boss/FoveanatorFlamethrower.cs +++ b/Projectiles/Boss/FoveanatorFlamethrower.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through diff --git a/Projectiles/Boss/FoveanatorLaser.cs b/Projectiles/Boss/FoveanatorLaser.cs index aaaa696a2e..fc73073e84 100644 --- a/Projectiles/Boss/FoveanatorLaser.cs +++ b/Projectiles/Boss/FoveanatorLaser.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/FrostMist.cs b/Projectiles/Boss/FrostMist.cs index 8cddc3dd3d..dc8229123f 100644 --- a/Projectiles/Boss/FrostMist.cs +++ b/Projectiles/Boss/FrostMist.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 8; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; if (Projectile.ai[1] == 0f) @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs index 9a6e845e2d..b7fa0c573f 100644 --- a/Projectiles/Boss/GreatSandBlast.cs +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/HiveBombGoliath.cs b/Projectiles/Boss/HiveBombGoliath.cs index 14a62b1d0a..0ebaf1fcc6 100644 --- a/Projectiles/Boss/HiveBombGoliath.cs +++ b/Projectiles/Boss/HiveBombGoliath.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -87,15 +87,15 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { Projectile.DrawBackglow(PlaguebringerGoliath.BackglowColor, 4f); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Texture2D glow = ModContent.Request("CalamityMod/Projectiles/Boss/HiveBombGoliathGlow").Value; - Vector2 textureArea = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Projectile.type] / 2); + Vector2 textureArea = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Type] / 2); Vector2 drawArea = Projectile.Center - Main.screenPosition; - drawArea -= new Vector2(glow.Width, glow.Height / Main.projFrames[Projectile.type]) / 2f; + drawArea -= new Vector2(glow.Width, glow.Height / Main.projFrames[Type]) / 2f; drawArea += textureArea + new Vector2(0f, Projectile.gfxOffY); Color whiteColor = Color.White; - int height = glow.Height / Main.projFrames[Projectile.type]; + int height = glow.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Main.spriteBatch.Draw(glow, drawArea, new Rectangle(0, drawStart, glow.Width, height), whiteColor, Projectile.rotation, textureArea, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/HolyAura.cs b/Projectiles/Boss/HolyAura.cs index 0837b1a5ea..6ef84c0b5e 100644 --- a/Projectiles/Boss/HolyAura.cs +++ b/Projectiles/Boss/HolyAura.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() / 2f; float time = Main.GlobalTimeWrappedHourly % 10f / 10f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index 5914bc44da..d38d41e26d 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void OnSpawn(IEntitySource source) @@ -127,8 +127,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Vector2 sc = Vector2.One; Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, sc, texture); diff --git a/Projectiles/Boss/HolyBomb.cs b/Projectiles/Boss/HolyBomb.cs index 228eb43f73..783cbbc98c 100644 --- a/Projectiles/Boss/HolyBomb.cs +++ b/Projectiles/Boss/HolyBomb.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -92,8 +92,8 @@ namespace CalamityMod.Projectiles.Boss { float squish = CalamityUtils.SineBumpEasing(SquishAnimation, 1) * 0.25f; - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBombNight").Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBombNight").Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, new Vector2(Projectile.scale + squish, Projectile.scale - squish), texture, offset: new Vector2(0, (-22 * (1 - squish)))); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, (framing / 2f) + 22), new Vector2(Projectile.scale + squish, Projectile.scale - squish), SpriteEffects.None, 0); diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index c8a9dcbb94..1a981b694b 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Boss { float lerpMult = MathHelper.Lerp(0.5f, 1.5f, Math.Abs((float)Math.Sin(Projectile.localAI[1] / 10f))); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color baseColor = ProvUtils.GetProjectileColor(255, true) * 4; Color baseColor2 = ProvUtils.GetProjectileColor(255); diff --git a/Projectiles/Boss/HolyExplosionBoom.cs b/Projectiles/Boss/HolyExplosionBoom.cs index a543577f17..0a1fde0f20 100644 --- a/Projectiles/Boss/HolyExplosionBoom.cs +++ b/Projectiles/Boss/HolyExplosionBoom.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/HolyFire.cs b/Projectiles/Boss/HolyFire.cs index 612d6e1542..af899962cb 100644 --- a/Projectiles/Boss/HolyFire.cs +++ b/Projectiles/Boss/HolyFire.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { Projectile.scale = 1.5f; - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFireNight").Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFireNight").Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, new Vector2(Projectile.scale)); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/HolyFire2.cs b/Projectiles/Boss/HolyFire2.cs index 360f7796a4..6c7602c239 100644 --- a/Projectiles/Boss/HolyFire2.cs +++ b/Projectiles/Boss/HolyFire2.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -86,8 +86,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/HolyFlare.cs b/Projectiles/Boss/HolyFlare.cs index 72817641c2..1fc4462898 100644 --- a/Projectiles/Boss/HolyFlare.cs +++ b/Projectiles/Boss/HolyFlare.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -93,8 +93,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFlareNight").Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFlareNight").Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/HolyLight.cs b/Projectiles/Boss/HolyLight.cs index 1a0d114a9f..31319ee9f3 100644 --- a/Projectiles/Boss/HolyLight.cs +++ b/Projectiles/Boss/HolyLight.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Boss float vel = Projectile.velocity.Length() / 8; Projectile.localAI[1] += vel; - Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color brightGreen = new Color(54, 209, 54, 0); Vector2 projDirection = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Vector2 halfTextureSize = drawTexture.Size() / 2f; diff --git a/Projectiles/Boss/HolySpear.cs b/Projectiles/Boss/HolySpear.cs index 8f1d475119..e09f2ac6e0 100644 --- a/Projectiles/Boss/HolySpear.cs +++ b/Projectiles/Boss/HolySpear.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; bool aimedSpear = Projectile.ai[0] > 0f; Color baseColor = new Color(255, aimedSpear ? 255 : 125, aimedSpear ? 25 : 125); // Default to day diff --git a/Projectiles/Boss/HomingGasBulb.cs b/Projectiles/Boss/HomingGasBulb.cs index 790a2bcb87..2c080802a1 100644 --- a/Projectiles/Boss/HomingGasBulb.cs +++ b/Projectiles/Boss/HomingGasBulb.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Boss/HomingGasBulbSporeGas.cs b/Projectiles/Boss/HomingGasBulbSporeGas.cs index bbe7f1e2c8..d467e3eeb4 100644 --- a/Projectiles/Boss/HomingGasBulbSporeGas.cs +++ b/Projectiles/Boss/HomingGasBulbSporeGas.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { // Changes the texture of the projectile - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; switch ((int)Projectile.ai[0]) { case 0: @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss default: break; } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, texture); return false; } diff --git a/Projectiles/Boss/HomingLaserDart.cs b/Projectiles/Boss/HomingLaserDart.cs index 49f9f9c9e7..dc93ed2c2b 100644 --- a/Projectiles/Boss/HomingLaserDart.cs +++ b/Projectiles/Boss/HomingLaserDart.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -205,7 +205,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/IchorBlob.cs b/Projectiles/Boss/IchorBlob.cs index 8f266377bd..479fb920eb 100644 --- a/Projectiles/Boss/IchorBlob.cs +++ b/Projectiles/Boss/IchorBlob.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -185,7 +185,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Boss/IchorShot.cs b/Projectiles/Boss/IchorShot.cs index 0f7d9381e2..f1e2338a03 100644 --- a/Projectiles/Boss/IchorShot.cs +++ b/Projectiles/Boss/IchorShot.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/Infernado.cs b/Projectiles/Boss/Infernado.cs index 0e50df4913..691c909e79 100644 --- a/Projectiles/Boss/Infernado.cs +++ b/Projectiles/Boss/Infernado.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; + Main.projFrames[Type] = 12; } public override void SetDefaults() @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -148,8 +148,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/Infernado2.cs b/Projectiles/Boss/Infernado2.cs index 74b3d2dcec..c73d5dc424 100644 --- a/Projectiles/Boss/Infernado2.cs +++ b/Projectiles/Boss/Infernado2.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; + Main.projFrames[Type] = 12; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -142,8 +142,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/InfernadoRevenge.cs b/Projectiles/Boss/InfernadoRevenge.cs index bfc028fc5b..8284f6abec 100644 --- a/Projectiles/Boss/InfernadoRevenge.cs +++ b/Projectiles/Boss/InfernadoRevenge.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss public const int TornadoHeight = 8800; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/JewelProjectile.cs b/Projectiles/Boss/JewelProjectile.cs index 39e6688a01..d9bbbe769f 100644 --- a/Projectiles/Boss/JewelProjectile.cs +++ b/Projectiles/Boss/JewelProjectile.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/LeviathanBomb.cs b/Projectiles/Boss/LeviathanBomb.cs index ff64d08ed9..f995b4634f 100644 --- a/Projectiles/Boss/LeviathanBomb.cs +++ b/Projectiles/Boss/LeviathanBomb.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Boss/LeviathanSpawner.cs b/Projectiles/Boss/LeviathanSpawner.cs index 13873a7d62..5bca369957 100644 --- a/Projectiles/Boss/LeviathanSpawner.cs +++ b/Projectiles/Boss/LeviathanSpawner.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Boss public static readonly SoundStyle RumbleSound = new("CalamityMod/Sounds/Custom/LeviathanRumble"); public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/MajesticSparkle.cs b/Projectiles/Boss/MajesticSparkle.cs index aab013ceda..c956aaf35b 100644 --- a/Projectiles/Boss/MajesticSparkle.cs +++ b/Projectiles/Boss/MajesticSparkle.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Boss } public override bool PreDraw(ref Color lightColor) { - Texture2D sparkleTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D sparkleTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Color sparkleColor = Main.hslToRgb(ColorSpectrumHue, 1f, 0.5f) * Projectile.Opacity * 0.5f; diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index c9d5306155..e6f75f7469 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -123,8 +123,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/MoltenBlob.cs b/Projectiles/Boss/MoltenBlob.cs index 6e1562fccd..83f9446068 100644 --- a/Projectiles/Boss/MoltenBlob.cs +++ b/Projectiles/Boss/MoltenBlob.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -101,8 +101,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * (1 + Projectile.frame); float squish = CalamityUtils.SineBumpEasing(Landing, 1) * 0.5f; Projectile.rotation = 0f; diff --git a/Projectiles/Boss/MushBomb.cs b/Projectiles/Boss/MushBomb.cs index 13f66d6d3f..3b31f317a9 100644 --- a/Projectiles/Boss/MushBomb.cs +++ b/Projectiles/Boss/MushBomb.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -86,8 +86,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White * Projectile.Opacity, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); @@ -96,8 +96,8 @@ namespace CalamityMod.Projectiles.Boss public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Boss/MushBombFall.cs b/Projectiles/Boss/MushBombFall.cs index bbc5cadcfe..aa774c226c 100644 --- a/Projectiles/Boss/MushBombFall.cs +++ b/Projectiles/Boss/MushBombFall.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -89,8 +89,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; SpriteEffects spriteEffects = SpriteEffects.None; @@ -103,8 +103,8 @@ namespace CalamityMod.Projectiles.Boss public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/MushBombGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White * Projectile.Opacity, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/OldDukeGore.cs b/Projectiles/Boss/OldDukeGore.cs index fb1110f055..382dc902b0 100644 --- a/Projectiles/Boss/OldDukeGore.cs +++ b/Projectiles/Boss/OldDukeGore.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/OldDukeSummonDrop.cs b/Projectiles/Boss/OldDukeSummonDrop.cs index 5dff1c3c95..abb9efda0c 100644 --- a/Projectiles/Boss/OldDukeSummonDrop.cs +++ b/Projectiles/Boss/OldDukeSummonDrop.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(255, 255, 255, 127), 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(255, 255, 255, 127), 2); return false; } } diff --git a/Projectiles/Boss/OldDukeVortex.cs b/Projectiles/Boss/OldDukeVortex.cs index f2c1fd5171..264a595984 100644 --- a/Projectiles/Boss/OldDukeVortex.cs +++ b/Projectiles/Boss/OldDukeVortex.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs index 895de7bbf4..b0c177b13f 100644 --- a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs +++ b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Boss bottomY--; Vector2 bottomVector = new Vector2(centerAsTileCoords.X, bottomY) * 16f + new Vector2(8f); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float yMax = 1600f * Projectile.scale; for (int y = 0; y < yMax; y += 30) { diff --git a/Projectiles/Boss/PeanutRocket.cs b/Projectiles/Boss/PeanutRocket.cs index e754966886..e0e203d817 100644 --- a/Projectiles/Boss/PeanutRocket.cs +++ b/Projectiles/Boss/PeanutRocket.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 9; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 9; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/PlagueStingerGoliath.cs b/Projectiles/Boss/PlagueStingerGoliath.cs index fc59234722..0f064415ea 100644 --- a/Projectiles/Boss/PlagueStingerGoliath.cs +++ b/Projectiles/Boss/PlagueStingerGoliath.cs @@ -59,16 +59,16 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { Projectile.DrawBackglow(PlaguebringerGoliath.BackglowColor, 4f); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } public override void PostDraw(Color lightColor) { Texture2D glow = ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value; - Vector2 textureArea = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Projectile.type] / 2); + Vector2 textureArea = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Type] / 2); Vector2 drawArea = Projectile.Center - Main.screenPosition; - drawArea -= new Vector2(glow.Width, glow.Height / Main.projFrames[Projectile.type]) / 2f; + drawArea -= new Vector2(glow.Width, glow.Height / Main.projFrames[Type]) / 2f; drawArea += textureArea + new Vector2(0f, Projectile.gfxOffY); Color whiteColor = Color.White; Main.spriteBatch.Draw(glow, drawArea, null, whiteColor, Projectile.rotation, textureArea, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/PlagueStingerGoliathV2.cs b/Projectiles/Boss/PlagueStingerGoliathV2.cs index a7615548da..cba5fae545 100644 --- a/Projectiles/Boss/PlagueStingerGoliathV2.cs +++ b/Projectiles/Boss/PlagueStingerGoliathV2.cs @@ -45,16 +45,16 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { Projectile.DrawBackglow(PlaguebringerGoliath.BackglowColor, 4f); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } public override void PostDraw(Color lightColor) { Texture2D glow = ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value; - Vector2 origin = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Projectile.type] / 2); + Vector2 origin = new Vector2(glow.Width / 2, glow.Height / Main.projFrames[Type] / 2); Vector2 drawPos = Projectile.Center - Main.screenPosition; - drawPos -= new Vector2(glow.Width, glow.Height / Main.projFrames[Projectile.type]) / 2f; + drawPos -= new Vector2(glow.Width, glow.Height / Main.projFrames[Type]) / 2f; drawPos += origin + new Vector2(0f, Projectile.gfxOffY); Color whiteColor = Color.White; Main.spriteBatch.Draw(glow, drawPos, null, whiteColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Boss/ProfanedSpear.cs b/Projectiles/Boss/ProfanedSpear.cs index ecaaa25008..d3cf52037b 100644 --- a/Projectiles/Boss/ProfanedSpear.cs +++ b/Projectiles/Boss/ProfanedSpear.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -66,10 +66,10 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/ProfanedSpearNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/ProfanedSpearNight").Value; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/ProvidenceCrystal.cs b/Projectiles/Boss/ProvidenceCrystal.cs index a90cc4a6a7..3b03365fff 100644 --- a/Projectiles/Boss/ProvidenceCrystal.cs +++ b/Projectiles/Boss/ProvidenceCrystal.cs @@ -171,8 +171,8 @@ namespace CalamityMod.Projectiles.Boss { Color colorArea = Lighting.GetColor((int)(Projectile.position.X + Projectile.width * 0.5) / 16, (int)((Projectile.position.Y + Projectile.height * 0.5) / 16.0)); Vector2 drawArea = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle textureRect = texture2D34.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle textureRect = texture2D34.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color colorAlpha = Projectile.GetAlpha(colorArea); Vector2 halfRect = textureRect.Size() / 2f; float scaleFactor = (float)Math.Cos(MathHelper.TwoPi * (Projectile.localAI[0] / 60f)) + 3f + 3f; diff --git a/Projectiles/Boss/ProvidenceCrystalShard.cs b/Projectiles/Boss/ProvidenceCrystalShard.cs index bfc1e781c0..482e4f40be 100644 --- a/Projectiles/Boss/ProvidenceCrystalShard.cs +++ b/Projectiles/Boss/ProvidenceCrystalShard.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Boss/ProvidenceHolyRay.cs b/Projectiles/Boss/ProvidenceHolyRay.cs index 72a56060bf..11d92a468f 100644 --- a/Projectiles/Boss/ProvidenceHolyRay.cs +++ b/Projectiles/Boss/ProvidenceHolyRay.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/RavagerBlast.cs b/Projectiles/Boss/RavagerBlast.cs index 61b4becedc..66ba50876e 100644 --- a/Projectiles/Boss/RavagerBlast.cs +++ b/Projectiles/Boss/RavagerBlast.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Boss // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 4f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } // Can hit if white (regardless of condition) or blue only if the player is (close to) still @@ -126,9 +126,9 @@ namespace CalamityMod.Projectiles.Boss return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. Vector2 centerOnLaser = Projectile.Center + Projectile.velocity * Projectile.scale * 116f; diff --git a/Projectiles/Boss/RedLightning.cs b/Projectiles/Boss/RedLightning.cs index b16281511c..7f2f6405fa 100644 --- a/Projectiles/Boss/RedLightning.cs +++ b/Projectiles/Boss/RedLightning.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() diff --git a/Projectiles/Boss/RedLightningFeather.cs b/Projectiles/Boss/RedLightningFeather.cs index d11b3fe2b4..4941a9ffe3 100644 --- a/Projectiles/Boss/RedLightningFeather.cs +++ b/Projectiles/Boss/RedLightningFeather.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, false); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, Terraria.GameContent.TextureAssets.Projectile[Type].Value, false); return false; } diff --git a/Projectiles/Boss/SCalBrimstoneFireblast.cs b/Projectiles/Boss/SCalBrimstoneFireblast.cs index fce044dea7..17595f148b 100644 --- a/Projectiles/Boss/SCalBrimstoneFireblast.cs +++ b/Projectiles/Boss/SCalBrimstoneFireblast.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss public bool setLifetime = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -159,8 +159,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int drawStart = frameHeight * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Boss/SCalBrimstoneGigablast.cs b/Projectiles/Boss/SCalBrimstoneGigablast.cs index c0c1fab63b..4ac7522311 100644 --- a/Projectiles/Boss/SCalBrimstoneGigablast.cs +++ b/Projectiles/Boss/SCalBrimstoneGigablast.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss public bool setLifetime = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -144,8 +144,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int drawStart = frameHeight * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Boss/SCalRitualDrama.cs b/Projectiles/Boss/SCalRitualDrama.cs index f72cbabdbf..22850fc1e5 100644 --- a/Projectiles/Boss/SCalRitualDrama.cs +++ b/Projectiles/Boss/SCalRitualDrama.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Boss public const int TotalRitualTime = 270; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/SandBlast.cs b/Projectiles/Boss/SandBlast.cs index 53a8ae4d8c..9b20386e13 100644 --- a/Projectiles/Boss/SandBlast.cs +++ b/Projectiles/Boss/SandBlast.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/SandPoisonCloud.cs b/Projectiles/Boss/SandPoisonCloud.cs index f769f853b0..6db2345c81 100644 --- a/Projectiles/Boss/SandPoisonCloud.cs +++ b/Projectiles/Boss/SandPoisonCloud.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 10; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.damage = 0; } - else if (Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); CalamityUtils.DrawProjectileWithBackglow(Projectile, new Color(255, 102, 56), lightColor, 3.75f); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/SandPoisonCloudOldDuke.cs b/Projectiles/Boss/SandPoisonCloudOldDuke.cs index c79b6a8733..30db17a25a 100644 --- a/Projectiles/Boss/SandPoisonCloudOldDuke.cs +++ b/Projectiles/Boss/SandPoisonCloudOldDuke.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 10; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.damage = 0; } - else if (Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); CalamityUtils.DrawProjectileWithBackglow(Projectile, new Color(66, 236, 113), lightColor, 3.75f); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/SandTooth.cs b/Projectiles/Boss/SandTooth.cs index 2278a12abd..f7d9a0a6f7 100644 --- a/Projectiles/Boss/SandTooth.cs +++ b/Projectiles/Boss/SandTooth.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/ScavengerNuke.cs b/Projectiles/Boss/ScavengerNuke.cs index 082ee5c27a..e7dcece543 100644 --- a/Projectiles/Boss/ScavengerNuke.cs +++ b/Projectiles/Boss/ScavengerNuke.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Boss public static readonly SoundStyle ExplosionSound = new("CalamityMod/Sounds/Custom/Ravager/RavagerMissileExplosion"); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() diff --git a/Projectiles/Boss/ShadeNimbusHostile.cs b/Projectiles/Boss/ShadeNimbusHostile.cs index 9ebf0fb51a..60a4894904 100644 --- a/Projectiles/Boss/ShadeNimbusHostile.cs +++ b/Projectiles/Boss/ShadeNimbusHostile.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() diff --git a/Projectiles/Boss/Shadowflamethrower.cs b/Projectiles/Boss/Shadowflamethrower.cs index 78497f54c3..7021df84c2 100644 --- a/Projectiles/Boss/Shadowflamethrower.cs +++ b/Projectiles/Boss/Shadowflamethrower.cs @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through diff --git a/Projectiles/Boss/SignusScythe.cs b/Projectiles/Boss/SignusScythe.cs index fba7051dee..45daa0f955 100644 --- a/Projectiles/Boss/SignusScythe.cs +++ b/Projectiles/Boss/SignusScythe.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/SirenSong.cs b/Projectiles/Boss/SirenSong.cs index c119d5920f..8a343083b5 100644 --- a/Projectiles/Boss/SirenSong.cs +++ b/Projectiles/Boss/SirenSong.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/SkyFlare.cs b/Projectiles/Boss/SkyFlare.cs index 8a7349e2c2..7e8efe47f6 100644 --- a/Projectiles/Boss/SkyFlare.cs +++ b/Projectiles/Boss/SkyFlare.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Boss public static readonly SoundStyle FlareSound = new("CalamityMod/Sounds/Custom/Yharon/YharonInfernado"); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -56,8 +56,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/SkyFlareRevenge.cs b/Projectiles/Boss/SkyFlareRevenge.cs index 8563018980..7cb58e9c83 100644 --- a/Projectiles/Boss/SkyFlareRevenge.cs +++ b/Projectiles/Boss/SkyFlareRevenge.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -46,8 +46,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Boss/SporeGasPlantera.cs b/Projectiles/Boss/SporeGasPlantera.cs index 3ab5f9af80..ac7d85083d 100644 --- a/Projectiles/Boss/SporeGasPlantera.cs +++ b/Projectiles/Boss/SporeGasPlantera.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { // Changes the texture of the projectile - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; switch ((int)Projectile.ai[0]) { case 0: @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Boss default: break; } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, texture); return false; } diff --git a/Projectiles/Boss/SupremeCataclysmFist.cs b/Projectiles/Boss/SupremeCataclysmFist.cs index c6aa6cdf6c..edb9e872bf 100644 --- a/Projectiles/Boss/SupremeCataclysmFist.cs +++ b/Projectiles/Boss/SupremeCataclysmFist.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -231,7 +231,7 @@ namespace CalamityMod.Projectiles.Boss // Decide frames. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; // Fade in and handle visuals. if (Projectile.ai[2] < 3) @@ -269,12 +269,12 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[1] == 1f) texture = ModContent.Request("CalamityMod/Projectiles/Boss/SupremeCataclysmFistAlt").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0); return false; } diff --git a/Projectiles/Boss/SupremeCatastropheSlash.cs b/Projectiles/Boss/SupremeCatastropheSlash.cs index 9048168f99..afa91f3d53 100644 --- a/Projectiles/Boss/SupremeCatastropheSlash.cs +++ b/Projectiles/Boss/SupremeCatastropheSlash.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss // Decide frames. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 7 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 7 % Main.projFrames[Type]; // Fade in and handle visuals. if (Projectile.ai[2] < 4 && Projectile.ai[2] < 50) @@ -196,13 +196,13 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[1] == 0f) texture = ModContent.Request("CalamityMod/Projectiles/Boss/SupremeCatastropheSlashAlt").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; drawPosition -= Projectile.velocity.SafeNormalize(Vector2.UnitX) * 38f; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 0; i < 3; i++) { diff --git a/Projectiles/Boss/THanosSideLaser.cs b/Projectiles/Boss/THanosSideLaser.cs index 4e6a1aa74a..89b47ae15d 100644 --- a/Projectiles/Boss/THanosSideLaser.cs +++ b/Projectiles/Boss/THanosSideLaser.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.B = (byte)(255 * Projectile.Opacity); Vector2 drawOffset = Projectile.velocity.SafeNormalize(Vector2.Zero) * -30f; Projectile.Center += drawOffset; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Projectile.Center -= drawOffset; return false; } diff --git a/Projectiles/Boss/ThanatosBeamStart.cs b/Projectiles/Boss/ThanatosBeamStart.cs index 79a3657cbb..1169549444 100644 --- a/Projectiles/Boss/ThanatosBeamStart.cs +++ b/Projectiles/Boss/ThanatosBeamStart.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Boss public override float Lifetime => 180; public override Color LaserOverlayColor => new(250, 250, 250, 100); public override Color LightCastColor => Color.White; - public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Type].Value; public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/ThanatosBeamMiddle", AssetRequestMode.ImmediateLoad).Value; public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/ThanatosBeamEnd", AssetRequestMode.ImmediateLoad).Value; @@ -41,8 +41,8 @@ namespace CalamityMod.Projectiles.Boss { // Thanatos' mouth laser // This is its serious name - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Boss // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 0f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public override bool PreDraw(ref Color lightColor) @@ -181,9 +181,9 @@ namespace CalamityMod.Projectiles.Boss return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. Main.EntitySpriteDraw(LaserBeginTexture, @@ -218,7 +218,7 @@ namespace CalamityMod.Projectiles.Boss 0); incrementalBodyLength += laserOffset; centerOnLaser += Projectile.velocity * laserOffset; - middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[Projectile.type]; + middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[Type]; if (middleFrameArea.Y + middleFrameArea.Height > LaserMiddleTexture.Height) middleFrameArea.Y = 0; } diff --git a/Projectiles/Boss/ThanatosBeamTelegraph.cs b/Projectiles/Boss/ThanatosBeamTelegraph.cs index 9eb50bc6c2..bd2b92755b 100644 --- a/Projectiles/Boss/ThanatosBeamTelegraph.cs +++ b/Projectiles/Boss/ThanatosBeamTelegraph.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss public const float BeamPosOffset = 16f; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/ThanatosLaser.cs b/Projectiles/Boss/ThanatosLaser.cs index 24e844b4d6..75739ff077 100644 --- a/Projectiles/Boss/ThanatosLaser.cs +++ b/Projectiles/Boss/ThanatosLaser.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 4; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -262,7 +262,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.B = (byte)(255 * Projectile.Opacity); Vector2 drawOffset = Projectile.velocity.SafeNormalize(Vector2.Zero) * -30f; Projectile.Center += drawOffset; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Projectile.Center -= drawOffset; return false; } diff --git a/Projectiles/Boss/ThornBallSpike.cs b/Projectiles/Boss/ThornBallSpike.cs index 86d5b8d957..790a4288bb 100644 --- a/Projectiles/Boss/ThornBallSpike.cs +++ b/Projectiles/Boss/ThornBallSpike.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/ToxicCloud.cs b/Projectiles/Boss/ToxicCloud.cs index 81f4051732..c1c879d50c 100644 --- a/Projectiles/Boss/ToxicCloud.cs +++ b/Projectiles/Boss/ToxicCloud.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 10; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.damage = 0; } - else if (Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); CalamityUtils.DrawProjectileWithBackglow(Projectile, new Color(66, 236, 113), lightColor, 3.75f); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/UnstableCrimulanGlob.cs b/Projectiles/Boss/UnstableCrimulanGlob.cs index 5885c845be..5c2a01564d 100644 --- a/Projectiles/Boss/UnstableCrimulanGlob.cs +++ b/Projectiles/Boss/UnstableCrimulanGlob.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/UnstableEbonianGlob.cs b/Projectiles/Boss/UnstableEbonianGlob.cs index b943ead30d..2860149285 100644 --- a/Projectiles/Boss/UnstableEbonianGlob.cs +++ b/Projectiles/Boss/UnstableEbonianGlob.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Boss/WaterSpear.cs b/Projectiles/Boss/WaterSpear.cs index 0580bbf1e2..7a461904d6 100644 --- a/Projectiles/Boss/WaterSpear.cs +++ b/Projectiles/Boss/WaterSpear.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Boss/YharonBulletHellVortex.cs b/Projectiles/Boss/YharonBulletHellVortex.cs index ce7aa08e4d..b62cfee279 100644 --- a/Projectiles/Boss/YharonBulletHellVortex.cs +++ b/Projectiles/Boss/YharonBulletHellVortex.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Boss/YharonFireball.cs b/Projectiles/Boss/YharonFireball.cs index 553a32d527..2f8648e584 100644 --- a/Projectiles/Boss/YharonFireball.cs +++ b/Projectiles/Boss/YharonFireball.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -68,8 +68,8 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); if (CalamityClientConfig.Instance.Afterimages) diff --git a/Projectiles/Boss/YharonFireball2.cs b/Projectiles/Boss/YharonFireball2.cs index 52db19e003..df9e249e70 100644 --- a/Projectiles/Boss/YharonFireball2.cs +++ b/Projectiles/Boss/YharonFireball2.cs @@ -22,9 +22,9 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; if (Projectile.ai[0] < TimeBeforeFalling) @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/DraedonsArsenal/AnomalysNanogunMPFBDevastator.cs b/Projectiles/DraedonsArsenal/AnomalysNanogunMPFBDevastator.cs index 7a763570fa..c143c8b02b 100644 --- a/Projectiles/DraedonsArsenal/AnomalysNanogunMPFBDevastator.cs +++ b/Projectiles/DraedonsArsenal/AnomalysNanogunMPFBDevastator.cs @@ -52,12 +52,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // Animate the projectile Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 3 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 3 % Main.projFrames[Type]; } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; int yPos = texture.Height / Main.projFrames[Type] * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.position - Main.screenPosition, diff --git a/Projectiles/DraedonsArsenal/AnomalysNanogunPlasmaBeam.cs b/Projectiles/DraedonsArsenal/AnomalysNanogunPlasmaBeam.cs index f910d2c453..a1b875a79d 100644 --- a/Projectiles/DraedonsArsenal/AnomalysNanogunPlasmaBeam.cs +++ b/Projectiles/DraedonsArsenal/AnomalysNanogunPlasmaBeam.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.timeLeft = 12; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; - Main.projFrames[Projectile.type] = 18; + Main.projFrames[Type] = 18; } public override void AI() @@ -122,9 +122,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal private void DrawPlasmaBeam(Color beamColor, float scale, int startFrame = 0, int middleFrame = 0, int endFrame = 0) { - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, startFrame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, middleFrame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, endFrame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, startFrame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, middleFrame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, endFrame); // Start texture drawing. Main.EntitySpriteDraw(LaserBeginTexture, diff --git a/Projectiles/DraedonsArsenal/FrequencyManipulatorEnergy.cs b/Projectiles/DraedonsArsenal/FrequencyManipulatorEnergy.cs index 1db526bbda..4bd40a578c 100644 --- a/Projectiles/DraedonsArsenal/FrequencyManipulatorEnergy.cs +++ b/Projectiles/DraedonsArsenal/FrequencyManipulatorEnergy.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public const int Lifetime = 240; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs b/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs index e51c3a9d58..d552e4e2b2 100644 --- a/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs +++ b/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 90; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 90; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Main.EntitySpriteDraw(texture, drawPosition, null, lightColor, Projectile.rotation, origin, Projectile.scale, Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); return false; diff --git a/Projectiles/DraedonsArsenal/GatlingLaserProj.cs b/Projectiles/DraedonsArsenal/GatlingLaserProj.cs index 1b90b5bb90..afe5e4399e 100644 --- a/Projectiles/DraedonsArsenal/GatlingLaserProj.cs +++ b/Projectiles/DraedonsArsenal/GatlingLaserProj.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { Projectile.frameCounter = 10; Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; } diff --git a/Projectiles/DraedonsArsenal/GaussPistolShot.cs b/Projectiles/DraedonsArsenal/GaussPistolShot.cs index 552d68adc5..8b69e78d76 100644 --- a/Projectiles/DraedonsArsenal/GaussPistolShot.cs +++ b/Projectiles/DraedonsArsenal/GaussPistolShot.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public const float ChargeTime = 30f; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; } public override void SetDefaults() diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index 9a99cf55b4..544e90f2f1 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (Projectile.frameCounter % 4f == 3f) { Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -183,8 +183,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs b/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs index b0e8e818b4..fe98ee4a84 100644 --- a/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs +++ b/Projectiles/DraedonsArsenal/MassivePlasmaExplosion.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; int length = texture.Width / horizontalFrames; int height = texture.Height / verticalFrames; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/DraedonsArsenal/MountedScannerLaser.cs b/Projectiles/DraedonsArsenal/MountedScannerLaser.cs index 4e1fd3599e..e51fce714d 100644 --- a/Projectiles/DraedonsArsenal/MountedScannerLaser.cs +++ b/Projectiles/DraedonsArsenal/MountedScannerLaser.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/DraedonsArsenal/MountedScannerSummon.cs b/Projectiles/DraedonsArsenal/MountedScannerSummon.cs index 996aca33d1..66f3b566cf 100644 --- a/Projectiles/DraedonsArsenal/MountedScannerSummon.cs +++ b/Projectiles/DraedonsArsenal/MountedScannerSummon.cs @@ -28,9 +28,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs b/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs index 694a2b26ef..1299ef33d0 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerBeam.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public const int Lifetime = 180; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - Texture2D bladeTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D bladeTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index d11e1de3a4..d070d4e388 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -63,8 +63,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 13; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 13; } public override void SetDefaults() @@ -296,7 +296,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { Texture2D bladeTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBlade").Value; - Texture2D hiltTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D hiltTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (IsSmall) bladeTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall").Value; diff --git a/Projectiles/DraedonsArsenal/PlasmaGrenadeSmallExplosion.cs b/Projectiles/DraedonsArsenal/PlasmaGrenadeSmallExplosion.cs index f2e91c5f2c..f85af545bb 100644 --- a/Projectiles/DraedonsArsenal/PlasmaGrenadeSmallExplosion.cs +++ b/Projectiles/DraedonsArsenal/PlasmaGrenadeSmallExplosion.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; int length = texture.Width / horizontalFrames; int height = texture.Height / verticalFrames; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs index 9cf0a0aff5..9501d9e619 100644 --- a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs +++ b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs @@ -25,10 +25,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; } public override void SetDefaults() diff --git a/Projectiles/DraedonsArsenal/PulsePistolShot.cs b/Projectiles/DraedonsArsenal/PulsePistolShot.cs index 6f5450ad20..55ad51e8d3 100644 --- a/Projectiles/DraedonsArsenal/PulsePistolShot.cs +++ b/Projectiles/DraedonsArsenal/PulsePistolShot.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public List NPCsAlreadyHit = new List(); public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/DraedonsArsenal/PulseTurret.cs b/Projectiles/DraedonsArsenal/PulseTurret.cs index 80ee8dd273..e820312872 100644 --- a/Projectiles/DraedonsArsenal/PulseTurret.cs +++ b/Projectiles/DraedonsArsenal/PulseTurret.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public new string LocalizationCategory => "Projectiles.Misc"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { Texture2D standTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseTurretStand").Value; - Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, + Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Projectile.Center - ((standTexture.Height / 2 + 6f) * Vector2.UnitY) - Main.screenPosition, null, lightColor, diff --git a/Projectiles/DraedonsArsenal/PulseTurretShot.cs b/Projectiles/DraedonsArsenal/PulseTurretShot.cs index ccd8d1458c..7bd968780f 100644 --- a/Projectiles/DraedonsArsenal/PulseTurretShot.cs +++ b/Projectiles/DraedonsArsenal/PulseTurretShot.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public const int SpiralRings = 6; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs b/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs index 594ca6cc18..45174b4fd5 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesProjectile.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs index 18ad44c4b2..ac77a1ed3e 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs @@ -240,7 +240,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/DraedonsArsenal/StarSwallowerAcid.cs b/Projectiles/DraedonsArsenal/StarSwallowerAcid.cs index d4ac4417e8..5d981f5dc8 100644 --- a/Projectiles/DraedonsArsenal/StarSwallowerAcid.cs +++ b/Projectiles/DraedonsArsenal/StarSwallowerAcid.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public const float Gravity = 0.25f; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(255, 255, 255, 127) * Projectile.Opacity, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(255, 255, 255, 127) * Projectile.Opacity, 2); return false; } } diff --git a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs index 6de89b202f..526dcb0227 100644 --- a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs +++ b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs @@ -27,9 +27,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 12; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -271,8 +271,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(2, Main.projFrames[Projectile.type], ReleasingAcid.ToInt(), Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(2, Main.projFrames[Type], ReleasingAcid.ToInt(), Projectile.frame); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, diff --git a/Projectiles/DraedonsArsenal/SystemBaneLightning.cs b/Projectiles/DraedonsArsenal/SystemBaneLightning.cs index 2bf1588312..d6c5867358 100644 --- a/Projectiles/DraedonsArsenal/SystemBaneLightning.cs +++ b/Projectiles/DraedonsArsenal/SystemBaneLightning.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 60; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 60; } public override void SetDefaults() { @@ -114,11 +114,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 start = oldPositions[i] + Projectile.Size * 0.5f - Main.screenPosition; Vector2 end = oldPositions[i + 1] + Projectile.Size * 0.5f - Main.screenPosition; - Utils.DrawLaser(Main.spriteBatch, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, start, end, new Vector2(OuterLightningScale), new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + Utils.DrawLaser(Main.spriteBatch, Terraria.GameContent.TextureAssets.Projectile[Type].Value, start, end, new Vector2(OuterLightningScale), new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); DelegateMethods.f_1 = InnerLightningOpacity; DelegateMethods.c_1 = InnerLightningColor; - Utils.DrawLaser(Main.spriteBatch, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, start, end, new Vector2(InnerLightningScale), new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); + Utils.DrawLaser(Main.spriteBatch, Terraria.GameContent.TextureAssets.Projectile[Type].Value, start, end, new Vector2(InnerLightningScale), new Utils.LaserLineFraming(DelegateMethods.LightningLaserDraw)); } return false; } diff --git a/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs b/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs index 51ade30681..ffccae3cda 100644 --- a/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs +++ b/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (Time % LightningFireRate == 0f && Main.myPlayer == Projectile.owner) { int lightningDamage = Projectile.damage; - int totalSystemBanes = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type]; + int totalSystemBanes = Main.player[Projectile.owner].ownedProjectileCounts[Type]; // Make the damage of the lightning have diminishing returns depending on how many systems are present. lightningDamage = (int)Math.Ceiling(lightningDamage / Math.Pow(totalSystemBanes, 1D / 3D)); diff --git a/Projectiles/DraedonsArsenal/TaserHook.cs b/Projectiles/DraedonsArsenal/TaserHook.cs index b729eb0c54..fc876533ee 100644 --- a/Projectiles/DraedonsArsenal/TaserHook.cs +++ b/Projectiles/DraedonsArsenal/TaserHook.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { Player player = Main.player[Projectile.owner]; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Utils.DrawLine(Main.spriteBatch, player.MountedCenter, Projectile.Center, Color.Cyan, Color.White, 4f); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs index 9184114052..5bb2ae7fd9 100644 --- a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs +++ b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs @@ -35,8 +35,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, ProjectileID.Sets.TrailCacheLength[Projectile.type]); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, ProjectileID.Sets.TrailCacheLength[Type]); return false; } } diff --git a/Projectiles/Enemy/AstralMeteorProj.cs b/Projectiles/Enemy/AstralMeteorProj.cs index 9048e87fa1..aa52ac2ac9 100644 --- a/Projectiles/Enemy/AstralMeteorProj.cs +++ b/Projectiles/Enemy/AstralMeteorProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 4; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Enemy/BelchingCoralSpike.cs b/Projectiles/Enemy/BelchingCoralSpike.cs index 5bb82dcfd8..d9c6fce5e7 100644 --- a/Projectiles/Enemy/BelchingCoralSpike.cs +++ b/Projectiles/Enemy/BelchingCoralSpike.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Enemy/CrabBoulder.cs b/Projectiles/Enemy/CrabBoulder.cs index 4a332d07f3..0043b4923b 100644 --- a/Projectiles/Enemy/CrabBoulder.cs +++ b/Projectiles/Enemy/CrabBoulder.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Enemy/CragmawVibeCheckChain.cs b/Projectiles/Enemy/CragmawVibeCheckChain.cs index 1b4a1cd930..8bcb308698 100644 --- a/Projectiles/Enemy/CragmawVibeCheckChain.cs +++ b/Projectiles/Enemy/CragmawVibeCheckChain.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D endTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D endTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D chainTexture = ModContent.Request("CalamityMod/Projectiles/Enemy/CragmawVibeCheckMid").Value; Vector2 drawPosition = ReelingPlayer ? Main.player[(int)Projectile.ai[1]].Center : Projectile.Center; Vector2 distanceVectorToStart = Main.npc[(int)Projectile.ai[0]].Top + Vector2.UnitY * 30f - drawPosition; diff --git a/Projectiles/Enemy/CrimsonSpike.cs b/Projectiles/Enemy/CrimsonSpike.cs index c44c0e7349..5fcc1c12c6 100644 --- a/Projectiles/Enemy/CrimsonSpike.cs +++ b/Projectiles/Enemy/CrimsonSpike.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Enemy lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Enemy/EarthRockBig.cs b/Projectiles/Enemy/EarthRockBig.cs index adb9ae03d4..9c6b8b2761 100644 --- a/Projectiles/Enemy/EarthRockBig.cs +++ b/Projectiles/Enemy/EarthRockBig.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Enemy/EarthRockSmall.cs b/Projectiles/Enemy/EarthRockSmall.cs index 4620b5eee9..50fe80569b 100644 --- a/Projectiles/Enemy/EarthRockSmall.cs +++ b/Projectiles/Enemy/EarthRockSmall.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Enemy/FlakAcid.cs b/Projectiles/Enemy/FlakAcid.cs index 3edadc017d..bb83aa3073 100644 --- a/Projectiles/Enemy/FlakAcid.cs +++ b/Projectiles/Enemy/FlakAcid.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Enemy/GammRayBurst.cs b/Projectiles/Enemy/GammRayBurst.cs index 0c8edea13a..54f9905839 100644 --- a/Projectiles/Enemy/GammRayBurst.cs +++ b/Projectiles/Enemy/GammRayBurst.cs @@ -30,15 +30,15 @@ namespace CalamityMod.Projectiles.Enemy public override float Lifetime => 300; public override Color LaserOverlayColor => new Color(0, 200, 50, 100); public override Color LightCastColor => Color.White; - public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Type].Value; public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/AresLaserBeamMiddle", AssetRequestMode.ImmediateLoad).Value; public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/AresLaserBeamEnd", AssetRequestMode.ImmediateLoad).Value; public override string Texture => "CalamityMod/Projectiles/Boss/AresLaserBeamStart"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + Main.projFrames[Type] = 5; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Enemy // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 0f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public float LaserWidthFunction(float _) => Projectile.scale * Projectile.width + 180; diff --git a/Projectiles/Enemy/GammaAcid.cs b/Projectiles/Enemy/GammaAcid.cs index f917bb3e8e..b355a8e34d 100644 --- a/Projectiles/Enemy/GammaAcid.cs +++ b/Projectiles/Enemy/GammaAcid.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Enemy public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Enemy/IceClasperEnemyProjectile.cs b/Projectiles/Enemy/IceClasperEnemyProjectile.cs index 05065edba3..8217a565d5 100644 --- a/Projectiles/Enemy/IceClasperEnemyProjectile.cs +++ b/Projectiles/Enemy/IceClasperEnemyProjectile.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Enemy public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 4; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { if (CalamityClientConfig.Instance.Afterimages) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return true; } diff --git a/Projectiles/Enemy/InkBombHostile.cs b/Projectiles/Enemy/InkBombHostile.cs index 5a60fec270..28acf8fd17 100644 --- a/Projectiles/Enemy/InkBombHostile.cs +++ b/Projectiles/Enemy/InkBombHostile.cs @@ -42,10 +42,10 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawOrigin = new(tex.Width * 0.5f, Projectile.height * 0.5f); Vector2 vector = new Vector2(Projectile.Center.X, Projectile.Center.Y) - Main.screenPosition + new Vector2(0, Projectile.gfxOffY); - Rectangle rectangle = new(0, tex.Height / Main.projFrames[Projectile.type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Projectile.type]); + Rectangle rectangle = new(0, tex.Height / Main.projFrames[Type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Type]); Main.EntitySpriteDraw(tex, vector, rectangle, Color.DarkGray, Projectile.rotation, drawOrigin, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Enemy/InkPoisonCloud.cs b/Projectiles/Enemy/InkPoisonCloud.cs index d74d2a8f1e..7fd5c520a6 100644 --- a/Projectiles/Enemy/InkPoisonCloud.cs +++ b/Projectiles/Enemy/InkPoisonCloud.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Enemy { Projectile.damage = 0; } - else if (Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } @@ -61,11 +61,11 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; var effects = Projectile.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; Vector2 drawOrigin = new(tex.Width * 0.5f, Projectile.height * 0.5f); Vector2 vector = new Vector2(Projectile.Center.X, Projectile.Center.Y) - Main.screenPosition + new Vector2(0, Projectile.gfxOffY); - Rectangle rectangle = new(0, tex.Height / Main.projFrames[Projectile.type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Projectile.type]); + Rectangle rectangle = new(0, tex.Height / Main.projFrames[Type] * Projectile.frame, tex.Width, tex.Height / Main.projFrames[Type]); Main.EntitySpriteDraw(tex, vector, rectangle, Color.White * 0.75f, Projectile.rotation, drawOrigin, Projectile.scale * 1.2f, effects, 0); return true; diff --git a/Projectiles/Enemy/JellyghoulBolt.cs b/Projectiles/Enemy/JellyghoulBolt.cs index e59b35ed62..bf9edbf051 100644 --- a/Projectiles/Enemy/JellyghoulBolt.cs +++ b/Projectiles/Enemy/JellyghoulBolt.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Enemy { ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.TrailCacheLength[Type] = 10; - Main.projFrames[Projectile.type] = 20; + Main.projFrames[Type] = 20; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Enemy { Lighting.AddLight(Projectile.Center, 1f * Projectile.Opacity, 0.1f * Projectile.Opacity, 0.1f); Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type]; Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; @@ -88,8 +88,8 @@ namespace CalamityMod.Projectiles.Enemy PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(SlashWidthFunction, SlashColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ExobladePierce"]), 30); - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int projFrame = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + 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); diff --git a/Projectiles/Enemy/LightningCloud.cs b/Projectiles/Enemy/LightningCloud.cs index 8d0e6037df..8dc6e54c65 100644 --- a/Projectiles/Enemy/LightningCloud.cs +++ b/Projectiles/Enemy/LightningCloud.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() diff --git a/Projectiles/Enemy/MantisRing.cs b/Projectiles/Enemy/MantisRing.cs index 5daadcdeef..002314546d 100644 --- a/Projectiles/Enemy/MantisRing.cs +++ b/Projectiles/Enemy/MantisRing.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Enemy/MaulerAcidBubble.cs b/Projectiles/Enemy/MaulerAcidBubble.cs index e649011ecf..f67e3b5b38 100644 --- a/Projectiles/Enemy/MaulerAcidBubble.cs +++ b/Projectiles/Enemy/MaulerAcidBubble.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Enemy public override string Texture => "CalamityMod/Projectiles/Enemy/SulphuricAcidBubble"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Enemy { // Handle frames. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type]; // Home in on players after a sufficient amount of time has passed. if (Time > 60f) @@ -55,8 +55,8 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Enemy/NuclearToadGoo.cs b/Projectiles/Enemy/NuclearToadGoo.cs index c38799573f..635f4bcc53 100644 --- a/Projectiles/Enemy/NuclearToadGoo.cs +++ b/Projectiles/Enemy/NuclearToadGoo.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Enemy/PearlBurst.cs b/Projectiles/Enemy/PearlBurst.cs index 3e35181991..3bc8a1c361 100644 --- a/Projectiles/Enemy/PearlBurst.cs +++ b/Projectiles/Enemy/PearlBurst.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Enemy/PearlRain.cs b/Projectiles/Enemy/PearlRain.cs index 97435f618b..29fde3728f 100644 --- a/Projectiles/Enemy/PearlRain.cs +++ b/Projectiles/Enemy/PearlRain.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Enemy public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Enemy/StormMarkHostile.cs b/Projectiles/Enemy/StormMarkHostile.cs index ead43ea48d..8c637f4aeb 100644 --- a/Projectiles/Enemy/StormMarkHostile.cs +++ b/Projectiles/Enemy/StormMarkHostile.cs @@ -137,8 +137,8 @@ namespace CalamityMod.Projectiles.Enemy { Color originalColor = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); Vector2 drawPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangl = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangl = texture2D27.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color alphaColor = Projectile.GetAlpha(originalColor); Vector2 halfRect = rectangl.Size() / 2f; Color whiteColor = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Enemy/SulphuricAcidBubble.cs b/Projectiles/Enemy/SulphuricAcidBubble.cs index 3b0544545e..acfa65b1b3 100644 --- a/Projectiles/Enemy/SulphuricAcidBubble.cs +++ b/Projectiles/Enemy/SulphuricAcidBubble.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -85,8 +85,8 @@ namespace CalamityMod.Projectiles.Enemy public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); diff --git a/Projectiles/Enemy/SulphuricAcidMist.cs b/Projectiles/Enemy/SulphuricAcidMist.cs index b037e6fabc..f1f5d6b825 100644 --- a/Projectiles/Enemy/SulphuricAcidMist.cs +++ b/Projectiles/Enemy/SulphuricAcidMist.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Enemy lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Enemy/TornadoHostile.cs b/Projectiles/Enemy/TornadoHostile.cs index ae8c8e1392..ed74fd0215 100644 --- a/Projectiles/Enemy/TornadoHostile.cs +++ b/Projectiles/Enemy/TornadoHostile.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Enemy public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Enemy Vector2 sizeModdingPos = new Vector2(0f, sizeModdingVector2.Y - sizeModdingVector.Y); sizeModdingPos.X = sizeModdingPos.Y * vectorMult; new Vector2(sizeModdingVector.X - sizeModdingPos.X / 2f, sizeModdingVector.Y); - Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle drawRectangle = texture2D23.Frame(1, 1, 0, 0); Vector2 smallRect = drawRectangle.Size() / 2f; float aiTrackMult = -0.06283186f * aiTracker; diff --git a/Projectiles/Enemy/ToxicMinnowCloud.cs b/Projectiles/Enemy/ToxicMinnowCloud.cs index 40254c224a..fa67dcad89 100644 --- a/Projectiles/Enemy/ToxicMinnowCloud.cs +++ b/Projectiles/Enemy/ToxicMinnowCloud.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Enemy public new string LocalizationCategory => "Projectiles.Enemy"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Enemy { Projectile.damage = 0; } - else if (Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Enemy lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Environment/AcidDrop.cs b/Projectiles/Environment/AcidDrop.cs index e027fa1379..a76420bc98 100644 --- a/Projectiles/Environment/AcidDrop.cs +++ b/Projectiles/Environment/AcidDrop.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Environment public new string LocalizationCategory => "Projectiles.Misc"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Environment public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(255, 255, 255, 127), 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(255, 255, 255, 127), 2); return false; } } diff --git a/Projectiles/Environment/HotSteam.cs b/Projectiles/Environment/HotSteam.cs index 861ef86c45..7a9029974e 100644 --- a/Projectiles/Environment/HotSteam.cs +++ b/Projectiles/Environment/HotSteam.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Environment if (Projectile.localAI[0] == 1f) return; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Projectile.Opacity * 0.45f; diff --git a/Projectiles/Environment/LavaChunk.cs b/Projectiles/Environment/LavaChunk.cs index 6bf6a55c07..2137bd3404 100644 --- a/Projectiles/Environment/LavaChunk.cs +++ b/Projectiles/Environment/LavaChunk.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Environment public new string LocalizationCategory => "Projectiles.Misc"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -87,8 +87,8 @@ namespace CalamityMod.Projectiles.Environment public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Environment/MurkySteam.cs b/Projectiles/Environment/MurkySteam.cs index 27dd0b7e11..74523462b0 100644 --- a/Projectiles/Environment/MurkySteam.cs +++ b/Projectiles/Environment/MurkySteam.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Environment if (Projectile.localAI[0] == 1f) return; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Projectile.Opacity * 0.45f; diff --git a/Projectiles/Environment/ThermalSteam.cs b/Projectiles/Environment/ThermalSteam.cs index cff4ecee12..2b4061379c 100644 --- a/Projectiles/Environment/ThermalSteam.cs +++ b/Projectiles/Environment/ThermalSteam.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Environment if (Projectile.localAI[0] == 1f) return; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Projectile.Opacity * 0.45f; diff --git a/Projectiles/Environment/WaterAlgae.cs b/Projectiles/Environment/WaterAlgae.cs index d28cbb522b..340942f2d5 100644 --- a/Projectiles/Environment/WaterAlgae.cs +++ b/Projectiles/Environment/WaterAlgae.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Environment public ref float Direction => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.CanDistortWater[Projectile.type] = false; + Main.projFrames[Type] = 3; + ProjectileID.Sets.CanDistortWater[Type] = false; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Environment Projectile.hide = Projectile.Opacity < 0.2f; if (Projectile.localAI[0] == 0f) { - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); Projectile.localAI[0] = 1f; } diff --git a/Projectiles/Healing/EssenceFlame.cs b/Projectiles/Healing/EssenceFlame.cs index 2b07b2e939..ad272fe761 100644 --- a/Projectiles/Healing/EssenceFlame.cs +++ b/Projectiles/Healing/EssenceFlame.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Healing public new string LocalizationCategory => "Projectiles.Healing"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Healing/GladiatorHealOrb.cs b/Projectiles/Healing/GladiatorHealOrb.cs index 1b8bd6b2db..a7ce7ed980 100644 --- a/Projectiles/Healing/GladiatorHealOrb.cs +++ b/Projectiles/Healing/GladiatorHealOrb.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Healing public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() diff --git a/Projectiles/Healing/PhantomicHeart.cs b/Projectiles/Healing/PhantomicHeart.cs index ad93a844e0..ea6c6c6de7 100644 --- a/Projectiles/Healing/PhantomicHeart.cs +++ b/Projectiles/Healing/PhantomicHeart.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Healing public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } diff --git a/Projectiles/Magic/AcidicSaxBubble.cs b/Projectiles/Magic/AcidicSaxBubble.cs index 8173932661..740ff708e4 100644 --- a/Projectiles/Magic/AcidicSaxBubble.cs +++ b/Projectiles/Magic/AcidicSaxBubble.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -127,8 +127,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/AcidicSaxMist.cs b/Projectiles/Magic/AcidicSaxMist.cs index 4ff3e96349..df7c684ca2 100644 --- a/Projectiles/Magic/AcidicSaxMist.cs +++ b/Projectiles/Magic/AcidicSaxMist.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() diff --git a/Projectiles/Magic/AnahitasArpeggioNote.cs b/Projectiles/Magic/AnahitasArpeggioNote.cs index 6269d9feae..62e5a3eaec 100644 --- a/Projectiles/Magic/AnahitasArpeggioNote.cs +++ b/Projectiles/Magic/AnahitasArpeggioNote.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/Ancient2.cs b/Projectiles/Magic/Ancient2.cs index abc16039f9..8e71e9d3fb 100644 --- a/Projectiles/Magic/Ancient2.cs +++ b/Projectiles/Magic/Ancient2.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -91,9 +91,9 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameHeight, texture.Width, height); Vector2 origin = new Vector2(texture.Width / 2f, height / 2f); diff --git a/Projectiles/Magic/ApotheosisEnergy.cs b/Projectiles/Magic/ApotheosisEnergy.cs index 672bae6e48..aa6b8bae8d 100644 --- a/Projectiles/Magic/ApotheosisEnergy.cs +++ b/Projectiles/Magic/ApotheosisEnergy.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Magic/ApotheosisWorm.cs b/Projectiles/Magic/ApotheosisWorm.cs index cc5217bb41..b9701da8a0 100644 --- a/Projectiles/Magic/ApotheosisWorm.cs +++ b/Projectiles/Magic/ApotheosisWorm.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -261,9 +261,9 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Vector2 headTextureOrigin = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Size() * 0.5f; + Vector2 headTextureOrigin = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Size() * 0.5f; drawPosition -= headTexture.Size() * Projectile.scale * 0.5f; drawPosition += headTextureOrigin * Projectile.scale + new Vector2(0f, 4f + Projectile.gfxOffY); diff --git a/Projectiles/Magic/AquamarineBolt.cs b/Projectiles/Magic/AquamarineBolt.cs index fa7697db9b..886ec7cabc 100644 --- a/Projectiles/Magic/AquamarineBolt.cs +++ b/Projectiles/Magic/AquamarineBolt.cs @@ -9,8 +9,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index aea6eae32c..c07be77f85 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 180; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 180; } public override void SetDefaults() @@ -218,7 +218,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Vector2 origin = texture.Size() * 0.5f; diff --git a/Projectiles/Magic/Asteroid.cs b/Projectiles/Magic/Asteroid.cs index a89860f6d3..5d354632ee 100644 --- a/Projectiles/Magic/Asteroid.cs +++ b/Projectiles/Magic/Asteroid.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/AsteroidMolten.cs b/Projectiles/Magic/AsteroidMolten.cs index 5c16a3b188..5c1561bd7b 100644 --- a/Projectiles/Magic/AsteroidMolten.cs +++ b/Projectiles/Magic/AsteroidMolten.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { //Changes the texture of the projectile - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; switch ((int)Projectile.ai[0]) { case 0: @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Magic default: break; } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, texture); return false; } diff --git a/Projectiles/Magic/AstralCrystal.cs b/Projectiles/Magic/AstralCrystal.cs index 366c34f1db..296fb9b03d 100644 --- a/Projectiles/Magic/AstralCrystal.cs +++ b/Projectiles/Magic/AstralCrystal.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/AstralStarMagic.cs b/Projectiles/Magic/AstralStarMagic.cs index 00c363b42d..5b201e4b1e 100644 --- a/Projectiles/Magic/AstralStarMagic.cs +++ b/Projectiles/Magic/AstralStarMagic.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { Projectile.DrawStarTrail(Color.Coral, Color.White); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/AstralachneaFang.cs b/Projectiles/Magic/AstralachneaFang.cs index e6e1d8aa48..cf5ed838f9 100644 --- a/Projectiles/Magic/AstralachneaFang.cs +++ b/Projectiles/Magic/AstralachneaFang.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/AtlantisSpear.cs b/Projectiles/Magic/AtlantisSpear.cs index 40e73700a1..09533fe2b7 100644 --- a/Projectiles/Magic/AtlantisSpear.cs +++ b/Projectiles/Magic/AtlantisSpear.cs @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (time > 0) Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * fade, Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Magic/BeamStar.cs b/Projectiles/Magic/BeamStar.cs index 8da90bd2cb..4c0c69d905 100644 --- a/Projectiles/Magic/BeamStar.cs +++ b/Projectiles/Magic/BeamStar.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { Vector2 drawPosition; - Texture2D starTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D starTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 1; i < Projectile.oldPos.Length; i++) { float scale = Projectile.scale * MathHelper.Lerp(0.9f, 0.6f, i / (float)Projectile.oldPos.Length) * 0.56f; diff --git a/Projectiles/Magic/BeamingBolt.cs b/Projectiles/Magic/BeamingBolt.cs index fb30fb008e..6c069c3319 100644 --- a/Projectiles/Magic/BeamingBolt.cs +++ b/Projectiles/Magic/BeamingBolt.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == 1f) tex = ModContent.Request("CalamityMod/Projectiles/Magic/BeamingThornBlossom").Value; diff --git a/Projectiles/Magic/BeamingBolt2.cs b/Projectiles/Magic/BeamingBolt2.cs index 4dd05b2777..df78947c31 100644 --- a/Projectiles/Magic/BeamingBolt2.cs +++ b/Projectiles/Magic/BeamingBolt2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == 1f) tex = ModContent.Request("CalamityMod/Projectiles/Magic/BeamingThorn").Value; diff --git a/Projectiles/Magic/BeastScythe.cs b/Projectiles/Magic/BeastScythe.cs index 13d14f67e9..0c309d3205 100644 --- a/Projectiles/Magic/BeastScythe.cs +++ b/Projectiles/Magic/BeastScythe.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/BlackAnurianPlankton.cs b/Projectiles/Magic/BlackAnurianPlankton.cs index 02bfa93279..7478e3231e 100644 --- a/Projectiles/Magic/BlackAnurianPlankton.cs +++ b/Projectiles/Magic/BlackAnurianPlankton.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Magic/BlueBubble.cs b/Projectiles/Magic/BlueBubble.cs index 7143b55d96..e54b7b72f7 100644 --- a/Projectiles/Magic/BlueBubble.cs +++ b/Projectiles/Magic/BlueBubble.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Magic Color drawColor = Color.Lerp(mainColor, Color.White, 0.2f) with { A = 0 }; float drawRotation = Projectile.rotation; Vector2 rotationPoint = texture.Size() * 0.5f; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], drawColor, 1, texture, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], drawColor, 1, texture, true, true); Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); return false; } diff --git a/Projectiles/Magic/BrimstoneHellfireballFriendly.cs b/Projectiles/Magic/BrimstoneHellfireballFriendly.cs index fa627a0ebc..d19ac4ede9 100644 --- a/Projectiles/Magic/BrimstoneHellfireballFriendly.cs +++ b/Projectiles/Magic/BrimstoneHellfireballFriendly.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/CauldronProj.cs b/Projectiles/Magic/CauldronProj.cs index 4c6b92ca08..21c716e995 100644 --- a/Projectiles/Magic/CauldronProj.cs +++ b/Projectiles/Magic/CauldronProj.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Magic public static Asset Glow; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; if (!Main.dedServ) { Glow = ModContent.Request(Texture + "Glow"); @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); Vector2 origin = Glow.Value.Size() / 2f; Main.EntitySpriteDraw(Glow.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/CauldronProjSmall.cs b/Projectiles/Magic/CauldronProjSmall.cs index e3d01d3509..1ae7f52f9a 100644 --- a/Projectiles/Magic/CauldronProjSmall.cs +++ b/Projectiles/Magic/CauldronProjSmall.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Magic public static Asset Glow; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; if (!Main.dedServ) { Glow = ModContent.Request(Texture + "Glow"); @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); Vector2 origin = Glow.Value.Size() / 2f; Main.EntitySpriteDraw(Glow.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/ChronomancersScytheHoldout.cs b/Projectiles/Magic/ChronomancersScytheHoldout.cs index d5861097b5..ed6c379bfd 100644 --- a/Projectiles/Magic/ChronomancersScytheHoldout.cs +++ b/Projectiles/Magic/ChronomancersScytheHoldout.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Magic { Owner.ChangeDir((int)Projectile.ai[2]); - Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 handleOrigin = Projectile.ai[2] == -1 ? new Vector2(scytheTexture.Width, scytheTexture.Height) : new Vector2(0, scytheTexture.Height); float scytheRotation = Projectile.rotation; diff --git a/Projectiles/Magic/ChronomancersScytheSwing.cs b/Projectiles/Magic/ChronomancersScytheSwing.cs index 5cbd28a35b..f6fc717b09 100644 --- a/Projectiles/Magic/ChronomancersScytheSwing.cs +++ b/Projectiles/Magic/ChronomancersScytheSwing.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Magic public static int ClockChance = 30; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Projectile.soundDelay--; diff --git a/Projectiles/Magic/ClamorNoctusStar.cs b/Projectiles/Magic/ClamorNoctusStar.cs index 7386caa9e2..0930c2506c 100644 --- a/Projectiles/Magic/ClamorNoctusStar.cs +++ b/Projectiles/Magic/ClamorNoctusStar.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/ClamorNoctusWyvern.cs b/Projectiles/Magic/ClamorNoctusWyvern.cs index db0583c6e5..3de2a503bc 100644 --- a/Projectiles/Magic/ClamorNoctusWyvern.cs +++ b/Projectiles/Magic/ClamorNoctusWyvern.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Magic/ClimaxProj.cs b/Projectiles/Magic/ClimaxProj.cs index 8ff285b156..2b7085481d 100644 --- a/Projectiles/Magic/ClimaxProj.cs +++ b/Projectiles/Magic/ClimaxProj.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic public bool firedBeam = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -78,8 +78,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/CryoBlast.cs b/Projectiles/Magic/CryoBlast.cs index 2a0515bc4d..2a2064891c 100644 --- a/Projectiles/Magic/CryoBlast.cs +++ b/Projectiles/Magic/CryoBlast.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.5f, 0.5f); @@ -86,9 +86,9 @@ namespace CalamityMod.Projectiles.Magic if ((Projectile.timeLeft > 596 && Projectile.ai[0] == 0f) || (Projectile.timeLeft > 599 && Projectile.ai[0] > 0f)) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameHeight, texture.Width, height); Vector2 origin = new Vector2(texture.Width / 2f, height / 2f); diff --git a/Projectiles/Magic/DarkSparkBeam.cs b/Projectiles/Magic/DarkSparkBeam.cs index 32a30db723..aee980f024 100644 --- a/Projectiles/Magic/DarkSparkBeam.cs +++ b/Projectiles/Magic/DarkSparkBeam.cs @@ -173,7 +173,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.velocity == Vector2.Zero) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float drawArea = Projectile.localAI[1]; Projectile projectile2 = Main.projectile[(int)Projectile.ai[1]]; Color color = GetBeamColor((int)projectile2.ai[0], (int)Projectile.ai[0]); diff --git a/Projectiles/Magic/DarkSparkPrism.cs b/Projectiles/Magic/DarkSparkPrism.cs index e3c0d1a384..a512651328 100644 --- a/Projectiles/Magic/DarkSparkPrism.cs +++ b/Projectiles/Magic/DarkSparkPrism.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Magic { Vector2 mountedCenter = Main.player[Projectile.owner].MountedCenter; Color prismColorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); - if (Projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[Projectile.type]) + if (Projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[Type]) { prismColorArea = Lighting.GetColor((int)mountedCenter.X / 16, (int)(mountedCenter.Y / 16f)); } @@ -169,8 +169,8 @@ namespace CalamityMod.Projectiles.Magic { spriteEffects = SpriteEffects.FlipHorizontally; } - Texture2D texture2D14 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D14 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y7 = framing * Projectile.frame; Vector2 drawStart = (Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition).Floor(); if (Main.player[Projectile.owner].shroomiteStealth && Main.player[Projectile.owner].inventory[Main.player[Projectile.owner].selectedItem].CountsAsClass()) diff --git a/Projectiles/Magic/DeathValleyDusterProjectile.cs b/Projectiles/Magic/DeathValleyDusterProjectile.cs index 873f582895..d7602bf560 100644 --- a/Projectiles/Magic/DeathValleyDusterProjectile.cs +++ b/Projectiles/Magic/DeathValleyDusterProjectile.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Projectiles.Magic public List buffList = new List(new bool[Main.maxPlayers]); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -182,7 +182,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { if (Projectile.timeLeft > 50) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.4f * Projectile.Opacity, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.4f * Projectile.Opacity, 1); return true; } } diff --git a/Projectiles/Magic/DivineRetributionSpear.cs b/Projectiles/Magic/DivineRetributionSpear.cs index ad5e534495..6f1a6aad3b 100644 --- a/Projectiles/Magic/DivineRetributionSpear.cs +++ b/Projectiles/Magic/DivineRetributionSpear.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/EelDrop.cs b/Projectiles/Magic/EelDrop.cs index e932ba247a..b636db1279 100644 --- a/Projectiles/Magic/EelDrop.cs +++ b/Projectiles/Magic/EelDrop.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(255, 255, 255, 127), 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(255, 255, 255, 127), 2); return false; } } diff --git a/Projectiles/Magic/EidolicWailSoundwave.cs b/Projectiles/Magic/EidolicWailSoundwave.cs index 18559438c0..0f15340a45 100644 --- a/Projectiles/Magic/EidolicWailSoundwave.cs +++ b/Projectiles/Magic/EidolicWailSoundwave.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/EternityBook.cs b/Projectiles/Magic/EternityBook.cs index a2b8f21950..47b4accb86 100644 --- a/Projectiles/Magic/EternityBook.cs +++ b/Projectiles/Magic/EternityBook.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic } public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() @@ -60,8 +60,8 @@ namespace CalamityMod.Projectiles.Magic // Switch frames at a linearly increasing rate to make it look like the player is flipping pages quickly. Projectile.localAI[0] += Utils.Remap(Time, 0f, 200f, 1f, 5f); - Projectile.frame = (int)Math.Round(Projectile.localAI[0] / 10f) % Main.projFrames[Projectile.type]; - if (Projectile.localAI[0] >= Main.projFrames[Projectile.type] * 10f) + Projectile.frame = (int)Math.Round(Projectile.localAI[0] / 10f) % Main.projFrames[Type]; + if (Projectile.localAI[0] >= Main.projFrames[Type] * 10f) Projectile.localAI[0] = 0f; AdjustPlayerValues(player); @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Magic // Update the player's arm directions to make it look as though they're flipping through the book. float frontArmRotation = (MathHelper.PiOver2 - 0.46f) * -player.direction; - float backArmRotation = frontArmRotation + MathHelper.Lerp(0.12f, 1.1f, CalamityUtils.Convert01To010(Projectile.localAI[0] / Main.projFrames[Projectile.type] / 10f)) * -player.direction; + float backArmRotation = frontArmRotation + MathHelper.Lerp(0.12f, 1.1f, CalamityUtils.Convert01To010(Projectile.localAI[0] / Main.projFrames[Type] / 10f)) * -player.direction; player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, backArmRotation); player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, frontArmRotation); } diff --git a/Projectiles/Magic/EternityCrystal.cs b/Projectiles/Magic/EternityCrystal.cs index 1aa03fe4b0..089eb63ded 100644 --- a/Projectiles/Magic/EternityCrystal.cs +++ b/Projectiles/Magic/EternityCrystal.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic public const int InwardCollapseTime = 70; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() @@ -165,8 +165,8 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D myTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = myTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D myTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = myTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color trasparentCrystalColor = Projectile.GetAlpha(lightColor) * 0.6f; Vector2 origin = frame.Size() / 2f; diff --git a/Projectiles/Magic/EternityHex.cs b/Projectiles/Magic/EternityHex.cs index 8443eb4ffb..857b001868 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -42,8 +42,8 @@ namespace CalamityMod.Projectiles.Magic public const float NormalEnemyLifeMaxDamageMult = 1f / 100f; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 63; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 63; } public override void SetDefaults() diff --git a/Projectiles/Magic/EventHorizonBlackhole.cs b/Projectiles/Magic/EventHorizonBlackhole.cs index 290e297da8..6b19a3af06 100644 --- a/Projectiles/Magic/EventHorizonBlackhole.cs +++ b/Projectiles/Magic/EventHorizonBlackhole.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/EventHorizonStar.cs b/Projectiles/Magic/EventHorizonStar.cs index d8608b9f81..3b309decb3 100644 --- a/Projectiles/Magic/EventHorizonStar.cs +++ b/Projectiles/Magic/EventHorizonStar.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -134,13 +134,13 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), new Color(255, 255, 255, 127), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); } } diff --git a/Projectiles/Magic/EvergladeSprayProjectile.cs b/Projectiles/Magic/EvergladeSprayProjectile.cs index db5714d406..dbd85e0838 100644 --- a/Projectiles/Magic/EvergladeSprayProjectile.cs +++ b/Projectiles/Magic/EvergladeSprayProjectile.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Magic/ExoVortex.cs b/Projectiles/Magic/ExoVortex.cs index 4bc02319c6..ba25da0d47 100644 --- a/Projectiles/Magic/ExoVortex.cs +++ b/Projectiles/Magic/ExoVortex.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 35; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 35; } public override void SetDefaults() diff --git a/Projectiles/Magic/ExoVortex2.cs b/Projectiles/Magic/ExoVortex2.cs index 11282c7696..e8e1c97ce0 100644 --- a/Projectiles/Magic/ExoVortex2.cs +++ b/Projectiles/Magic/ExoVortex2.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 27; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 27; } public override void SetDefaults() diff --git a/Projectiles/Magic/FabBolt.cs b/Projectiles/Magic/FabBolt.cs index 8b9149b5bf..75521fc686 100644 --- a/Projectiles/Magic/FabBolt.cs +++ b/Projectiles/Magic/FabBolt.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 23; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 23; } public override void SetDefaults() diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index a58f5f7bfa..48288510f6 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 54; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 54; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Magic/FatesRevealFlame.cs b/Projectiles/Magic/FatesRevealFlame.cs index 38bca14e6e..d31fb68c89 100644 --- a/Projectiles/Magic/FatesRevealFlame.cs +++ b/Projectiles/Magic/FatesRevealFlame.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Magic/FlareBoltProjectile.cs b/Projectiles/Magic/FlareBoltProjectile.cs index d744d9eb4f..d07901184d 100644 --- a/Projectiles/Magic/FlareBoltProjectile.cs +++ b/Projectiles/Magic/FlareBoltProjectile.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/ForbiddenAxeBlade.cs b/Projectiles/Magic/ForbiddenAxeBlade.cs index b865086f2e..d320fcfb4c 100644 --- a/Projectiles/Magic/ForbiddenAxeBlade.cs +++ b/Projectiles/Magic/ForbiddenAxeBlade.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/ForbiddenSunProjectile.cs b/Projectiles/Magic/ForbiddenSunProjectile.cs index 6aaf251d2a..0472da95c3 100644 --- a/Projectiles/Magic/ForbiddenSunProjectile.cs +++ b/Projectiles/Magic/ForbiddenSunProjectile.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.rotation = Projectile.velocity.ToRotation(); Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type]; Lighting.AddLight(Projectile.Center, 0.25f, 0.2f, 0.01f); if (Projectile.wet && !Projectile.lavaWet) { diff --git a/Projectiles/Magic/FrigidflashBoltProjectile.cs b/Projectiles/Magic/FrigidflashBoltProjectile.cs index 3011c145e7..420a0b7dc3 100644 --- a/Projectiles/Magic/FrigidflashBoltProjectile.cs +++ b/Projectiles/Magic/FrigidflashBoltProjectile.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/FrostBoltProjectile.cs b/Projectiles/Magic/FrostBoltProjectile.cs index 06cadcc66d..d906f20215 100644 --- a/Projectiles/Magic/FrostBoltProjectile.cs +++ b/Projectiles/Magic/FrostBoltProjectile.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/GammaLaser.cs b/Projectiles/Magic/GammaLaser.cs index 85f8aa17ec..0030bf2cdc 100644 --- a/Projectiles/Magic/GammaLaser.cs +++ b/Projectiles/Magic/GammaLaser.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/GhastlyBlast.cs b/Projectiles/Magic/GhastlyBlast.cs index 992934a4a1..f6201dcd9a 100644 --- a/Projectiles/Magic/GhastlyBlast.cs +++ b/Projectiles/Magic/GhastlyBlast.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -233,7 +233,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/GhastlyVisageProj.cs b/Projectiles/Magic/GhastlyVisageProj.cs index 1946027091..42cd6b630f 100644 --- a/Projectiles/Magic/GhastlyVisageProj.cs +++ b/Projectiles/Magic/GhastlyVisageProj.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -203,8 +203,8 @@ namespace CalamityMod.Projectiles.Magic public override void PostDraw(Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Vector2 origin = new Vector2(13f, 16f); SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Magic/GranitePulse.cs b/Projectiles/Magic/GranitePulse.cs index 1cee67b0f7..885df7e794 100644 --- a/Projectiles/Magic/GranitePulse.cs +++ b/Projectiles/Magic/GranitePulse.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -145,8 +145,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/HadalUrnIsopod.cs b/Projectiles/Magic/HadalUrnIsopod.cs index 1ac62e58f1..08c64edc11 100644 --- a/Projectiles/Magic/HadalUrnIsopod.cs +++ b/Projectiles/Magic/HadalUrnIsopod.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Magic/HadalUrnJellyfish.cs b/Projectiles/Magic/HadalUrnJellyfish.cs index fd7a241f3c..e85edb4ef0 100644 --- a/Projectiles/Magic/HadalUrnJellyfish.cs +++ b/Projectiles/Magic/HadalUrnJellyfish.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic bool neartarget = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -132,8 +132,8 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int textureheight = tex.Height / Main.projFrames[Projectile.type]; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int textureheight = tex.Height / Main.projFrames[Type]; int y = textureheight * Projectile.frame; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y, tex.Width, textureheight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)tex.Width / 2f, (float)textureheight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/HadalUrnLamprey.cs b/Projectiles/Magic/HadalUrnLamprey.cs index 972180a9d2..a8b5030619 100644 --- a/Projectiles/Magic/HadalUrnLamprey.cs +++ b/Projectiles/Magic/HadalUrnLamprey.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic int invistimer = 0; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic //AI exclusive to when it isn't sticking if (Projectile.ai[0] == 0) { - if (Projectile.frame >= Main.projFrames[Projectile.type] / 2) + if (Projectile.frame >= Main.projFrames[Type] / 2) { Projectile.frame = 0; } @@ -79,9 +79,9 @@ namespace CalamityMod.Projectiles.Magic //If it IS sticking else { - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { - Projectile.frame = Main.projFrames[Projectile.type] / 2; + Projectile.frame = Main.projFrames[Type] / 2; } } } @@ -99,8 +99,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int textureheight = tex.Height / Main.projFrames[Projectile.type]; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int textureheight = tex.Height / Main.projFrames[Type]; int y = textureheight * Projectile.frame; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y, tex.Width, textureheight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(tex.Width, tex.Height / 16f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/HadalUrnStarfish.cs b/Projectiles/Magic/HadalUrnStarfish.cs index d2043be509..b69111abb1 100644 --- a/Projectiles/Magic/HadalUrnStarfish.cs +++ b/Projectiles/Magic/HadalUrnStarfish.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; Shards(); diff --git a/Projectiles/Magic/HellwingBat.cs b/Projectiles/Magic/HellwingBat.cs index 735877902a..f07139620d 100644 --- a/Projectiles/Magic/HellwingBat.cs +++ b/Projectiles/Magic/HellwingBat.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 12; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/HeresyProj.cs b/Projectiles/Magic/HeresyProj.cs index 0c48a337cb..d3da71c8c8 100644 --- a/Projectiles/Magic/HeresyProj.cs +++ b/Projectiles/Magic/HeresyProj.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Magic public ref float AttackTimer => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() @@ -48,8 +48,8 @@ namespace CalamityMod.Projectiles.Magic // Switch frames at a linearly increasing rate to make it look like the player is flipping pages quickly. Projectile.localAI[0] += Utils.Remap(Time, 0f, 180f, 1f, 5f); - Projectile.frame = (int)Math.Round(Projectile.localAI[0] / 10f) % Main.projFrames[Projectile.type]; - if (Projectile.localAI[0] >= Main.projFrames[Projectile.type] * 10f) + Projectile.frame = (int)Math.Round(Projectile.localAI[0] / 10f) % Main.projFrames[Type]; + if (Projectile.localAI[0] >= Main.projFrames[Type] * 10f) Projectile.localAI[0] = 0f; AdjustPlayerValues(); @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Magic // Update the player's arm directions to make it look as though they're flipping through the book. float frontArmRotation = (MathHelper.PiOver2 - 0.46f) * -Owner.direction; - float backArmRotation = frontArmRotation + MathHelper.Lerp(0.23f, 0.97f, CalamityUtils.Convert01To010(Projectile.localAI[0] / Main.projFrames[Projectile.type] / 10f)) * -Owner.direction; + float backArmRotation = frontArmRotation + MathHelper.Lerp(0.23f, 0.97f, CalamityUtils.Convert01To010(Projectile.localAI[0] / Main.projFrames[Type] / 10f)) * -Owner.direction; Owner.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, backArmRotation); Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, frontArmRotation); } @@ -112,8 +112,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { float glowOutwardness = MathHelper.SmoothStep(0f, 4f, Utils.GetLerpValue(90f, 270f, Time, true)); - Texture2D bookTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = bookTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D bookTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = bookTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 drawPosition; Vector2 origin = frame.Size() * 0.5f; Color glowColor = Color.Lerp(Color.Pink, Color.Red, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 5f) * 0.5f + 0.5f); diff --git a/Projectiles/Magic/HolyFlame.cs b/Projectiles/Magic/HolyFlame.cs index 0d58ed03c6..caea82db64 100644 --- a/Projectiles/Magic/HolyFlame.cs +++ b/Projectiles/Magic/HolyFlame.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Magic/IceCluster.cs b/Projectiles/Magic/IceCluster.cs index c5a292e024..40d362af69 100644 --- a/Projectiles/Magic/IceCluster.cs +++ b/Projectiles/Magic/IceCluster.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/IncineratingFireball.cs b/Projectiles/Magic/IncineratingFireball.cs index d3a353aa63..1978c2724d 100644 --- a/Projectiles/Magic/IncineratingFireball.cs +++ b/Projectiles/Magic/IncineratingFireball.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Magic public ref float Timer => ref Projectile.ai[0]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Magic/InfernadoFriendly.cs b/Projectiles/Magic/InfernadoFriendly.cs index 46ab217618..2dd9e9497f 100644 --- a/Projectiles/Magic/InfernadoFriendly.cs +++ b/Projectiles/Magic/InfernadoFriendly.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Magic bool intersectingSomething = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; + Main.projFrames[Type] = 12; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -144,8 +144,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/InfernalBlade.cs b/Projectiles/Magic/InfernalBlade.cs index 4d960c272a..98a4418dea 100644 --- a/Projectiles/Magic/InfernalBlade.cs +++ b/Projectiles/Magic/InfernalBlade.cs @@ -79,8 +79,8 @@ namespace CalamityMod.Projectiles.Magic spriteEffects = SpriteEffects.FlipHorizontally; } Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); - Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int textureArea = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int textureArea = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y3 = textureArea * Projectile.frame; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, textureArea); Vector2 halfRect = rectangle.Size() / 2f; @@ -90,11 +90,11 @@ namespace CalamityMod.Projectiles.Magic { Color alphaColor = colorArea; alphaColor = Projectile.GetAlpha(alphaColor); - alphaColor *= (float)(3 - i) / ((float)ProjectileID.Sets.TrailCacheLength[Projectile.type] * 1.5f); + alphaColor *= (float)(3 - i) / ((float)ProjectileID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 oldPosition = Projectile.oldPos[i]; float projRotation = Projectile.rotation; SpriteEffects effects = spriteEffects; - if (ProjectileID.Sets.TrailingMode[Projectile.type] == 2) + if (ProjectileID.Sets.TrailingMode[Type] == 2) { projRotation = Projectile.oldRot[i]; effects = (Projectile.oldSpriteDirection[i] == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Magic/InfernalBlade2.cs b/Projectiles/Magic/InfernalBlade2.cs index 55094dd6c6..8a2bc0d826 100644 --- a/Projectiles/Magic/InfernalBlade2.cs +++ b/Projectiles/Magic/InfernalBlade2.cs @@ -86,8 +86,8 @@ namespace CalamityMod.Projectiles.Magic spriteEffects = SpriteEffects.FlipHorizontally; } Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); - Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int textureArea = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int textureArea = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y3 = textureArea * Projectile.frame; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, textureArea); Vector2 halfRect = rectangle.Size() / 2f; @@ -97,11 +97,11 @@ namespace CalamityMod.Projectiles.Magic { Color alphaColor = colorArea; alphaColor = Projectile.GetAlpha(alphaColor); - alphaColor *= (float)(3 - j) / ((float)ProjectileID.Sets.TrailCacheLength[Projectile.type] * 1.5f); + alphaColor *= (float)(3 - j) / ((float)ProjectileID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 oldPosition = Projectile.oldPos[j]; float projRotation = Projectile.rotation; SpriteEffects effects = spriteEffects; - if (ProjectileID.Sets.TrailingMode[Projectile.type] == 2) + if (ProjectileID.Sets.TrailingMode[Type] == 2) { projRotation = Projectile.oldRot[j]; effects = (Projectile.oldSpriteDirection[j] == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Magic/IonBlast.cs b/Projectiles/Magic/IonBlast.cs index 16f2ce592a..708fe8812d 100644 --- a/Projectiles/Magic/IonBlast.cs +++ b/Projectiles/Magic/IonBlast.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/KeelhaulGeyserBottom.cs b/Projectiles/Magic/KeelhaulGeyserBottom.cs index 97cc0ab147..632c9c9e08 100644 --- a/Projectiles/Magic/KeelhaulGeyserBottom.cs +++ b/Projectiles/Magic/KeelhaulGeyserBottom.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Magic/KeelhaulGeyserTop.cs b/Projectiles/Magic/KeelhaulGeyserTop.cs index 70fa1eabeb..69aeb8f78b 100644 --- a/Projectiles/Magic/KeelhaulGeyserTop.cs +++ b/Projectiles/Magic/KeelhaulGeyserTop.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Magic/LightBlade.cs b/Projectiles/Magic/LightBlade.cs index d036aa40c8..b67da9d6d7 100644 --- a/Projectiles/Magic/LightBlade.cs +++ b/Projectiles/Magic/LightBlade.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = NumAfterimages; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = NumAfterimages; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Magic Point projTile = Projectile.Center.ToTileCoordinates(); Color localLight = Lighting.GetColor(projTile.X, projTile.Y); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle rect = new Rectangle(38 * Projectile.frame, 0, 38, 38); Vector2 halfSpriteSize = rect.Size() / 2f; diff --git a/Projectiles/Magic/LiquidBlade.cs b/Projectiles/Magic/LiquidBlade.cs index fbf6ce611f..cf4d6601f1 100644 --- a/Projectiles/Magic/LiquidBlade.cs +++ b/Projectiles/Magic/LiquidBlade.cs @@ -85,8 +85,8 @@ namespace CalamityMod.Projectiles.Magic spriteEffects = SpriteEffects.FlipHorizontally; } Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); - Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int textureArea = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int textureArea = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y3 = textureArea * Projectile.frame; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, textureArea); Vector2 halfRect = rectangle.Size() / 2f; @@ -96,11 +96,11 @@ namespace CalamityMod.Projectiles.Magic { Color alphaColor = colorArea; alphaColor = Projectile.GetAlpha(alphaColor); - alphaColor *= (float)(3 - i) / ((float)ProjectileID.Sets.TrailCacheLength[Projectile.type] * 1.5f); + alphaColor *= (float)(3 - i) / ((float)ProjectileID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 oldPosition = Projectile.oldPos[i]; float projRotation = Projectile.rotation; SpriteEffects effects = spriteEffects; - if (ProjectileID.Sets.TrailingMode[Projectile.type] == 2) + if (ProjectileID.Sets.TrailingMode[Type] == 2) { projRotation = Projectile.oldRot[i]; effects = (Projectile.oldSpriteDirection[i] == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Magic/LiquidBlade2.cs b/Projectiles/Magic/LiquidBlade2.cs index 21876dd11d..94ab1d3557 100644 --- a/Projectiles/Magic/LiquidBlade2.cs +++ b/Projectiles/Magic/LiquidBlade2.cs @@ -86,8 +86,8 @@ namespace CalamityMod.Projectiles.Magic spriteEffects = SpriteEffects.FlipHorizontally; } Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); - Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int textureArea = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D3 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int textureArea = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y3 = textureArea * Projectile.frame; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, textureArea); Vector2 halfRect = rectangle.Size() / 2f; @@ -97,11 +97,11 @@ namespace CalamityMod.Projectiles.Magic { Color alphaColor = colorArea; alphaColor = Projectile.GetAlpha(alphaColor); - alphaColor *= (float)(3 - j) / ((float)ProjectileID.Sets.TrailCacheLength[Projectile.type] * 1.5f); + alphaColor *= (float)(3 - j) / ((float)ProjectileID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 oldPosition = Projectile.oldPos[j]; float projRotation = Projectile.rotation; SpriteEffects effects = spriteEffects; - if (ProjectileID.Sets.TrailingMode[Projectile.type] == 2) + if (ProjectileID.Sets.TrailingMode[Type] == 2) { projRotation = Projectile.oldRot[j]; effects = (Projectile.oldSpriteDirection[j] == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Magic/LuxorsGiftMagic.cs b/Projectiles/Magic/LuxorsGiftMagic.cs index 01915b5d3e..aaeb7a4d68 100644 --- a/Projectiles/Magic/LuxorsGiftMagic.cs +++ b/Projectiles/Magic/LuxorsGiftMagic.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/MagneticOrb.cs b/Projectiles/Magic/MagneticOrb.cs index 8a6e384e68..e5b9faf445 100644 --- a/Projectiles/Magic/MagneticOrb.cs +++ b/Projectiles/Magic/MagneticOrb.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -81,8 +81,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Magic/ManaChargedCoral.cs b/Projectiles/Magic/ManaChargedCoral.cs index 9fd20d08f4..2a0c915a13 100644 --- a/Projectiles/Magic/ManaChargedCoral.cs +++ b/Projectiles/Magic/ManaChargedCoral.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; int variant = (int)(Projectile.frame - 1); Rectangle frame = new Rectangle(0, 26 * variant, 24, 24); diff --git a/Projectiles/Magic/ManaMonster.cs b/Projectiles/Magic/ManaMonster.cs index c8c85b203f..13c05a348d 100644 --- a/Projectiles/Magic/ManaMonster.cs +++ b/Projectiles/Magic/ManaMonster.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Magic public const int PlayerAttackRedirectTime = 45; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/MelterAmp.cs b/Projectiles/Magic/MelterAmp.cs index 12729568a3..3d959df991 100644 --- a/Projectiles/Magic/MelterAmp.cs +++ b/Projectiles/Magic/MelterAmp.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Magic/MeteorStar.cs b/Projectiles/Magic/MeteorStar.cs index ac9a45264c..2ae86002c8 100644 --- a/Projectiles/Magic/MeteorStar.cs +++ b/Projectiles/Magic/MeteorStar.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Type]; Color LightYellow = new Color(255, 255, 76); Lighting.AddLight(Projectile.Center, LightYellow.ToVector3() * Projectile.Opacity * 0.5f); @@ -112,10 +112,10 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); // Draw the main texture in fullbright - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); return false; diff --git a/Projectiles/Magic/MeteorStarExplosion.cs b/Projectiles/Magic/MeteorStarExplosion.cs index aa7a66e539..200e4d1f14 100644 --- a/Projectiles/Magic/MeteorStarExplosion.cs +++ b/Projectiles/Magic/MeteorStarExplosion.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = -1; - Projectile.timeLeft = Main.projFrames[Projectile.type] * 5; + Projectile.timeLeft = Main.projFrames[Type] * 5; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 35; Projectile.tileCollide = false; diff --git a/Projectiles/Magic/MiasmaGas.cs b/Projectiles/Magic/MiasmaGas.cs index d7df7b79ea..2bece586d9 100644 --- a/Projectiles/Magic/MiasmaGas.cs +++ b/Projectiles/Magic/MiasmaGas.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/NanoPurgeHoldout.cs b/Projectiles/Magic/NanoPurgeHoldout.cs index 4127860c0a..2437fb60be 100644 --- a/Projectiles/Magic/NanoPurgeHoldout.cs +++ b/Projectiles/Magic/NanoPurgeHoldout.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic ChargeTowardsNextShot -= itemUseTime; // Update the animation. - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; bool manaCostPaid = Owner.CheckMana(Owner.ActiveItem(), -1, true, false); if (manaCostPaid) diff --git a/Projectiles/Magic/NebulaCloud.cs b/Projectiles/Magic/NebulaCloud.cs index 89797b1b20..d2cafeea2e 100644 --- a/Projectiles/Magic/NebulaCloud.cs +++ b/Projectiles/Magic/NebulaCloud.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Magic/NebulaCloudCore.cs b/Projectiles/Magic/NebulaCloudCore.cs index a5c36b5bb0..d48efbeab7 100644 --- a/Projectiles/Magic/NebulaCloudCore.cs +++ b/Projectiles/Magic/NebulaCloudCore.cs @@ -16,10 +16,10 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; // Decide what state the projectile is in. @@ -261,14 +261,14 @@ namespace CalamityMod.Projectiles.Magic float rotationScale = 0.95f + (Projectile.rotation * 0.75f).ToRotationVector2().Y * 0.1f; cloudColor *= rotationScale; float cloudScale = 0.6f + Projectile.scale * 0.6f * rotationScale; - Texture2D coreTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D coreTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D nebulaCloudTexture = ModContent.Request("CalamityMod/Projectiles/Magic/NebulaCloud", AssetRequestMode.ImmediateLoad).Value; Vector2 position = Projectile.Center - Main.screenPosition; - Vector2 coreOrigin = coreTexture.Size() / new Vector2(0, Main.projFrames[Projectile.type]) * 0.5f; + Vector2 coreOrigin = coreTexture.Size() / new Vector2(0, Main.projFrames[Type]) * 0.5f; Vector2 cloudOrigin = nebulaCloudTexture.Size() * 0.5f; Main.EntitySpriteDraw(nebulaCloudTexture, position, null, cloudColor, 0f - Projectile.rotation + 0.35f, cloudOrigin, cloudScale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); Main.EntitySpriteDraw(nebulaCloudTexture, position, null, fuckYou, 0f - Projectile.rotation, cloudOrigin, Projectile.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); - Main.EntitySpriteDraw(coreTexture, position, new Rectangle?(new Rectangle(0, Main.projFrames[Projectile.type] * Projectile.frame, coreTexture.Width, Main.projFrames[Projectile.type])), coreColor, (0f - Projectile.rotation) * 0.7f, coreOrigin, Projectile.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); + Main.EntitySpriteDraw(coreTexture, position, new Rectangle?(new Rectangle(0, Main.projFrames[Type] * Projectile.frame, coreTexture.Width, Main.projFrames[Type])), coreColor, (0f - Projectile.rotation) * 0.7f, coreOrigin, Projectile.scale, spriteEffects ^ SpriteEffects.FlipHorizontally, 0); Main.EntitySpriteDraw(nebulaCloudTexture, position, null, fuckYou * 0.8f, Projectile.rotation * 0.5f, cloudOrigin, Projectile.scale * 0.9f, spriteEffects, 0); fuckYou.A = 0; diff --git a/Projectiles/Magic/NebulaNova.cs b/Projectiles/Magic/NebulaNova.cs index 141a2e4745..84830b3f48 100644 --- a/Projectiles/Magic/NebulaNova.cs +++ b/Projectiles/Magic/NebulaNova.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() / new Vector2(TotalXFrames, TotalYFrames) * 0.5f; Rectangle frame = texture.Frame(TotalXFrames, TotalYFrames, frameX, frameY); diff --git a/Projectiles/Magic/NebulousCataclysm_Held.cs b/Projectiles/Magic/NebulousCataclysm_Held.cs index 1e137421ee..d29dbbe09e 100644 --- a/Projectiles/Magic/NebulousCataclysm_Held.cs +++ b/Projectiles/Magic/NebulousCataclysm_Held.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.frameCounter < 5) return; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() / new Vector2(TotalXFrames, TotalYFrames) * 0.5f; Rectangle frame = texture.Frame(TotalXFrames, TotalYFrames, frameX, frameY); diff --git a/Projectiles/Magic/NettleRight.cs b/Projectiles/Magic/NettleRight.cs index 6029ca4ce6..87e17e8810 100644 --- a/Projectiles/Magic/NettleRight.cs +++ b/Projectiles/Magic/NettleRight.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Magic // Draw the tip for the final thorn public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == TotalSegments) texture = ModContent.Request("CalamityMod/Projectiles/Magic/NettleTip").Value; diff --git a/Projectiles/Magic/NuclearFuryProjectile.cs b/Projectiles/Magic/NuclearFuryProjectile.cs index 6629661976..24e443b373 100644 --- a/Projectiles/Magic/NuclearFuryProjectile.cs +++ b/Projectiles/Magic/NuclearFuryProjectile.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/OmicronWingman.cs b/Projectiles/Magic/OmicronWingman.cs index 9b830bea2a..dd7fb2fbb7 100644 --- a/Projectiles/Magic/OmicronWingman.cs +++ b/Projectiles/Magic/OmicronWingman.cs @@ -258,7 +258,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.spriteDirection == -1 ? MovingUp : !MovingUp) flipSprite |= SpriteEffects.FlipVertically; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(StaticEffectsColor, Color.White, 0.5f) * 0.2f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(StaticEffectsColor, Color.White, 0.5f) * 0.2f, 1, texture); Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); return false; diff --git a/Projectiles/Magic/PartySparkle.cs b/Projectiles/Magic/PartySparkle.cs index f9d953761f..5eafa1cce4 100644 --- a/Projectiles/Magic/PartySparkle.cs +++ b/Projectiles/Magic/PartySparkle.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D sparkleTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D sparkleTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color sparkleColor = CalamityUtils.MulticolorLerp(ColorSpectrumHue, RainbowPartyCannon.ColorSet) * Projectile.Opacity * 0.5f; sparkleColor.A = 0; diff --git a/Projectiles/Magic/PhantasmalFuryProj.cs b/Projectiles/Magic/PhantasmalFuryProj.cs index d3e831b9f3..2250576b86 100644 --- a/Projectiles/Magic/PhantasmalFuryProj.cs +++ b/Projectiles/Magic/PhantasmalFuryProj.cs @@ -16,10 +16,10 @@ namespace CalamityMod.Projectiles.Magic public bool launched = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; dustRotation += 0.12f; @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White, 1); return false; } diff --git a/Projectiles/Magic/PhasedGodRay.cs b/Projectiles/Magic/PhasedGodRay.cs index 633e74c335..06e3528bdc 100644 --- a/Projectiles/Magic/PhasedGodRay.cs +++ b/Projectiles/Magic/PhasedGodRay.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Magic/PoseidonTyphoon.cs b/Projectiles/Magic/PoseidonTyphoon.cs index 2d992ffb05..e9b2f197a4 100644 --- a/Projectiles/Magic/PoseidonTyphoon.cs +++ b/Projectiles/Magic/PoseidonTyphoon.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Magic/PrimordialAncientProjectile.cs b/Projectiles/Magic/PrimordialAncientProjectile.cs index 7d83787b70..a21659f739 100644 --- a/Projectiles/Magic/PrimordialAncientProjectile.cs +++ b/Projectiles/Magic/PrimordialAncientProjectile.cs @@ -28,9 +28,9 @@ namespace CalamityMod.Projectiles.Magic public List buffList = new List(new bool[Main.maxPlayers]); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -276,7 +276,7 @@ namespace CalamityMod.Projectiles.Magic public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox); public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.7f, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.7f, 1); Texture2D rTexture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; float randSize = Main.rand.NextFloat(0.8f, 1.2f); diff --git a/Projectiles/Magic/PrimordialEarthProjectile.cs b/Projectiles/Magic/PrimordialEarthProjectile.cs index 80592b03cc..e7d99309b2 100644 --- a/Projectiles/Magic/PrimordialEarthProjectile.cs +++ b/Projectiles/Magic/PrimordialEarthProjectile.cs @@ -22,9 +22,9 @@ namespace CalamityMod.Projectiles.Magic public List buffList = new List(new bool[Main.maxPlayers]); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { if (Projectile.timeLeft > 50) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.4f, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.4f, 1); return true; } } diff --git a/Projectiles/Magic/PrinceFlameLarge.cs b/Projectiles/Magic/PrinceFlameLarge.cs index d29aae3dde..f79be51059 100644 --- a/Projectiles/Magic/PrinceFlameLarge.cs +++ b/Projectiles/Magic/PrinceFlameLarge.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Magic public const int FadeoutTime = 25; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; + Main.projFrames[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 4; } public override void SetDefaults() @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Magic { lightColor = Color.Lerp(lightColor, Color.White, 0.8f); lightColor.A /= 4; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/PrinceFlameSmall.cs b/Projectiles/Magic/PrinceFlameSmall.cs index 23ad14f604..35c6dbffe4 100644 --- a/Projectiles/Magic/PrinceFlameSmall.cs +++ b/Projectiles/Magic/PrinceFlameSmall.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Projectiles.Magic public const int AttackDelay = 12; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Magic { Time++; Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; Projectile.Opacity = Utils.GetLerpValue(0f, 15f, Projectile.timeLeft, true); @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Magic { lightColor = Color.Lerp(lightColor, Color.White, 0.8f); lightColor.A /= 3; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/RainbowComet.cs b/Projectiles/Magic/RainbowComet.cs index b6fa5e20be..3bd0b240f3 100644 --- a/Projectiles/Magic/RainbowComet.cs +++ b/Projectiles/Magic/RainbowComet.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Magic public const float FadeinTime = 40f; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -42,14 +42,14 @@ namespace CalamityMod.Projectiles.Magic Projectile.frameCounter++; if (Projectile.frameCounter % 4 == 3) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public override bool PreDraw(ref Color lightColor) { - Texture2D cometTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D cometTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(cometTexture, Projectile.Center + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition, - cometTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), + cometTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame), Color.White * Projectile.Opacity, Projectile.rotation, cometTexture.Size() * 0.5f, diff --git a/Projectiles/Magic/RainbowRocket.cs b/Projectiles/Magic/RainbowRocket.cs index 37b7d50a5a..8d93e5a912 100644 --- a/Projectiles/Magic/RainbowRocket.cs +++ b/Projectiles/Magic/RainbowRocket.cs @@ -37,10 +37,10 @@ namespace CalamityMod.Projectiles.Magic public const float HomingAcceleration = 0.4f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frameCounter++; if (Projectile.frameCounter % 4 == 3) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; NPC potentialTarget = Projectile.Center.ClosestNPCAt(2300f, true, true); if (Time < SwerveTime) @@ -139,10 +139,10 @@ namespace CalamityMod.Projectiles.Magic Projectile.oldPos[0] = Projectile.position + Projectile.velocity.SafeNormalize(Vector2.Zero) * 50f; PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity), 80); - Texture2D rocketTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D rocketTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(rocketTexture, Projectile.Center - Main.screenPosition, - rocketTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), + rocketTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame), GetRocketColor(), Projectile.rotation, rocketTexture.Size() * 0.5f, diff --git a/Projectiles/Magic/RancorArm.cs b/Projectiles/Magic/RancorArm.cs index 2f3c7a281c..e2ad741f5e 100644 --- a/Projectiles/Magic/RancorArm.cs +++ b/Projectiles/Magic/RancorArm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Magic public ref float Time => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Magic SoundStyle sound = Time == 0 ? SoundID.NPCDeath52 : SoundID.Item20; SoundEngine.PlaySound(sound, Projectile.Center); - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); Vector2 newSize; switch (Projectile.frame) @@ -137,8 +137,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Color light = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16); diff --git a/Projectiles/Magic/RancorFog.cs b/Projectiles/Magic/RancorFog.cs index caa7e8cfb2..5ef1397d9e 100644 --- a/Projectiles/Magic/RancorFog.cs +++ b/Projectiles/Magic/RancorFog.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Magic { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.5f; diff --git a/Projectiles/Magic/RancorHoldout.cs b/Projectiles/Magic/RancorHoldout.cs index e0edf03517..e845a63e6c 100644 --- a/Projectiles/Magic/RancorHoldout.cs +++ b/Projectiles/Magic/RancorHoldout.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Magic public const int ManaConsumeRate = 12; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 16; + Main.projFrames[Type] = 16; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frameCounter++; if (Projectile.frameCounter >= 4) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } diff --git a/Projectiles/Magic/RancorMagicCircle.cs b/Projectiles/Magic/RancorMagicCircle.cs index f048530309..ec4eefc63e 100644 --- a/Projectiles/Magic/RancorMagicCircle.cs +++ b/Projectiles/Magic/RancorMagicCircle.cs @@ -191,7 +191,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D outerCircleTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D outerCircleTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D outerCircleGlowmask = ModContent.Request(Texture + "Glowmask").Value; Texture2D innerCircleTexture = ModContent.Request(Texture + "Inner").Value; Texture2D innerCircleGlowmask = ModContent.Request(Texture + "InnerGlowmask").Value; diff --git a/Projectiles/Magic/RancorSmallCinder.cs b/Projectiles/Magic/RancorSmallCinder.cs index 01e6135270..30b36d11b1 100644 --- a/Projectiles/Magic/RancorSmallCinder.cs +++ b/Projectiles/Magic/RancorSmallCinder.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Magic public ref float Lifetime => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic // Decide a frame to use on the first frame this projectile exists. if (Projectile.localAI[0] == 0f) { - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); Projectile.localAI[0] = 1f; } diff --git a/Projectiles/Magic/RedirectingGildedSoul.cs b/Projectiles/Magic/RedirectingGildedSoul.cs index a8c0001025..f49200a9d7 100644 --- a/Projectiles/Magic/RedirectingGildedSoul.cs +++ b/Projectiles/Magic/RedirectingGildedSoul.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Projectiles.Magic public ref float Time => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -44,8 +44,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; for (int i = 0; i < 4; i++) { diff --git a/Projectiles/Magic/RedirectingLostSoul.cs b/Projectiles/Magic/RedirectingLostSoul.cs index d70963e256..c4bae2a019 100644 --- a/Projectiles/Magic/RedirectingLostSoul.cs +++ b/Projectiles/Magic/RedirectingLostSoul.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Projectiles.Magic public ref float Time => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -44,8 +44,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int j = 0; j < Projectile.oldPos.Length / 2; j++) { diff --git a/Projectiles/Magic/RedirectingVengefulSoul.cs b/Projectiles/Magic/RedirectingVengefulSoul.cs index 9876be7596..550b223e20 100644 --- a/Projectiles/Magic/RedirectingVengefulSoul.cs +++ b/Projectiles/Magic/RedirectingVengefulSoul.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Projectiles.Magic public ref float Time => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -80,8 +80,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 0; i < 4; i++) { for (int j = 0; j < Projectile.oldPos.Length / 2; j++) diff --git a/Projectiles/Magic/RougeSlashLarge.cs b/Projectiles/Magic/RougeSlashLarge.cs index 008c535d98..309880636c 100644 --- a/Projectiles/Magic/RougeSlashLarge.cs +++ b/Projectiles/Magic/RougeSlashLarge.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/RougeSlashMedium.cs b/Projectiles/Magic/RougeSlashMedium.cs index 69ac3a213d..332bd32555 100644 --- a/Projectiles/Magic/RougeSlashMedium.cs +++ b/Projectiles/Magic/RougeSlashMedium.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/RougeSlashSmall.cs b/Projectiles/Magic/RougeSlashSmall.cs index 558ea6a65d..a542522e7a 100644 --- a/Projectiles/Magic/RougeSlashSmall.cs +++ b/Projectiles/Magic/RougeSlashSmall.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/SHPB.cs b/Projectiles/Magic/SHPB.cs index 6760d73471..8872be23e2 100644 --- a/Projectiles/Magic/SHPB.cs +++ b/Projectiles/Magic/SHPB.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Magic/SanguineFlareProj.cs b/Projectiles/Magic/SanguineFlareProj.cs index 33b8185b8d..e4c05b622e 100644 --- a/Projectiles/Magic/SanguineFlareProj.cs +++ b/Projectiles/Magic/SanguineFlareProj.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs b/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs index f43be3785f..fb896cbdec 100644 --- a/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs +++ b/Projectiles/Magic/SeethingDischargeBrimstoneBarrage.cs @@ -16,10 +16,10 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs b/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs index 2535e7ee60..4810a27147 100644 --- a/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs +++ b/Projectiles/Magic/SeethingDischargeBrimstoneHellblast.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/SerpentineBody.cs b/Projectiles/Magic/SerpentineBody.cs index c3586ae240..aa3ca04383 100644 --- a/Projectiles/Magic/SerpentineBody.cs +++ b/Projectiles/Magic/SerpentineBody.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Magic/SerpentineHead.cs b/Projectiles/Magic/SerpentineHead.cs index b49cdfa57a..59bb7d7b8b 100644 --- a/Projectiles/Magic/SerpentineHead.cs +++ b/Projectiles/Magic/SerpentineHead.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Magic/SerpentineTail.cs b/Projectiles/Magic/SerpentineTail.cs index 0d147b0b30..f187432d5e 100644 --- a/Projectiles/Magic/SerpentineTail.cs +++ b/Projectiles/Magic/SerpentineTail.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Magic/ShadeNimbusCloud.cs b/Projectiles/Magic/ShadeNimbusCloud.cs index a94a50d56c..29a58b8da6 100644 --- a/Projectiles/Magic/ShadeNimbusCloud.cs +++ b/Projectiles/Magic/ShadeNimbusCloud.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Magic // Does the animation of the projectile, the number in the middle determines the speed of the animatino. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Type]; // If the projectile is about to die or it collides with a tile, start fading. // Depending on how strong the fade-out speed is, it'll adapt by the amount of time left for it do die. diff --git a/Projectiles/Magic/ShadecrystalProjectile.cs b/Projectiles/Magic/ShadecrystalProjectile.cs index b30d1e466a..27b15744f2 100644 --- a/Projectiles/Magic/ShadecrystalProjectile.cs +++ b/Projectiles/Magic/ShadecrystalProjectile.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/Shadowbolt.cs b/Projectiles/Magic/Shadowbolt.cs index 2384ea76c7..2b1574d21e 100644 --- a/Projectiles/Magic/Shadowbolt.cs +++ b/Projectiles/Magic/Shadowbolt.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() { diff --git a/Projectiles/Magic/ShiftingSandsProj.cs b/Projectiles/Magic/ShiftingSandsProj.cs index 509fa87d59..f231dfd265 100644 --- a/Projectiles/Magic/ShiftingSandsProj.cs +++ b/Projectiles/Magic/ShiftingSandsProj.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/SlitheringEelProjectile.cs b/Projectiles/Magic/SlitheringEelProjectile.cs index 21beaa4a6d..1c1582c4af 100644 --- a/Projectiles/Magic/SlitheringEelProjectile.cs +++ b/Projectiles/Magic/SlitheringEelProjectile.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Magic/SmallSpirit.cs b/Projectiles/Magic/SmallSpirit.cs index 495e8611b2..d220c36ccd 100644 --- a/Projectiles/Magic/SmallSpirit.cs +++ b/Projectiles/Magic/SmallSpirit.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic // Handle frames. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; float maxOpacity = 1f; diff --git a/Projectiles/Magic/Snowflake.cs b/Projectiles/Magic/Snowflake.cs index 75b16aec3f..f024feb401 100644 --- a/Projectiles/Magic/Snowflake.cs +++ b/Projectiles/Magic/Snowflake.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -167,7 +167,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/SnowflakeIceStar.cs b/Projectiles/Magic/SnowflakeIceStar.cs index 31783bb77f..4984b0cd42 100644 --- a/Projectiles/Magic/SnowflakeIceStar.cs +++ b/Projectiles/Magic/SnowflakeIceStar.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/SparklingLaser.cs b/Projectiles/Magic/SparklingLaser.cs index 1adfe56d9c..ced25d2724 100644 --- a/Projectiles/Magic/SparklingLaser.cs +++ b/Projectiles/Magic/SparklingLaser.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Magic // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 4f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } // Gently adjusts the aim vector of the laser to point towards the mouse. @@ -174,9 +174,9 @@ namespace CalamityMod.Projectiles.Magic return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. // This is a lot more scuffed than other lasers... for some reason I'll try not to think about right now. diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs index 703931b497..06ed20b5e5 100644 --- a/Projectiles/Magic/SpiritCongregation.cs +++ b/Projectiles/Magic/SpiritCongregation.cs @@ -46,8 +46,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; } public override void SetDefaults() @@ -269,7 +269,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (CurrentPower > LargeMouthPowerLowerBound) texture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationBig").Value; diff --git a/Projectiles/Magic/Starblast.cs b/Projectiles/Magic/Starblast.cs index f590783b6c..b267683a8d 100644 --- a/Projectiles/Magic/Starblast.cs +++ b/Projectiles/Magic/Starblast.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/StickyFeather.cs b/Projectiles/Magic/StickyFeather.cs index 233d5383dd..96822f36ce 100644 --- a/Projectiles/Magic/StickyFeather.cs +++ b/Projectiles/Magic/StickyFeather.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/TacticiansTrumpCardProj.cs b/Projectiles/Magic/TacticiansTrumpCardProj.cs index 8d57cb81ef..a186aa8245 100644 --- a/Projectiles/Magic/TacticiansTrumpCardProj.cs +++ b/Projectiles/Magic/TacticiansTrumpCardProj.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.timeLeft > 295) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Magic/TearsofHeavenProjectile.cs b/Projectiles/Magic/TearsofHeavenProjectile.cs index ad1e1449b4..c3c2809d12 100644 --- a/Projectiles/Magic/TearsofHeavenProjectile.cs +++ b/Projectiles/Magic/TearsofHeavenProjectile.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/Teslabeam.cs b/Projectiles/Magic/Teslabeam.cs index bc5f59087b..15583e7412 100644 --- a/Projectiles/Magic/Teslabeam.cs +++ b/Projectiles/Magic/Teslabeam.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() diff --git a/Projectiles/Magic/ThunderboltHoldout.cs b/Projectiles/Magic/ThunderboltHoldout.cs index 1e7782345f..1fdc41da6f 100644 --- a/Projectiles/Magic/ThunderboltHoldout.cs +++ b/Projectiles/Magic/ThunderboltHoldout.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Magic public static Asset MuzzleFlash; public override void Load() => MuzzleFlash = ModContent.Request("CalamityMod/Projectiles/Magic/ThunderboltHoldoutFlash"); - public override void SetStaticDefaults() => Main.projFrames[Projectile.type] = 15; + public override void SetStaticDefaults() => Main.projFrames[Type] = 15; public override void SetDefaults() { diff --git a/Projectiles/Magic/ThunderboltOrb.cs b/Projectiles/Magic/ThunderboltOrb.cs index 6be0dc9933..56d7a48e04 100644 --- a/Projectiles/Magic/ThunderboltOrb.cs +++ b/Projectiles/Magic/ThunderboltOrb.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type]; Projectile.velocity *= 0.8f; Projectile.rotation += 0.01f; diff --git a/Projectiles/Magic/TradewindsProjectile.cs b/Projectiles/Magic/TradewindsProjectile.cs index 3963edfbe5..ba0a63c9e0 100644 --- a/Projectiles/Magic/TradewindsProjectile.cs +++ b/Projectiles/Magic/TradewindsProjectile.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/UndinesRetributionSpear.cs b/Projectiles/Magic/UndinesRetributionSpear.cs index 186b8ea30d..4b973c8524 100644 --- a/Projectiles/Magic/UndinesRetributionSpear.cs +++ b/Projectiles/Magic/UndinesRetributionSpear.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Magic/ValkyrieRayBeam.cs b/Projectiles/Magic/ValkyrieRayBeam.cs index f1ab86759c..c23a73f8d4 100644 --- a/Projectiles/Magic/ValkyrieRayBeam.cs +++ b/Projectiles/Magic/ValkyrieRayBeam.cs @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Magic if (beamVector == Vector2.Zero || Projectile.velocity != Vector2.Zero) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float beamLength = Projectile.ai[0]; Vector2 centerFloored = Projectile.Center.Floor() + beamVector * Projectile.scale * BeamRenderTileOffset; Vector2 scaleVec = new Vector2(Projectile.scale); diff --git a/Projectiles/Magic/VeeringWindAirWave.cs b/Projectiles/Magic/VeeringWindAirWave.cs index debc0d10d9..654b6a8349 100644 --- a/Projectiles/Magic/VeeringWindAirWave.cs +++ b/Projectiles/Magic/VeeringWindAirWave.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) // Photoviscerator ball drawcode, slightly edited. { - Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 2.4f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; diff --git a/Projectiles/Magic/VeeringWindFrostWave.cs b/Projectiles/Magic/VeeringWindFrostWave.cs index c5d52e0493..1e8e76e209 100644 --- a/Projectiles/Magic/VeeringWindFrostWave.cs +++ b/Projectiles/Magic/VeeringWindFrostWave.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) // Photoviscerator ball drawcode, slightly edited. { - Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 4.8f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; diff --git a/Projectiles/Magic/VehemenceBolt.cs b/Projectiles/Magic/VehemenceBolt.cs index b0b4bf4cb7..ea3f439cc1 100644 --- a/Projectiles/Magic/VehemenceBolt.cs +++ b/Projectiles/Magic/VehemenceBolt.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Magic public Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/VehemenceSkull.cs b/Projectiles/Magic/VehemenceSkull.cs index 514291573a..2a4cf2e042 100644 --- a/Projectiles/Magic/VehemenceSkull.cs +++ b/Projectiles/Magic/VehemenceSkull.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Magic public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.frame >= 4) Projectile.frame = 0; } - else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); // Produce some light. diff --git a/Projectiles/Magic/VenusianBolt.cs b/Projectiles/Magic/VenusianBolt.cs index 0b377eb749..4c5d14a937 100644 --- a/Projectiles/Magic/VenusianBolt.cs +++ b/Projectiles/Magic/VenusianBolt.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public int time = 0; public bool explode = true; @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White, 1); return true; } } diff --git a/Projectiles/Magic/VenusianFlame.cs b/Projectiles/Magic/VenusianFlame.cs index 9d06d4ffea..6d87b5c89c 100644 --- a/Projectiles/Magic/VenusianFlame.cs +++ b/Projectiles/Magic/VenusianFlame.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic if (!initialized) { initialized = true; - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); } Projectile.frameCounter++; if (Projectile.frameCounter > 4) @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Magic/VisceraBeam.cs b/Projectiles/Magic/VisceraBeam.cs index 6352e6ca85..d2b5f5d155 100644 --- a/Projectiles/Magic/VisceraBeam.cs +++ b/Projectiles/Magic/VisceraBeam.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Magic/VitriolicViperFang.cs b/Projectiles/Magic/VitriolicViperFang.cs index b011911b30..74432eebd5 100644 --- a/Projectiles/Magic/VitriolicViperFang.cs +++ b/Projectiles/Magic/VitriolicViperFang.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Magic Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + rotationalDrawOffset, null, auraColor with { A = 0 } * Utils.GetLerpValue(255, 0, Projectile.alpha), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.5f, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.5f, 2); return true; } diff --git a/Projectiles/Magic/VoidVortexProj.cs b/Projectiles/Magic/VoidVortexProj.cs index e855c2f25c..c0a5cfbf3f 100644 --- a/Projectiles/Magic/VoidVortexProj.cs +++ b/Projectiles/Magic/VoidVortexProj.cs @@ -23,9 +23,9 @@ namespace CalamityMod.Projectiles.Magic public bool rotDirection = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -191,13 +191,13 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, framing / 2f), Projectile.scale * (Projectile.ai[2] == 3 ? 1.3f : 1f), SpriteEffects.None, 0); if (Projectile.ai[2] == 3) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.3f, 1, texture2D13); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.3f, 1, texture2D13); return false; } diff --git a/Projectiles/Magic/VolatileStarcore.cs b/Projectiles/Magic/VolatileStarcore.cs index d4aa82ba38..8a061d7cf4 100644 --- a/Projectiles/Magic/VolatileStarcore.cs +++ b/Projectiles/Magic/VolatileStarcore.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = NumAnimationFrames; + Main.projFrames[Type] = NumAnimationFrames; } public override void SetDefaults() { diff --git a/Projectiles/Magic/VortexElementalBeam.cs b/Projectiles/Magic/VortexElementalBeam.cs index 588e6a436f..d1ee143217 100644 --- a/Projectiles/Magic/VortexElementalBeam.cs +++ b/Projectiles/Magic/VortexElementalBeam.cs @@ -23,9 +23,9 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 30; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 30; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Magic #region Drawing public override bool PreDraw(ref Color lightColor) { - Texture2D lightningSegmentTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D lightningSegmentTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Projectile.GetAlpha(lightColor); Vector2 lightningScale = new Vector2(Projectile.scale) / 2f; for (int i = 0; i < 3; i++) diff --git a/Projectiles/Magic/WaterLeechProj.cs b/Projectiles/Magic/WaterLeechProj.cs index 6345b2e1f5..cc1d8ddeb6 100644 --- a/Projectiles/Magic/WaterLeechProj.cs +++ b/Projectiles/Magic/WaterLeechProj.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -70,8 +70,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; SpriteEffects spriteEffects = SpriteEffects.None; @@ -85,8 +85,8 @@ namespace CalamityMod.Projectiles.Magic public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Magic/WingmanHoldout.cs b/Projectiles/Magic/WingmanHoldout.cs index c0a303c917..9a52ef8a81 100644 --- a/Projectiles/Magic/WingmanHoldout.cs +++ b/Projectiles/Magic/WingmanHoldout.cs @@ -270,7 +270,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.spriteDirection == -1 ? MovingUp : !MovingUp) flipSprite |= SpriteEffects.FlipVertically; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(StaticEffectsColor, Color.White, 0.5f) * 0.2f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(StaticEffectsColor, Color.White, 0.5f) * 0.2f, 1, texture); Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); return false; diff --git a/Projectiles/Magic/WingmanShot.cs b/Projectiles/Magic/WingmanShot.cs index d964fb366e..4a291ae93a 100644 --- a/Projectiles/Magic/WingmanShot.cs +++ b/Projectiles/Magic/WingmanShot.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Magic public int time = 0; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 14; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 14; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Magic float drawRotation = Projectile.rotation; Vector2 rotationPoint = texture.Size() * 0.5f; - //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(Color.Cyan, Color.White, 0.7f) * 0.6f, 1); + //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(Color.Cyan, Color.White, 0.7f) * 0.6f, 1); Main.EntitySpriteDraw(texture, drawPosition, null, mainColor with { A = 0 }, drawRotation, rotationPoint, new Vector2(0.5f, 1.4f) * 0.025f * Projectile.scale, SpriteEffects.None); Main.EntitySpriteDraw(texture, drawPosition, null, Color.White with { A = 0 }, drawRotation, rotationPoint, new Vector2(0.5f, 1.4f) * 0.02f * Projectile.scale, SpriteEffects.None); return false; diff --git a/Projectiles/Magic/WulfrumBolt.cs b/Projectiles/Magic/WulfrumBolt.cs index ce3f7716a0..591346ae76 100644 --- a/Projectiles/Magic/WulfrumBolt.cs +++ b/Projectiles/Magic/WulfrumBolt.cs @@ -46,8 +46,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Magic/WyvernFeatherGreen.cs b/Projectiles/Magic/WyvernFeatherGreen.cs index 77753bde0f..74c6d6ee5f 100644 --- a/Projectiles/Magic/WyvernFeatherGreen.cs +++ b/Projectiles/Magic/WyvernFeatherGreen.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/WyvernFeatherPink.cs b/Projectiles/Magic/WyvernFeatherPink.cs index 0603088547..c336051740 100644 --- a/Projectiles/Magic/WyvernFeatherPink.cs +++ b/Projectiles/Magic/WyvernFeatherPink.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/WyvernFeatherPurple.cs b/Projectiles/Magic/WyvernFeatherPurple.cs index 11dab5c10b..fbc4db8a6d 100644 --- a/Projectiles/Magic/WyvernFeatherPurple.cs +++ b/Projectiles/Magic/WyvernFeatherPurple.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Magic/WyvernProjectile.cs b/Projectiles/Magic/WyvernProjectile.cs index 97a304fa72..8900d5bdd0 100644 --- a/Projectiles/Magic/WyvernProjectile.cs +++ b/Projectiles/Magic/WyvernProjectile.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Magic/YharimsCrystalBeam.cs b/Projectiles/Magic/YharimsCrystalBeam.cs index 9f3bf8f341..7c811c7501 100644 --- a/Projectiles/Magic/YharimsCrystalBeam.cs +++ b/Projectiles/Magic/YharimsCrystalBeam.cs @@ -221,7 +221,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.velocity == Vector2.Zero) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float beamLength = Projectile.localAI[1]; Vector2 centerFloored = Projectile.Center.Floor() + Projectile.velocity * Projectile.scale * BeamRenderTileOffset; Vector2 scaleVec = new Vector2(Projectile.scale); diff --git a/Projectiles/Magic/YharimsCrystalPrism.cs b/Projectiles/Magic/YharimsCrystalPrism.cs index aeb274e80e..5be4576bfe 100644 --- a/Projectiles/Magic/YharimsCrystalPrism.cs +++ b/Projectiles/Magic/YharimsCrystalPrism.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Magic public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -176,8 +176,8 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { SpriteEffects eff = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int texYOffset = frameHeight * Projectile.frame; Vector2 sheetInsertVec = (Projectile.Center + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition).Floor(); Main.spriteBatch.Draw(tex, sheetInsertVec, new Rectangle?(new Rectangle(0, texYOffset, tex.Width, frameHeight)), Color.White, Projectile.rotation, new Vector2(tex.Width / 2f, frameHeight / 2f), Projectile.scale, eff, 0f); diff --git a/Projectiles/Melee/AbyssBladeProjectile.cs b/Projectiles/Melee/AbyssBladeProjectile.cs index ff30c4275e..9f9a13004b 100644 --- a/Projectiles/Melee/AbyssBladeProjectile.cs +++ b/Projectiles/Melee/AbyssBladeProjectile.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/AmidiasWhirlpool.cs b/Projectiles/Melee/AmidiasWhirlpool.cs index 0b200a0bf7..4815d4d045 100644 --- a/Projectiles/Melee/AmidiasWhirlpool.cs +++ b/Projectiles/Melee/AmidiasWhirlpool.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/AncientBeam.cs b/Projectiles/Melee/AncientBeam.cs index 5ae73dd099..f0d35c5aed 100644 --- a/Projectiles/Melee/AncientBeam.cs +++ b/Projectiles/Melee/AncientBeam.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } const float MaxTime = 40; @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 35) return false; - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/AncientStar.cs b/Projectiles/Melee/AncientStar.cs index 5dc157d780..dfbfc0db3d 100644 --- a/Projectiles/Melee/AncientStar.cs +++ b/Projectiles/Melee/AncientStar.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); if (Shine == 1f) { diff --git a/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs b/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs index 69c3d25b70..7306abe908 100644 --- a/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheAncients_SwungBlade.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityClientConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs index 7ef7023edc..6717f3513c 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs @@ -75,8 +75,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -489,7 +489,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(flipped ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type] && Combo == 0f) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Type] && Combo == 0f) { for (int i = 1; i < Projectile.oldRot.Length; ++i) { @@ -544,7 +544,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 backScissorDrawPosition = Owner.Center + drawAngle.ToRotationVector2() * 10f + (drawAngle.ToRotationVector2() * 56f + (drawAngle - MathHelper.PiOver2).ToRotationVector2() * 11 * Owner.direction) * Projectile.scale - Main.screenPosition; //Lined up with the hole in the front blade - if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Type]) { Texture2D afterimage = Request("CalamityMod/Projectiles/Melee/SunderingScissorsGlow").Value; diff --git a/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs b/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs index 7afe20cae8..861b0490a3 100644 --- a/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheElements_SwungBlade.cs @@ -74,8 +74,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -308,7 +308,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Combo == 1 ? sword.Width / 2f : flipped ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { @@ -362,7 +362,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 backScissorDrawPosition = Owner.Center + drawAngle.ToRotationVector2() * 10f + functionalDrawAngle.ToRotationVector2() * 70f * Projectile.scale - Main.screenPosition; //Lined up with the hole in the front blade float backScissorRotation = drawRotation + (Combo == 1 ? (!flipped ? MathHelper.PiOver4 * 0.75f : MathHelper.PiOver4 * -0.75f) : 0f); - if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && SwingTimer > ProjectileID.Sets.TrailCacheLength[Type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/ArkoftheCosmos_Constellation.cs b/Projectiles/Melee/ArkoftheCosmos_Constellation.cs index 279ffadd27..20f812135e 100644 --- a/Projectiles/Melee/ArkoftheCosmos_Constellation.cs +++ b/Projectiles/Melee/ArkoftheCosmos_Constellation.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 1; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 1; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { diff --git a/Projectiles/Melee/AstralScytheProjectile.cs b/Projectiles/Melee/AstralScytheProjectile.cs index f57ef7acea..a821a14477 100644 --- a/Projectiles/Melee/AstralScytheProjectile.cs +++ b/Projectiles/Melee/AstralScytheProjectile.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/AtaraxiaMain.cs b/Projectiles/Melee/AtaraxiaMain.cs index b359302337..ca674586b8 100644 --- a/Projectiles/Melee/AtaraxiaMain.cs +++ b/Projectiles/Melee/AtaraxiaMain.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = NumAnimationFrames; + Main.projFrames[Type] = NumAnimationFrames; } public override void SetDefaults() diff --git a/Projectiles/Melee/AtaraxiaSide.cs b/Projectiles/Melee/AtaraxiaSide.cs index 9af813ba37..9b4779611c 100644 --- a/Projectiles/Melee/AtaraxiaSide.cs +++ b/Projectiles/Melee/AtaraxiaSide.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = NumAnimationFrames; + Main.projFrames[Type] = NumAnimationFrames; } public override void SetDefaults() diff --git a/Projectiles/Melee/BalefulHarvesterProjectile.cs b/Projectiles/Melee/BalefulHarvesterProjectile.cs index ae84265cb7..3841513df9 100644 --- a/Projectiles/Melee/BalefulHarvesterProjectile.cs +++ b/Projectiles/Melee/BalefulHarvesterProjectile.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/BiomeBladeHoldout.cs b/Projectiles/Melee/BiomeBladeHoldout.cs index b0540193eb..77950d089b 100644 --- a/Projectiles/Melee/BiomeBladeHoldout.cs +++ b/Projectiles/Melee/BiomeBladeHoldout.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Melee else if (ChanneledState == 1f) { - Texture2D tex = TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = TextureAssets.Projectile[Type].Value; Vector2 squishyScale = new Vector2(Math.Abs((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * Projectile.timeLeft / 30f)), 1f); SpriteEffects flip = (float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * Projectile.timeLeft / 30f) > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; Main.EntitySpriteDraw(tex, Projectile.position - Main.screenPosition, null, lightColor * (Projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (Projectile.timeLeft / 60f)), flip, 0); diff --git a/Projectiles/Melee/BladecrestOathswordProj.cs b/Projectiles/Melee/BladecrestOathswordProj.cs index 4b0fdfee15..f3520c41c4 100644 --- a/Projectiles/Melee/BladecrestOathswordProj.cs +++ b/Projectiles/Melee/BladecrestOathswordProj.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Projectiles.Melee { base.SetStaticDefaults(); // DO NOT REMOVE THIS - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Melee/BlazingPhantomBlade.cs b/Projectiles/Melee/BlazingPhantomBlade.cs index dd67236ae3..a4cc2fb971 100644 --- a/Projectiles/Melee/BlazingPhantomBlade.cs +++ b/Projectiles/Melee/BlazingPhantomBlade.cs @@ -26,10 +26,10 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.NoMeleeSpeedVelocityScaling[Projectile.type] = true; - Main.projFrames[Projectile.type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.NoMeleeSpeedVelocityScaling[Type] = true; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -159,7 +159,7 @@ namespace CalamityMod.Projectiles.Melee bool hyperBlade = fullyVisibleDuration == DefiledGreatsword.ProjectileFullyVisibleDuration + DefiledGreatsword.ProjectileFullyVisibleDurationIncreasePerAdditionalProjectile; bool sunlightBlade = fullyVisibleDuration == DefiledGreatsword.ProjectileFullyVisibleDuration + DefiledGreatsword.ProjectileFullyVisibleDurationIncreasePerAdditionalProjectile * 2f; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Microsoft.Xna.Framework.Rectangle rectangle = asset.Frame(1, 4); Vector2 origin = rectangle.Size() / 2f; float num = Projectile.scale * 1.1f; diff --git a/Projectiles/Melee/BloodScythe.cs b/Projectiles/Melee/BloodScythe.cs index d7ed77bd5c..72d7b034ef 100644 --- a/Projectiles/Melee/BloodScythe.cs +++ b/Projectiles/Melee/BloodScythe.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/BonebreakerProjectile.cs b/Projectiles/Melee/BonebreakerProjectile.cs index 817f36b1d3..4e3dd6de31 100644 --- a/Projectiles/Melee/BonebreakerProjectile.cs +++ b/Projectiles/Melee/BonebreakerProjectile.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/BotanicSpear.cs b/Projectiles/Melee/BotanicSpear.cs index 94de7a4f18..f42ce6103b 100644 --- a/Projectiles/Melee/BotanicSpear.cs +++ b/Projectiles/Melee/BotanicSpear.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/Brimlash2.cs b/Projectiles/Melee/Brimlash2.cs index 7fd3ff0d50..8451bb0894 100644 --- a/Projectiles/Melee/Brimlash2.cs +++ b/Projectiles/Melee/Brimlash2.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 115) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/BrimlashProj.cs b/Projectiles/Melee/BrimlashProj.cs index ce54bdae0b..52d339417e 100644 --- a/Projectiles/Melee/BrimlashProj.cs +++ b/Projectiles/Melee/BrimlashProj.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 295) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/BrimstoneSwordProj.cs b/Projectiles/Melee/BrimstoneSwordProj.cs index 4a38898b22..c1b453c184 100644 --- a/Projectiles/Melee/BrimstoneSwordProj.cs +++ b/Projectiles/Melee/BrimstoneSwordProj.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/BrinySpout.cs b/Projectiles/Melee/BrinySpout.cs index 8d243f41f0..9f3f068b51 100644 --- a/Projectiles/Melee/BrinySpout.cs +++ b/Projectiles/Melee/BrinySpout.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -117,8 +117,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Melee/BrinyTyphoonBubble.cs b/Projectiles/Melee/BrinyTyphoonBubble.cs index ad9261f9bd..cd4332d625 100644 --- a/Projectiles/Melee/BrinyTyphoonBubble.cs +++ b/Projectiles/Melee/BrinyTyphoonBubble.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs index d7a67b80e0..70a438d923 100644 --- a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs +++ b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Melee else if (ChanneledState == 1f) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 squishyScale = new Vector2(Math.Abs((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * Projectile.timeLeft / 30f)), 1f); SpriteEffects flip = (float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * Projectile.timeLeft / 30f) > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; Main.EntitySpriteDraw(tex, Projectile.position - Main.screenPosition, null, lightColor * (Projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (Projectile.timeLeft / 60f)), flip, 0); diff --git a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs index 89c1276071..43aed82d98 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; //The true trolling is that we only really use this for the third swing. + Main.projFrames[Type] = 6; //The true trolling is that we only really use this for the third swing. } public override void SetDefaults() { @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); Projectile.frameCounter++; - if (Projectile.frameCounter % 5 == 0 && Projectile.frame + 1 < Main.projFrames[Projectile.type]) + if (Projectile.frameCounter % 5 == 0 && Projectile.frame + 1 < Main.projFrames[Type]) Projectile.frame++; if (Main.rand.NextBool()) diff --git a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs index cf1ff9c56c..93a2a92bf0 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 35) return false; - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/BurningMeteor.cs b/Projectiles/Melee/BurningMeteor.cs index 9602d219c3..61dafb5b13 100644 --- a/Projectiles/Melee/BurningMeteor.cs +++ b/Projectiles/Melee/BurningMeteor.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 175) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/CausticEdgeProjectile.cs b/Projectiles/Melee/CausticEdgeProjectile.cs index 82ae873f32..bbf1077d4e 100644 --- a/Projectiles/Melee/CausticEdgeProjectile.cs +++ b/Projectiles/Melee/CausticEdgeProjectile.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/CometQuasherMeteor.cs b/Projectiles/Melee/CometQuasherMeteor.cs index 3193c97b84..83300c48e0 100644 --- a/Projectiles/Melee/CometQuasherMeteor.cs +++ b/Projectiles/Melee/CometQuasherMeteor.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Melee public NPC chosenTarget; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -91,13 +91,13 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.Calamity().lineColor == 1) tex = ModContent.Request("CalamityMod/Projectiles/Melee/CometQuasherMeteor2").Value; if (Projectile.Calamity().lineColor == 2) tex = ModContent.Request("CalamityMod/Projectiles/Melee/CometQuasherMeteor3").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1, tex); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White, 1, tex); return false; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/CosmicDischargeFlail.cs b/Projectiles/Melee/CosmicDischargeFlail.cs index eb980cd6f7..df46b60a8a 100644 --- a/Projectiles/Melee/CosmicDischargeFlail.cs +++ b/Projectiles/Melee/CosmicDischargeFlail.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 mountedCenter = Main.player[Projectile.owner].MountedCenter; Color colorAtCenter = Lighting.GetColor((int)(Projectile.position.X + Projectile.width * 0.5) / 16, (int)((Projectile.position.Y + Projectile.height * 0.5) / 16.0)); - if (Projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[Projectile.type]) + if (Projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[Type]) { colorAtCenter = Lighting.GetColor((int)mountedCenter.X / 16, (int)(mountedCenter.Y / 16f)); } diff --git a/Projectiles/Melee/CosmicIceBurst.cs b/Projectiles/Melee/CosmicIceBurst.cs index 14d9f76f4c..997501b309 100644 --- a/Projectiles/Melee/CosmicIceBurst.cs +++ b/Projectiles/Melee/CosmicIceBurst.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.ai[1] += 0.01f; Projectile.scale = Projectile.ai[1]; Projectile.ai[0] += 1f; - if (Projectile.ai[0] >= (3 * Main.projFrames[Projectile.type])) + if (Projectile.ai[0] >= (3 * Main.projFrames[Type])) { Projectile.Kill(); return; @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee if (++Projectile.frameCounter >= 3) { Projectile.frameCounter = 0; - if (++Projectile.frame >= Main.projFrames[Projectile.type]) + if (++Projectile.frame >= Main.projFrames[Type]) { Projectile.hide = true; } @@ -101,12 +101,12 @@ namespace CalamityMod.Projectiles.Melee { Vector2 mountedCenter = Main.player[Projectile.owner].MountedCenter; Color colorArea = Lighting.GetColor((int)(Projectile.position.X + Projectile.width * 0.5f) / 16, (int)((Projectile.position.Y + Projectile.height * 0.5f) / 16)); - if (Projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[Projectile.type]) + if (Projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[Type]) { colorArea = Lighting.GetColor((int)mountedCenter.X / 16, (int)(mountedCenter.Y / 16f)); } - Texture2D texture2D33 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangl = texture2D33.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D33 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangl = texture2D33.Frame(1, Main.projFrames[Type], 0, Projectile.frame); return true; } diff --git a/Projectiles/Melee/CosmicShivBlade.cs b/Projectiles/Melee/CosmicShivBlade.cs index 34015b7af1..074d2769c8 100644 --- a/Projectiles/Melee/CosmicShivBlade.cs +++ b/Projectiles/Melee/CosmicShivBlade.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/CrescentMoonProj.cs b/Projectiles/Melee/CrescentMoonProj.cs index dad5dc93d5..1d705276ba 100644 --- a/Projectiles/Melee/CrescentMoonProj.cs +++ b/Projectiles/Melee/CrescentMoonProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/CrystylCrusherRay.cs b/Projectiles/Melee/CrystylCrusherRay.cs index 6fe3b3ff24..d66c58b184 100644 --- a/Projectiles/Melee/CrystylCrusherRay.cs +++ b/Projectiles/Melee/CrystylCrusherRay.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 maxLength = Main.MouseWorld - Main.player[Projectile.owner].Center; - DrawLaser(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, Main.player[Projectile.owner].Center, + DrawLaser(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Main.player[Projectile.owner].Center, Projectile.velocity, 15f, Projectile.damage, -MathHelper.PiOver2, Projectile.scale, maxLength.Length(), new Color(Main.DiscoR, 0, 255), (int)MOVE_DISTANCE); } return false; diff --git a/Projectiles/Melee/Cyclone.cs b/Projectiles/Melee/Cyclone.cs index 0a14bde12d..449613f3d8 100644 --- a/Projectiles/Melee/Cyclone.cs +++ b/Projectiles/Melee/Cyclone.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Melee public int dustvortex = 0; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/DarkBeam.cs b/Projectiles/Melee/DarkBeam.cs index 892b90beb5..b4e4995aaa 100644 --- a/Projectiles/Melee/DarkBeam.cs +++ b/Projectiles/Melee/DarkBeam.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/DarkMasterBeam.cs b/Projectiles/Melee/DarkMasterBeam.cs index 65cd9deac0..7a8fa76ef3 100644 --- a/Projectiles/Melee/DarkMasterBeam.cs +++ b/Projectiles/Melee/DarkMasterBeam.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/DeathsAscensionProjectile.cs b/Projectiles/Melee/DeathsAscensionProjectile.cs index 52e243df5b..9492d93041 100644 --- a/Projectiles/Melee/DeathsAscensionProjectile.cs +++ b/Projectiles/Melee/DeathsAscensionProjectile.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * Projectile.Opacity, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * Projectile.Opacity, 2); return false; } diff --git a/Projectiles/Melee/DeathsAscensionSwing.cs b/Projectiles/Melee/DeathsAscensionSwing.cs index 379f042834..2a229ebcaf 100644 --- a/Projectiles/Melee/DeathsAscensionSwing.cs +++ b/Projectiles/Melee/DeathsAscensionSwing.cs @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition + (Projectile.spriteDirection == -1 ? new Vector2(60, 0) : new Vector2(-60, 0)) - Projectile.velocity; Vector2 origin = texture.Size() / new Vector2(2f, 6f) * 0.5f; Rectangle frame = texture.Frame(2, 6, frameX, frameY); diff --git a/Projectiles/Melee/DemonBlast.cs b/Projectiles/Melee/DemonBlast.cs index 6e8e7402e0..7cb3fcd4a9 100644 --- a/Projectiles/Melee/DemonBlast.cs +++ b/Projectiles/Melee/DemonBlast.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/DepthCrusherProjectile.cs b/Projectiles/Melee/DepthCrusherProjectile.cs index d0b0e7f55d..96f9496617 100644 --- a/Projectiles/Melee/DepthCrusherProjectile.cs +++ b/Projectiles/Melee/DepthCrusherProjectile.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/DevilsSunriseCyclone.cs b/Projectiles/Melee/DevilsSunriseCyclone.cs index 8c04e8c38f..c958d2c2f8 100644 --- a/Projectiles/Melee/DevilsSunriseCyclone.cs +++ b/Projectiles/Melee/DevilsSunriseCyclone.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -196,7 +196,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/DevilsSunriseProj.cs b/Projectiles/Melee/DevilsSunriseProj.cs index 186640c5ad..805f06e933 100644 --- a/Projectiles/Melee/DevilsSunriseProj.cs +++ b/Projectiles/Melee/DevilsSunriseProj.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 28; + Main.projFrames[Type] = 28; } public override void SetDefaults() @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee if (red > 255) red = 255; - if (++Projectile.frame >= Main.projFrames[Projectile.type]) + if (++Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Projectile.soundDelay--; diff --git a/Projectiles/Melee/DivineHatchetBoomerang.cs b/Projectiles/Melee/DivineHatchetBoomerang.cs index 561fb30b9c..9b0c3acdf9 100644 --- a/Projectiles/Melee/DivineHatchetBoomerang.cs +++ b/Projectiles/Melee/DivineHatchetBoomerang.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/DracoBeam.cs b/Projectiles/Melee/DracoBeam.cs index a213272e50..e75c10b4c5 100644 --- a/Projectiles/Melee/DracoBeam.cs +++ b/Projectiles/Melee/DracoBeam.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 14; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 14; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/DracoBeam2.cs b/Projectiles/Melee/DracoBeam2.cs index 359ea9af86..e389a628c6 100644 --- a/Projectiles/Melee/DracoBeam2.cs +++ b/Projectiles/Melee/DracoBeam2.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/DragonRageFireball.cs b/Projectiles/Melee/DragonRageFireball.cs index 51789ebee6..ff741f31f5 100644 --- a/Projectiles/Melee/DragonRageFireball.cs +++ b/Projectiles/Melee/DragonRageFireball.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Melee private int lifeTime = 420; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -66,8 +66,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D projectileTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D projectileTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Main.spriteBatch.Draw(projectileTexture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, projectileTexture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)projectileTexture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index 79c116440d..9c93805d20 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -251,7 +251,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Rectangle rectangle = new Rectangle(0, 0, tex.Width, tex.Height); Vector2 origin = tex.Size() / 2f; diff --git a/Projectiles/Melee/EarthMeteor.cs b/Projectiles/Melee/EarthMeteor.cs index 64bcf12c7e..09de32939d 100644 --- a/Projectiles/Melee/EarthMeteor.cs +++ b/Projectiles/Melee/EarthMeteor.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Melee Color auraColor = mainColor; CalamityUtils.DrawProjectileWithBackglow(Projectile, auraColor, Color.White * 0.5f, 9); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(Color.White, randomColor, 0.3f), 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(Color.White, randomColor, 0.3f), 1); return false; } diff --git a/Projectiles/Melee/ElementalGlassStar.cs b/Projectiles/Melee/ElementalGlassStar.cs index 96b2638973..8c711f571f 100644 --- a/Projectiles/Melee/ElementalGlassStar.cs +++ b/Projectiles/Melee/ElementalGlassStar.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/EmpyreanKnife.cs b/Projectiles/Melee/EmpyreanKnife.cs index 0883369104..eb5905ac47 100644 --- a/Projectiles/Melee/EmpyreanKnife.cs +++ b/Projectiles/Melee/EmpyreanKnife.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/EonBolt.cs b/Projectiles/Melee/EonBolt.cs index 98960cc01b..e6988ef0c0 100644 --- a/Projectiles/Melee/EonBolt.cs +++ b/Projectiles/Melee/EonBolt.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/EssenceFlame2.cs b/Projectiles/Melee/EssenceFlame2.cs index 92b88b7c62..e48ffa2e5b 100644 --- a/Projectiles/Melee/EssenceFlame2.cs +++ b/Projectiles/Melee/EssenceFlame2.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Melee/EssenceScythe.cs b/Projectiles/Melee/EssenceScythe.cs index 1b715aaa50..f487a0cd93 100644 --- a/Projectiles/Melee/EssenceScythe.cs +++ b/Projectiles/Melee/EssenceScythe.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, Projectile.Center - Main.screenPosition, null, color, Projectile.rotation, origin, 1f, spriteEffects, 0); + Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, color, Projectile.rotation, origin, 1f, spriteEffects, 0); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Melee/ExcelsusBlue.cs b/Projectiles/Melee/ExcelsusBlue.cs index df52f54cfd..2ae98ca2fc 100644 --- a/Projectiles/Melee/ExcelsusBlue.cs +++ b/Projectiles/Melee/ExcelsusBlue.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/ExcelsusMain.cs b/Projectiles/Melee/ExcelsusMain.cs index 55d116045f..4b86ba15d7 100644 --- a/Projectiles/Melee/ExcelsusMain.cs +++ b/Projectiles/Melee/ExcelsusMain.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/ExcelsusPink.cs b/Projectiles/Melee/ExcelsusPink.cs index d260c54745..5bf63ee24e 100644 --- a/Projectiles/Melee/ExcelsusPink.cs +++ b/Projectiles/Melee/ExcelsusPink.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/Exobeam.cs b/Projectiles/Melee/Exobeam.cs index 4d103b0f24..553cb5793c 100644 --- a/Projectiles/Melee/Exobeam.cs +++ b/Projectiles/Melee/Exobeam.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 30; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 30; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -142,7 +142,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float bladeScale = Utils.GetLerpValue(3f, 13f, Projectile.velocity.Length(), true) * 1.2f; //Draw the blade. diff --git a/Projectiles/Melee/ExobladeProj.cs b/Projectiles/Melee/ExobladeProj.cs index c754b6d14e..d7f94d1966 100644 --- a/Projectiles/Melee/ExobladeProj.cs +++ b/Projectiles/Melee/ExobladeProj.cs @@ -172,8 +172,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 120; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 120; } public override void SetDefaults() @@ -514,7 +514,7 @@ namespace CalamityMod.Projectiles.Melee public void DrawBlade() { - var texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + var texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; SpriteEffects direction = Direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; if (State == SwingState.Swinging) diff --git a/Projectiles/Melee/FallenPaladinsHammerEcho.cs b/Projectiles/Melee/FallenPaladinsHammerEcho.cs index b13a989cf2..6ae479f6fe 100644 --- a/Projectiles/Melee/FallenPaladinsHammerEcho.cs +++ b/Projectiles/Melee/FallenPaladinsHammerEcho.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() { @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Melee/FallenPaladinsHammer").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.DarkRed with { A = 0 } * 0.5f, 1, texture, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.DarkRed with { A = 0 } * 0.5f, 1, texture, true, true); Projectile.DrawProjectileWithBackglow(Color.Red with { A = 0 }, Color.Lerp(Color.Red, Color.White, 0.5f), 5f, texture); return false; diff --git a/Projectiles/Melee/FallenPaladinsHammerProj.cs b/Projectiles/Melee/FallenPaladinsHammerProj.cs index 5686dff56a..fae1893ed4 100644 --- a/Projectiles/Melee/FallenPaladinsHammerProj.cs +++ b/Projectiles/Melee/FallenPaladinsHammerProj.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -214,7 +214,7 @@ namespace CalamityMod.Projectiles.Melee } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/ForbiddenOathbladeProjectile.cs b/Projectiles/Melee/ForbiddenOathbladeProjectile.cs index 3af5f732c7..0274780ffe 100644 --- a/Projectiles/Melee/ForbiddenOathbladeProjectile.cs +++ b/Projectiles/Melee/ForbiddenOathbladeProjectile.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/GaelSkull.cs b/Projectiles/Melee/GaelSkull.cs index dccf7c12be..173ff6754d 100644 --- a/Projectiles/Melee/GaelSkull.cs +++ b/Projectiles/Melee/GaelSkull.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/GaelSkull2.cs b/Projectiles/Melee/GaelSkull2.cs index 1edd731ae0..43b3fc5cc5 100644 --- a/Projectiles/Melee/GaelSkull2.cs +++ b/Projectiles/Melee/GaelSkull2.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Melee } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/GalacticaComet.cs b/Projectiles/Melee/GalacticaComet.cs index fedde06c1d..5f46d9af87 100644 --- a/Projectiles/Melee/GalacticaComet.cs +++ b/Projectiles/Melee/GalacticaComet.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/GalaxiaBolt.cs b/Projectiles/Melee/GalaxiaBolt.cs index f182dc58e7..0f842730fe 100644 --- a/Projectiles/Melee/GalaxiaBolt.cs +++ b/Projectiles/Melee/GalaxiaBolt.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Galaxia_AriesWrath.cs b/Projectiles/Melee/Galaxia_AriesWrath.cs index fbfac04194..01b0079f53 100644 --- a/Projectiles/Melee/Galaxia_AriesWrath.cs +++ b/Projectiles/Melee/Galaxia_AriesWrath.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs b/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs index 12ed46f183..a4d35ba78d 100644 --- a/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs +++ b/Projectiles/Melee/Galaxia_AriesWrathConstellation.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 1; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 1; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index 3bb96e5877..d76dde0d6f 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -44,8 +44,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { diff --git a/Projectiles/Melee/GalaxyBlast.cs b/Projectiles/Melee/GalaxyBlast.cs index 53de74b650..9c26fe5e20 100644 --- a/Projectiles/Melee/GalaxyBlast.cs +++ b/Projectiles/Melee/GalaxyBlast.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void AI() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frameCounter = 0; Projectile.frame++; } - if (Projectile.ai[0] >= (float)(Main.projFrames[Projectile.type] * Projectile.MaxUpdates * 3)) + if (Projectile.ai[0] >= (float)(Main.projFrames[Type] * Projectile.MaxUpdates * 3)) { Projectile.Kill(); } diff --git a/Projectiles/Melee/GalaxyBlastType2.cs b/Projectiles/Melee/GalaxyBlastType2.cs index 3620edaacb..476153872a 100644 --- a/Projectiles/Melee/GalaxyBlastType2.cs +++ b/Projectiles/Melee/GalaxyBlastType2.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void AI() @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frameCounter = 0; Projectile.frame++; } - if (Projectile.ai[0] >= (float)(Main.projFrames[Projectile.type] * Projectile.MaxUpdates * 3)) + if (Projectile.ai[0] >= (float)(Main.projFrames[Type] * Projectile.MaxUpdates * 3)) { Projectile.Kill(); } diff --git a/Projectiles/Melee/GalaxyBlastType3.cs b/Projectiles/Melee/GalaxyBlastType3.cs index 6ee3f57b3a..030e73e15d 100644 --- a/Projectiles/Melee/GalaxyBlastType3.cs +++ b/Projectiles/Melee/GalaxyBlastType3.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void AI() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frameCounter = 0; Projectile.frame++; } - if (Projectile.ai[0] >= (float)(Main.projFrames[Projectile.type] * Projectile.MaxUpdates * 3)) + if (Projectile.ai[0] >= (float)(Main.projFrames[Type] * Projectile.MaxUpdates * 3)) { Projectile.Kill(); } diff --git a/Projectiles/Melee/GalaxySmasherEcho.cs b/Projectiles/Melee/GalaxySmasherEcho.cs index 9afc7239fb..4a61eb830e 100644 --- a/Projectiles/Melee/GalaxySmasherEcho.cs +++ b/Projectiles/Melee/GalaxySmasherEcho.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Melee/GalaxySmasher").Value; Asset p2 = ModContent.Request("CalamityMod/Particles/CircularSmearSmokey"); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.5f, 3, texture, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.5f, 3, texture, true, true); Vector2 generalDrawPos = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Melee/GalaxySmasherHammer.cs b/Projectiles/Melee/GalaxySmasherHammer.cs index 9e6a5434f9..0ae4079832 100644 --- a/Projectiles/Melee/GalaxySmasherHammer.cs +++ b/Projectiles/Melee/GalaxySmasherHammer.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -326,7 +326,7 @@ namespace CalamityMod.Projectiles.Melee Asset p2 = ModContent.Request("CalamityMod/Particles/CircularSmearSmokey"); Asset p3 = ModContent.Request("CalamityMod/Particles/SmallBloom"); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.5f, 3, texture, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.5f, 3, texture, true, true); float shrinkLerp = (Utils.GetLerpValue(40, 35, EchoHammerPrep, true)); float growLerp = (Utils.GetLerpValue(0, 35, EchoHammerPrep, true)); diff --git a/Projectiles/Melee/GalileosMoon.cs b/Projectiles/Melee/GalileosMoon.cs index 1390ce7d95..6a8bc39a8a 100644 --- a/Projectiles/Melee/GalileosMoon.cs +++ b/Projectiles/Melee/GalileosMoon.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/GalileosPlanet.cs b/Projectiles/Melee/GalileosPlanet.cs index bc651357af..5cf1d49137 100644 --- a/Projectiles/Melee/GalileosPlanet.cs +++ b/Projectiles/Melee/GalileosPlanet.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/GayBeam.cs b/Projectiles/Melee/GayBeam.cs index fdfe26c180..5d016effdc 100644 --- a/Projectiles/Melee/GayBeam.cs +++ b/Projectiles/Melee/GayBeam.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = TrailLength; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = TrailLength; } public override void SetDefaults() @@ -332,8 +332,8 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.ExitShaderRegion(); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; float scale = Projectile.scale; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); diff --git a/Projectiles/Melee/GelWave.cs b/Projectiles/Melee/GelWave.cs index 81ae99eb2c..c40a402662 100644 --- a/Projectiles/Melee/GelWave.cs +++ b/Projectiles/Melee/GelWave.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/GhastlySoulLarge.cs b/Projectiles/Melee/GhastlySoulLarge.cs index db5d77867d..085ce42998 100644 --- a/Projectiles/Melee/GhastlySoulLarge.cs +++ b/Projectiles/Melee/GhastlySoulLarge.cs @@ -20,10 +20,10 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.2f, 0.9f); @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/GhastlySoulMedium.cs b/Projectiles/Melee/GhastlySoulMedium.cs index bb14c96f6b..874f2f8820 100644 --- a/Projectiles/Melee/GhastlySoulMedium.cs +++ b/Projectiles/Melee/GhastlySoulMedium.cs @@ -20,10 +20,10 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.2f, 0.9f); @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/GhastlySoulSmall.cs b/Projectiles/Melee/GhastlySoulSmall.cs index ba0e187ad7..8a37f9eae7 100644 --- a/Projectiles/Melee/GhastlySoulSmall.cs +++ b/Projectiles/Melee/GhastlySoulSmall.cs @@ -21,10 +21,10 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.5f, 0.2f, 0.9f); @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/HellionSpike.cs b/Projectiles/Melee/HellionSpike.cs index a847d50f03..7955c988a0 100644 --- a/Projectiles/Melee/HellionSpike.cs +++ b/Projectiles/Melee/HellionSpike.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/HolyColliderHolyFire.cs b/Projectiles/Melee/HolyColliderHolyFire.cs index e38b466afd..ed2c6ba922 100644 --- a/Projectiles/Melee/HolyColliderHolyFire.cs +++ b/Projectiles/Melee/HolyColliderHolyFire.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -57,8 +57,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Melee/IllustriousKnife.cs b/Projectiles/Melee/IllustriousKnife.cs index 0b79e6acae..ac9f8c2017 100644 --- a/Projectiles/Melee/IllustriousKnife.cs +++ b/Projectiles/Melee/IllustriousKnife.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/InsidiousHarpoon.cs b/Projectiles/Melee/InsidiousHarpoon.cs index 162c726b27..cc0681195a 100644 --- a/Projectiles/Melee/InsidiousHarpoon.cs +++ b/Projectiles/Melee/InsidiousHarpoon.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Projectiles.Melee public bool hasHitTarget = false; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 11; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 11; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -188,7 +188,7 @@ namespace CalamityMod.Projectiles.Melee } if (!isPowered) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return true; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 40, targetHitbox); diff --git a/Projectiles/Melee/IridescentExcaliburSlash.cs b/Projectiles/Melee/IridescentExcaliburSlash.cs index 623ef18e98..5d64f82220 100644 --- a/Projectiles/Melee/IridescentExcaliburSlash.cs +++ b/Projectiles/Melee/IridescentExcaliburSlash.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { Vector2 vector = Projectile.Center - Main.screenPosition; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle rectangle = asset.Frame(1, 4); Vector2 origin = rectangle.Size() / 2f; float num = Projectile.scale * 1.1f; diff --git a/Projectiles/Melee/IridescentExcaliburSlash2.cs b/Projectiles/Melee/IridescentExcaliburSlash2.cs index fcdacfc7d9..54728381f9 100644 --- a/Projectiles/Melee/IridescentExcaliburSlash2.cs +++ b/Projectiles/Melee/IridescentExcaliburSlash2.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { Vector2 vector = Projectile.Center - Main.screenPosition; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle rectangle = asset.Frame(1, 4); Vector2 origin = rectangle.Size() / 2f; float num = Projectile.scale * 1.1f; diff --git a/Projectiles/Melee/IridescentExcaliburSlash3.cs b/Projectiles/Melee/IridescentExcaliburSlash3.cs index 73ac9b7231..b370bdf8b5 100644 --- a/Projectiles/Melee/IridescentExcaliburSlash3.cs +++ b/Projectiles/Melee/IridescentExcaliburSlash3.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { Vector2 vector = Projectile.Center - Main.screenPosition; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle rectangle = asset.Frame(1, 4); Vector2 origin = rectangle.Size() / 2f; float num = Projectile.scale * 1.1f; diff --git a/Projectiles/Melee/LifeScythe.cs b/Projectiles/Melee/LifeScythe.cs index 369ffaea81..ac2bb88855 100644 --- a/Projectiles/Melee/LifeScythe.cs +++ b/Projectiles/Melee/LifeScythe.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/LightBeam.cs b/Projectiles/Melee/LightBeam.cs index cfe7c32b91..b955bf6f86 100644 --- a/Projectiles/Melee/LightBeam.cs +++ b/Projectiles/Melee/LightBeam.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/LuxorsGiftMelee.cs b/Projectiles/Melee/LuxorsGiftMelee.cs index 6e7647375e..83d423e61e 100644 --- a/Projectiles/Melee/LuxorsGiftMelee.cs +++ b/Projectiles/Melee/LuxorsGiftMelee.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/MantisClawJet.cs b/Projectiles/Melee/MantisClawJet.cs index 5c3ae0a27d..87821016d3 100644 --- a/Projectiles/Melee/MantisClawJet.cs +++ b/Projectiles/Melee/MantisClawJet.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 40; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 40; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Melee/MarniteDeconstructorProj.cs b/Projectiles/Melee/MarniteDeconstructorProj.cs index 31c639c24e..35145b1729 100644 --- a/Projectiles/Melee/MarniteDeconstructorProj.cs +++ b/Projectiles/Melee/MarniteDeconstructorProj.cs @@ -167,7 +167,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 normalizedVelocity = Projectile.velocity.SafeNormalize(Vector2.Zero); //Draw the holdout. - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(9f, tex.Height / 2f); SpriteEffects effect = SpriteEffects.None; if (Owner.direction * Owner.gravDir < 0) diff --git a/Projectiles/Melee/MarniteObliteratorProj.cs b/Projectiles/Melee/MarniteObliteratorProj.cs index d3f9272e13..60b4ae4975 100644 --- a/Projectiles/Melee/MarniteObliteratorProj.cs +++ b/Projectiles/Melee/MarniteObliteratorProj.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(9f, tex.Height / 2f); SpriteEffects effect = SpriteEffects.None; if (Owner.direction * Owner.gravDir < 0) diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs index fee1077dee..ac906d11f8 100644 --- a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs +++ b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs @@ -33,9 +33,9 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index 719e2b7024..4ca0604618 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -41,8 +41,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { diff --git a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs index 7fd0b3059e..5a67dc7c71 100644 --- a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs +++ b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee { if (Main.myPlayer != Projectile.owner) // don't show for other players return false; - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs index 17f21ef9ae..39309dc368 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); Projectile.frameCounter++; - if (Projectile.frameCounter % 5 == 0 && Projectile.frame + 1 < Main.projFrames[Projectile.type]) + if (Projectile.frameCounter % 5 == 0 && Projectile.frame + 1 < Main.projFrames[Type]) Projectile.frame++; if (Main.rand.NextBool() && Owner.whoAmI == Main.myPlayer) diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs index 1545f4d734..139ff19839 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TrueBiomeBlade.DefaultAttunement_BeamTime - 5f) return false; - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/MirrorBlast.cs b/Projectiles/Melee/MirrorBlast.cs index 5b768e9693..bcf7c10932 100644 --- a/Projectiles/Melee/MirrorBlast.cs +++ b/Projectiles/Melee/MirrorBlast.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 295) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/MourningSkull.cs b/Projectiles/Melee/MourningSkull.cs index 9c8aa59826..a6dd1f7b10 100644 --- a/Projectiles/Melee/MourningSkull.cs +++ b/Projectiles/Melee/MourningSkull.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/MurasamaSlash.cs b/Projectiles/Melee/MurasamaSlash.cs index c6b615e264..4ae6bfea79 100644 --- a/Projectiles/Melee/MurasamaSlash.cs +++ b/Projectiles/Melee/MurasamaSlash.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee public int time = 0; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 14; + Main.projFrames[Type] = 14; } public bool Slashing = false; @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee { if (Projectile.frameCounter <= 1) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY: Projectile.frame); Vector2 origin = frame.Size() * 0.5f; SpriteEffects spriteEffects = Projectile.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Melee/NeptunesBountyProjectile.cs b/Projectiles/Melee/NeptunesBountyProjectile.cs index 48173262b6..f86a683e98 100644 --- a/Projectiles/Melee/NeptunesBountyProjectile.cs +++ b/Projectiles/Melee/NeptunesBountyProjectile.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -296,7 +296,7 @@ namespace CalamityMod.Projectiles.Melee { if (spinMode2) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Aqua with { A = 0 } * 0.6f, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Aqua with { A = 0 } * 0.6f, 1); } Asset p = ModContent.Request("CalamityMod/Particles/CircularSmearSmokey"); Asset p2 = ModContent.Request("CalamityMod/Particles/SemiCircularSmearSwipe"); diff --git a/Projectiles/Melee/Oathblade.cs b/Projectiles/Melee/Oathblade.cs index 5be1f636f3..12457fe915 100644 --- a/Projectiles/Melee/Oathblade.cs +++ b/Projectiles/Melee/Oathblade.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/OldLordClaymoreProj.cs b/Projectiles/Melee/OldLordClaymoreProj.cs index a15390c1b4..f15552b0a2 100644 --- a/Projectiles/Melee/OldLordClaymoreProj.cs +++ b/Projectiles/Melee/OldLordClaymoreProj.cs @@ -43,8 +43,8 @@ namespace CalamityMod.Projectiles.Melee { base.SetStaticDefaults(); // DO NOT REMOVE THIS - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Melee/OmnibladeSwing.cs b/Projectiles/Melee/OmnibladeSwing.cs index 396202ab0b..06e65b81d6 100644 --- a/Projectiles/Melee/OmnibladeSwing.cs +++ b/Projectiles/Melee/OmnibladeSwing.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.frameCounter++; Projectile.frame = Projectile.frameCounter / 3; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); Vector2 playerRotatedPoint = Owner.RotatedRelativePoint(Owner.MountedCenter, true); diff --git a/Projectiles/Melee/Orbacle.cs b/Projectiles/Melee/Orbacle.cs index 6f4f88e0e0..1e1743c5ea 100644 --- a/Projectiles/Melee/Orbacle.cs +++ b/Projectiles/Melee/Orbacle.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() * 0.5f; Color color = Color.Goldenrod; diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index fe41a6d1a7..ea5a3dc017 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.3f) with { A = 0 }, 1, null, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(mainColor, Color.White, 0.3f) with { A = 0 }, 1, null, true, true); return false; } diff --git a/Projectiles/Melee/PhosphorescentGauntletPunches.cs b/Projectiles/Melee/PhosphorescentGauntletPunches.cs index 2c02f06d22..e9385e48e5 100644 --- a/Projectiles/Melee/PhosphorescentGauntletPunches.cs +++ b/Projectiles/Melee/PhosphorescentGauntletPunches.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee public const float LungeSpeed = 19f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 14; + Main.projFrames[Type] = 14; } public override void SetDefaults() @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; // Die at the end of the final punch. - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); } } @@ -158,8 +158,8 @@ namespace CalamityMod.Projectiles.Melee // Manual drawing is used to correct the origin of the projectile when drawn. public override bool PreDraw(ref Color lightColor) { - Texture2D punchTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = punchTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D punchTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = punchTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; SpriteEffects directionEffect = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Main.EntitySpriteDraw(punchTexture, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, origin, Projectile.scale, directionEffect, 0); diff --git a/Projectiles/Melee/PhotonRipperProjectile.cs b/Projectiles/Melee/PhotonRipperProjectile.cs index ea3a7d4c47..0fd61c4476 100644 --- a/Projectiles/Melee/PhotonRipperProjectile.cs +++ b/Projectiles/Melee/PhotonRipperProjectile.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowmaskTexture = ModContent.Request("CalamityMod/Projectiles/Melee/PhotonRipperGlowmask").Value; Rectangle glowmaskRectangle = glowmaskTexture.Frame(1, 6, 0, Projectile.frame); Vector2 origin = texture.Size() * 0.5f; diff --git a/Projectiles/Melee/PlagueSeeker.cs b/Projectiles/Melee/PlagueSeeker.cs index 62293378b4..842c7102ee 100644 --- a/Projectiles/Melee/PlagueSeeker.cs +++ b/Projectiles/Melee/PlagueSeeker.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee { int cap = 3; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } diff --git a/Projectiles/Melee/PrismRay.cs b/Projectiles/Melee/PrismRay.cs index 82014e4644..e1638f5750 100644 --- a/Projectiles/Melee/PrismRay.cs +++ b/Projectiles/Melee/PrismRay.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -107,8 +107,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { Vector2 baseDrawPosition = Projectile.Center + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() / 2f; Color fadedRayColor = Projectile.GetAlpha(lightColor); Color fullbrightRayColor = HueDownscaledRayColor.MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Melee/PrismTooth.cs b/Projectiles/Melee/PrismTooth.cs index c8e2d143d1..7a35d2761e 100644 --- a/Projectiles/Melee/PrismTooth.cs +++ b/Projectiles/Melee/PrismTooth.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee public ref float CanBreakTrees => ref Projectile.ai[2]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 90; + ProjectileID.Sets.TrailingMode[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 90; } public override void SetDefaults() diff --git a/Projectiles/Melee/PrismaticRay.cs b/Projectiles/Melee/PrismaticRay.cs index ea33aa5184..a920374e94 100644 --- a/Projectiles/Melee/PrismaticRay.cs +++ b/Projectiles/Melee/PrismaticRay.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/Melee/PrismaticRayStart"; public Player Owner => Main.player[Projectile.owner]; - public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + public override Texture2D LaserBeginTexture => Terraria.GameContent.TextureAssets.Projectile[Type].Value; public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/PrismaticRayMid", AssetRequestMode.ImmediateLoad).Value; public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/PrismaticRayEnd", AssetRequestMode.ImmediateLoad).Value; public override float MaxScale => 5f; diff --git a/Projectiles/Melee/PrismaticWave.cs b/Projectiles/Melee/PrismaticWave.cs index 017cf67e73..98dec241ce 100644 --- a/Projectiles/Melee/PrismaticWave.cs +++ b/Projectiles/Melee/PrismaticWave.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/PwnagehammerEcho.cs b/Projectiles/Melee/PwnagehammerEcho.cs index cf48232e18..e24dfc9dd5 100644 --- a/Projectiles/Melee/PwnagehammerEcho.cs +++ b/Projectiles/Melee/PwnagehammerEcho.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -134,8 +134,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Gold with { A = 0 } * 0.5f, 1, texture, true, true); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Gold with { A = 0 } * 0.5f, 1, texture, true, true); return false; } diff --git a/Projectiles/Melee/PwnagehammerProj.cs b/Projectiles/Melee/PwnagehammerProj.cs index d180d605ef..be9c4ce20d 100644 --- a/Projectiles/Melee/PwnagehammerProj.cs +++ b/Projectiles/Melee/PwnagehammerProj.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/RSSolarFlare.cs b/Projectiles/Melee/RSSolarFlare.cs index c0d7da5f0f..1365f97247 100644 --- a/Projectiles/Melee/RSSolarFlare.cs +++ b/Projectiles/Melee/RSSolarFlare.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -73,8 +73,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Melee/Razorwind.cs b/Projectiles/Melee/Razorwind.cs index 85eea04146..cd3a626853 100644 --- a/Projectiles/Melee/Razorwind.cs +++ b/Projectiles/Melee/Razorwind.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/RedtideWhirlpool.cs b/Projectiles/Melee/RedtideWhirlpool.cs index 319032448d..1922176180 100644 --- a/Projectiles/Melee/RedtideWhirlpool.cs +++ b/Projectiles/Melee/RedtideWhirlpool.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; SpriteEffects flip = Math.Sign(Projectile.velocity.X) < 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Melee/RendingNeedle.cs b/Projectiles/Melee/RendingNeedle.cs index 6d609a9ec7..6c4ad50df0 100644 --- a/Projectiles/Melee/RendingNeedle.cs +++ b/Projectiles/Melee/RendingNeedle.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } const float MaxTime = 30; diff --git a/Projectiles/Melee/RespiteblockHoldout.cs b/Projectiles/Melee/RespiteblockHoldout.cs index 4cd26ca080..20f3d8f62e 100644 --- a/Projectiles/Melee/RespiteblockHoldout.cs +++ b/Projectiles/Melee/RespiteblockHoldout.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); diff --git a/Projectiles/Melee/RoxcaliburProj.cs b/Projectiles/Melee/RoxcaliburProj.cs index e970f4b362..8241beb5f4 100644 --- a/Projectiles/Melee/RoxcaliburProj.cs +++ b/Projectiles/Melee/RoxcaliburProj.cs @@ -268,7 +268,7 @@ namespace CalamityMod.Projectiles.Melee } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle rectangle = texture.Bounds; Vector2 origin2 = rectangle.Size() / 2f; SpriteEffects effects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Melee/SaharaSlicersBolt.cs b/Projectiles/Melee/SaharaSlicersBolt.cs index 0150b4757a..0e35948b9f 100644 --- a/Projectiles/Melee/SaharaSlicersBolt.cs +++ b/Projectiles/Melee/SaharaSlicersBolt.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 9; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 9; + ProjectileID.Sets.TrailingMode[Type] = 0; } public ref int Bolts => ref Main.player[Projectile.owner].Calamity().saharaSlicersBolts; public override void SetDefaults() @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { if (Projectile.ai[0] == 1) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return true; } public override bool? CanDamage() => Projectile.ai[0] == 1 ? true : false; diff --git a/Projectiles/Melee/SandBlade.cs b/Projectiles/Melee/SandBlade.cs index daf43041df..1ff0f70ab3 100644 --- a/Projectiles/Melee/SandBlade.cs +++ b/Projectiles/Melee/SandBlade.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/ScourgeoftheCosmosMini.cs b/Projectiles/Melee/ScourgeoftheCosmosMini.cs index 6e95d9e0be..9e1fff2b3e 100644 --- a/Projectiles/Melee/ScourgeoftheCosmosMini.cs +++ b/Projectiles/Melee/ScourgeoftheCosmosMini.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -149,8 +149,8 @@ namespace CalamityMod.Projectiles.Melee public override void PostDraw(Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Vector2 origin = new Vector2(9f, 10f); Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Melee/ScourgeoftheCosmosMiniGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Melee/ScourgeoftheCosmosProj.cs b/Projectiles/Melee/ScourgeoftheCosmosProj.cs index bb5bb91e57..4767611827 100644 --- a/Projectiles/Melee/ScourgeoftheCosmosProj.cs +++ b/Projectiles/Melee/ScourgeoftheCosmosProj.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/SeashineSwordProj.cs b/Projectiles/Melee/SeashineSwordProj.cs index 91b63de8bb..12e6aa9d77 100644 --- a/Projectiles/Melee/SeashineSwordProj.cs +++ b/Projectiles/Melee/SeashineSwordProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/SolarNeedle.cs b/Projectiles/Melee/SolarNeedle.cs index a2cb9c4f29..73ff5cf5ef 100644 --- a/Projectiles/Melee/SolarNeedle.cs +++ b/Projectiles/Melee/SolarNeedle.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } const float MaxTime = 30; @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Melee } - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/SolsticeBeam.cs b/Projectiles/Melee/SolsticeBeam.cs index 909c591cff..c51f791152 100644 --- a/Projectiles/Melee/SolsticeBeam.cs +++ b/Projectiles/Melee/SolsticeBeam.cs @@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/SoulScythe.cs b/Projectiles/Melee/SoulScythe.cs index 8e22c60646..0f4dd0e19c 100644 --- a/Projectiles/Melee/SoulScythe.cs +++ b/Projectiles/Melee/SoulScythe.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/SpatialSpear.cs b/Projectiles/Melee/SpatialSpear.cs index 8d06a0e6d5..db4bd66be8 100644 --- a/Projectiles/Melee/SpatialSpear.cs +++ b/Projectiles/Melee/SpatialSpear.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/SpatialSpear2.cs b/Projectiles/Melee/SpatialSpear2.cs index bcf1a5c36b..fcdd40ad08 100644 --- a/Projectiles/Melee/SpatialSpear2.cs +++ b/Projectiles/Melee/SpatialSpear2.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/SpatialSpear3.cs b/Projectiles/Melee/SpatialSpear3.cs index db84085d23..2b5f59aa0d 100644 --- a/Projectiles/Melee/SpatialSpear3.cs +++ b/Projectiles/Melee/SpatialSpear3.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/SpatialSpear4.cs b/Projectiles/Melee/SpatialSpear4.cs index 85754074fa..f7932ebf8d 100644 --- a/Projectiles/Melee/SpatialSpear4.cs +++ b/Projectiles/Melee/SpatialSpear4.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > TimeLeft - 5) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/Spears/BansheeHookProj.cs b/Projectiles/Melee/Spears/BansheeHookProj.cs index f93eefbdd9..cb3b1f3b6b 100644 --- a/Projectiles/Melee/Spears/BansheeHookProj.cs +++ b/Projectiles/Melee/Spears/BansheeHookProj.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override bool PreDraw(ref Color lightColor) { Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request("CalamityMod/Projectiles/Melee/Spears/BansheeHookAlt").Value : Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request("CalamityMod/Projectiles/Melee/Spears/BansheeHookAlt").Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null, new Color(255, 255, 255, 127), Projectile.rotation, diff --git a/Projectiles/Melee/Spears/RedtideSpearProjectile.cs b/Projectiles/Melee/Spears/RedtideSpearProjectile.cs index 3eef0e3a0a..f1d42d5b71 100644 --- a/Projectiles/Melee/Spears/RedtideSpearProjectile.cs +++ b/Projectiles/Melee/Spears/RedtideSpearProjectile.cs @@ -325,7 +325,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, AppropriateRotation + MathHelper.PiOver2 * 1.5f - MathHelper.ToRadians(12), texture.Size() / 2f, Projectile.scale, 0, 0); return false; diff --git a/Projectiles/Melee/Spears/StreamGougeProj.cs b/Projectiles/Melee/Spears/StreamGougeProj.cs index 49a36ff07b..659d3f95ee 100644 --- a/Projectiles/Melee/Spears/StreamGougeProj.cs +++ b/Projectiles/Melee/Spears/StreamGougeProj.cs @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Melee.Spears bool portalIsInteractable = portalOpacity >= 1f; Vector2 portalDrawPosition = Owner.Center + InitialDirection.ToRotationVector2() * 130f - Main.screenPosition; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (portalIsInteractable) { Main.spriteBatch.EnterShaderRegion(); diff --git a/Projectiles/Melee/StarburstSHIV.cs b/Projectiles/Melee/StarburstSHIV.cs index 0642318a7b..6bdbcae1a7 100644 --- a/Projectiles/Melee/StarburstSHIV.cs +++ b/Projectiles/Melee/StarburstSHIV.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 85) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/StarnightBeam.cs b/Projectiles/Melee/StarnightBeam.cs index 305f72a60a..69151c2493 100644 --- a/Projectiles/Melee/StarnightBeam.cs +++ b/Projectiles/Melee/StarnightBeam.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/StarofJudgement.cs b/Projectiles/Melee/StarofJudgement.cs index aca5ea6566..7d8e9fb74c 100644 --- a/Projectiles/Melee/StarofJudgement.cs +++ b/Projectiles/Melee/StarofJudgement.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Melee Color drawColor = Color.Lerp(mainColor, Color.White, 0.2f) with { A = 0 }; float drawRotation = Projectile.rotation; Vector2 rotationPoint = texture.Size() * 0.5f; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], drawColor * 0.5f, 1, texture, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], drawColor * 0.5f, 1, texture, true, true); Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); return false; } diff --git a/Projectiles/Melee/StellarContemptEcho.cs b/Projectiles/Melee/StellarContemptEcho.cs index 39a9736341..8d094996f2 100644 --- a/Projectiles/Melee/StellarContemptEcho.cs +++ b/Projectiles/Melee/StellarContemptEcho.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -189,8 +189,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Turquoise with { A = 0 } * 0.5f, 1, texture, true, true); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Turquoise with { A = 0 } * 0.5f, 1, texture, true, true); Projectile.DrawProjectileWithBackglow(Color.Turquoise with { A = 0 }, Color.White, 12f * Utils.GetLerpValue(0, 42, Projectile.ai[0], true) , texture); return true; diff --git a/Projectiles/Melee/StellarContemptHammer.cs b/Projectiles/Melee/StellarContemptHammer.cs index 30e8240cd5..c46e2eb20a 100644 --- a/Projectiles/Melee/StellarContemptHammer.cs +++ b/Projectiles/Melee/StellarContemptHammer.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Melee public int time = 0; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 11; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 11; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -310,7 +310,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 3); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 3); return false; } } diff --git a/Projectiles/Melee/StellarStrikerMeteor.cs b/Projectiles/Melee/StellarStrikerMeteor.cs index 7cfefe6248..b927220ec5 100644 --- a/Projectiles/Melee/StellarStrikerMeteor.cs +++ b/Projectiles/Melee/StellarStrikerMeteor.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -110,9 +110,9 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1, tex); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White, 1, tex); return false; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/StormBeam.cs b/Projectiles/Melee/StormBeam.cs index cb38b8d20f..0d8723c6a6 100644 --- a/Projectiles/Melee/StormBeam.cs +++ b/Projectiles/Melee/StormBeam.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/StormMark.cs b/Projectiles/Melee/StormMark.cs index c2ce3af1f8..23dbddc32c 100644 --- a/Projectiles/Melee/StormMark.cs +++ b/Projectiles/Melee/StormMark.cs @@ -138,8 +138,8 @@ namespace CalamityMod.Projectiles.Melee { Color originalColor = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); Vector2 drawPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangl = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangl = texture2D27.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color alphaColor = Projectile.GetAlpha(originalColor); Vector2 halfRect = rectangl.Size() / 2f; Color whiteColor = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Melee/StormRulerProj.cs b/Projectiles/Melee/StormRulerProj.cs index 307aca13a6..337f994549 100644 --- a/Projectiles/Melee/StormRulerProj.cs +++ b/Projectiles/Melee/StormRulerProj.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/StygianShieldAttack.cs b/Projectiles/Melee/StygianShieldAttack.cs index 2293e3eb0e..c82c514d61 100644 --- a/Projectiles/Melee/StygianShieldAttack.cs +++ b/Projectiles/Melee/StygianShieldAttack.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { // Textures and general use stuff - Texture2D mainTex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D mainTex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D bloomTex = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; Texture2D flatTex = ModContent.Request("CalamityMod/Particles/FlatShape").Value; Texture2D shieldTex = ModContent.Request("CalamityMod/Projectiles/Melee/StygianShieldBloom").Value; diff --git a/Projectiles/Melee/StygianShieldThrown.cs b/Projectiles/Melee/StygianShieldThrown.cs index 3ee45d065b..c786c5a669 100644 --- a/Projectiles/Melee/StygianShieldThrown.cs +++ b/Projectiles/Melee/StygianShieldThrown.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = (int)TotalTrailLength; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = (int)TotalTrailLength; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/SwordsplosionBlue.cs b/Projectiles/Melee/SwordsplosionBlue.cs index a914389a7b..b7678895ef 100644 --- a/Projectiles/Melee/SwordsplosionBlue.cs +++ b/Projectiles/Melee/SwordsplosionBlue.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 195) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/SwordsplosionGreen.cs b/Projectiles/Melee/SwordsplosionGreen.cs index c92125967f..3ca4b3ffff 100644 --- a/Projectiles/Melee/SwordsplosionGreen.cs +++ b/Projectiles/Melee/SwordsplosionGreen.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 295) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/SwordsplosionPurple.cs b/Projectiles/Melee/SwordsplosionPurple.cs index 3763256b22..bb39cca1c7 100644 --- a/Projectiles/Melee/SwordsplosionPurple.cs +++ b/Projectiles/Melee/SwordsplosionPurple.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 295) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/SwordsplosionRed.cs b/Projectiles/Melee/SwordsplosionRed.cs index 1b5a77cb25..dac1a1a59e 100644 --- a/Projectiles/Melee/SwordsplosionRed.cs +++ b/Projectiles/Melee/SwordsplosionRed.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 195) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/TaintedBladeSlasher.cs b/Projectiles/Melee/TaintedBladeSlasher.cs index 4bc31dba95..eadf582a05 100644 --- a/Projectiles/Melee/TaintedBladeSlasher.cs +++ b/Projectiles/Melee/TaintedBladeSlasher.cs @@ -106,8 +106,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 70; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 70; } public override void SetDefaults() diff --git a/Projectiles/Melee/TenebreusTidesWaterProjectile.cs b/Projectiles/Melee/TenebreusTidesWaterProjectile.cs index e9f30041da..2d717a89c9 100644 --- a/Projectiles/Melee/TenebreusTidesWaterProjectile.cs +++ b/Projectiles/Melee/TenebreusTidesWaterProjectile.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee { if (Projectile.timeLeft == 300) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/TenebreusTidesWaterSpear.cs b/Projectiles/Melee/TenebreusTidesWaterSpear.cs index da2fbddebb..97a536f5f8 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSpear.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSpear.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -205,8 +205,8 @@ namespace CalamityMod.Projectiles.Melee { if (dontDraw) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Melee/TenebreusTidesWaterSword.cs b/Projectiles/Melee/TenebreusTidesWaterSword.cs index 8eeca5bc8d..272ea31e28 100644 --- a/Projectiles/Melee/TenebreusTidesWaterSword.cs +++ b/Projectiles/Melee/TenebreusTidesWaterSword.cs @@ -187,7 +187,7 @@ namespace CalamityMod.Projectiles.Melee { if (dontDraw) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/TerratomereExplosion.cs b/Projectiles/Melee/TerratomereExplosion.cs index 6082d67ae7..09d1b72d13 100644 --- a/Projectiles/Melee/TerratomereExplosion.cs +++ b/Projectiles/Melee/TerratomereExplosion.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee public void AdditiveDraw(SpriteBatch spriteBatch) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index 95ff843ca5..f1366e5835 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -254,7 +254,7 @@ namespace CalamityMod.Projectiles.Melee public void DrawBlade(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() * Vector2.UnitY; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Melee/TerrorBeam.cs b/Projectiles/Melee/TerrorBeam.cs index 3dadc5c1ea..1f00829413 100644 --- a/Projectiles/Melee/TerrorBeam.cs +++ b/Projectiles/Melee/TerrorBeam.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Melee/ThornBase.cs b/Projectiles/Melee/ThornBase.cs index 637585167f..3c82181917 100644 --- a/Projectiles/Melee/ThornBase.cs +++ b/Projectiles/Melee/ThornBase.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Melee // Draw the tip for the final thorn public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == TotalSegments) texture = ModContent.Request("CalamityMod/Projectiles/Melee/ThornTip").Value; diff --git a/Projectiles/Melee/Tornado.cs b/Projectiles/Melee/Tornado.cs index e1c3021502..cd8fb99aaf 100644 --- a/Projectiles/Melee/Tornado.cs +++ b/Projectiles/Melee/Tornado.cs @@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 sizeModdingPos = new Vector2(0f, sizeModdingVector2.Y - sizeModdingVector.Y); sizeModdingPos.X = sizeModdingPos.Y * vectorMult; new Vector2(sizeModdingVector.X - sizeModdingPos.X / 2f, sizeModdingVector.Y); - Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle drawRectangle = texture2D23.Frame(1, 1, 0, 0); Vector2 smallRect = drawRectangle.Size() / 2f; float aiTrackMult = -0.06283186f * aiTracker; diff --git a/Projectiles/Melee/TriactisHammerProj.cs b/Projectiles/Melee/TriactisHammerProj.cs index 1c010ff50e..15c555b76b 100644 --- a/Projectiles/Melee/TriactisHammerProj.cs +++ b/Projectiles/Melee/TriactisHammerProj.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -301,7 +301,7 @@ namespace CalamityMod.Projectiles.Melee return false; } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/TrueAncientBeam.cs b/Projectiles/Melee/TrueAncientBeam.cs index ac70351edc..1aa7a7af72 100644 --- a/Projectiles/Melee/TrueAncientBeam.cs +++ b/Projectiles/Melee/TrueAncientBeam.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } const float MaxTime = 75; @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 70) return false; - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/TrueAncientBlast.cs b/Projectiles/Melee/TrueAncientBlast.cs index d5e29ed281..cb87979839 100644 --- a/Projectiles/Melee/TrueAncientBlast.cs +++ b/Projectiles/Melee/TrueAncientBlast.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } const float MaxTime = 20; diff --git a/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs b/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs index dbf5921c89..77452e7e1e 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_SwungBlade.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? sword.Width : 0f, sword.Height); Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - if (CalamityClientConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Projectile.type]) + if (CalamityClientConfig.Instance.Afterimages && Timer > ProjectileID.Sets.TrailCacheLength[Type]) { for (int i = 0; i < Projectile.oldRot.Length; ++i) { diff --git a/Projectiles/Melee/TrueBiomeBladeHoldout.cs b/Projectiles/Melee/TrueBiomeBladeHoldout.cs index 3e84af2225..0b5075093c 100644 --- a/Projectiles/Melee/TrueBiomeBladeHoldout.cs +++ b/Projectiles/Melee/TrueBiomeBladeHoldout.cs @@ -197,7 +197,7 @@ namespace CalamityMod.Projectiles.Melee if (ChanneledState == 0f && ChannelTimer > 10f) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() / 2, 1, 0, 0); return false; @@ -205,7 +205,7 @@ namespace CalamityMod.Projectiles.Melee } else if (ChanneledState == 1f) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 squishyScale = new Vector2(Math.Abs((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * Projectile.timeLeft / 30f)), 1f); SpriteEffects flip = (float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * Projectile.timeLeft / 30f) > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; Main.EntitySpriteDraw(tex, Projectile.position - Main.screenPosition, null, lightColor * (Projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (Projectile.timeLeft / 60f)), flip, 0); diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index 6404dc74ae..0b2cd2c04d 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -46,8 +46,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs index 68efc899ff..5dcf795150 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -74,12 +74,12 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft > 75) return false; - DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); Main.spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f)), Projectile.rotation, tex.Size() * 0.5f, 1f, 0f, 0); diff --git a/Projectiles/Melee/TyphonsGreedBubble.cs b/Projectiles/Melee/TyphonsGreedBubble.cs index 057ab4b520..b62d82e9dd 100644 --- a/Projectiles/Melee/TyphonsGreedBubble.cs +++ b/Projectiles/Melee/TyphonsGreedBubble.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -76,8 +76,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), diff --git a/Projectiles/Melee/UrchinMaceProjectile.cs b/Projectiles/Melee/UrchinMaceProjectile.cs index 57a93c8b70..fe25ca3df6 100644 --- a/Projectiles/Melee/UrchinMaceProjectile.cs +++ b/Projectiles/Melee/UrchinMaceProjectile.cs @@ -144,7 +144,7 @@ namespace CalamityMod.Projectiles.Melee { Owner.ChangeDir(Math.Sign(Owner.Calamity().mouseWorld.X - Owner.position.X)); - Texture2D maceTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D maceTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D whirlpoolTexture = ModContent.Request("CalamityMod/Projectiles/Melee/RedtideWhirlpool").Value; float whirlpoolScale = MathHelper.Clamp(WindupProgress * 3f - 0.4f, 0f, 1f) * 2f; diff --git a/Projectiles/Melee/UrchinSpikeFugu.cs b/Projectiles/Melee/UrchinSpikeFugu.cs index 667a5789f9..89652246eb 100644 --- a/Projectiles/Melee/UrchinSpikeFugu.cs +++ b/Projectiles/Melee/UrchinSpikeFugu.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/ViolenceSlashProjectile.cs b/Projectiles/Melee/ViolenceSlashProjectile.cs index 7d888bd361..88203f77a0 100644 --- a/Projectiles/Melee/ViolenceSlashProjectile.cs +++ b/Projectiles/Melee/ViolenceSlashProjectile.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Items/Weapons/Melee/Violence"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 36; } public override void SetDefaults() @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Melee { GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SwordSlashTexture")); - Texture2D spearProjectile = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D spearProjectile = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Player player = Main.player[Projectile.owner]; List positions = new List(); diff --git a/Projectiles/Melee/ViolenceThrownProjectile.cs b/Projectiles/Melee/ViolenceThrownProjectile.cs index 393fc828d1..4879094cc4 100644 --- a/Projectiles/Melee/ViolenceThrownProjectile.cs +++ b/Projectiles/Melee/ViolenceThrownProjectile.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Items/Weapons/Melee/Violence"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 36; } public override void SetDefaults() @@ -199,7 +199,7 @@ namespace CalamityMod.Projectiles.Melee { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); - Texture2D spearProjectile = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D spearProjectile = Terraria.GameContent.TextureAssets.Projectile[Type].Value; // Not cloning the points causes the below operations to be applied to the original oldPos value by reference // and thus causes it to be consistently added over and over, which is not intended behavior. diff --git a/Projectiles/Melee/VirulentWave.cs b/Projectiles/Melee/VirulentWave.cs index 4f8ce857f1..5f713dd71e 100644 --- a/Projectiles/Melee/VirulentWave.cs +++ b/Projectiles/Melee/VirulentWave.cs @@ -10,9 +10,9 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/VoidEssence.cs b/Projectiles/Melee/VoidEssence.cs index e3d8dc1dd5..047bad504b 100644 --- a/Projectiles/Melee/VoidEssence.cs +++ b/Projectiles/Melee/VoidEssence.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = NumAnimationFrames; + Main.projFrames[Type] = NumAnimationFrames; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/VolcanicFireball.cs b/Projectiles/Melee/VolcanicFireball.cs index 6386cef05d..16215da6ae 100644 --- a/Projectiles/Melee/VolcanicFireball.cs +++ b/Projectiles/Melee/VolcanicFireball.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Melee/VolcanicFireballLarge.cs b/Projectiles/Melee/VolcanicFireballLarge.cs index c031cf1664..690b93fada 100644 --- a/Projectiles/Melee/VolcanicFireballLarge.cs +++ b/Projectiles/Melee/VolcanicFireballLarge.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Melee/WulfrumScrew.cs b/Projectiles/Melee/WulfrumScrew.cs index 263a358bd3..f45e68d8d1 100644 --- a/Projectiles/Melee/WulfrumScrew.cs +++ b/Projectiles/Melee/WulfrumScrew.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 60; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 60; + ProjectileID.Sets.TrailingMode[Type] = 0; } public static int Lifetime = 950; @@ -151,7 +151,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float distanceFromAim = Projectile.Center.ShortestDistanceToLine(Owner.MountedCenter, Main.MouseWorld); float distanceFromPlayerAcrossSightLine = (Owner.MountedCenter - Projectile.Center.ClosestPointOnLine(Owner.MountedCenter, Main.MouseWorld)).Length(); diff --git a/Projectiles/Melee/WulfrumScrewdriverProj.cs b/Projectiles/Melee/WulfrumScrewdriverProj.cs index 1f76e30360..200b137924 100644 --- a/Projectiles/Melee/WulfrumScrewdriverProj.cs +++ b/Projectiles/Melee/WulfrumScrewdriverProj.cs @@ -212,7 +212,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (SmearTex == null) SmearTex = ModContent.Request("CalamityMod/Particles/MediumLongThrust"); diff --git a/Projectiles/Melee/YinYoDark.cs b/Projectiles/Melee/YinYoDark.cs index f4a3ad684b..5574b74854 100644 --- a/Projectiles/Melee/YinYoDark.cs +++ b/Projectiles/Melee/YinYoDark.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/YinYoLight.cs b/Projectiles/Melee/YinYoLight.cs index 13a31524b7..a9b585e130 100644 --- a/Projectiles/Melee/YinYoLight.cs +++ b/Projectiles/Melee/YinYoLight.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Melee/Yoyos/AirSpinnerYoyo.cs b/Projectiles/Melee/Yoyos/AirSpinnerYoyo.cs index f43f41c800..a0f3ab6cc9 100644 --- a/Projectiles/Melee/Yoyos/AirSpinnerYoyo.cs +++ b/Projectiles/Melee/Yoyos/AirSpinnerYoyo.cs @@ -14,12 +14,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 30f * MaxUpdates; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 330f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 32f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = 30f * MaxUpdates; + ProjectileID.Sets.YoyosMaximumRange[Type] = 330f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 32f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/AortaYoyo.cs b/Projectiles/Melee/Yoyos/AortaYoyo.cs index 64dd6c5d35..4ede694904 100644 --- a/Projectiles/Melee/Yoyos/AortaYoyo.cs +++ b/Projectiles/Melee/Yoyos/AortaYoyo.cs @@ -15,12 +15,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 24f * MaxUpdates; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 330f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 25f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = 24f * MaxUpdates; + ProjectileID.Sets.YoyosMaximumRange[Type] = 330f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 25f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/AzathothYoyo.cs b/Projectiles/Melee/Yoyos/AzathothYoyo.cs index 2f99f79c09..2bd20fd772 100644 --- a/Projectiles/Melee/Yoyos/AzathothYoyo.cs +++ b/Projectiles/Melee/Yoyos/AzathothYoyo.cs @@ -14,12 +14,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 880f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 60f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 880f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 60f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs index c1b176f8e6..3c498738c9 100644 --- a/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs +++ b/Projectiles/Melee/Yoyos/BurningRevelationYoyo.cs @@ -16,12 +16,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 560f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 54f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 560f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 54f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/FaultLineYoyo.cs b/Projectiles/Melee/Yoyos/FaultLineYoyo.cs index 2a8f012961..0efc358a1f 100644 --- a/Projectiles/Melee/Yoyos/FaultLineYoyo.cs +++ b/Projectiles/Melee/Yoyos/FaultLineYoyo.cs @@ -15,12 +15,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 480f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 40f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/GodsGambitYoyo.cs b/Projectiles/Melee/Yoyos/GodsGambitYoyo.cs index 986d085580..2eee2ebee7 100644 --- a/Projectiles/Melee/Yoyos/GodsGambitYoyo.cs +++ b/Projectiles/Melee/Yoyos/GodsGambitYoyo.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 32f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 400f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 32f / MaxUpdates; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs index 16bcd345fd..6a6dcd51f9 100644 --- a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs @@ -15,12 +15,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 640f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 48f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 640f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 48f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs index d77d1ab63c..9fd8eba495 100644 --- a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs +++ b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs @@ -24,12 +24,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 512f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 54f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 512f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 54f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs index 4676977462..def2f76387 100644 --- a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 720f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 54f / UpdatesPerFrame; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 720f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 54f / UpdatesPerFrame; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/Yoyos/OblivionYoyo.cs b/Projectiles/Melee/Yoyos/OblivionYoyo.cs index ded14484d2..072661bdad 100644 --- a/Projectiles/Melee/Yoyos/OblivionYoyo.cs +++ b/Projectiles/Melee/Yoyos/OblivionYoyo.cs @@ -16,12 +16,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 512f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 36f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 512f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 36f / MaxUpdates; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index db442ce25f..b34a655cf9 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -52,12 +52,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 800f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 60f / UpdatesPerFrame; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 800f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 60f / UpdatesPerFrame; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SendExtraAI(BinaryWriter writer) @@ -210,7 +210,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Melee/Yoyos/PandemicYoyo.cs b/Projectiles/Melee/Yoyos/PandemicYoyo.cs index bb0ac459d2..462b04a0f6 100644 --- a/Projectiles/Melee/Yoyos/PandemicYoyo.cs +++ b/Projectiles/Melee/Yoyos/PandemicYoyo.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public const int MaxUpdates = 2; public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 480f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 40f / MaxUpdates; } public override void SetDefaults() @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/Yoyos/QuagmireYoyo.cs b/Projectiles/Melee/Yoyos/QuagmireYoyo.cs index 281c95a226..14b9c77152 100644 --- a/Projectiles/Melee/Yoyos/QuagmireYoyo.cs +++ b/Projectiles/Melee/Yoyos/QuagmireYoyo.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 36f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 480f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 36f / MaxUpdates; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/Yoyos/RiptideYoyo.cs b/Projectiles/Melee/Yoyos/RiptideYoyo.cs index 464e265922..caa23fdf28 100644 --- a/Projectiles/Melee/Yoyos/RiptideYoyo.cs +++ b/Projectiles/Melee/Yoyos/RiptideYoyo.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 18f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 288f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 25f; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = 18f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 288f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 25f; } public override void SetDefaults() diff --git a/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs b/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs index df7f2d90c3..9e3a335dc1 100644 --- a/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs +++ b/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 448f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 36f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 448f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 36f / MaxUpdates; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs b/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs index 11fbb9e90f..785fa38aa9 100644 --- a/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs +++ b/Projectiles/Melee/Yoyos/SmokingCometYoyo.cs @@ -16,12 +16,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 21f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 320f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 20f; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = 21f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 320f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 20f; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Main.spriteBatch.Draw(stringTexture, new Vector2(vector.X - Main.screenPosition.X + (float)ModContent.Request("CalamityMod/Projectiles/Melee/Yoyos/SmokingCometChain").Width() * 0.5f, vector.Y - Main.screenPosition.Y + (float)ModContent.Request("CalamityMod/Projectiles/Melee/Yoyos/SmokingCometChain").Height() * 0.5f) - new Vector2(6f, 0f), new Rectangle(0, 0, ModContent.Request("CalamityMod/Projectiles/Melee/Yoyos/SmokingCometChain").Width(), (int)chainWidth), Color.White, stringHelper, new Vector2((float)ModContent.Request("CalamityMod/Projectiles/Melee/Yoyos/SmokingCometChain").Width() * 0.5f, 0f), 1f, SpriteEffects.None, 0f); } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs b/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs index d47df05a8d..893686cc9a 100644 --- a/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs +++ b/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f; // 32 effective, 48 bubbled + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 400f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 16f; // 32 effective, 48 bubbled - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -97,12 +97,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); if (bubbleStronk) { tex = ModContent.Request("CalamityMod/Projectiles/Melee/Yoyos/SulphurousGrabberYoyoBubble").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, tex); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, tex); } return false; } diff --git a/Projectiles/Melee/Yoyos/YinYoyo.cs b/Projectiles/Melee/Yoyos/YinYoyo.cs index 0dae90d883..e977ac6a72 100644 --- a/Projectiles/Melee/Yoyos/YinYoyo.cs +++ b/Projectiles/Melee/Yoyos/YinYoyo.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 32f / MaxUpdates; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Type] = 400f; + ProjectileID.Sets.YoyosTopSpeed[Type] = 32f / MaxUpdates; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Pets/Akato.cs b/Projectiles/Pets/Akato.cs index a7e6431f73..7f422f60b0 100644 --- a/Projectiles/Pets/Akato.cs +++ b/Projectiles/Pets/Akato.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 6; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-38f, 0f).WithSpriteDirection(1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/Astrophage.cs b/Projectiles/Pets/Astrophage.cs index b44752567f..081821e8f7 100644 --- a/Projectiles/Pets/Astrophage.cs +++ b/Projectiles/Pets/Astrophage.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 5; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-10f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/BabyGhostBell.cs b/Projectiles/Pets/BabyGhostBell.cs index 9af28bf336..ec696d2407 100644 --- a/Projectiles/Pets/BabyGhostBell.cs +++ b/Projectiles/Pets/BabyGhostBell.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 4; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Pets/Bear.cs b/Projectiles/Pets/Bear.cs index b07928bc79..1219fbbc89 100644 --- a/Projectiles/Pets/Bear.cs +++ b/Projectiles/Pets/Bear.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 22; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 22; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 13, 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 13, 6) .WithOffset(-20f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/BendyPet.cs b/Projectiles/Pets/BendyPet.cs index 5d5d505804..75c302d373 100644 --- a/Projectiles/Pets/BendyPet.cs +++ b/Projectiles/Pets/BendyPet.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 5; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Pets Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -223,8 +223,8 @@ namespace CalamityMod.Projectiles.Pets public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) @@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles.Pets public override void PostDraw(Color lightColor) { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Pets/BendyPetGlow").Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Pets/BrimlingPet.cs b/Projectiles/Pets/BrimlingPet.cs index fd95edd8ed..8b7e5d7d9c 100644 --- a/Projectiles/Pets/BrimlingPet.cs +++ b/Projectiles/Pets/BrimlingPet.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 8; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 4, 5) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 4, 5) .WithOffset(-25f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index 9954324dac..95ea59780d 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 11; //same as black cat - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 11; //same as black cat + Main.projPet[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-7f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Pets spriteEffects = SpriteEffects.FlipHorizontally; Color colorArea = Lighting.GetColor((int)(Projectile.Center.X / 16), (int)(Projectile.Center.Y / 16)); Texture2D texture2D3 = ModContent.Request("CalamityMod/Projectiles/Pets/ChibiiDoggoMonochrome").Value; - int textureArea = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + int textureArea = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y3 = textureArea * Projectile.frame; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, textureArea); Vector2 halfRect = rectangle.Size() / 2f; @@ -75,14 +75,14 @@ IL_6899: { trailColorChange = (float)(1 - counter); } - colorAlpha *= trailColorChange / ((float)ProjectileID.Sets.TrailCacheLength[Projectile.type] * 1.5f); + colorAlpha *= trailColorChange / ((float)ProjectileID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 oldDrawPos = Projectile.oldPos[counter]; float projRotate = Projectile.rotation; SpriteEffects effects = spriteEffects; Main.spriteBatch.Draw(texture2D3, oldDrawPos + Projectile.Size / 2f - Main.screenPosition + new Vector2(0, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), colorAlpha, projRotate + Projectile.rotation * 0f * (float)(counter - 1) * Projectile.spriteDirection, halfRect, Projectile.scale, effects, 0f); goto IL_6881; } - Main.spriteBatch.Draw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, Projectile.position + Projectile.Size / 2f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, halfRect, Projectile.scale, spriteEffects, 0); + Main.spriteBatch.Draw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Projectile.position + Projectile.Size / 2f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, halfRect, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Pets/ChibiiDoggoFly.cs b/Projectiles/Pets/ChibiiDoggoFly.cs index b726b1f09f..2775e51300 100644 --- a/Projectiles/Pets/ChibiiDoggoFly.cs +++ b/Projectiles/Pets/ChibiiDoggoFly.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projPet[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Pets spriteEffects = SpriteEffects.FlipHorizontally; Color colorArea = Lighting.GetColor((int)(Projectile.Center.X / 16), (int)(Projectile.Center.Y / 16)); Texture2D texture2D3 = ModContent.Request("CalamityMod/Projectiles/Pets/ChibiiDoggoFlyMonochrome").Value; - int textureArea = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + int textureArea = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y3 = textureArea * Projectile.frame; Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, textureArea); Vector2 origin2 = rectangle.Size() / 2f; @@ -58,14 +58,14 @@ IL_6899: { trailColorChange = (float)(1 - counter); } - colorAlpha *= trailColorChange / ((float)ProjectileID.Sets.TrailCacheLength[Projectile.type] * 1.5f); + colorAlpha *= trailColorChange / ((float)ProjectileID.Sets.TrailCacheLength[Type] * 1.5f); Vector2 oldDrawPos = Projectile.oldPos[counter]; float projRotate = Projectile.rotation; SpriteEffects effects = spriteEffects; Main.spriteBatch.Draw(texture2D3, oldDrawPos + Projectile.Size / 2f - Main.screenPosition + new Vector2(0, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), colorAlpha, projRotate + Projectile.rotation * 0f * (float)(counter - 1) * Projectile.spriteDirection, origin2, Projectile.scale, effects, 0f); goto IL_6881; } - Main.spriteBatch.Draw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, Projectile.position + Projectile.Size / 2f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin2, Projectile.scale, spriteEffects, 0); + Main.spriteBatch.Draw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Projectile.position + Projectile.Size / 2f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin2, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Pets/DannyDevitoPet.cs b/Projectiles/Pets/DannyDevitoPet.cs index 43b6b5f3f1..a57bd3e2d5 100644 --- a/Projectiles/Pets/DannyDevitoPet.cs +++ b/Projectiles/Pets/DannyDevitoPet.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 8; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(2, 5, 5) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(2, 5, 5) .WithOffset(-12f, 2f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/EidolonSnail.cs b/Projectiles/Pets/EidolonSnail.cs index 5e1e05f16b..7e8f2c8910 100644 --- a/Projectiles/Pets/EidolonSnail.cs +++ b/Projectiles/Pets/EidolonSnail.cs @@ -17,10 +17,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 12; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 4, 5) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 4, 5) .WithOffset(-18f, 0f).WithSpriteDirection(1).WhenNotSelected(0, 0); } @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Pets { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Pets/EidolonSnail").Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Pets { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Pets/EidolonSnailGlow").Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Pets/FlakPet.cs b/Projectiles/Pets/FlakPet.cs index 2f60ed8740..afdace01c1 100644 --- a/Projectiles/Pets/FlakPet.cs +++ b/Projectiles/Pets/FlakPet.cs @@ -17,10 +17,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 7; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(2, 4, 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(2, 4, 6) .WithOffset(-7f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/FoxPet.cs b/Projectiles/Pets/FoxPet.cs index 3dafc5d4bd..148b6862f5 100644 --- a/Projectiles/Pets/FoxPet.cs +++ b/Projectiles/Pets/FoxPet.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 11; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 11; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 7, 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 7, 6) .WithOffset(-35f, 0f).WithSpriteDirection(1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/GoldiePet.cs b/Projectiles/Pets/GoldiePet.cs index 1479dff3f8..3fc1a3d6ee 100644 --- a/Projectiles/Pets/GoldiePet.cs +++ b/Projectiles/Pets/GoldiePet.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 5; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Pets return; Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Lighting.AddLight(Projectile.Center, GoldColor.ToVector3() * (0.9f + 0.45f * SparkleTimer / MaxSparkleTime)); if (SparkleTimer < MaxBloomTime) diff --git a/Projectiles/Pets/KendraPet.cs b/Projectiles/Pets/KendraPet.cs index c05c9a6eeb..417fb901bf 100644 --- a/Projectiles/Pets/KendraPet.cs +++ b/Projectiles/Pets/KendraPet.cs @@ -22,10 +22,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 31; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 31; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 13, 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 13, 6) .WithOffset(-30f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -354,8 +354,8 @@ namespace CalamityMod.Projectiles.Pets public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, spriteEffects, 0); return false; diff --git a/Projectiles/Pets/LadShark.cs b/Projectiles/Pets/LadShark.cs index ca68ec4c9c..314e849006 100644 --- a/Projectiles/Pets/LadShark.cs +++ b/Projectiles/Pets/LadShark.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 0, 1) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 0, 1) .WithOffset(-12f, -12f).WithSpriteDirection(-1); } diff --git a/Projectiles/Pets/LeviPet.cs b/Projectiles/Pets/LeviPet.cs index d7505a1750..dcf9d60e09 100644 --- a/Projectiles/Pets/LeviPet.cs +++ b/Projectiles/Pets/LeviPet.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 5; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-18f, -12f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/LittleLightProj.cs b/Projectiles/Pets/LittleLightProj.cs index 670adb081a..c9988efd4c 100644 --- a/Projectiles/Pets/LittleLightProj.cs +++ b/Projectiles/Pets/LittleLightProj.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Pets public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 9; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 9; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Pets public void HandleFrames() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; } public void DoSpinEffect() diff --git a/Projectiles/Pets/LordePet.cs b/Projectiles/Pets/LordePet.cs index d44b91473b..96843ca749 100644 --- a/Projectiles/Pets/LordePet.cs +++ b/Projectiles/Pets/LordePet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Pets public override string Texture => "CalamityMod/NPCs/Other/THELORDE"; public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; + Main.projPet[Type] = true; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Pets SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frameUsed = texture.Frame(2, 7, 0, 1); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), frameUsed, drawColor, Projectile.rotation, new Vector2(texture.Width / 4f, texture.Height / 14f), Projectile.scale, spriteEffects, 0); diff --git a/Projectiles/Pets/MiniHiveMind.cs b/Projectiles/Pets/MiniHiveMind.cs index 46508b2fe8..8c593910ba 100644 --- a/Projectiles/Pets/MiniHiveMind.cs +++ b/Projectiles/Pets/MiniHiveMind.cs @@ -17,12 +17,12 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 16; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 16; + Main.projPet[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-12f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Pets { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Pets/OceanSpirit.cs b/Projectiles/Pets/OceanSpirit.cs index 64e4cb27e1..233fb80d29 100644 --- a/Projectiles/Pets/OceanSpirit.cs +++ b/Projectiles/Pets/OceanSpirit.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 17; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 17; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Pets/PerforaMini.cs b/Projectiles/Pets/PerforaMini.cs index 64659ece26..d11e8856f5 100644 --- a/Projectiles/Pets/PerforaMini.cs +++ b/Projectiles/Pets/PerforaMini.cs @@ -12,10 +12,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 8; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-8f, -20f).WithSpriteDirection(1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/PineapplePetProj.cs b/Projectiles/Pets/PineapplePetProj.cs index 4ab4afddce..c7a8323e1e 100644 --- a/Projectiles/Pets/PineapplePetProj.cs +++ b/Projectiles/Pets/PineapplePetProj.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 5; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-2f, -20f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Pets Projectile.frameCounter++; if (Projectile.frameCounter > 6) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } diff --git a/Projectiles/Pets/PlaguebringerBab.cs b/Projectiles/Pets/PlaguebringerBab.cs index 5bcc934fc0..60bff4d0a0 100644 --- a/Projectiles/Pets/PlaguebringerBab.cs +++ b/Projectiles/Pets/PlaguebringerBab.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 6; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 4, 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 4, 6) .WithOffset(-25f, -20f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/PrimroseKeepsakeDisplay.cs b/Projectiles/Pets/PrimroseKeepsakeDisplay.cs index 6fca15e509..5f4baf9ecf 100644 --- a/Projectiles/Pets/PrimroseKeepsakeDisplay.cs +++ b/Projectiles/Pets/PrimroseKeepsakeDisplay.cs @@ -10,9 +10,9 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 0, 1) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 0, 1) .WithOffset(-22f, 0f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/RadiatorPet.cs b/Projectiles/Pets/RadiatorPet.cs index 701e26229d..406c8e749d 100644 --- a/Projectiles/Pets/RadiatorPet.cs +++ b/Projectiles/Pets/RadiatorPet.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 4; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Pets/RotomPet.cs b/Projectiles/Pets/RotomPet.cs index b58699ab21..f9920c8963 100644 --- a/Projectiles/Pets/RotomPet.cs +++ b/Projectiles/Pets/RotomPet.cs @@ -26,10 +26,10 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 4; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-10f, 0f).WithSpriteDirection(1).WhenNotSelected(0, 0); } @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Pets public override bool PreDraw(ref Color lightColor) { Drawing(lightColor, - Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, + Terraria.GameContent.TextureAssets.Projectile[Type].Value, ModContent.Request("CalamityMod/Projectiles/Pets/RotomDex").Value, ModContent.Request("CalamityMod/Projectiles/Pets/RotomWash").Value, ModContent.Request("CalamityMod/Projectiles/Pets/RotomHeat").Value, @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Pets break; } - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Pets/SCalPet.cs b/Projectiles/Pets/SCalPet.cs index 9ae7ed1612..e36dffffe6 100644 --- a/Projectiles/Pets/SCalPet.cs +++ b/Projectiles/Pets/SCalPet.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 6; + Main.projPet[Type] = true; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Projectile.type], 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, Main.projFrames[Type], 6) .WithOffset(-12f, -18).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Pets Projectile.frameCounter++; if (Projectile.frameCounter > 6) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } } diff --git a/Projectiles/Pets/Sparks.cs b/Projectiles/Pets/Sparks.cs index 6cde17f7d5..e7918942b7 100644 --- a/Projectiles/Pets/Sparks.cs +++ b/Projectiles/Pets/Sparks.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 4; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() @@ -453,12 +453,12 @@ namespace CalamityMod.Projectiles.Pets public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (color == 1) texture = ModContent.Request("CalamityMod/Projectiles/Pets/SparksBlue").Value; if (color == 2) texture = ModContent.Request("CalamityMod/Projectiles/Pets/SparksGreen").Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Pets/ThirdSage.cs b/Projectiles/Pets/ThirdSage.cs index 8aa69533f3..1191d75421 100644 --- a/Projectiles/Pets/ThirdSage.cs +++ b/Projectiles/Pets/ThirdSage.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Pets public new string LocalizationCategory => "Projectiles.Pets"; public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; - Main.projFrames[Projectile.type] = 7; + Main.projPet[Type] = true; + Main.projFrames[Type] = 7; - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(0, 4, 6) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 4, 6) .WithOffset(-15f, -5f).WithSpriteDirection(1).WhenNotSelected(0, 0); } diff --git a/Projectiles/Pets/YharonSonPet.cs b/Projectiles/Pets/YharonSonPet.cs index 0992ce81da..32a8114fb5 100644 --- a/Projectiles/Pets/YharonSonPet.cs +++ b/Projectiles/Pets/YharonSonPet.cs @@ -29,11 +29,11 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; + Main.projPet[Type] = true; //i cannot be bothered to figure out why it keeps flickering everytime it repeats the animation //as a "solution" i have set the frame counter to an obnoxiously high number so it probably wont be noticed by players - ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(1, 1, int.MaxValue) + ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(1, 1, int.MaxValue) .WithOffset(-55f, 2f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Pets { if (Projectile.frameCounter <= 1) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() / new Vector2((float)xFrameAmt, (float)yFrameAmt) * 0.5f; Rectangle frame = texture.Frame(xFrameAmt, yFrameAmt, frameX, frameY); SpriteEffects spriteEffects = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Ranged/AdamAcceleratorBeam.cs b/Projectiles/Ranged/AdamAcceleratorBeam.cs index bd50ea7155..cb36de16a4 100644 --- a/Projectiles/Ranged/AdamAcceleratorBeam.cs +++ b/Projectiles/Ranged/AdamAcceleratorBeam.cs @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Ranged if (beamVector == Vector2.Zero || Projectile.velocity != Vector2.Zero) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float beamLength = Projectile.ai[0]; Vector2 centerFloored = Projectile.Center.Floor() + beamVector * Projectile.scale * BeamRenderTileOffset; Vector2 scaleVec = new Vector2(Projectile.scale); diff --git a/Projectiles/Ranged/AnimosityBullet.cs b/Projectiles/Ranged/AnimosityBullet.cs index 69bb9b21de..546f2b7cf2 100644 --- a/Projectiles/Ranged/AnimosityBullet.cs +++ b/Projectiles/Ranged/AnimosityBullet.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Ranged public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Crimson * 0.45f, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Crimson * 0.45f, 1); return true; } } diff --git a/Projectiles/Ranged/AquaBlast.cs b/Projectiles/Ranged/AquaBlast.cs index 4f3777524d..4a0a100b61 100644 --- a/Projectiles/Ranged/AquaBlast.cs +++ b/Projectiles/Ranged/AquaBlast.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 20; + Main.projFrames[Type] = 20; } public int spreadDust = 0; public static int Lifetime = 600; @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.frame = 0; } - Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type]; //Rotation Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); diff --git a/Projectiles/Ranged/ArcherfishRing.cs b/Projectiles/Ranged/ArcherfishRing.cs index 72c3133e72..b8ca7a3a57 100644 --- a/Projectiles/Ranged/ArcherfishRing.cs +++ b/Projectiles/Ranged/ArcherfishRing.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 ringScale = Projectile.Size / tex.Size() * Projectile.scale; Color ringColor = Color.Lerp(Color.DodgerBlue, Color.Blue, Projectile.Opacity) * Projectile.Opacity * 1.2f; diff --git a/Projectiles/Ranged/AstralCannonProjectile.cs b/Projectiles/Ranged/AstralCannonProjectile.cs index 2be0ef7466..e07b194773 100644 --- a/Projectiles/Ranged/AstralCannonProjectile.cs +++ b/Projectiles/Ranged/AstralCannonProjectile.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/AstralRound.cs b/Projectiles/Ranged/AstralRound.cs index 7418a50382..834728bd1c 100644 --- a/Projectiles/Ranged/AstralRound.cs +++ b/Projectiles/Ranged/AstralRound.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/AstrealArrow.cs b/Projectiles/Ranged/AstrealArrow.cs index 0fe493e714..4d72d5c9f0 100644 --- a/Projectiles/Ranged/AstrealArrow.cs +++ b/Projectiles/Ranged/AstrealArrow.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/AstrealFlame.cs b/Projectiles/Ranged/AstrealFlame.cs index d29f10eb2e..06d379b47a 100644 --- a/Projectiles/Ranged/AstrealFlame.cs +++ b/Projectiles/Ranged/AstrealFlame.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Ranged/AuricBullet.cs b/Projectiles/Ranged/AuricBullet.cs index da301a6e41..9a2f524c55 100644 --- a/Projectiles/Ranged/AuricBullet.cs +++ b/Projectiles/Ranged/AuricBullet.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 9; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 9; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index a404c8b5a2..afd3c9a209 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D fog = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fog = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.3f; Main.EntitySpriteDraw(fog, drawPosition, null, OrangeFogColor * opacity, Projectile.rotation + OrangeFogRot, fog.Size() * 0.5f, Projectile.scale * OrangeFogScale, SpriteEffects.None); diff --git a/Projectiles/Ranged/BallistaGreatArrow.cs b/Projectiles/Ranged/BallistaGreatArrow.cs index 1f11dc004b..f80294e65a 100644 --- a/Projectiles/Ranged/BallistaGreatArrow.cs +++ b/Projectiles/Ranged/BallistaGreatArrow.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Ranged/BarinadeArrow.cs b/Projectiles/Ranged/BarinadeArrow.cs index 3b663a244f..a324978dfd 100644 --- a/Projectiles/Ranged/BarinadeArrow.cs +++ b/Projectiles/Ranged/BarinadeArrow.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() { @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 2, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 2, 1); return true; } } diff --git a/Projectiles/Ranged/BlightFlames.cs b/Projectiles/Ranged/BlightFlames.cs index 16c693e4cc..cf32ee4072 100644 --- a/Projectiles/Ranged/BlightFlames.cs +++ b/Projectiles/Ranged/BlightFlames.cs @@ -166,7 +166,7 @@ namespace CalamityMod.Projectiles.Ranged { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.65f; Color drawColor = FogColor * opacity; diff --git a/Projectiles/Ranged/BloodClotFriendly.cs b/Projectiles/Ranged/BloodClotFriendly.cs index 1d96edd43d..a72db98d46 100644 --- a/Projectiles/Ranged/BloodClotFriendly.cs +++ b/Projectiles/Ranged/BloodClotFriendly.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/BloodfireArrowProj.cs b/Projectiles/Ranged/BloodfireArrowProj.cs index 69a3118522..985287bd5b 100644 --- a/Projectiles/Ranged/BloodfireArrowProj.cs +++ b/Projectiles/Ranged/BloodfireArrowProj.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Ranged/BloodfireBulletProj.cs b/Projectiles/Ranged/BloodfireBulletProj.cs index e45df960a2..cdf8888264 100644 --- a/Projectiles/Ranged/BloodfireBulletProj.cs +++ b/Projectiles/Ranged/BloodfireBulletProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/BloodflareSoul.cs b/Projectiles/Ranged/BloodflareSoul.cs index 2e30e64aa0..e124ee2a71 100644 --- a/Projectiles/Ranged/BloodflareSoul.cs +++ b/Projectiles/Ranged/BloodflareSoul.cs @@ -12,10 +12,10 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/Bolt.cs b/Projectiles/Ranged/Bolt.cs index e45cd19672..2e67071502 100644 --- a/Projectiles/Ranged/Bolt.cs +++ b/Projectiles/Ranged/Bolt.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/BrimstoneFireFriendly.cs b/Projectiles/Ranged/BrimstoneFireFriendly.cs index e419809b56..75f421c5e6 100644 --- a/Projectiles/Ranged/BrimstoneFireFriendly.cs +++ b/Projectiles/Ranged/BrimstoneFireFriendly.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through diff --git a/Projectiles/Ranged/BubonicRoundProj.cs b/Projectiles/Ranged/BubonicRoundProj.cs index 5c9a9c260d..d591810015 100644 --- a/Projectiles/Ranged/BubonicRoundProj.cs +++ b/Projectiles/Ranged/BubonicRoundProj.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/BuzzkillHoldout.cs b/Projectiles/Ranged/BuzzkillHoldout.cs index 44db5dd77a..e7833c92a3 100644 --- a/Projectiles/Ranged/BuzzkillHoldout.cs +++ b/Projectiles/Ranged/BuzzkillHoldout.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() diff --git a/Projectiles/Ranged/BuzzkillSaw.cs b/Projectiles/Ranged/BuzzkillSaw.cs index be7825b949..ac72578d91 100644 --- a/Projectiles/Ranged/BuzzkillSaw.cs +++ b/Projectiles/Ranged/BuzzkillSaw.cs @@ -25,9 +25,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -193,7 +193,7 @@ namespace CalamityMod.Projectiles.Ranged return true; // Special afterimage drawing to include the slashes - Texture2D buzzsawTexture = TextureAssets.Projectile[Projectile.type].Value; + Texture2D buzzsawTexture = TextureAssets.Projectile[Type].Value; Rectangle frame = buzzsawTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 1; i < Projectile.oldPos.Length; i++) { diff --git a/Projectiles/Ranged/CardClub.cs b/Projectiles/Ranged/CardClub.cs index 91aaec67ac..34900bde02 100644 --- a/Projectiles/Ranged/CardClub.cs +++ b/Projectiles/Ranged/CardClub.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/CardClubSplit.cs b/Projectiles/Ranged/CardClubSplit.cs index cd3c6dc6cf..3a5b856b38 100644 --- a/Projectiles/Ranged/CardClubSplit.cs +++ b/Projectiles/Ranged/CardClubSplit.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/CardDiamond.cs b/Projectiles/Ranged/CardDiamond.cs index 8bb7a7706c..30ffcf5781 100644 --- a/Projectiles/Ranged/CardDiamond.cs +++ b/Projectiles/Ranged/CardDiamond.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -125,7 +125,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/CardHeart.cs b/Projectiles/Ranged/CardHeart.cs index da83907400..8995ad87c6 100644 --- a/Projectiles/Ranged/CardHeart.cs +++ b/Projectiles/Ranged/CardHeart.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/CardSpade.cs b/Projectiles/Ranged/CardSpade.cs index 4e9861bb9d..b0addec51c 100644 --- a/Projectiles/Ranged/CardSpade.cs +++ b/Projectiles/Ranged/CardSpade.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/ChargedBlast.cs b/Projectiles/Ranged/ChargedBlast.cs index 30a3a8ef6f..1661a3af21 100644 --- a/Projectiles/Ranged/ChargedBlast.cs +++ b/Projectiles/Ranged/ChargedBlast.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Ranged public Vector2 baseVel; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Ranged if (baseColor == Color.White) return false; Texture2D texture = ModContent.Request("CalamityMod/Particles/DrainLineBloom").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], (baseColor * 0.7f) with { A = 0 }, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], (baseColor * 0.7f) with { A = 0 }, 1, texture); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, baseColor with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/ChargedBlastSplit.cs b/Projectiles/Ranged/ChargedBlastSplit.cs index fb72db7217..ed90969521 100644 --- a/Projectiles/Ranged/ChargedBlastSplit.cs +++ b/Projectiles/Ranged/ChargedBlastSplit.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Ranged public float homeSpeed; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Ranged if (baseColor == Color.White) return false; Texture2D texture = ModContent.Request("CalamityMod/Particles/DrainLineBloom").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], (baseColor * 0.7f) with { A = 0 }, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], (baseColor * 0.7f) with { A = 0 }, 1, texture); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, baseColor with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/ChickenCannonHeld.cs b/Projectiles/Ranged/ChickenCannonHeld.cs index f1e2ebb30e..acaafa0d12 100644 --- a/Projectiles/Ranged/ChickenCannonHeld.cs +++ b/Projectiles/Ranged/ChickenCannonHeld.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Ranged/ChromaticFlare.cs b/Projectiles/Ranged/ChromaticFlare.cs index 873f213973..4c9cb7dd55 100644 --- a/Projectiles/Ranged/ChromaticFlare.cs +++ b/Projectiles/Ranged/ChromaticFlare.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 18; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 18; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { float hue = 0.5f + 0.5f * i / (float)Projectile.oldPos.Length * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f); diff --git a/Projectiles/Ranged/CinderArrowProj.cs b/Projectiles/Ranged/CinderArrowProj.cs index cfd82c1257..52d673fc7d 100644 --- a/Projectiles/Ranged/CinderArrowProj.cs +++ b/Projectiles/Ranged/CinderArrowProj.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -126,14 +126,14 @@ namespace CalamityMod.Projectiles.Ranged if (splitShot) { Texture2D texture = ModContent.Request("CalamityMod/Particles/DrainLine").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Crimson * 0.3f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Crimson * 0.3f, 1, texture); return false; } else { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Ranged/BloodfireBulletProj").Value; if (Time > 6f) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White * 0.3f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White * 0.3f, 1, texture); return true; } } diff --git a/Projectiles/Ranged/ClaretCannonProj.cs b/Projectiles/Ranged/ClaretCannonProj.cs index 3c9c5699d9..1719f76360 100644 --- a/Projectiles/Ranged/ClaretCannonProj.cs +++ b/Projectiles/Ranged/ClaretCannonProj.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/CondemnationArrow.cs b/Projectiles/Ranged/CondemnationArrow.cs index 1807a79a2b..764a7d524a 100644 --- a/Projectiles/Ranged/CondemnationArrow.cs +++ b/Projectiles/Ranged/CondemnationArrow.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 9; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 9; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Ranged/CondemnationArrowHoming.cs b/Projectiles/Ranged/CondemnationArrowHoming.cs index 97c832c568..295ae54eb5 100644 --- a/Projectiles/Ranged/CondemnationArrowHoming.cs +++ b/Projectiles/Ranged/CondemnationArrowHoming.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 9; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 9; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Ranged/ContagionArrow.cs b/Projectiles/Ranged/ContagionArrow.cs index 04e8f7b438..067c7820e3 100644 --- a/Projectiles/Ranged/ContagionArrow.cs +++ b/Projectiles/Ranged/ContagionArrow.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs b/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs index b77d4e0bec..a097576c82 100644 --- a/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs +++ b/Projectiles/Ranged/CorinthPrimeAirburstGrenade.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Ranged/DaemonsFlameBow.cs b/Projectiles/Ranged/DaemonsFlameBow.cs index 907806df64..6653ea2313 100644 --- a/Projectiles/Ranged/DaemonsFlameBow.cs +++ b/Projectiles/Ranged/DaemonsFlameBow.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Ranged public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -156,8 +156,8 @@ namespace CalamityMod.Projectiles.Ranged public override void PostDraw(Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Vector2 origin = new Vector2(27f, 58f); SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Ranged/DragonsBreathHoldout.cs b/Projectiles/Ranged/DragonsBreathHoldout.cs index 0600bc37de..6ae39cc534 100644 --- a/Projectiles/Ranged/DragonsBreathHoldout.cs +++ b/Projectiles/Ranged/DragonsBreathHoldout.cs @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Ranged if (Time < 2) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; float rotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); Vector2 origin = texture.Size() * 0.5f; diff --git a/Projectiles/Ranged/DragonsBreathMag.cs b/Projectiles/Ranged/DragonsBreathMag.cs index 0908d58da1..89bafd2447 100644 --- a/Projectiles/Ranged/DragonsBreathMag.cs +++ b/Projectiles/Ranged/DragonsBreathMag.cs @@ -34,12 +34,12 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { // Unsure if it will look good with these - //ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - //ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + //ProjectileID.Sets.TrailCacheLength[Type] = 8; + //ProjectileID.Sets.TrailingMode[Type] = 0; } public override bool PreDraw(ref Color lightColor) { - //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DragonsBreathMag").Value); + //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DragonsBreathMag").Value); return true; } public override void AI() diff --git a/Projectiles/Ranged/DrataliornusFlame.cs b/Projectiles/Ranged/DrataliornusFlame.cs index eb614b0583..2b7c2cf2d0 100644 --- a/Projectiles/Ranged/DrataliornusFlame.cs +++ b/Projectiles/Ranged/DrataliornusFlame.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture2D13.Width, texture2D13.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)texture2D13.Height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/DrizzlefishFire.cs b/Projectiles/Ranged/DrizzlefishFire.cs index 7d1dd34af7..a1384538d8 100644 --- a/Projectiles/Ranged/DrizzlefishFire.cs +++ b/Projectiles/Ranged/DrizzlefishFire.cs @@ -28,19 +28,19 @@ namespace CalamityMod.Projectiles.Ranged } public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override bool PreDraw(ref Color lightColor) { if (Time < 7) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value); else { if (Projectile.ai[1] == 1f) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); else - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); } //Changes the texture of the projectile if (Projectile.ai[1] == 1f) diff --git a/Projectiles/Ranged/DrizzlefishFireSplit.cs b/Projectiles/Ranged/DrizzlefishFireSplit.cs index 8ab731eafa..29155befd3 100644 --- a/Projectiles/Ranged/DrizzlefishFireSplit.cs +++ b/Projectiles/Ranged/DrizzlefishFireSplit.cs @@ -28,15 +28,15 @@ namespace CalamityMod.Projectiles.Ranged } public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override bool PreDraw(ref Color lightColor) { if (Projectile.ai[1] == 1f) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); else - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); //Changes the texture of the projectile if (Projectile.ai[1] == 1f) { diff --git a/Projectiles/Ranged/DrizzlefishFireball.cs b/Projectiles/Ranged/DrizzlefishFireball.cs index 864bcdaa33..d6de88439b 100644 --- a/Projectiles/Ranged/DrizzlefishFireball.cs +++ b/Projectiles/Ranged/DrizzlefishFireball.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Ranged } public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void AI() { @@ -117,13 +117,13 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { if (Time < 7) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value); else { if (Projectile.ai[1] == 1f) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); else - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); } //Changes the texture of the projectile if (Projectile.ai[1] == 1f) diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index 2002b27fe6..81766cb87a 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/DryadsTearSplit.cs b/Projectiles/Ranged/DryadsTearSplit.cs index 4fc7b04a76..dc63930a32 100644 --- a/Projectiles/Ranged/DryadsTearSplit.cs +++ b/Projectiles/Ranged/DryadsTearSplit.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/ElysianArrowRain.cs b/Projectiles/Ranged/ElysianArrowRain.cs index cae1a8b482..2963288945 100644 --- a/Projectiles/Ranged/ElysianArrowRain.cs +++ b/Projectiles/Ranged/ElysianArrowRain.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Ranged { ProjectileID.Sets.CultistIsResistantTo[Type] = true; // While this projectile doesn't have afterimages, it keeps track of old positions for its primitive drawcode. - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 21; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 21; } public override void SetDefaults() diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index 0edd066459..18d29ded2c 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through diff --git a/Projectiles/Ranged/ExoCrystalArrow.cs b/Projectiles/Ranged/ExoCrystalArrow.cs index fbcffc2110..add3758658 100644 --- a/Projectiles/Ranged/ExoCrystalArrow.cs +++ b/Projectiles/Ranged/ExoCrystalArrow.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Ranged GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].UseSecondaryColor(secondaryColor); GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"].Apply(); PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(PrimitiveWidthFunction, PrimitiveColorFunction, (_) => trailOffset, shader: GameShaders.Misc["CalamityMod:HeavenlyGaleTrail"]), 53); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = tex.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Main.spriteBatch.Draw(tex, drawPosition, null, Projectile.GetAlpha(Color.White), Projectile.rotation, origin, Projectile.scale, 0, 0f); diff --git a/Projectiles/Ranged/ExoLight.cs b/Projectiles/Ranged/ExoLight.cs index 2cf433a89a..7e169f185c 100644 --- a/Projectiles/Ranged/ExoLight.cs +++ b/Projectiles/Ranged/ExoLight.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Projectiles.Ranged public Vector2 oldPos = Vector2.Zero; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 36; } public override void SetDefaults() diff --git a/Projectiles/Ranged/ExoLightningBolt.cs b/Projectiles/Ranged/ExoLightningBolt.cs index 1a3338f0af..9fb2aad3a1 100644 --- a/Projectiles/Ranged/ExoLightningBolt.cs +++ b/Projectiles/Ranged/ExoLightningBolt.cs @@ -35,8 +35,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 50; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 50; } public override void SetDefaults() diff --git a/Projectiles/Ranged/FeatherLarge.cs b/Projectiles/Ranged/FeatherLarge.cs index f516e7080f..54bafbc9f1 100644 --- a/Projectiles/Ranged/FeatherLarge.cs +++ b/Projectiles/Ranged/FeatherLarge.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/FlakKrakenProjectile.cs b/Projectiles/Ranged/FlakKrakenProjectile.cs index 98db63bb3b..7eee3c9790 100644 --- a/Projectiles/Ranged/FlakKrakenProjectile.cs +++ b/Projectiles/Ranged/FlakKrakenProjectile.cs @@ -250,7 +250,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color drawColor = IsShrapnel ? Projectile.GetAlpha(lightColor) : Color.Black; diff --git a/Projectiles/Ranged/FlakToxicannonProjectile.cs b/Projectiles/Ranged/FlakToxicannonProjectile.cs index a01cdd3535..d8ab7107d2 100644 --- a/Projectiles/Ranged/FlakToxicannonProjectile.cs +++ b/Projectiles/Ranged/FlakToxicannonProjectile.cs @@ -252,10 +252,10 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = IsShrapnel ? Request("CalamityMod/Projectiles/Environment/AcidDrop").Value : Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = IsShrapnel ? Request("CalamityMod/Projectiles/Environment/AcidDrop").Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color drawColor = Projectile.GetAlpha(lightColor); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], drawColor * 0.35f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], drawColor * 0.35f, 1, texture); return false; } diff --git a/Projectiles/Ranged/FlareBat.cs b/Projectiles/Ranged/FlareBat.cs index ec5583125c..eec96dfc86 100644 --- a/Projectiles/Ranged/FlareBat.cs +++ b/Projectiles/Ranged/FlareBat.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Ranged/FlashRoundProj.cs b/Projectiles/Ranged/FlashRoundProj.cs index 9d44f9e9f9..6eb86ba08f 100644 --- a/Projectiles/Ranged/FlashRoundProj.cs +++ b/Projectiles/Ranged/FlashRoundProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public float ExplosionPower = 1.5f; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/FlurrystormCannonShooting.cs b/Projectiles/Ranged/FlurrystormCannonShooting.cs index 3e0da96543..52bee35333 100644 --- a/Projectiles/Ranged/FlurrystormCannonShooting.cs +++ b/Projectiles/Ranged/FlurrystormCannonShooting.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Ranged public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/FreedomStarBeam.cs b/Projectiles/Ranged/FreedomStarBeam.cs index 859e5d49d5..f647654627 100644 --- a/Projectiles/Ranged/FreedomStarBeam.cs +++ b/Projectiles/Ranged/FreedomStarBeam.cs @@ -203,7 +203,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.velocity == Vector2.Zero) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float beamLength = Projectile.ai[0]; Vector2 centerFloored = Projectile.Center.Floor() + Projectile.velocity * Projectile.scale * BeamRenderTileOffset; Vector2 scaleVec = new Vector2(Projectile.scale); diff --git a/Projectiles/Ranged/GemTechGreenFlechette.cs b/Projectiles/Ranged/GemTechGreenFlechette.cs index 2f2410091a..981761315d 100644 --- a/Projectiles/Ranged/GemTechGreenFlechette.cs +++ b/Projectiles/Ranged/GemTechGreenFlechette.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; } public override void SetDefaults() @@ -69,8 +69,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - int afterimageCount = ProjectileID.Sets.TrailCacheLength[Projectile.type]; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + int afterimageCount = ProjectileID.Sets.TrailCacheLength[Type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() * 0.5f; for (int i = 0; i < afterimageCount; i++) diff --git a/Projectiles/Ranged/GodSlayerSlugProj.cs b/Projectiles/Ranged/GodSlayerSlugProj.cs index cc839fb9b4..cbd98e805f 100644 --- a/Projectiles/Ranged/GodSlayerSlugProj.cs +++ b/Projectiles/Ranged/GodSlayerSlugProj.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; if (Main.netMode != NetmodeID.Server) TextureBlue = Mod.Assets.Request("Projectiles/Ranged/GodSlayerSlugBlue", AssetRequestMode.ImmediateLoad).Value; @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Ranged // Set all old positions to the bullet's warp position so that there aren't weird afterimages. // If an old position is uninitialized (0,0 aka never used), then don't change it. - for (int i = 0; i < ProjectileID.Sets.TrailCacheLength[Projectile.type]; ++i) + for (int i = 0; i < ProjectileID.Sets.TrailCacheLength[Type]; ++i) { Vector2 oldPosElem = Projectile.oldPos[i]; if (!(oldPosElem == Vector2.Zero)) diff --git a/Projectiles/Ranged/HailstormBulletProj.cs b/Projectiles/Ranged/HailstormBulletProj.cs index ac240f4e5d..45830553ff 100644 --- a/Projectiles/Ranged/HailstormBulletProj.cs +++ b/Projectiles/Ranged/HailstormBulletProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Ranged public Vector2 startVelocity; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 18; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 18; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/HallowPointRoundProj.cs b/Projectiles/Ranged/HallowPointRoundProj.cs index 2318b6c5d1..8d8ec76fec 100644 --- a/Projectiles/Ranged/HallowPointRoundProj.cs +++ b/Projectiles/Ranged/HallowPointRoundProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() diff --git a/Projectiles/Ranged/HeavenlyGaleProj.cs b/Projectiles/Ranged/HeavenlyGaleProj.cs index 09e5b1616b..9902e03773 100644 --- a/Projectiles/Ranged/HeavenlyGaleProj.cs +++ b/Projectiles/Ranged/HeavenlyGaleProj.cs @@ -196,7 +196,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D textureGlow = ModContent.Request("CalamityMod/Projectiles/Ranged/HeavenlyGaleProjGlow").Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Ranged/HellbornHoldout.cs b/Projectiles/Ranged/HellbornHoldout.cs index 12a6cb31e7..f452fcb318 100644 --- a/Projectiles/Ranged/HellbornHoldout.cs +++ b/Projectiles/Ranged/HellbornHoldout.cs @@ -35,8 +35,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { diff --git a/Projectiles/Ranged/HellbornProj.cs b/Projectiles/Ranged/HellbornProj.cs index 9f12d7abfb..288d075844 100644 --- a/Projectiles/Ranged/HellbornProj.cs +++ b/Projectiles/Ranged/HellbornProj.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() diff --git a/Projectiles/Ranged/HighExplosivePeanutShell.cs b/Projectiles/Ranged/HighExplosivePeanutShell.cs index 10fdaa11e0..cefe2998ce 100644 --- a/Projectiles/Ranged/HighExplosivePeanutShell.cs +++ b/Projectiles/Ranged/HighExplosivePeanutShell.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 9; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 9; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/HiveMissile.cs b/Projectiles/Ranged/HiveMissile.cs index 33ceb2d7f6..a660154ee0 100644 --- a/Projectiles/Ranged/HiveMissile.cs +++ b/Projectiles/Ranged/HiveMissile.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/HiveNuke.cs b/Projectiles/Ranged/HiveNuke.cs index fd07e0e2ba..cbf2793e2f 100644 --- a/Projectiles/Ranged/HiveNuke.cs +++ b/Projectiles/Ranged/HiveNuke.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Ranged private Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -153,8 +153,8 @@ namespace CalamityMod.Projectiles.Ranged if (BonusEffectMode) { return false; } Texture2D texture = ModContent.Request("CalamityMod/Projectiles/StarProj").Value; if (Time > 6) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], EffectsColor * 0.4f, 1, texture); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], EffectsColor * 0.4f, 1, texture); + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/HolyFireBulletProj.cs b/Projectiles/Ranged/HolyFireBulletProj.cs index 501562259e..1a126bde6b 100644 --- a/Projectiles/Ranged/HolyFireBulletProj.cs +++ b/Projectiles/Ranged/HolyFireBulletProj.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/HydraHead.cs b/Projectiles/Ranged/HydraHead.cs index f4a93d2ee6..6cccc366b3 100644 --- a/Projectiles/Ranged/HydraHead.cs +++ b/Projectiles/Ranged/HydraHead.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Ranged public void PerformInitializationEffects() { - int totalHeads = Owner.ownedProjectileCounts[Projectile.type]; + int totalHeads = Owner.ownedProjectileCounts[Type]; CurrentPositionOffset = IdealPositionOffset = new Vector2(Main.rand.NextFloat(-72f - 8f * totalHeads, 72f + 8f * totalHeads), -Main.rand.NextFloat(8f, 84f + 4f * totalHeads)); Projectile.netUpdate = true; } @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.velocity = (Projectile.velocity * 9f + Projectile.SafeDirectionTo(returnPosition) * flySpeed) / 10f; } - int totalHeads = Owner.ownedProjectileCounts[Projectile.type]; + int totalHeads = Owner.ownedProjectileCounts[Type]; int moveRate = 40 + totalHeads * 4; // Reset the ideal offset from time to time. @@ -229,7 +229,7 @@ namespace CalamityMod.Projectiles.Ranged } bool shouldFlip = Math.Abs(Projectile.rotation) > MathHelper.PiOver2; - Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(headTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, null, diff --git a/Projectiles/Ranged/HydrasBlood.cs b/Projectiles/Ranged/HydrasBlood.cs index 0ba74cfb66..2b4f87c976 100644 --- a/Projectiles/Ranged/HydrasBlood.cs +++ b/Projectiles/Ranged/HydrasBlood.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/HyperiusBulletProj.cs b/Projectiles/Ranged/HyperiusBulletProj.cs index 0399e05bd4..11cf611ac4 100644 --- a/Projectiles/Ranged/HyperiusBulletProj.cs +++ b/Projectiles/Ranged/HyperiusBulletProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Ranged public float variance; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/HyperiusSplit.cs b/Projectiles/Ranged/HyperiusSplit.cs index 8bff3cfed8..5c8111fc06 100644 --- a/Projectiles/Ranged/HyperiusSplit.cs +++ b/Projectiles/Ranged/HyperiusSplit.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Ranged private bool rotPhase2 = false; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -104,8 +104,8 @@ namespace CalamityMod.Projectiles.Ranged Texture2D texture = ModContent.Request("CalamityMod/Particles/LargeBloom").Value; Texture2D texture2 = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(currentColor, Color.White, 0.15f), 1, texture); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White with { A = 0 }, 1, texture2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(currentColor, Color.White, 0.15f), 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White with { A = 0 }, 1, texture2); //Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, Projectile.scale * 1.5f, 0, 0f); return false; } diff --git a/Projectiles/Ranged/KingsbaneHoldout.cs b/Projectiles/Ranged/KingsbaneHoldout.cs index 09d7d84584..4f7c6b7c73 100644 --- a/Projectiles/Ranged/KingsbaneHoldout.cs +++ b/Projectiles/Ranged/KingsbaneHoldout.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged } public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void AI() { @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 2; } diff --git a/Projectiles/Ranged/LeafArrow.cs b/Projectiles/Ranged/LeafArrow.cs index 495a5168e8..e5fb34f26e 100644 --- a/Projectiles/Ranged/LeafArrow.cs +++ b/Projectiles/Ranged/LeafArrow.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Ranged/LeviatitanAberration.cs b/Projectiles/Ranged/LeviatitanAberration.cs index 836c490874..2d8f5fdeef 100644 --- a/Projectiles/Ranged/LeviatitanAberration.cs +++ b/Projectiles/Ranged/LeviatitanAberration.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Projectiles/Summon/GastricBelcher"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } public override void SetDefaults() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Ranged/LeviatitanMeteor.cs b/Projectiles/Ranged/LeviatitanMeteor.cs index ef3279a3ea..3cc53d20e9 100644 --- a/Projectiles/Ranged/LeviatitanMeteor.cs +++ b/Projectiles/Ranged/LeviatitanMeteor.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Projectiles/Melee/AftershockRock"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public static int Lifetime = 600; public override void SetDefaults() @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/LuxorsGiftRanged.cs b/Projectiles/Ranged/LuxorsGiftRanged.cs index 70ab922648..07ef96b9fc 100644 --- a/Projectiles/Ranged/LuxorsGiftRanged.cs +++ b/Projectiles/Ranged/LuxorsGiftRanged.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Ranged/MagnaShot.cs b/Projectiles/Ranged/MagnaShot.cs index acdb64ef78..874aa255a4 100644 --- a/Projectiles/Ranged/MagnaShot.cs +++ b/Projectiles/Ranged/MagnaShot.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Ranged/MagnomalyRocket.cs b/Projectiles/Ranged/MagnomalyRocket.cs index 49bb1cc4b6..12dacb88a4 100644 --- a/Projectiles/Ranged/MagnomalyRocket.cs +++ b/Projectiles/Ranged/MagnomalyRocket.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Projectiles.Ranged private bool spawnedAura = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/MarksmanShot.cs b/Projectiles/Ranged/MarksmanShot.cs index e3db98ad8c..f0ed4e0c90 100644 --- a/Projectiles/Ranged/MarksmanShot.cs +++ b/Projectiles/Ranged/MarksmanShot.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 4000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 4000; } public override void SetDefaults() diff --git a/Projectiles/Ranged/MechanicalBarracuda.cs b/Projectiles/Ranged/MechanicalBarracuda.cs index 0afe862a35..ee921712b0 100644 --- a/Projectiles/Ranged/MechanicalBarracuda.cs +++ b/Projectiles/Ranged/MechanicalBarracuda.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Ranged/MeowCreature.cs b/Projectiles/Ranged/MeowCreature.cs index f8b11ada31..081011d165 100644 --- a/Projectiles/Ranged/MeowCreature.cs +++ b/Projectiles/Ranged/MeowCreature.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 36; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Ranged public override void PostDraw(Color lightColor) { PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f), 30); - Texture2D glow = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D glow = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); } } diff --git a/Projectiles/Ranged/MineralMortarHoldout.cs b/Projectiles/Ranged/MineralMortarHoldout.cs index aa1f8f32b6..4530fe7347 100644 --- a/Projectiles/Ranged/MineralMortarHoldout.cs +++ b/Projectiles/Ranged/MineralMortarHoldout.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; float rotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); Vector2 origin = texture.Size() * 0.5f; diff --git a/Projectiles/Ranged/MineralMortarProjectile.cs b/Projectiles/Ranged/MineralMortarProjectile.cs index 98a7ae6fec..9e50f46a25 100644 --- a/Projectiles/Ranged/MineralMortarProjectile.cs +++ b/Projectiles/Ranged/MineralMortarProjectile.cs @@ -172,7 +172,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; float rotation = Projectile.rotation + MathHelper.PiOver2; Vector2 origin = texture.Size() * 0.5f; diff --git a/Projectiles/Ranged/MiniSharkron.cs b/Projectiles/Ranged/MiniSharkron.cs index f0e32544b6..0f1e920e05 100644 --- a/Projectiles/Ranged/MiniSharkron.cs +++ b/Projectiles/Ranged/MiniSharkron.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/MiniatureFolly.cs b/Projectiles/Ranged/MiniatureFolly.cs index d779746349..88e8fec4dd 100644 --- a/Projectiles/Ranged/MiniatureFolly.cs +++ b/Projectiles/Ranged/MiniatureFolly.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Ranged/MistArrow.cs b/Projectiles/Ranged/MistArrow.cs index 50b745512a..60782c2b63 100644 --- a/Projectiles/Ranged/MistArrow.cs +++ b/Projectiles/Ranged/MistArrow.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Ranged/MistArrowFrostMist.cs b/Projectiles/Ranged/MistArrowFrostMist.cs index 64f4f7d36d..2c38992adf 100644 --- a/Projectiles/Ranged/MistArrowFrostMist.cs +++ b/Projectiles/Ranged/MistArrowFrostMist.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; switch (Projectile.ai[0]) { case 0: diff --git a/Projectiles/Ranged/MortarRoundProj.cs b/Projectiles/Ranged/MortarRoundProj.cs index 07ac04dbda..95dee8af46 100644 --- a/Projectiles/Ranged/MortarRoundProj.cs +++ b/Projectiles/Ranged/MortarRoundProj.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/NorfleetComet.cs b/Projectiles/Ranged/NorfleetComet.cs index bcc684bd6a..3bfb7d1196 100644 --- a/Projectiles/Ranged/NorfleetComet.cs +++ b/Projectiles/Ranged/NorfleetComet.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Ranged Main.EntitySpriteDraw(rechargeTexture, Projectile.Center - Main.screenPosition, null, drawColor2 with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.25f * Utils.GetLerpValue(0, 25, time, true) * randSize, SpriteEffects.None, 0); Main.EntitySpriteDraw(rechargeTexture, Projectile.Center - Main.screenPosition, null, Color.White with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.1f * Utils.GetLerpValue(0, 25, time, true) * randSize, SpriteEffects.None, 0); - //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 75, targetHitbox); diff --git a/Projectiles/Ranged/NovaChargedShot.cs b/Projectiles/Ranged/NovaChargedShot.cs index 7571a40057..26e5da2318 100644 --- a/Projectiles/Ranged/NovaChargedShot.cs +++ b/Projectiles/Ranged/NovaChargedShot.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Ranged/NovaShot.cs b/Projectiles/Ranged/NovaShot.cs index 01f16f0119..c121177a34 100644 --- a/Projectiles/Ranged/NovaShot.cs +++ b/Projectiles/Ranged/NovaShot.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Ranged/Nuke.cs b/Projectiles/Ranged/Nuke.cs index 255fa30cd0..dd6560362e 100644 --- a/Projectiles/Ranged/Nuke.cs +++ b/Projectiles/Ranged/Nuke.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -208,7 +208,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/NullShot.cs b/Projectiles/Ranged/NullShot.cs index 972d90826a..73d93eb49b 100644 --- a/Projectiles/Ranged/NullShot.cs +++ b/Projectiles/Ranged/NullShot.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 25; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 25; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -225,8 +225,8 @@ namespace CalamityMod.Projectiles.Ranged Asset tex = ModContent.Request("CalamityMod/Particles/DrainLineBloom"); Asset tex2 = ModContent.Request("CalamityMod/Particles/DrainLine"); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], baseColor with { A = 0 } * 0.35f, 1, tex.Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Projectile.ai[1] == 5 ? Color.Black : Color.Lerp(baseColor, Color.White, 0.5f), 1, tex2.Value, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], baseColor with { A = 0 } * 0.35f, 1, tex.Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Projectile.ai[1] == 5 ? Color.Black : Color.Lerp(baseColor, Color.White, 0.5f), 1, tex2.Value, true, true); return false; } } diff --git a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs index 31553262ae..7ced1e591b 100644 --- a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs +++ b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 25; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 25; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -216,8 +216,8 @@ namespace CalamityMod.Projectiles.Ranged Asset tex = ModContent.Request("CalamityMod/Particles/DrainLineBloom2"); Asset tex2 = ModContent.Request("CalamityMod/Particles/DrainLine2"); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], baseColor with { A = 0 } * 0.8f, 1, tex.Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Black, 1, tex2.Value, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], baseColor with { A = 0 } * 0.8f, 1, tex.Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Black, 1, tex2.Value, true, true); Asset tex3 = ModContent.Request("CalamityMod/Projectiles/Ranged/OntologicalDespoilerGrenade"); Rectangle frame = tex3.Frame(1, 6, 0, Projectile.frame); diff --git a/Projectiles/Ranged/OntologicalDespoilerShot.cs b/Projectiles/Ranged/OntologicalDespoilerShot.cs index d4bd330f5e..17077e746b 100644 --- a/Projectiles/Ranged/OntologicalDespoilerShot.cs +++ b/Projectiles/Ranged/OntologicalDespoilerShot.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 25; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 25; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -205,8 +205,8 @@ namespace CalamityMod.Projectiles.Ranged Asset tex = ModContent.Request("CalamityMod/Particles/DrainLineBloom2"); Asset tex2 = ModContent.Request("CalamityMod/Particles/DrainLine2"); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], baseColor with { A = 0 } * 0.8f, 1, tex.Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Positive ? Color.Lerp(Color.White, baseColor, MathHelper.Clamp(Utils.GetLerpValue(50, 175, time, true), 0, 0.5f)) with { A = 0 } : Color.Black, 1, tex2.Value, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], baseColor with { A = 0 } * 0.8f, 1, tex.Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Positive ? Color.Lerp(Color.White, baseColor, MathHelper.Clamp(Utils.GetLerpValue(50, 175, time, true), 0, 0.5f)) with { A = 0 } : Color.Black, 1, tex2.Value, true, true); Asset tex3 = ModContent.Request("CalamityMod/Projectiles/Ranged/OntologicalDespoilerShot"); Asset tex4 = ModContent.Request("CalamityMod/Projectiles/Ranged/OntologicalDespoilerShot2"); diff --git a/Projectiles/Ranged/OpalChargedStrike.cs b/Projectiles/Ranged/OpalChargedStrike.cs index 6abb6efd69..52cf57f8aa 100644 --- a/Projectiles/Ranged/OpalChargedStrike.cs +++ b/Projectiles/Ranged/OpalChargedStrike.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Ranged/OpalStrike.cs b/Projectiles/Ranged/OpalStrike.cs index e4fa59607f..c2d0bbc307 100644 --- a/Projectiles/Ranged/OpalStrike.cs +++ b/Projectiles/Ranged/OpalStrike.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index 0d13e87d20..3038418116 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -288,7 +288,7 @@ namespace CalamityMod.Projectiles.Ranged public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(85f, 33f); SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Ranged/PlagueArrow.cs b/Projectiles/Ranged/PlagueArrow.cs index 6a40f1bd25..f6ee408e98 100644 --- a/Projectiles/Ranged/PlagueArrow.cs +++ b/Projectiles/Ranged/PlagueArrow.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Ranged/PlagueTaintedDrone.cs b/Projectiles/Ranged/PlagueTaintedDrone.cs index 85511f3095..834053e7a0 100644 --- a/Projectiles/Ranged/PlagueTaintedDrone.cs +++ b/Projectiles/Ranged/PlagueTaintedDrone.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; NPC target = Projectile.FindTargetWithinRange(1600f); @@ -91,8 +91,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); @@ -101,8 +101,8 @@ namespace CalamityMod.Projectiles.Ranged public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Ranged/PlagueTaintedProjectile.cs b/Projectiles/Ranged/PlagueTaintedProjectile.cs index 93191a077a..1c24282b48 100644 --- a/Projectiles/Ranged/PlagueTaintedProjectile.cs +++ b/Projectiles/Ranged/PlagueTaintedProjectile.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/PlanarRipperBolt.cs b/Projectiles/Ranged/PlanarRipperBolt.cs index 217acf83c3..48917303c7 100644 --- a/Projectiles/Ranged/PlanarRipperBolt.cs +++ b/Projectiles/Ranged/PlanarRipperBolt.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Ranged/PlasmaBlast.cs b/Projectiles/Ranged/PlasmaBlast.cs index 6eba241bce..4c9fda47d3 100644 --- a/Projectiles/Ranged/PlasmaBlast.cs +++ b/Projectiles/Ranged/PlasmaBlast.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Ranged/PrismComet.cs b/Projectiles/Ranged/PrismComet.cs index ce8d5fa495..94d0ccf5c0 100644 --- a/Projectiles/Ranged/PrismComet.cs +++ b/Projectiles/Ranged/PrismComet.cs @@ -13,10 +13,10 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged Lighting.AddLight(Projectile.Center, Color.LightSeaGreen.ToVector3()); Projectile.frameCounter++; if (Projectile.frameCounter % 6 == 5) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.alpha = Utils.Clamp(Projectile.alpha - 25, 30, 255); @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Ranged/PrismEnergyBullet.cs b/Projectiles/Ranged/PrismEnergyBullet.cs index e28af7dd0d..7de5fd8833 100644 --- a/Projectiles/Ranged/PrismEnergyBullet.cs +++ b/Projectiles/Ranged/PrismEnergyBullet.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 currentDirection = Projectile.velocity.SafeNormalize(Vector2.Zero); for (int i = 0; i < CurrentLaserLength; i++) diff --git a/Projectiles/Ranged/PrismExplosionLarge.cs b/Projectiles/Ranged/PrismExplosionLarge.cs index 9279a24993..d8fefeee20 100644 --- a/Projectiles/Ranged/PrismExplosionLarge.cs +++ b/Projectiles/Ranged/PrismExplosionLarge.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D lightTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Ranged/PrismExplosionSmall.cs b/Projectiles/Ranged/PrismExplosionSmall.cs index 1a7fff1cfc..c4f8675e0f 100644 --- a/Projectiles/Ranged/PrismExplosionSmall.cs +++ b/Projectiles/Ranged/PrismExplosionSmall.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.frameCounter % 8 == 7) Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); Projectile.scale *= 1.0115f; Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); @@ -43,9 +43,9 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D lightTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 drawPosition = Projectile.Center - Main.screenPosition; Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Ranged/PrismMine.cs b/Projectiles/Ranged/PrismMine.cs index d677b63c99..de7662ace0 100644 --- a/Projectiles/Ranged/PrismMine.cs +++ b/Projectiles/Ranged/PrismMine.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D baseTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D baseTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = ModContent.Request($"{Texture}Glowmask").Value; Texture2D laserTexture = ModContent.Request($"CalamityMod/Projectiles/Ranged/PrismMineArc").Value; diff --git a/Projectiles/Ranged/PrismaticEnergyBlast.cs b/Projectiles/Ranged/PrismaticEnergyBlast.cs index 2fe416f9c6..e7f29f76f0 100644 --- a/Projectiles/Ranged/PrismaticEnergyBlast.cs +++ b/Projectiles/Ranged/PrismaticEnergyBlast.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { // Start texture drawing. - Rectangle beginFrame = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle beginFrame = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Main.EntitySpriteDraw(LaserBeginTexture, Projectile.Center - Main.screenPosition, beginFrame, @@ -108,14 +108,14 @@ namespace CalamityMod.Projectiles.Ranged // Prepare things for body drawing. float laserBodyLength = LaserLength; - laserBodyLength -= (LaserBeginTexture.Height * 0.5f + LaserEndTexture.Height) * Projectile.scale / Main.projFrames[Projectile.type]; + laserBodyLength -= (LaserBeginTexture.Height * 0.5f + LaserEndTexture.Height) * Projectile.scale / Main.projFrames[Type]; Vector2 centerOnLaser = Projectile.Center; // Body drawing. - Rectangle middleFrame = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle middleFrame = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); if (laserBodyLength > 30f) { - float laserOffset = (LaserMiddleTexture.Height - 10f) * Projectile.scale / Main.projFrames[Projectile.type]; + float laserOffset = (LaserMiddleTexture.Height - 10f) * Projectile.scale / Main.projFrames[Type]; float incrementalBodyLength = 0f; while (incrementalBodyLength + 1f < laserBodyLength) { @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Ranged } // End texture drawing. - Rectangle endFrame = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle endFrame = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 laserEndCenter = centerOnLaser - Main.screenPosition; Main.EntitySpriteDraw(LaserEndTexture, laserEndCenter, diff --git a/Projectiles/Ranged/PristineSecondary.cs b/Projectiles/Ranged/PristineSecondary.cs index ef5744f2d4..be33fda1e1 100644 --- a/Projectiles/Ranged/PristineSecondary.cs +++ b/Projectiles/Ranged/PristineSecondary.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Ranged { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.5f; Color drawColor = FogColor * opacity; diff --git a/Projectiles/Ranged/PumplerHoldout.cs b/Projectiles/Ranged/PumplerHoldout.cs index 6dea938198..54844c1430 100644 --- a/Projectiles/Ranged/PumplerHoldout.cs +++ b/Projectiles/Ranged/PumplerHoldout.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 9; + Main.projFrames[Type] = 9; } private Player Owner => Main.player[Projectile.owner]; @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.frameCounter >= 10) //10 fps anim { Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type] - 1) + if (Projectile.frame >= Main.projFrames[Type] - 1) Projectile.frame = 0; Projectile.frameCounter = 0; } @@ -232,8 +232,8 @@ namespace CalamityMod.Projectiles.Ranged GameShaders.Misc["CalamityMod:BasicTint"].Apply(); Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Rectangle frameRectangle = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Frame(1, 9, 0, Projectile.frame); - Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, drawPosition, frameRectangle, lightColor, Projectile.rotation, frameRectangle.Size() * 0.5f, 1f, Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + Rectangle frameRectangle = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Frame(1, 9, 0, Projectile.frame); + Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, drawPosition, frameRectangle, lightColor, Projectile.rotation, frameRectangle.Size() * 0.5f, 1f, Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); Main.spriteBatch.ExitShaderRegion(); diff --git a/Projectiles/Ranged/RealmRavagerBullet.cs b/Projectiles/Ranged/RealmRavagerBullet.cs index 64d52761a0..76570d8ccd 100644 --- a/Projectiles/Ranged/RealmRavagerBullet.cs +++ b/Projectiles/Ranged/RealmRavagerBullet.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/RicoshotCoin.cs b/Projectiles/Ranged/RicoshotCoin.cs index 96d3acca3c..b8090108e7 100644 --- a/Projectiles/Ranged/RicoshotCoin.cs +++ b/Projectiles/Ranged/RicoshotCoin.cs @@ -91,9 +91,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 60; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 8; + ProjectileID.Sets.TrailCacheLength[Type] = 60; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 8; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; // Produce a tiny amount of light based on coin type. @@ -253,8 +253,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int numFrames = Main.projFrames[Projectile.type]; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int numFrames = Main.projFrames[Type]; Rectangle frame = new Rectangle( /* X */ (int)CoinType * tex.Width / 3, /* Y */ Projectile.frame * tex.Height / numFrames, diff --git a/Projectiles/Ranged/RocketFire.cs b/Projectiles/Ranged/RocketFire.cs index 47a34a1452..899990b1ac 100644 --- a/Projectiles/Ranged/RocketFire.cs +++ b/Projectiles/Ranged/RocketFire.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged if (!initialized) { initialized = true; - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); } Projectile.frameCounter++; if (Projectile.frameCounter > 6) @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/RubberMortarRoundProj.cs b/Projectiles/Ranged/RubberMortarRoundProj.cs index 8355606f88..1c734273d3 100644 --- a/Projectiles/Ranged/RubberMortarRoundProj.cs +++ b/Projectiles/Ranged/RubberMortarRoundProj.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Ranged/SandblasterBullet.cs b/Projectiles/Ranged/SandblasterBullet.cs index f0c141ba49..7bdf86ebc3 100644 --- a/Projectiles/Ranged/SandblasterBullet.cs +++ b/Projectiles/Ranged/SandblasterBullet.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/ScorchedEarthRocket.cs b/Projectiles/Ranged/ScorchedEarthRocket.cs index 5066793bdd..2e1a91320e 100644 --- a/Projectiles/Ranged/ScorchedEarthRocket.cs +++ b/Projectiles/Ranged/ScorchedEarthRocket.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 6; } @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/ScorpioHoldout.cs b/Projectiles/Ranged/ScorpioHoldout.cs index 36669dd5f8..6df41d2aa0 100644 --- a/Projectiles/Ranged/ScorpioHoldout.cs +++ b/Projectiles/Ranged/ScorpioHoldout.cs @@ -194,7 +194,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = Request(GlowTexture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Color drawColor = Projectile.GetAlpha(lightColor); diff --git a/Projectiles/Ranged/ScorpioLargeRocket.cs b/Projectiles/Ranged/ScorpioLargeRocket.cs index aad9d581b0..0e6e837318 100644 --- a/Projectiles/Ranged/ScorpioLargeRocket.cs +++ b/Projectiles/Ranged/ScorpioLargeRocket.cs @@ -210,7 +210,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = Request("CalamityMod/Projectiles/Ranged/ScorpioLargeRocket_Glow").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); diff --git a/Projectiles/Ranged/ScorpioRocket.cs b/Projectiles/Ranged/ScorpioRocket.cs index f1f39ce548..4b5e53b013 100644 --- a/Projectiles/Ranged/ScorpioRocket.cs +++ b/Projectiles/Ranged/ScorpioRocket.cs @@ -159,7 +159,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = Request("CalamityMod/Projectiles/Ranged/ScorpioRocket_Glow").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); diff --git a/Projectiles/Ranged/SeasSearingBubble.cs b/Projectiles/Ranged/SeasSearingBubble.cs index a9a0fa85c7..f6f3aa3cb7 100644 --- a/Projectiles/Ranged/SeasSearingBubble.cs +++ b/Projectiles/Ranged/SeasSearingBubble.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/SeasSearingSpout.cs b/Projectiles/Ranged/SeasSearingSpout.cs index 1a0f8a08e4..3d292d69d1 100644 --- a/Projectiles/Ranged/SeasSearingSpout.cs +++ b/Projectiles/Ranged/SeasSearingSpout.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -118,8 +118,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Ranged/SepticSkewerHarpoon.cs b/Projectiles/Ranged/SepticSkewerHarpoon.cs index d53a9969ce..3bae1c6fb4 100644 --- a/Projectiles/Ranged/SepticSkewerHarpoon.cs +++ b/Projectiles/Ranged/SepticSkewerHarpoon.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged public bool pullCheckValid => ((chosenTarget != null && chosenTarget.life < Projectile.damage * 28f && !calledToPull && chosenTarget.realLife == -1 && !normalHit) || Main.zenithWorld); public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public Vector2 DrawStartPosition { @@ -256,7 +256,7 @@ namespace CalamityMod.Projectiles.Ranged closestTarget = Main.npc[index]; } } - if (Main.zenithWorld && Main.npc[index] != null && index < 80 && Main.npc[index].realLife == -1 && Owner.ownedProjectileCounts[Projectile.type] < 80) + if (Main.zenithWorld && Main.npc[index] != null && index < 80 && Main.npc[index].realLife == -1 && Owner.ownedProjectileCounts[Type] < 80) { closestTarget = Main.npc[index]; Projectile harpoon = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, ((closestTarget.Center - Owner.Center + closestTarget.velocity * 1.5f).SafeNormalize(Vector2.UnitX) * 18), Projectile.type, Projectile.damage, Projectile.knockBack, Projectile.owner, 0, Projectile.ai[1] + 1); diff --git a/Projectiles/Ranged/SevensStrikerHoldout.cs b/Projectiles/Ranged/SevensStrikerHoldout.cs index 52c5f49420..b94d1e005f 100644 --- a/Projectiles/Ranged/SevensStrikerHoldout.cs +++ b/Projectiles/Ranged/SevensStrikerHoldout.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 19; + Main.projFrames[Type] = 19; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frameCounter = 0; } // Once the animation is finished, stop rolling, set the extra timer to 16 frames, and reset the sprite to frame 0 - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { rolling = false; rolltimer = 16; @@ -214,7 +214,7 @@ namespace CalamityMod.Projectiles.Ranged // Sounds // Crank & new casino - if (Projectile.frameCounter == 0 && Projectile.frame == 2 * (Main.projFrames[Projectile.type] / 19)) + if (Projectile.frameCounter == 0 && Projectile.frame == 2 * (Main.projFrames[Type] / 19)) { SoundEngine.PlaySound(SoundID.Item108 with { Volume = SoundID.Item108.Volume * 0.9f }, Projectile.Center); RouletteSoundSlot = SoundEngine.PlaySound(TheSevensStriker.RouletteSound, Projectile.Center); @@ -340,7 +340,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 drawOrigin = new Vector2(Owner.direction < 0 ? gun.Width - 33f : 33f, 33f); Vector2 drawOffset = Owner.MountedCenter + Projectile.rotation.ToRotationVector2() - Main.screenPosition; drawOffset.Y -= 10; - int indframeheight = gun.Height / Main.projFrames[Projectile.type]; + int indframeheight = gun.Height / Main.projFrames[Type]; int currentframe = indframeheight * Projectile.frame; Rectangle frame = new Rectangle(0, currentframe, gun.Width, indframeheight); diff --git a/Projectiles/Ranged/ShockblastRound.cs b/Projectiles/Ranged/ShockblastRound.cs index fab6292353..fd34f249f8 100644 --- a/Projectiles/Ranged/ShockblastRound.cs +++ b/Projectiles/Ranged/ShockblastRound.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/Shroom.cs b/Projectiles/Ranged/Shroom.cs index e708d40665..60082e80d0 100644 --- a/Projectiles/Ranged/Shroom.cs +++ b/Projectiles/Ranged/Shroom.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Ranged/SicknessRound.cs b/Projectiles/Ranged/SicknessRound.cs index 0140d85c0a..b67f488a47 100644 --- a/Projectiles/Ranged/SicknessRound.cs +++ b/Projectiles/Ranged/SicknessRound.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/SicknessRound2.cs b/Projectiles/Ranged/SicknessRound2.cs index 44e91f2563..0cf0fafcba 100644 --- a/Projectiles/Ranged/SicknessRound2.cs +++ b/Projectiles/Ranged/SicknessRound2.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/SlagRound.cs b/Projectiles/Ranged/SlagRound.cs index 919494bf8b..acfbcffc99 100644 --- a/Projectiles/Ranged/SlagRound.cs +++ b/Projectiles/Ranged/SlagRound.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Ranged/SlimeBolt.cs b/Projectiles/Ranged/SlimeBolt.cs index efe0d6612b..a89ee193a5 100644 --- a/Projectiles/Ranged/SlimeBolt.cs +++ b/Projectiles/Ranged/SlimeBolt.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Ranged { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Main.EntitySpriteDraw(texture, drawPosition, null, SlimeColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Ranged/SpeedBlasterShot.cs b/Projectiles/Ranged/SpeedBlasterShot.cs index d5258593dc..f55c9d7c5d 100644 --- a/Projectiles/Ranged/SpeedBlasterShot.cs +++ b/Projectiles/Ranged/SpeedBlasterShot.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/SporeBomb.cs b/Projectiles/Ranged/SporeBomb.cs index 8bf8a13126..8dce1067ed 100644 --- a/Projectiles/Ranged/SporeBomb.cs +++ b/Projectiles/Ranged/SporeBomb.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/SputterComet.cs b/Projectiles/Ranged/SputterComet.cs index 8a519534ad..c0f6a38eb1 100644 --- a/Projectiles/Ranged/SputterComet.cs +++ b/Projectiles/Ranged/SputterComet.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/SputterCometBig.cs b/Projectiles/Ranged/SputterCometBig.cs index 60555865fe..99391f093e 100644 --- a/Projectiles/Ranged/SputterCometBig.cs +++ b/Projectiles/Ranged/SputterCometBig.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/SpykerProj.cs b/Projectiles/Ranged/SpykerProj.cs index 34ccd4eba6..78994fca75 100644 --- a/Projectiles/Ranged/SpykerProj.cs +++ b/Projectiles/Ranged/SpykerProj.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs b/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs index 13f69b0956..30c4c325b1 100644 --- a/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs +++ b/Projectiles/Ranged/StarmageddonBinaryStarCenter.cs @@ -35,8 +35,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Ranged/StarmageddonHeld.cs b/Projectiles/Ranged/StarmageddonHeld.cs index b19eea0f43..87f3bc97ff 100644 --- a/Projectiles/Ranged/StarmageddonHeld.cs +++ b/Projectiles/Ranged/StarmageddonHeld.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + Main.projFrames[Type] = 8; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 7; bool timeToFire = noStars && Projectile.frame == 7; @@ -155,8 +155,8 @@ namespace CalamityMod.Projectiles.Ranged public override void PostDraw(Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Ranged/StarmageddonStar.cs b/Projectiles/Ranged/StarmageddonStar.cs index fbc18cf57d..4d92d0e560 100644 --- a/Projectiles/Ranged/StarmageddonStar.cs +++ b/Projectiles/Ranged/StarmageddonStar.cs @@ -23,9 +23,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; double deg = Projectile.ai[2]; @@ -164,8 +164,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Ranged/StarmageddonStar2.cs b/Projectiles/Ranged/StarmageddonStar2.cs index d5f6d2b84d..97e5aae436 100644 --- a/Projectiles/Ranged/StarmageddonStar2.cs +++ b/Projectiles/Ranged/StarmageddonStar2.cs @@ -23,9 +23,9 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; double deg = Projectile.ai[2]; @@ -164,8 +164,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Ranged/StormSurgeTornado.cs b/Projectiles/Ranged/StormSurgeTornado.cs index a66d24cc72..80f279f7d5 100644 --- a/Projectiles/Ranged/StormSurgeTornado.cs +++ b/Projectiles/Ranged/StormSurgeTornado.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -53,8 +53,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Ranged/SulphuricBlast.cs b/Projectiles/Ranged/SulphuricBlast.cs index fba65d999f..d75283807b 100644 --- a/Projectiles/Ranged/SulphuricBlast.cs +++ b/Projectiles/Ranged/SulphuricBlast.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Ranged public const int TotalSecondsToStick = 8; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 20; + Main.projFrames[Type] = 20; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Ranged { if (Projectile.FinalExtraUpdate()) Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 4 % Main.projFrames[Type]; Projectile.StickyProjAI(8); Projectile.Opacity = Utils.GetLerpValue(CalamityUtils.SecondsToFrames(TotalSecondsToStick), CalamityUtils.SecondsToFrames(TotalSecondsToStick * 0.5f), Projectile.localAI[0], true); @@ -80,8 +80,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int projFrame = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + 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.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, projFrame)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)projFrame / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Ranged/SuperradiantBolt.cs b/Projectiles/Ranged/SuperradiantBolt.cs index d46167f8d3..2ba1733524 100644 --- a/Projectiles/Ranged/SuperradiantBolt.cs +++ b/Projectiles/Ranged/SuperradiantBolt.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Ranged { GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/FabstaffStreak")); PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 20); - Texture2D glow = TextureAssets.Projectile[Projectile.type].Value; + Texture2D glow = TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); return false; } diff --git a/Projectiles/Ranged/SuperradiantSaw.cs b/Projectiles/Ranged/SuperradiantSaw.cs index 5e43af296a..91b754c63d 100644 --- a/Projectiles/Ranged/SuperradiantSaw.cs +++ b/Projectiles/Ranged/SuperradiantSaw.cs @@ -43,8 +43,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -353,7 +353,7 @@ namespace CalamityMod.Projectiles.Ranged } // Draw the saw itself at full brightness - Texture2D buzzsawTexture = TextureAssets.Projectile[Projectile.type].Value; + Texture2D buzzsawTexture = TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(buzzsawTexture, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, buzzsawTexture.Size() * 0.5f, 1f, SpriteEffects.None); if (Empowered) // Rainbow outline while empowered diff --git a/Projectiles/Ranged/SuperradiantSawLingering.cs b/Projectiles/Ranged/SuperradiantSawLingering.cs index 49529f2016..5687ab125b 100644 --- a/Projectiles/Ranged/SuperradiantSawLingering.cs +++ b/Projectiles/Ranged/SuperradiantSawLingering.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -174,7 +174,7 @@ namespace CalamityMod.Projectiles.Ranged } // Draw the saw itself at full brightness, glow and outline in rainbow - Texture2D buzzsawTexture = TextureAssets.Projectile[Projectile.type].Value; + Texture2D buzzsawTexture = TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(buzzsawTexture, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, buzzsawTexture.Size() * 0.5f, 1f, SpriteEffects.None); SawOutline ??= ModContent.Request("CalamityMod/Projectiles/Ranged/SuperradiantSawOutline"); diff --git a/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs b/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs index 16e78c01b0..02017800c3 100644 --- a/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs +++ b/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() diff --git a/Projectiles/Ranged/TelluricGlareArrow.cs b/Projectiles/Ranged/TelluricGlareArrow.cs index 5cfd0ef4b3..b87de92696 100644 --- a/Projectiles/Ranged/TelluricGlareArrow.cs +++ b/Projectiles/Ranged/TelluricGlareArrow.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { // While this projectile doesn't have afterimages, it keeps track of old positions for its primitive drawcode. - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 21; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 21; } public override void SetDefaults() diff --git a/Projectiles/Ranged/TheHiveHoldout.cs b/Projectiles/Ranged/TheHiveHoldout.cs index a282f52ad9..83cf912bcb 100644 --- a/Projectiles/Ranged/TheHiveHoldout.cs +++ b/Projectiles/Ranged/TheHiveHoldout.cs @@ -245,7 +245,7 @@ namespace CalamityMod.Projectiles.Ranged if (ShootingTimer <= 0) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = Request(GlowTexture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Color drawColor = Projectile.GetAlpha(lightColor); diff --git a/Projectiles/Ranged/TheMaelstromExplosion.cs b/Projectiles/Ranged/TheMaelstromExplosion.cs index 77bc361ffb..d4c0e99c0c 100644 --- a/Projectiles/Ranged/TheMaelstromExplosion.cs +++ b/Projectiles/Ranged/TheMaelstromExplosion.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 75; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 75; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; float scale = Projectile.scale * Projectile.width / texture.Width; diff --git a/Projectiles/Ranged/TheMaelstromShark.cs b/Projectiles/Ranged/TheMaelstromShark.cs index 2af536ec39..56ba605ef4 100644 --- a/Projectiles/Ranged/TheMaelstromShark.cs +++ b/Projectiles/Ranged/TheMaelstromShark.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Projectile.rotation = Projectile.velocity.ToRotation(); Projectile.spriteDirection = (Math.Cos(Projectile.rotation) > 0f).ToDirectionInt(); @@ -91,8 +91,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Ranged/ThePackMinissile.cs b/Projectiles/Ranged/ThePackMinissile.cs index b595b2bb01..7044b1bbb1 100644 --- a/Projectiles/Ranged/ThePackMinissile.cs +++ b/Projectiles/Ranged/ThePackMinissile.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Ranged/ThePackMissile.cs b/Projectiles/Ranged/ThePackMissile.cs index 8257904285..6d16b07aaf 100644 --- a/Projectiles/Ranged/ThePackMissile.cs +++ b/Projectiles/Ranged/ThePackMissile.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Ranged/TitaniumRailgunScope.cs b/Projectiles/Ranged/TitaniumRailgunScope.cs index 9d79448e35..d064c083d1 100644 --- a/Projectiles/Ranged/TitaniumRailgunScope.cs +++ b/Projectiles/Ranged/TitaniumRailgunScope.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Projectiles.Ranged // Converge the sights float spread = (1f - ChargePercent) * MaxSightAngle; float halfAngle = spread / 2f; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color sightsColor = Color.Lerp(Color.LightBlue, Color.Crimson, ChargePercent); diff --git a/Projectiles/Ranged/TyphoonBubble.cs b/Projectiles/Ranged/TyphoonBubble.cs index 85307684f9..c0915367a7 100644 --- a/Projectiles/Ranged/TyphoonBubble.cs +++ b/Projectiles/Ranged/TyphoonBubble.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Ranged/UltimaBolt.cs b/Projectiles/Ranged/UltimaBolt.cs index 588d3b154c..2c321b7ad7 100644 --- a/Projectiles/Ranged/UltimaBolt.cs +++ b/Projectiles/Ranged/UltimaBolt.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Ranged public const int MaxBounces = 1; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; } public override void SetDefaults() @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { if (i > 0) diff --git a/Projectiles/Ranged/UniversalGenesisStar.cs b/Projectiles/Ranged/UniversalGenesisStar.cs index 5f3a7af876..25b8a78224 100644 --- a/Projectiles/Ranged/UniversalGenesisStar.cs +++ b/Projectiles/Ranged/UniversalGenesisStar.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DrawStarTrail(Color.Blue, Color.White); //Draw the actual projectile - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Ranged/UniversalGenesisStarcaller.cs b/Projectiles/Ranged/UniversalGenesisStarcaller.cs index 2c95e6bdeb..86c3d946d9 100644 --- a/Projectiles/Ranged/UniversalGenesisStarcaller.cs +++ b/Projectiles/Ranged/UniversalGenesisStarcaller.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Ranged/VanquisherArrowProj.cs b/Projectiles/Ranged/VanquisherArrowProj.cs index 7f2542ddaa..b0c39fb9b8 100644 --- a/Projectiles/Ranged/VanquisherArrowProj.cs +++ b/Projectiles/Ranged/VanquisherArrowProj.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged public override void PostDraw(Color lightColor) { Color color = Color.White; - Rectangle frame = new Rectangle(0, 0, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Width, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height); + Rectangle frame = new Rectangle(0, 0, Terraria.GameContent.TextureAssets.Projectile[Type].Value.Width, Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height); Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Ammo/VanquisherArrowGlow").Value, Projectile.Center - Main.screenPosition, frame, color, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); } @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Ranged { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/StarProj").Value; if (Time > 6) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], MainColor * 0.3f, 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], MainColor * 0.3f, 1, texture); return true; } } diff --git a/Projectiles/Ranged/VeriumBoltProj.cs b/Projectiles/Ranged/VeriumBoltProj.cs index 229b93e41e..3c62464ca2 100644 --- a/Projectiles/Ranged/VeriumBoltProj.cs +++ b/Projectiles/Ranged/VeriumBoltProj.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Items/Ammo/VeriumBolt"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Ranged/Voidragon.cs b/Projectiles/Ranged/Voidragon.cs index 950f54cd19..558e564049 100644 --- a/Projectiles/Ranged/Voidragon.cs +++ b/Projectiles/Ranged/Voidragon.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Ranged/WaterSpout.cs b/Projectiles/Ranged/WaterSpout.cs index fd74bc6e11..b46c5fb43a 100644 --- a/Projectiles/Ranged/WaterSpout.cs +++ b/Projectiles/Ranged/WaterSpout.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -112,8 +112,8 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Ranged/WildfireBloomFlare.cs b/Projectiles/Ranged/WildfireBloomFlare.cs index 2cbe955247..f21d9f5d93 100644 --- a/Projectiles/Ranged/WildfireBloomFlare.cs +++ b/Projectiles/Ranged/WildfireBloomFlare.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 18; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 18; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { - Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D lightTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; diff --git a/Projectiles/Ranged/WulfrumScrapBullet.cs b/Projectiles/Ranged/WulfrumScrapBullet.cs index 09cfa52d89..908adae75c 100644 --- a/Projectiles/Ranged/WulfrumScrapBullet.cs +++ b/Projectiles/Ranged/WulfrumScrapBullet.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Projectiles/Rogue/AbyssalMirrorProjectile.cs b/Projectiles/Rogue/AbyssalMirrorProjectile.cs index b08dea9d1e..514bdfd82d 100644 --- a/Projectiles/Rogue/AbyssalMirrorProjectile.cs +++ b/Projectiles/Rogue/AbyssalMirrorProjectile.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Rogue/AcidBarrelDrop.cs b/Projectiles/Rogue/AcidBarrelDrop.cs index 0591f2951a..d635b81c3f 100644 --- a/Projectiles/Rogue/AcidBarrelDrop.cs +++ b/Projectiles/Rogue/AcidBarrelDrop.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(255, 255, 255, 127), 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(255, 255, 255, 127), 2); return false; } } diff --git a/Projectiles/Rogue/AcidShrapnel.cs b/Projectiles/Rogue/AcidShrapnel.cs index 4feb1b9207..8797e58c73 100644 --- a/Projectiles/Rogue/AcidShrapnel.cs +++ b/Projectiles/Rogue/AcidShrapnel.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Rogue public bool HitTile = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs index 39a07ff343..755047ab3a 100644 --- a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs +++ b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/ApoctolithProj.cs b/Projectiles/Rogue/ApoctolithProj.cs index 873ba49c82..6952d4915d 100644 --- a/Projectiles/Rogue/ApoctolithProj.cs +++ b/Projectiles/Rogue/ApoctolithProj.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -206,7 +206,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(32f, 33f); Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Rogue/ApoctolithShard.cs b/Projectiles/Rogue/ApoctolithShard.cs index 71b80be562..7255ff54fb 100644 --- a/Projectiles/Rogue/ApoctolithShard.cs +++ b/Projectiles/Rogue/ApoctolithShard.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Rogue/AshenStalactiteDebris.cs b/Projectiles/Rogue/AshenStalactiteDebris.cs index 2d3f21e080..45e2583878 100644 --- a/Projectiles/Rogue/AshenStalactiteDebris.cs +++ b/Projectiles/Rogue/AshenStalactiteDebris.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/AshenStalactiteProj.cs b/Projectiles/Rogue/AshenStalactiteProj.cs index b0baa5e4f5..f0e3046f7a 100644 --- a/Projectiles/Rogue/AshenStalactiteProj.cs +++ b/Projectiles/Rogue/AshenStalactiteProj.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/AshenStalagmiteProj.cs b/Projectiles/Rogue/AshenStalagmiteProj.cs index 2802db70f0..d6df8cb06e 100644 --- a/Projectiles/Rogue/AshenStalagmiteProj.cs +++ b/Projectiles/Rogue/AshenStalagmiteProj.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/AuroradicalSplitter.cs b/Projectiles/Rogue/AuroradicalSplitter.cs index 40d0ea5715..519b63f719 100644 --- a/Projectiles/Rogue/AuroradicalSplitter.cs +++ b/Projectiles/Rogue/AuroradicalSplitter.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/AuroradicalStar.cs b/Projectiles/Rogue/AuroradicalStar.cs index 850672aa0d..2d471c304d 100644 --- a/Projectiles/Rogue/AuroradicalStar.cs +++ b/Projectiles/Rogue/AuroradicalStar.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/BallisticPoisonCloud.cs b/Projectiles/Rogue/BallisticPoisonCloud.cs index f6255437fe..efd74924e6 100644 --- a/Projectiles/Rogue/BallisticPoisonCloud.cs +++ b/Projectiles/Rogue/BallisticPoisonCloud.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame = 0; } } - else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } diff --git a/Projectiles/Rogue/BarrelShrapnel.cs b/Projectiles/Rogue/BarrelShrapnel.cs index 28f65cdfae..b753bc41b3 100644 --- a/Projectiles/Rogue/BarrelShrapnel.cs +++ b/Projectiles/Rogue/BarrelShrapnel.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public bool hitTile = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index 390b2f5ba3..50ebbd1133 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Rogue public bool CollideX => Projectile.oldPosition.X == Projectile.position.X; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -96,7 +96,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool OnTileCollide(Vector2 oldVelocity) => false; public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/BlazingStarProj.cs b/Projectiles/Rogue/BlazingStarProj.cs index acbeb72bc4..79ce3bb0d0 100644 --- a/Projectiles/Rogue/BlazingStarProj.cs +++ b/Projectiles/Rogue/BlazingStarProj.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/BloodsoakedCrashax.cs b/Projectiles/Rogue/BloodsoakedCrashax.cs index 276796b634..3b6fe23afb 100644 --- a/Projectiles/Rogue/BloodsoakedCrashax.cs +++ b/Projectiles/Rogue/BloodsoakedCrashax.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) //afterimages { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/BlueFlamePillar.cs b/Projectiles/Rogue/BlueFlamePillar.cs index 4f97fc008e..414069dc13 100644 --- a/Projectiles/Rogue/BlueFlamePillar.cs +++ b/Projectiles/Rogue/BlueFlamePillar.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = new Rectangle(frameX * 80, frameY * 322, 80, 322); Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Rogue/BlunderBoosterLightning.cs b/Projectiles/Rogue/BlunderBoosterLightning.cs index ee80f8c99b..29bd9d4098 100644 --- a/Projectiles/Rogue/BlunderBoosterLightning.cs +++ b/Projectiles/Rogue/BlunderBoosterLightning.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Rogue/BouncingEyeballProjectile.cs b/Projectiles/Rogue/BouncingEyeballProjectile.cs index 22eaba59ad..00510d890d 100644 --- a/Projectiles/Rogue/BouncingEyeballProjectile.cs +++ b/Projectiles/Rogue/BouncingEyeballProjectile.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue private int Bounces = 5; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs b/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs index c8bd1fc82f..923fcfb63d 100644 --- a/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs +++ b/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/ButcherKnife.cs b/Projectiles/Rogue/ButcherKnife.cs index 3cf2ecce4f..444921731e 100644 --- a/Projectiles/Rogue/ButcherKnife.cs +++ b/Projectiles/Rogue/ButcherKnife.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/CarvingFork.cs b/Projectiles/Rogue/CarvingFork.cs index 6a4d2fb686..4a997ecf91 100644 --- a/Projectiles/Rogue/CarvingFork.cs +++ b/Projectiles/Rogue/CarvingFork.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/CelestusMiniScythe.cs b/Projectiles/Rogue/CelestusMiniScythe.cs index 87e4349b9b..cb561bc9cd 100644 --- a/Projectiles/Rogue/CelestusMiniScythe.cs +++ b/Projectiles/Rogue/CelestusMiniScythe.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/CelestusProj.cs b/Projectiles/Rogue/CelestusProj.cs index 4b226f24f5..3ff5f325cb 100644 --- a/Projectiles/Rogue/CelestusProj.cs +++ b/Projectiles/Rogue/CelestusProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/CinquedeaProj.cs b/Projectiles/Rogue/CinquedeaProj.cs index 5528b5bf67..1ba199ca9b 100644 --- a/Projectiles/Rogue/CinquedeaProj.cs +++ b/Projectiles/Rogue/CinquedeaProj.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Rogue/CircletMark.cs b/Projectiles/Rogue/CircletMark.cs index d3d27dd67c..1222796e47 100644 --- a/Projectiles/Rogue/CircletMark.cs +++ b/Projectiles/Rogue/CircletMark.cs @@ -145,8 +145,8 @@ namespace CalamityMod.Projectiles.Rogue spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 drawPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangle = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangle = texture2D27.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color alphaColor = Projectile.GetAlpha(originalColor); Vector2 origin7 = rectangle.Size() / 2f; Color sandyColor = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Rogue/CircletTornado.cs b/Projectiles/Rogue/CircletTornado.cs index 083ef42cd3..8ea5f2ff63 100644 --- a/Projectiles/Rogue/CircletTornado.cs +++ b/Projectiles/Rogue/CircletTornado.cs @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 sizeModdingPos = new Vector2(0f, sizeModdingVector2.Y - sizeModdingVector.Y); sizeModdingPos.X = sizeModdingPos.Y * vectorMult; new Vector2(sizeModdingVector.X - sizeModdingPos.X / 2f, sizeModdingVector.Y); - Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle drawRectangle = texture2D23.Frame(1, 1, 0, 0); Vector2 smallRect = drawRectangle.Size() / 2f; float aiTrackMult = -0.06283186f * aiTracker; diff --git a/Projectiles/Rogue/CobaltEnergy.cs b/Projectiles/Rogue/CobaltEnergy.cs index 1f74e418a9..0bfb8cffe7 100644 --- a/Projectiles/Rogue/CobaltEnergy.cs +++ b/Projectiles/Rogue/CobaltEnergy.cs @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/CobaltKunaiProjectile.cs b/Projectiles/Rogue/CobaltKunaiProjectile.cs index 6113862dfa..ed004b2435 100644 --- a/Projectiles/Rogue/CobaltKunaiProjectile.cs +++ b/Projectiles/Rogue/CobaltKunaiProjectile.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/CorpusAvertorClone.cs b/Projectiles/Rogue/CorpusAvertorClone.cs index 680dfd30d1..740a9c4f82 100644 --- a/Projectiles/Rogue/CorpusAvertorClone.cs +++ b/Projectiles/Rogue/CorpusAvertorClone.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/CorpusAvertorProj.cs b/Projectiles/Rogue/CorpusAvertorProj.cs index f0411b6978..a16cb344c3 100644 --- a/Projectiles/Rogue/CorpusAvertorProj.cs +++ b/Projectiles/Rogue/CorpusAvertorProj.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/CorpusAvertorStealth.cs b/Projectiles/Rogue/CorpusAvertorStealth.cs index 57c49b9897..ab2d5f309a 100644 --- a/Projectiles/Rogue/CorpusAvertorStealth.cs +++ b/Projectiles/Rogue/CorpusAvertorStealth.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/Corrocloud1.cs b/Projectiles/Rogue/Corrocloud1.cs index 206005a920..1a277ec5db 100644 --- a/Projectiles/Rogue/Corrocloud1.cs +++ b/Projectiles/Rogue/Corrocloud1.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() diff --git a/Projectiles/Rogue/Corrocloud2.cs b/Projectiles/Rogue/Corrocloud2.cs index 67711f3448..32115a9cf5 100644 --- a/Projectiles/Rogue/Corrocloud2.cs +++ b/Projectiles/Rogue/Corrocloud2.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() diff --git a/Projectiles/Rogue/Corrocloud3.cs b/Projectiles/Rogue/Corrocloud3.cs index 720440764a..06fa8761d7 100644 --- a/Projectiles/Rogue/Corrocloud3.cs +++ b/Projectiles/Rogue/Corrocloud3.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() diff --git a/Projectiles/Rogue/CosmicScythe.cs b/Projectiles/Rogue/CosmicScythe.cs index 994cff3517..10c8612d1e 100644 --- a/Projectiles/Rogue/CosmicScythe.cs +++ b/Projectiles/Rogue/CosmicScythe.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/Crushax.cs b/Projectiles/Rogue/Crushax.cs index efebdce745..b0a1f1e7fa 100644 --- a/Projectiles/Rogue/Crushax.cs +++ b/Projectiles/Rogue/Crushax.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 0e52f58ddb..61cb9505f0 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/Crystalline2.cs b/Projectiles/Rogue/Crystalline2.cs index f14f4858d9..0401358dc1 100644 --- a/Projectiles/Rogue/Crystalline2.cs +++ b/Projectiles/Rogue/Crystalline2.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.timeLeft == (Projectile.ai[1] == 2f ? 20 : 30)) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/CrystallineProj.cs b/Projectiles/Rogue/CrystallineProj.cs index 7ff1767715..237e3bb6f0 100644 --- a/Projectiles/Rogue/CrystallineProj.cs +++ b/Projectiles/Rogue/CrystallineProj.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/CursedDaggerProj.cs b/Projectiles/Rogue/CursedDaggerProj.cs index 90127ca24c..9c71695011 100644 --- a/Projectiles/Rogue/CursedDaggerProj.cs +++ b/Projectiles/Rogue/CursedDaggerProj.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/DeepWounderProjectile.cs b/Projectiles/Rogue/DeepWounderProjectile.cs index 3cbadfac87..eccc24db80 100644 --- a/Projectiles/Rogue/DeepWounderProjectile.cs +++ b/Projectiles/Rogue/DeepWounderProjectile.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.direction > 0) { Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Rogue/DeepWounderWater.cs b/Projectiles/Rogue/DeepWounderWater.cs index e9cf620e03..d6dcd18c22 100644 --- a/Projectiles/Rogue/DeepWounderWater.cs +++ b/Projectiles/Rogue/DeepWounderWater.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/DesecratedWaterProj.cs b/Projectiles/Rogue/DesecratedWaterProj.cs index f38e07224b..3f8cab8c40 100644 --- a/Projectiles/Rogue/DesecratedWaterProj.cs +++ b/Projectiles/Rogue/DesecratedWaterProj.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/DestructionBolt.cs b/Projectiles/Rogue/DestructionBolt.cs index a6aa89de0b..1138898d74 100644 --- a/Projectiles/Rogue/DestructionBolt.cs +++ b/Projectiles/Rogue/DestructionBolt.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Asset tex2 = ModContent.Request("CalamityMod/Projectiles/Rogue/DestructionBoltGhost"); Asset tex3 = ModContent.Request("CalamityMod/Particles/BloomCircle"); float fading = Utils.GetLerpValue(180, 90, time, true); diff --git a/Projectiles/Rogue/DragonScalesInfernado.cs b/Projectiles/Rogue/DragonScalesInfernado.cs index a2d7cfb451..f30b9462d4 100644 --- a/Projectiles/Rogue/DragonScalesInfernado.cs +++ b/Projectiles/Rogue/DragonScalesInfernado.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Rogue bool intersectingSomething = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; + Main.projFrames[Type] = 12; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -146,8 +146,8 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameDraw = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameDraw = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = frameDraw * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, frameDraw)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)frameDraw / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Rogue/DragonShit.cs b/Projectiles/Rogue/DragonShit.cs index 2f0cbb809e..3946698d41 100644 --- a/Projectiles/Rogue/DragonShit.cs +++ b/Projectiles/Rogue/DragonShit.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; if (Projectile.timeLeft >= 420) @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue { int cap = 5; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } @@ -82,8 +82,8 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D projectileTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D projectileTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Main.spriteBatch.Draw(projectileTexture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, projectileTexture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)projectileTexture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Rogue/DukesDecapitatorProj.cs b/Projectiles/Rogue/DukesDecapitatorProj.cs index f6684198f6..35b995769f 100644 --- a/Projectiles/Rogue/DukesDecapitatorProj.cs +++ b/Projectiles/Rogue/DukesDecapitatorProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Items/Weapons/Rogue/DukesDecapitator"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/DuststormCloud.cs b/Projectiles/Rogue/DuststormCloud.cs index 394602c8c5..be9d2ec200 100644 --- a/Projectiles/Rogue/DuststormCloud.cs +++ b/Projectiles/Rogue/DuststormCloud.cs @@ -5,7 +5,7 @@ namespace CalamityMod.Projectiles.Rogue public class DuststormCloud : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetStaticDefaults() => Main.projFrames[Projectile.type] = 4; + public override void SetStaticDefaults() => Main.projFrames[Type] = 4; public override void SetDefaults() { @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Rogue/DynamicPursuerElectricity.cs b/Projectiles/Rogue/DynamicPursuerElectricity.cs index 1e79b95400..9e44160aad 100644 --- a/Projectiles/Rogue/DynamicPursuerElectricity.cs +++ b/Projectiles/Rogue/DynamicPursuerElectricity.cs @@ -27,9 +27,9 @@ namespace CalamityMod.Projectiles.Rogue }*/ public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 50; + ProjectileID.Sets.TrailCacheLength[Type] = 50; ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() { diff --git a/Projectiles/Rogue/DynamicPursuerProjectile.cs b/Projectiles/Rogue/DynamicPursuerProjectile.cs index d12823defd..132302e852 100644 --- a/Projectiles/Rogue/DynamicPursuerProjectile.cs +++ b/Projectiles/Rogue/DynamicPursuerProjectile.cs @@ -48,8 +48,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -289,8 +289,8 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, ProjectileID.Sets.TrailCacheLength[Projectile.type]); - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, ProjectileID.Sets.TrailCacheLength[Type]); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowmaskTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/DynamicPursuerProjectileGlowmask").Value; Rectangle glowmaskRectangle = glowmaskTexture.Frame(1, 9, 0, glowmaskFrame); Vector2 origin = glowmaskRectangle.Size() / 2f; diff --git a/Projectiles/Rogue/EclipseMirrorBurst.cs b/Projectiles/Rogue/EclipseMirrorBurst.cs index 9076e35af0..e378a547f9 100644 --- a/Projectiles/Rogue/EclipseMirrorBurst.cs +++ b/Projectiles/Rogue/EclipseMirrorBurst.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.spriteBatch.Draw ( texture, diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs index f6e5558869..f9831d85bc 100644 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ b/Projectiles/Rogue/EclipsesSmol.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); return false; } diff --git a/Projectiles/Rogue/EnchantedAxe2.cs b/Projectiles/Rogue/EnchantedAxe2.cs index db675587c8..201416cdb1 100644 --- a/Projectiles/Rogue/EnchantedAxe2.cs +++ b/Projectiles/Rogue/EnchantedAxe2.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, new Color(192, 192, 255, 128), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/EnchantedAxeProj.cs b/Projectiles/Rogue/EnchantedAxeProj.cs index 08c006a756..ff859e9c29 100644 --- a/Projectiles/Rogue/EnchantedAxeProj.cs +++ b/Projectiles/Rogue/EnchantedAxeProj.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -121,9 +121,9 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/EquanimityProj.cs b/Projectiles/Rogue/EquanimityProj.cs index 9d06b322be..4c62672278 100644 --- a/Projectiles/Rogue/EquanimityProj.cs +++ b/Projectiles/Rogue/EquanimityProj.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 3); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 3); return false; } diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/EradicatorProjectile.cs index 6ae62597b9..6c32ebf15d 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/EradicatorProjectile.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -227,7 +227,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Rogue/ExecutionersBladeProj.cs b/Projectiles/Rogue/ExecutionersBladeProj.cs index 7ce21a95ba..ae1c6226d1 100644 --- a/Projectiles/Rogue/ExecutionersBladeProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeProj.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/ExecutionersBladeStealthProj.cs b/Projectiles/Rogue/ExecutionersBladeStealthProj.cs index 40b244acc3..7eca83fe91 100644 --- a/Projectiles/Rogue/ExecutionersBladeStealthProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeStealthProj.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/ExorcismProj.cs b/Projectiles/Rogue/ExorcismProj.cs index 79b74887d0..6757dae3cb 100644 --- a/Projectiles/Rogue/ExorcismProj.cs +++ b/Projectiles/Rogue/ExorcismProj.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/ExorcismStar.cs b/Projectiles/Rogue/ExorcismStar.cs index 9c31376c1d..81f3637e11 100644 --- a/Projectiles/Rogue/ExorcismStar.cs +++ b/Projectiles/Rogue/ExorcismStar.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Projectile.DrawStarTrail(Color.DarkGoldenrod, Color.Gold); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/FantasyTalismanProj.cs b/Projectiles/Rogue/FantasyTalismanProj.cs index f9c734ca63..8af3ec9732 100644 --- a/Projectiles/Rogue/FantasyTalismanProj.cs +++ b/Projectiles/Rogue/FantasyTalismanProj.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Rogue/FantasyTalismanStealth.cs b/Projectiles/Rogue/FantasyTalismanStealth.cs index 25d6cbf1f7..bdc7db0f27 100644 --- a/Projectiles/Rogue/FantasyTalismanStealth.cs +++ b/Projectiles/Rogue/FantasyTalismanStealth.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index 8fc80ea665..1c454320dd 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/FinalDawnFireSlash.cs b/Projectiles/Rogue/FinalDawnFireSlash.cs index 77e2e24401..bfd59add8c 100644 --- a/Projectiles/Rogue/FinalDawnFireSlash.cs +++ b/Projectiles/Rogue/FinalDawnFireSlash.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Rogue public static float StealthReturnRatio = 0.40f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 11; + Main.projFrames[Type] = 11; } public override void SetDefaults() { @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 drawCenter = Projectile.Center; Rectangle frameRectangle = new Rectangle(Projectile.frame / 5 * width, Projectile.frame % 5 * height, width, height); - Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnFireSlash_Glow").Value; Main.spriteBatch.Draw(scytheTexture, diff --git a/Projectiles/Rogue/FinalDawnFireball.cs b/Projectiles/Rogue/FinalDawnFireball.cs index 1071ebfb2e..58ca9578a5 100644 --- a/Projectiles/Rogue/FinalDawnFireball.cs +++ b/Projectiles/Rogue/FinalDawnFireball.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Rogue public const float InterpolationTime = 10; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.frame++; Projectile.frameCounter = 0; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; } } @@ -71,8 +71,8 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D glowmask = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D glowmask = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(glowmask, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), diff --git a/Projectiles/Rogue/FinalDawnFlame.cs b/Projectiles/Rogue/FinalDawnFlame.cs index 60789f2f1f..d45cb79e75 100644 --- a/Projectiles/Rogue/FinalDawnFlame.cs +++ b/Projectiles/Rogue/FinalDawnFlame.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue public const int TotalFlames = 120; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } public override void SetDefaults() { @@ -59,8 +59,8 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; if (Flames.Length > 0) diff --git a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs index e41cb19294..1f03f7c82b 100644 --- a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs +++ b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 9; + Main.projFrames[Type] = 9; } public override void SetDefaults() { @@ -72,9 +72,9 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D scytheGlowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnHorizontalSlash_Glow").Value; - int height = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + int height = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(scytheTexture, Projectile.Center - Main.screenPosition + Projectile.gfxOffY * Vector2.UnitY, diff --git a/Projectiles/Rogue/FinalDawnProjectile.cs b/Projectiles/Rogue/FinalDawnProjectile.cs index d6c0d2e372..1678c054c7 100644 --- a/Projectiles/Rogue/FinalDawnProjectile.cs +++ b/Projectiles/Rogue/FinalDawnProjectile.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Rogue public const float MaxChargeTime = 20f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() { @@ -156,9 +156,9 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnProjectile_Glow").Value; - int height = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + int height = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(scytheTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, diff --git a/Projectiles/Rogue/FinalDawnReticle.cs b/Projectiles/Rogue/FinalDawnReticle.cs index 19001e5563..3e1f091290 100644 --- a/Projectiles/Rogue/FinalDawnReticle.cs +++ b/Projectiles/Rogue/FinalDawnReticle.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D ring = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D ring = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D symbol = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnReticleSymbol").Value; Main.EntitySpriteDraw(symbol, Projectile.Center - Main.screenPosition, diff --git a/Projectiles/Rogue/FinalDawnThrow.cs b/Projectiles/Rogue/FinalDawnThrow.cs index 273f8d58d7..b5743c9437 100644 --- a/Projectiles/Rogue/FinalDawnThrow.cs +++ b/Projectiles/Rogue/FinalDawnThrow.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public const float InterpolationTime = 15; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() { @@ -70,9 +70,9 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D scytheGlowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnThrow_Glow").Value; - int height = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + int height = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(scytheTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, diff --git a/Projectiles/Rogue/FinalDawnThrow2.cs b/Projectiles/Rogue/FinalDawnThrow2.cs index 71e5979a8f..7038aeda7c 100644 --- a/Projectiles/Rogue/FinalDawnThrow2.cs +++ b/Projectiles/Rogue/FinalDawnThrow2.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue bool HasHitEnemy = false; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() { @@ -115,9 +115,9 @@ namespace CalamityMod.Projectiles.Rogue Player player = Main.player[Projectile.owner]; float scytheRotation = player.fullRotation; - Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D scytheTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowScytheTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnThrow2_Glow").Value; - int num214 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + int num214 = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Vector2 origin = new Vector2(scytheTexture.Width / 2f + 40f * player.direction, num214 * 1.1f); diff --git a/Projectiles/Rogue/FishboneBoomerangProjectile.cs b/Projectiles/Rogue/FishboneBoomerangProjectile.cs index f15ed5da4d..47f1d6eae8 100644 --- a/Projectiles/Rogue/FishboneBoomerangProjectile.cs +++ b/Projectiles/Rogue/FishboneBoomerangProjectile.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Rogue/Fork.cs b/Projectiles/Rogue/Fork.cs index 3a621e5fa9..7467556d56 100644 --- a/Projectiles/Rogue/Fork.cs +++ b/Projectiles/Rogue/Fork.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/FrostShardFriendly.cs b/Projectiles/Rogue/FrostShardFriendly.cs index 5f166e6d70..fe9ca6f148 100644 --- a/Projectiles/Rogue/FrostShardFriendly.cs +++ b/Projectiles/Rogue/FrostShardFriendly.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void AI() diff --git a/Projectiles/Rogue/GelDartProjectile.cs b/Projectiles/Rogue/GelDartProjectile.cs index 2a7639c289..79f2a0b1fb 100644 --- a/Projectiles/Rogue/GelDartProjectile.cs +++ b/Projectiles/Rogue/GelDartProjectile.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/GhoulishGougerBoomerang.cs b/Projectiles/Rogue/GhoulishGougerBoomerang.cs index 850823fa0c..ffb1af702c 100644 --- a/Projectiles/Rogue/GhoulishGougerBoomerang.cs +++ b/Projectiles/Rogue/GhoulishGougerBoomerang.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/GildedDaggerProj.cs b/Projectiles/Rogue/GildedDaggerProj.cs index 5d1d4d48f2..bafb14937a 100644 --- a/Projectiles/Rogue/GildedDaggerProj.cs +++ b/Projectiles/Rogue/GildedDaggerProj.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/GlaiveProj.cs b/Projectiles/Rogue/GlaiveProj.cs index ef3c88a0a6..5ba3bdc63f 100644 --- a/Projectiles/Rogue/GlaiveProj.cs +++ b/Projectiles/Rogue/GlaiveProj.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -118,7 +118,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/GleamingDaggerProj.cs b/Projectiles/Rogue/GleamingDaggerProj.cs index 99c742ee71..2adb2139bb 100644 --- a/Projectiles/Rogue/GleamingDaggerProj.cs +++ b/Projectiles/Rogue/GleamingDaggerProj.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/GodsParanoiaDart.cs b/Projectiles/Rogue/GodsParanoiaDart.cs index 5313f73144..16caa8444d 100644 --- a/Projectiles/Rogue/GodsParanoiaDart.cs +++ b/Projectiles/Rogue/GodsParanoiaDart.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft > 595) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/GodsParanoiaProj.cs b/Projectiles/Rogue/GodsParanoiaProj.cs index 5bf12b95e5..3a6c251b5b 100644 --- a/Projectiles/Rogue/GodsParanoiaProj.cs +++ b/Projectiles/Rogue/GodsParanoiaProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/GraveGrimreaverProjectile.cs b/Projectiles/Rogue/GraveGrimreaverProjectile.cs index fec13ec0b2..2d405329bb 100644 --- a/Projectiles/Rogue/GraveGrimreaverProjectile.cs +++ b/Projectiles/Rogue/GraveGrimreaverProjectile.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/GreenDonkeyKongReference.cs b/Projectiles/Rogue/GreenDonkeyKongReference.cs index 1b8e63e9dd..fce9c945f1 100644 --- a/Projectiles/Rogue/GreenDonkeyKongReference.cs +++ b/Projectiles/Rogue/GreenDonkeyKongReference.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/GrimreaverBat.cs b/Projectiles/Rogue/GrimreaverBat.cs index 2577bb628c..035f912300 100644 --- a/Projectiles/Rogue/GrimreaverBat.cs +++ b/Projectiles/Rogue/GrimreaverBat.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); diff --git a/Projectiles/Rogue/GrimreaverSkull.cs b/Projectiles/Rogue/GrimreaverSkull.cs index b52d7d6c4b..36f83f8a40 100644 --- a/Projectiles/Rogue/GrimreaverSkull.cs +++ b/Projectiles/Rogue/GrimreaverSkull.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs index 2916cc6b65..aa6704c88a 100644 --- a/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs +++ b/Projectiles/Rogue/HeavenfallenStardiskBoomerang.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -167,7 +167,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index 307c85c0b0..fa275b5ea9 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index 7e2cecaddf..bdedfa919b 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/HypothermiaShard.cs b/Projectiles/Rogue/HypothermiaShard.cs index 343c1c80c2..054cdff67c 100644 --- a/Projectiles/Rogue/HypothermiaShard.cs +++ b/Projectiles/Rogue/HypothermiaShard.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { //Changes the texture of the projectile - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == 1f) { texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard2").Value; diff --git a/Projectiles/Rogue/IcebreakerHammer.cs b/Projectiles/Rogue/IcebreakerHammer.cs index d040baf46a..3ab30014a9 100644 --- a/Projectiles/Rogue/IcebreakerHammer.cs +++ b/Projectiles/Rogue/IcebreakerHammer.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/IchorSpearProj.cs b/Projectiles/Rogue/IchorSpearProj.cs index c61396d01c..8829f4d7e7 100644 --- a/Projectiles/Rogue/IchorSpearProj.cs +++ b/Projectiles/Rogue/IchorSpearProj.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/InfernalKrisCinder.cs b/Projectiles/Rogue/InfernalKrisCinder.cs index 237bfae602..648d864ded 100644 --- a/Projectiles/Rogue/InfernalKrisCinder.cs +++ b/Projectiles/Rogue/InfernalKrisCinder.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue { // If this is a stealth strike, make the blade glow orange Color glowColour = new Color(255, 215, 100, 100); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, glowColour, Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); float minScale = 1.9f; diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index 66c7e17204..60d4e259a8 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Rogue { // If this is a stealth strike, make the blade glow orange Color glowColour = new Color(255, 215, 100, 100); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], glowColour, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], glowColour, 1); float minScale = 1.9f; float maxScale = 2.5f; @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Rogue } else { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); } return false; } diff --git a/Projectiles/Rogue/InfestedClawmerangProj.cs b/Projectiles/Rogue/InfestedClawmerangProj.cs index 13a9af0825..ab0c7314d9 100644 --- a/Projectiles/Rogue/InfestedClawmerangProj.cs +++ b/Projectiles/Rogue/InfestedClawmerangProj.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/IronFranciscaProj.cs b/Projectiles/Rogue/IronFranciscaProj.cs index 92520b56eb..6352c68223 100644 --- a/Projectiles/Rogue/IronFranciscaProj.cs +++ b/Projectiles/Rogue/IronFranciscaProj.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/JawsProjectile.cs b/Projectiles/Rogue/JawsProjectile.cs index 73a0ad5587..897081520a 100644 --- a/Projectiles/Rogue/JawsProjectile.cs +++ b/Projectiles/Rogue/JawsProjectile.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/KelvinCatalystBoomerang.cs b/Projectiles/Rogue/KelvinCatalystBoomerang.cs index 6a2f3827e0..db15c7a74b 100644 --- a/Projectiles/Rogue/KelvinCatalystBoomerang.cs +++ b/Projectiles/Rogue/KelvinCatalystBoomerang.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -188,7 +188,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/Knife.cs b/Projectiles/Rogue/Knife.cs index 32e6c36e8d..31f3c1cf9b 100644 --- a/Projectiles/Rogue/Knife.cs +++ b/Projectiles/Rogue/Knife.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/LanceofDestiny.cs b/Projectiles/Rogue/LanceofDestiny.cs index 49ec34f37a..60d06ad8ae 100644 --- a/Projectiles/Rogue/LanceofDestiny.cs +++ b/Projectiles/Rogue/LanceofDestiny.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/LeadTomahawkProj.cs b/Projectiles/Rogue/LeadTomahawkProj.cs index d2a961382c..714492858c 100644 --- a/Projectiles/Rogue/LeadTomahawkProj.cs +++ b/Projectiles/Rogue/LeadTomahawkProj.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/LeonidCometBig.cs b/Projectiles/Rogue/LeonidCometBig.cs index d797ae04f1..0491cc876c 100644 --- a/Projectiles/Rogue/LeonidCometBig.cs +++ b/Projectiles/Rogue/LeonidCometBig.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1); return false; } diff --git a/Projectiles/Rogue/LeonidCometSmall.cs b/Projectiles/Rogue/LeonidCometSmall.cs index 9714deddb6..9bcf7cc54e 100644 --- a/Projectiles/Rogue/LeonidCometSmall.cs +++ b/Projectiles/Rogue/LeonidCometSmall.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/LeonidProgenitorBombshell.cs b/Projectiles/Rogue/LeonidProgenitorBombshell.cs index 1eedb2ca47..8ecefdb0c6 100644 --- a/Projectiles/Rogue/LeonidProgenitorBombshell.cs +++ b/Projectiles/Rogue/LeonidProgenitorBombshell.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/LeviathanTooth.cs b/Projectiles/Rogue/LeviathanTooth.cs index bc64091280..d8917d0db4 100644 --- a/Projectiles/Rogue/LeviathanTooth.cs +++ b/Projectiles/Rogue/LeviathanTooth.cs @@ -35,8 +35,8 @@ namespace CalamityMod.Projectiles.Rogue public bool chomping = true; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -256,7 +256,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[1] == 2) tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeviathanTooth2").Value; if (Projectile.ai[1] == 3) diff --git a/Projectiles/Rogue/LionfishProj.cs b/Projectiles/Rogue/LionfishProj.cs index 33fe5a4944..6d6bd45d06 100644 --- a/Projectiles/Rogue/LionfishProj.cs +++ b/Projectiles/Rogue/LionfishProj.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Rogue/LostSoulFriendly.cs b/Projectiles/Rogue/LostSoulFriendly.cs index 1b233eb724..2afa877aae 100644 --- a/Projectiles/Rogue/LostSoulFriendly.cs +++ b/Projectiles/Rogue/LostSoulFriendly.cs @@ -9,10 +9,10 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; Lighting.AddLight(Projectile.Center, 0.25f, 0.25f, 0.25f); @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue { int cap = 5; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } } @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/LunarKunaiProj.cs b/Projectiles/Rogue/LunarKunaiProj.cs index a7afccb20d..0e9238f4ce 100644 --- a/Projectiles/Rogue/LunarKunaiProj.cs +++ b/Projectiles/Rogue/LunarKunaiProj.cs @@ -16,10 +16,10 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/LuxorsGiftRogue.cs b/Projectiles/Rogue/LuxorsGiftRogue.cs index c970824e1c..2b0e580ad5 100644 --- a/Projectiles/Rogue/LuxorsGiftRogue.cs +++ b/Projectiles/Rogue/LuxorsGiftRogue.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/MalachiteBolt.cs b/Projectiles/Rogue/MalachiteBolt.cs index bfcae585c3..6645114223 100644 --- a/Projectiles/Rogue/MalachiteBolt.cs +++ b/Projectiles/Rogue/MalachiteBolt.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/MalachiteProj.cs b/Projectiles/Rogue/MalachiteProj.cs index f5653839f9..6ee5620237 100644 --- a/Projectiles/Rogue/MalachiteProj.cs +++ b/Projectiles/Rogue/MalachiteProj.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/MalachiteStealth.cs b/Projectiles/Rogue/MalachiteStealth.cs index 5cc69d9c07..d8bd435577 100644 --- a/Projectiles/Rogue/MalachiteStealth.cs +++ b/Projectiles/Rogue/MalachiteStealth.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/MangroveChakramProjectile.cs b/Projectiles/Rogue/MangroveChakramProjectile.cs index 6bd879b46b..81f4212305 100644 --- a/Projectiles/Rogue/MangroveChakramProjectile.cs +++ b/Projectiles/Rogue/MangroveChakramProjectile.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/MoltenAmputatorProj.cs b/Projectiles/Rogue/MoltenAmputatorProj.cs index 4abfdf3453..b2c7c1966d 100644 --- a/Projectiles/Rogue/MoltenAmputatorProj.cs +++ b/Projectiles/Rogue/MoltenAmputatorProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Rogue/MoltenBlobThrown.cs b/Projectiles/Rogue/MoltenBlobThrown.cs index 588a14db6c..4cf8a1b0ea 100644 --- a/Projectiles/Rogue/MoltenBlobThrown.cs +++ b/Projectiles/Rogue/MoltenBlobThrown.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() diff --git a/Projectiles/Rogue/MonkeyDart.cs b/Projectiles/Rogue/MonkeyDart.cs index 7d120c08aa..727b4ffe66 100644 --- a/Projectiles/Rogue/MonkeyDart.cs +++ b/Projectiles/Rogue/MonkeyDart.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.ai[0] == 1) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } return true; diff --git a/Projectiles/Rogue/MoonSigil.cs b/Projectiles/Rogue/MoonSigil.cs index 3527d04e0b..1e519983af 100644 --- a/Projectiles/Rogue/MoonSigil.cs +++ b/Projectiles/Rogue/MoonSigil.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue { int cap = 5; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } diff --git a/Projectiles/Rogue/MycorootProj.cs b/Projectiles/Rogue/MycorootProj.cs index 3fe48a9a8c..681c6a2201 100644 --- a/Projectiles/Rogue/MycorootProj.cs +++ b/Projectiles/Rogue/MycorootProj.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/MythrilKnifeProjectile.cs b/Projectiles/Rogue/MythrilKnifeProjectile.cs index 57eaf29f2b..0e041f6aba 100644 --- a/Projectiles/Rogue/MythrilKnifeProjectile.cs +++ b/Projectiles/Rogue/MythrilKnifeProjectile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/NanoblackMain.cs b/Projectiles/Rogue/NanoblackMain.cs index 829a6f0a22..cd18f9f0ff 100644 --- a/Projectiles/Rogue/NanoblackMain.cs +++ b/Projectiles/Rogue/NanoblackMain.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/NanoblackSplit.cs b/Projectiles/Rogue/NanoblackSplit.cs index a8b470856e..b311e37066 100644 --- a/Projectiles/Rogue/NanoblackSplit.cs +++ b/Projectiles/Rogue/NanoblackSplit.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/NanoblackStealthSplit.cs b/Projectiles/Rogue/NanoblackStealthSplit.cs index 173092cc0d..eaaef636bf 100644 --- a/Projectiles/Rogue/NanoblackStealthSplit.cs +++ b/Projectiles/Rogue/NanoblackStealthSplit.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/NiceCock.cs b/Projectiles/Rogue/NiceCock.cs index 11bc1ff1ca..51360e48a2 100644 --- a/Projectiles/Rogue/NiceCock.cs +++ b/Projectiles/Rogue/NiceCock.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue if (!initialized) { // Pick a random frame to start on - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); initialized = true; } @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; int index = (int)Projectile.ai[1]; diff --git a/Projectiles/Rogue/NightsGazeProjectile.cs b/Projectiles/Rogue/NightsGazeProjectile.cs index 380d4a6bc8..1676e41309 100644 --- a/Projectiles/Rogue/NightsGazeProjectile.cs +++ b/Projectiles/Rogue/NightsGazeProjectile.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/NightsGazeStar.cs b/Projectiles/Rogue/NightsGazeStar.cs index e45644d91c..69829d8f21 100644 --- a/Projectiles/Rogue/NightsGazeStar.cs +++ b/Projectiles/Rogue/NightsGazeStar.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White, 1); return false; } diff --git a/Projectiles/Rogue/NychthemeronOrb.cs b/Projectiles/Rogue/NychthemeronOrb.cs index b7230922fa..aa26e41cc1 100644 --- a/Projectiles/Rogue/NychthemeronOrb.cs +++ b/Projectiles/Rogue/NychthemeronOrb.cs @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texLight = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texLight = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D texDark = ModContent.Request("CalamityMod/Projectiles/Rogue/NychthemeronOrb2").Value; if (Projectile.ai[0] == 0f) { diff --git a/Projectiles/Rogue/NychthemeronProjectile.cs b/Projectiles/Rogue/NychthemeronProjectile.cs index 8810f57ab2..283a21e0b8 100644 --- a/Projectiles/Rogue/NychthemeronProjectile.cs +++ b/Projectiles/Rogue/NychthemeronProjectile.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs index 1bdd516980..dab49da486 100644 --- a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs +++ b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index 2b5a7562de..a43502280a 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/PanSpark.cs b/Projectiles/Rogue/PanSpark.cs index 9fcf5404d8..941dae41cc 100644 --- a/Projectiles/Rogue/PanSpark.cs +++ b/Projectiles/Rogue/PanSpark.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue if (!initialized) { initialized = true; - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); } Projectile.frameCounter++; if (Projectile.frameCounter > 6) @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/PenumbraBomb.cs b/Projectiles/Rogue/PenumbraBomb.cs index adff0d85fb..3ecbfb63bd 100644 --- a/Projectiles/Rogue/PenumbraBomb.cs +++ b/Projectiles/Rogue/PenumbraBomb.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/PenumbraSoul.cs b/Projectiles/Rogue/PenumbraSoul.cs index 8e4930114c..a942a55356 100644 --- a/Projectiles/Rogue/PenumbraSoul.cs +++ b/Projectiles/Rogue/PenumbraSoul.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/PhantasmalRuinProj.cs b/Projectiles/Rogue/PhantasmalRuinProj.cs index 28c391a7cc..e0b8e583db 100644 --- a/Projectiles/Rogue/PhantasmalRuinProj.cs +++ b/Projectiles/Rogue/PhantasmalRuinProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 12; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 3); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 3); return false; } diff --git a/Projectiles/Rogue/PhantasmalSoul.cs b/Projectiles/Rogue/PhantasmalSoul.cs index f0f89a8501..f902cf4c79 100644 --- a/Projectiles/Rogue/PhantasmalSoul.cs +++ b/Projectiles/Rogue/PhantasmalSoul.cs @@ -17,10 +17,10 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft > Lifetime - NoDrawFrames) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/PhantasmalSoulBlue.cs b/Projectiles/Rogue/PhantasmalSoulBlue.cs index 6b8fe467e9..a8d0612531 100644 --- a/Projectiles/Rogue/PhantasmalSoulBlue.cs +++ b/Projectiles/Rogue/PhantasmalSoulBlue.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft > Lifetime - NoDrawFrames) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/PlaguenadeBee.cs b/Projectiles/Rogue/PlaguenadeBee.cs index a5143606fb..b7bd8e95f2 100644 --- a/Projectiles/Rogue/PlaguenadeBee.cs +++ b/Projectiles/Rogue/PlaguenadeBee.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -137,8 +137,8 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int drawStart = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Rogue/PlaguenadeProj.cs b/Projectiles/Rogue/PlaguenadeProj.cs index 4efa0328c3..8f8ff934e5 100644 --- a/Projectiles/Rogue/PlaguenadeProj.cs +++ b/Projectiles/Rogue/PlaguenadeProj.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/PrismShurikenBlade.cs b/Projectiles/Rogue/PrismShurikenBlade.cs index d535d70023..fe3d80d954 100644 --- a/Projectiles/Rogue/PrismShurikenBlade.cs +++ b/Projectiles/Rogue/PrismShurikenBlade.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } } diff --git a/Projectiles/Rogue/Prismalline2.cs b/Projectiles/Rogue/Prismalline2.cs index 84c7e8de2f..040527656c 100644 --- a/Projectiles/Rogue/Prismalline2.cs +++ b/Projectiles/Rogue/Prismalline2.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/Prismalline3.cs b/Projectiles/Rogue/Prismalline3.cs index b93567254b..a57b72b223 100644 --- a/Projectiles/Rogue/Prismalline3.cs +++ b/Projectiles/Rogue/Prismalline3.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/PrismallineProj.cs b/Projectiles/Rogue/PrismallineProj.cs index c47deff442..60ff9fdaa0 100644 --- a/Projectiles/Rogue/PrismallineProj.cs +++ b/Projectiles/Rogue/PrismallineProj.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index edb349683d..b7c056a4ad 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index f0f15157a0..0f9ab63c40 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/RadiantStar2.cs b/Projectiles/Rogue/RadiantStar2.cs index e2253b15ee..d50bc1c07a 100644 --- a/Projectiles/Rogue/RadiantStar2.cs +++ b/Projectiles/Rogue/RadiantStar2.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/RadiantStarKnife.cs b/Projectiles/Rogue/RadiantStarKnife.cs index fa3d6ca7ff..33e48e406f 100644 --- a/Projectiles/Rogue/RadiantStarKnife.cs +++ b/Projectiles/Rogue/RadiantStarKnife.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/RealityRuptureLance.cs b/Projectiles/Rogue/RealityRuptureLance.cs index 3fe8595e45..1c809342c0 100644 --- a/Projectiles/Rogue/RealityRuptureLance.cs +++ b/Projectiles/Rogue/RealityRuptureLance.cs @@ -54,9 +54,9 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; float scale = Projectile.scale; float rotation = Projectile.rotation; diff --git a/Projectiles/Rogue/RealityRuptureStealth.cs b/Projectiles/Rogue/RealityRuptureStealth.cs index ce21f21560..5842c87c3b 100644 --- a/Projectiles/Rogue/RealityRuptureStealth.cs +++ b/Projectiles/Rogue/RealityRuptureStealth.cs @@ -77,9 +77,9 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; float scale = Projectile.scale; float rotation = Projectile.rotation; diff --git a/Projectiles/Rogue/ReaperProjectile.cs b/Projectiles/Rogue/ReaperProjectile.cs index 34378bfbbb..bc52b43a07 100644 --- a/Projectiles/Rogue/ReaperProjectile.cs +++ b/Projectiles/Rogue/ReaperProjectile.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -282,7 +282,7 @@ namespace CalamityMod.Projectiles.Rogue if (spinning) { Main.EntitySpriteDraw(p.Value, drawPos + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 4, null, Color.Chartreuse with { A = 0 } * 0.45f, Projectile.velocity.ToRotation() + MathHelper.PiOver2, p.Size() * 0.5f, new Vector2(0.9f - 0.3f * Utils.GetLerpValue(25, 0, time, true), 1 + 0.6f * Utils.GetLerpValue(25, 0, time, true)) * Main.rand.NextFloat(1.25f, 1.4f), SpriteEffects.None); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Chartreuse * 0.5f, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Chartreuse * 0.5f, 1); } return false; } diff --git a/Projectiles/Rogue/ReboundingRainbowProj.cs b/Projectiles/Rogue/ReboundingRainbowProj.cs index dc64249bbe..7a05825cc5 100644 --- a/Projectiles/Rogue/ReboundingRainbowProj.cs +++ b/Projectiles/Rogue/ReboundingRainbowProj.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -191,7 +191,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/ReboundingRainbowSplit.cs b/Projectiles/Rogue/ReboundingRainbowSplit.cs index d9ee841801..95aecb60a2 100644 --- a/Projectiles/Rogue/ReboundingRainbowSplit.cs +++ b/Projectiles/Rogue/ReboundingRainbowSplit.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Rogue/RefractionRotorProjectile.cs b/Projectiles/Rogue/RefractionRotorProjectile.cs index 7bafa8c5b8..fa4dcd30d5 100644 --- a/Projectiles/Rogue/RefractionRotorProjectile.cs +++ b/Projectiles/Rogue/RefractionRotorProjectile.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 16; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 16; } public override void SetDefaults() diff --git a/Projectiles/Rogue/RegulusRiotProj.cs b/Projectiles/Rogue/RegulusRiotProj.cs index 331c820572..894510f190 100644 --- a/Projectiles/Rogue/RegulusRiotProj.cs +++ b/Projectiles/Rogue/RegulusRiotProj.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Rogue/RotBallProjectile.cs b/Projectiles/Rogue/RotBallProjectile.cs index 47437ea0d3..66ce8495dc 100644 --- a/Projectiles/Rogue/RotBallProjectile.cs +++ b/Projectiles/Rogue/RotBallProjectile.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/SacrificeProjectile.cs b/Projectiles/Rogue/SacrificeProjectile.cs index fd2c11b97d..d14526b969 100644 --- a/Projectiles/Rogue/SacrificeProjectile.cs +++ b/Projectiles/Rogue/SacrificeProjectile.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Items/Weapons/Rogue/Sacrifice"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; } public override void SetDefaults() @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } diff --git a/Projectiles/Rogue/SamsaraSlicerProjectile.cs b/Projectiles/Rogue/SamsaraSlicerProjectile.cs index e4e11c27af..1433f615a4 100644 --- a/Projectiles/Rogue/SamsaraSlicerProjectile.cs +++ b/Projectiles/Rogue/SamsaraSlicerProjectile.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -215,7 +215,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.ai[2] < 0) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(0f, 0.6f, 0f, 0f), 2, ModContent.Request("CalamityMod/Items/Weapons/Rogue/SamsaraSlicerGlow").Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(0f, 0.6f, 0f, 0f), 2, ModContent.Request("CalamityMod/Items/Weapons/Rogue/SamsaraSlicerGlow").Value); } else { diff --git a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs index 9e29cade13..dac74b5b0d 100644 --- a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs +++ b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public Projectile Parent = null; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.oldPos[i] = oldP2 + (oldP2.DirectionTo(oldP1) * MathHelper.Min(oldP2.Distance(oldP1), 5)); } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(0.2f, 1f, 0f, 0f), 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(0.2f, 1f, 0f, 0f), 2); return false; } } diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index 07873133be..26bd32b34d 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -19,13 +19,13 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 45; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 45; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 45; + ProjectileID.Sets.TrailCacheLength[Type] = 45; Projectile.width = 108; Projectile.height = 108; Projectile.friendly = true; @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Rogue { if (!Projectile.Calamity().stealthStrike) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], new Color(100, 100, 100)); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], new Color(100, 100, 100)); return true; } else @@ -192,7 +192,7 @@ namespace CalamityMod.Projectiles.Rogue PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.Zero) * 86f, false, shader: GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"]), 60); - Texture2D spearTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D spearTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < 7; i++) { diff --git a/Projectiles/Rogue/ScourgeVenomCloud.cs b/Projectiles/Rogue/ScourgeVenomCloud.cs index 1ea306b316..a1fa4c3477 100644 --- a/Projectiles/Rogue/ScourgeVenomCloud.cs +++ b/Projectiles/Rogue/ScourgeVenomCloud.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame = 0; } } - else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Projectile.type]) + else if (Projectile.owner == Main.myPlayer && Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } diff --git a/Projectiles/Rogue/ScourgeoftheDesertProj.cs b/Projectiles/Rogue/ScourgeoftheDesertProj.cs index 90d25a4c2c..70d5fadbbc 100644 --- a/Projectiles/Rogue/ScourgeoftheDesertProj.cs +++ b/Projectiles/Rogue/ScourgeoftheDesertProj.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -201,7 +201,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs index e3a34b3310..ec0174b1a5 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/SealedSingularityBlackhole.cs b/Projectiles/Rogue/SealedSingularityBlackhole.cs index 2450b07510..2ca31c17bd 100644 --- a/Projectiles/Rogue/SealedSingularityBlackhole.cs +++ b/Projectiles/Rogue/SealedSingularityBlackhole.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Rogue/SealedSingularityGore.cs b/Projectiles/Rogue/SealedSingularityGore.cs index 4a8db4cc51..77492eb2cc 100644 --- a/Projectiles/Rogue/SealedSingularityGore.cs +++ b/Projectiles/Rogue/SealedSingularityGore.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityGore3").Value; break; default: - texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; break; } Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Rogue/SearedPanProjectile.cs b/Projectiles/Rogue/SearedPanProjectile.cs index a7022fce06..11e591ffc0 100644 --- a/Projectiles/Rogue/SearedPanProjectile.cs +++ b/Projectiles/Rogue/SearedPanProjectile.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -199,7 +199,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/SeraphimAngelicLight.cs b/Projectiles/Rogue/SeraphimAngelicLight.cs index 3519a18273..e1f1561977 100644 --- a/Projectiles/Rogue/SeraphimAngelicLight.cs +++ b/Projectiles/Rogue/SeraphimAngelicLight.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.scale = CalamityUtils.Convert01To010(Projectile.timeLeft / 10f); Projectile.Opacity = (float)Math.Sqrt(Projectile.scale); Projectile.velocity *= 0.8f; - Projectile.frame = Main.projFrames[Projectile.type] - Projectile.timeLeft; + Projectile.frame = Main.projFrames[Type] - Projectile.timeLeft; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Rogue/SeraphimAngelicLight2.cs b/Projectiles/Rogue/SeraphimAngelicLight2.cs index bae53092ef..3c3d4e443b 100644 --- a/Projectiles/Rogue/SeraphimAngelicLight2.cs +++ b/Projectiles/Rogue/SeraphimAngelicLight2.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Projectiles/Rogue/SeraphimAngelicLight"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.scale = CalamityUtils.Convert01To010(Projectile.timeLeft / (float)Lifetime); Projectile.Opacity = (float)Math.Sqrt(Projectile.scale); Projectile.velocity *= 0.8f; - Projectile.frame = (int)(Utils.GetLerpValue(Lifetime, 0f, Projectile.timeLeft, true) * Main.projFrames[Projectile.type]); + Projectile.frame = (int)(Utils.GetLerpValue(Lifetime, 0f, Projectile.timeLeft, true) * Main.projFrames[Type]); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Rogue/SeraphimBeamLarge.cs b/Projectiles/Rogue/SeraphimBeamLarge.cs index f0940f0ab8..ad41f9fa89 100644 --- a/Projectiles/Rogue/SeraphimBeamLarge.cs +++ b/Projectiles/Rogue/SeraphimBeamLarge.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Rogue // Determine frames. Projectile.frameCounter++; if (Projectile.frameCounter % 5f == 4f) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } // Rapidly decrease damage every hit @@ -117,9 +117,9 @@ namespace CalamityMod.Projectiles.Rogue return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. Vector2 centerOnLaser = Projectile.Center + Projectile.velocity * Projectile.scale * 116f; diff --git a/Projectiles/Rogue/SeraphimDagger.cs b/Projectiles/Rogue/SeraphimDagger.cs index aaea9660ad..fc174afd86 100644 --- a/Projectiles/Rogue/SeraphimDagger.cs +++ b/Projectiles/Rogue/SeraphimDagger.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 baseDrawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Rogue/SeraphimProjectile.cs b/Projectiles/Rogue/SeraphimProjectile.cs index 2e27bbe5bd..e16685c4a0 100644 --- a/Projectiles/Rogue/SeraphimProjectile.cs +++ b/Projectiles/Rogue/SeraphimProjectile.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 baseDrawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Rogue/ShatteredSunKnife.cs b/Projectiles/Rogue/ShatteredSunKnife.cs index 9a6017b8d5..dc2a14cb85 100644 --- a/Projectiles/Rogue/ShatteredSunKnife.cs +++ b/Projectiles/Rogue/ShatteredSunKnife.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs index a62c7f499b..60081d12c1 100644 --- a/Projectiles/Rogue/ShatteredSunScorchedBlade.cs +++ b/Projectiles/Rogue/ShatteredSunScorchedBlade.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/ShinobiBladeProjectile.cs b/Projectiles/Rogue/ShinobiBladeProjectile.cs index 2b457f6bdb..7eee20f797 100644 --- a/Projectiles/Rogue/ShinobiBladeProjectile.cs +++ b/Projectiles/Rogue/ShinobiBladeProjectile.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/ShockGrenadeBolt.cs b/Projectiles/Rogue/ShockGrenadeBolt.cs index 3d647376a3..1a1db9e013 100644 --- a/Projectiles/Rogue/ShockGrenadeBolt.cs +++ b/Projectiles/Rogue/ShockGrenadeBolt.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Rogue/ShockGrenadeProjectile.cs b/Projectiles/Rogue/ShockGrenadeProjectile.cs index 16ec5fcfd3..591bea4e50 100644 --- a/Projectiles/Rogue/ShockGrenadeProjectile.cs +++ b/Projectiles/Rogue/ShockGrenadeProjectile.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/ShockTeslaAura.cs b/Projectiles/Rogue/ShockTeslaAura.cs index 799665639c..da9583480a 100644 --- a/Projectiles/Rogue/ShockTeslaAura.cs +++ b/Projectiles/Rogue/ShockTeslaAura.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color drawColour = Color.White; Rectangle sourceRect = new Rectangle(Projectile.width * (int)Projectile.localAI[1], Projectile.height * (int)Projectile.localAI[0], Projectile.width, Projectile.height); diff --git a/Projectiles/Rogue/SlickCaneProjectile.cs b/Projectiles/Rogue/SlickCaneProjectile.cs index 350d3bd3cc..550378cc14 100644 --- a/Projectiles/Rogue/SlickCaneProjectile.cs +++ b/Projectiles/Rogue/SlickCaneProjectile.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Vector2 drawPosition = Projectile.position + new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request("CalamityMod/Projectiles/Rogue/SlickCaneProjectileAlt").Value : Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D alternateHookTexture = Projectile.spriteDirection == -1 ? ModContent.Request("CalamityMod/Projectiles/Rogue/SlickCaneProjectileAlt").Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(Projectile.spriteDirection == 1 ? alternateHookTexture.Width + 8f : -8f, -8f); Main.EntitySpriteDraw(alternateHookTexture, drawPosition, null, lightColor, Projectile.rotation, diff --git a/Projectiles/Rogue/SludgeSplotchProj2.cs b/Projectiles/Rogue/SludgeSplotchProj2.cs index db7798497c..9d8560b6c3 100644 --- a/Projectiles/Rogue/SludgeSplotchProj2.cs +++ b/Projectiles/Rogue/SludgeSplotchProj2.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/SnapClamProj.cs b/Projectiles/Rogue/SnapClamProj.cs index f9dfd6d0da..f84567151f 100644 --- a/Projectiles/Rogue/SnapClamProj.cs +++ b/Projectiles/Rogue/SnapClamProj.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Rogue/SnapClamStealth.cs b/Projectiles/Rogue/SnapClamStealth.cs index 7e8c16117d..a7dd3b8d1c 100644 --- a/Projectiles/Rogue/SnapClamStealth.cs +++ b/Projectiles/Rogue/SnapClamStealth.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; + Main.projFrames[Type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Rogue/SpearofDestinyProjectile.cs b/Projectiles/Rogue/SpearofDestinyProjectile.cs index f63822b705..7326defabb 100644 --- a/Projectiles/Rogue/SpearofDestinyProjectile.cs +++ b/Projectiles/Rogue/SpearofDestinyProjectile.cs @@ -109,9 +109,9 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; float scale = Projectile.scale; float rotation = Projectile.rotation; diff --git a/Projectiles/Rogue/SpearofDestinyStealth.cs b/Projectiles/Rogue/SpearofDestinyStealth.cs index 9e68d646a7..d117d5262e 100644 --- a/Projectiles/Rogue/SpearofDestinyStealth.cs +++ b/Projectiles/Rogue/SpearofDestinyStealth.cs @@ -87,9 +87,9 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; float scale = Projectile.scale; float rotation = Projectile.rotation; diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index d8ba7f1c6a..1ddf1453bf 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/SphereBladed.cs b/Projectiles/Rogue/SphereBladed.cs index ba66d6bdc2..41f5c87f10 100644 --- a/Projectiles/Rogue/SphereBladed.cs +++ b/Projectiles/Rogue/SphereBladed.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/SphereBlue.cs b/Projectiles/Rogue/SphereBlue.cs index a688974964..d2c7637ab4 100644 --- a/Projectiles/Rogue/SphereBlue.cs +++ b/Projectiles/Rogue/SphereBlue.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/SphereSpiked.cs b/Projectiles/Rogue/SphereSpiked.cs index 443ccef165..7d2c53512d 100644 --- a/Projectiles/Rogue/SphereSpiked.cs +++ b/Projectiles/Rogue/SphereSpiked.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/SphereYellow.cs b/Projectiles/Rogue/SphereYellow.cs index 77c6e434de..cfa9694d3b 100644 --- a/Projectiles/Rogue/SphereYellow.cs +++ b/Projectiles/Rogue/SphereYellow.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/StealthNimbus.cs b/Projectiles/Rogue/StealthNimbus.cs index 7a5cfc0e3e..dcc429b897 100644 --- a/Projectiles/Rogue/StealthNimbus.cs +++ b/Projectiles/Rogue/StealthNimbus.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -26,10 +26,10 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == 1f) texture = ModContent.Request("CalamityMod/Projectiles/Rogue/StealthNimbus2").Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Rogue/StealthNimbusCloud.cs b/Projectiles/Rogue/StealthNimbusCloud.cs index d1e3eab024..3f6c3d1f6e 100644 --- a/Projectiles/Rogue/StealthNimbusCloud.cs +++ b/Projectiles/Rogue/StealthNimbusCloud.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -26,10 +26,10 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == 1f) texture = ModContent.Request("CalamityMod/Projectiles/Rogue/StealthNimbusCloud2").Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Rogue/StellarKnifeProj.cs b/Projectiles/Rogue/StellarKnifeProj.cs index 4be9d7c5da..6b1d717b9b 100644 --- a/Projectiles/Rogue/StellarKnifeProj.cs +++ b/Projectiles/Rogue/StellarKnifeProj.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Rogue/StormfrontLightning.cs b/Projectiles/Rogue/StormfrontLightning.cs index 00b1816ea2..bab525c68b 100644 --- a/Projectiles/Rogue/StormfrontLightning.cs +++ b/Projectiles/Rogue/StormfrontLightning.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 50; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 50; } public override void SetDefaults() diff --git a/Projectiles/Rogue/StormfrontRazorProjectile.cs b/Projectiles/Rogue/StormfrontRazorProjectile.cs index 3a9dc47f28..625317777c 100644 --- a/Projectiles/Rogue/StormfrontRazorProjectile.cs +++ b/Projectiles/Rogue/StormfrontRazorProjectile.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/SubductionFlameburst.cs b/Projectiles/Rogue/SubductionFlameburst.cs index bbcb328bf8..9ba236808d 100644 --- a/Projectiles/Rogue/SubductionFlameburst.cs +++ b/Projectiles/Rogue/SubductionFlameburst.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = new Rectangle(frameX * Projectile.width, frameY * Projectile.height, Projectile.width, Projectile.height); Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Rogue/SubductionSlicerProj.cs b/Projectiles/Rogue/SubductionSlicerProj.cs index e1a0b88425..8136bb01ce 100644 --- a/Projectiles/Rogue/SubductionSlicerProj.cs +++ b/Projectiles/Rogue/SubductionSlicerProj.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/SupernovaBomb.cs b/Projectiles/Rogue/SupernovaBomb.cs index ae4babe2e3..fdfb0aea35 100644 --- a/Projectiles/Rogue/SupernovaBomb.cs +++ b/Projectiles/Rogue/SupernovaBomb.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -308,7 +308,7 @@ namespace CalamityMod.Projectiles.Rogue } if (!homing) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(Color.White, randomColor, 0.3f), 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.Lerp(Color.White, randomColor, 0.3f), 1); return true; } } diff --git a/Projectiles/Rogue/SupernovaBoom.cs b/Projectiles/Rogue/SupernovaBoom.cs index a2616f9c96..0a285d4df6 100644 --- a/Projectiles/Rogue/SupernovaBoom.cs +++ b/Projectiles/Rogue/SupernovaBoom.cs @@ -214,7 +214,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; int length = texture.Width / horizontalFrames; int height = texture.Height / verticalFrames; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/Rogue/TalonLargeProj.cs b/Projectiles/Rogue/TalonLargeProj.cs index f5ed435467..e5c7941a05 100644 --- a/Projectiles/Rogue/TalonLargeProj.cs +++ b/Projectiles/Rogue/TalonLargeProj.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/TalonSmallProj.cs b/Projectiles/Rogue/TalonSmallProj.cs index da51fad4f5..921bcc1e21 100644 --- a/Projectiles/Rogue/TalonSmallProj.cs +++ b/Projectiles/Rogue/TalonSmallProj.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/TarraThornRight.cs b/Projectiles/Rogue/TarraThornRight.cs index 7560dbac9e..32413a97ee 100644 --- a/Projectiles/Rogue/TarraThornRight.cs +++ b/Projectiles/Rogue/TarraThornRight.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Rogue // Draw the tip for the final thorn public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == TotalSegments) texture = ModContent.Request("CalamityMod/Projectiles/Magic/NettleTip").Value; diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs index 3989f2219e..7b4cbfeb6e 100644 --- a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs +++ b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/TheAtomSplitterDuplicate.cs b/Projectiles/Rogue/TheAtomSplitterDuplicate.cs index b7c764094e..a4af127001 100644 --- a/Projectiles/Rogue/TheAtomSplitterDuplicate.cs +++ b/Projectiles/Rogue/TheAtomSplitterDuplicate.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public ref float Lifetime => ref Projectile.ai[1]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue Color drawColor = CalamityUtils.MulticolorLerp((Time / 35f + Projectile.identity / 4f) % 1f, CalamityUtils.ExoPalette); drawColor.A = 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], drawColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], drawColor); return false; } } diff --git a/Projectiles/Rogue/TheSyringeCinder.cs b/Projectiles/Rogue/TheSyringeCinder.cs index 7a16399617..fcd99f75ce 100644 --- a/Projectiles/Rogue/TheSyringeCinder.cs +++ b/Projectiles/Rogue/TheSyringeCinder.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Rogue/TheSyringeProj.cs b/Projectiles/Rogue/TheSyringeProj.cs index 583442bdf8..21301511b7 100644 --- a/Projectiles/Rogue/TheSyringeProj.cs +++ b/Projectiles/Rogue/TheSyringeProj.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Rogue/TheSyringeS1.cs b/Projectiles/Rogue/TheSyringeS1.cs index 8b05b75c90..66832fedd0 100644 --- a/Projectiles/Rogue/TheSyringeS1.cs +++ b/Projectiles/Rogue/TheSyringeS1.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Rogue/TimeBoltKnife.cs b/Projectiles/Rogue/TimeBoltKnife.cs index 26cf772940..b9a74852d3 100644 --- a/Projectiles/Rogue/TimeBoltKnife.cs +++ b/Projectiles/Rogue/TimeBoltKnife.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -225,7 +225,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/TitaniumClone.cs b/Projectiles/Rogue/TitaniumClone.cs index 4f4b696192..e43e62128d 100644 --- a/Projectiles/Rogue/TitaniumClone.cs +++ b/Projectiles/Rogue/TitaniumClone.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/TitaniumShurikenProjectile.cs b/Projectiles/Rogue/TitaniumShurikenProjectile.cs index 286c01ae26..d8f0da7267 100644 --- a/Projectiles/Rogue/TitaniumShurikenProjectile.cs +++ b/Projectiles/Rogue/TitaniumShurikenProjectile.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -133,10 +133,10 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.Calamity().stealthStrike) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); } else { diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index 13742c844d..dda87de504 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/TotalMeltdown.cs b/Projectiles/Rogue/TotalMeltdown.cs index 1b824a2e4e..48e2eb7e92 100644 --- a/Projectiles/Rogue/TotalMeltdown.cs +++ b/Projectiles/Rogue/TotalMeltdown.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 13; + Main.projFrames[Type] = 13; } public override void SetDefaults() @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = -1; - Projectile.timeLeft = Main.projFrames[Projectile.type] * 5; + Projectile.timeLeft = Main.projFrames[Type] * 5; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 30; } diff --git a/Projectiles/Rogue/TotalityFire.cs b/Projectiles/Rogue/TotalityFire.cs index 3202ed7114..9ecf91af5a 100644 --- a/Projectiles/Rogue/TotalityFire.cs +++ b/Projectiles/Rogue/TotalityFire.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Rogue if (!initialized) { initialized = true; - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); } Projectile.frameCounter++; if (Projectile.frameCounter > 6) @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/ToxicantTwisterProj.cs b/Projectiles/Rogue/ToxicantTwisterProj.cs index 5e5720b627..db053ab2f9 100644 --- a/Projectiles/Rogue/ToxicantTwisterProj.cs +++ b/Projectiles/Rogue/ToxicantTwisterProj.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Rogue public float circleSpeed = 1; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() { @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Rogue Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + rotationalDrawOffset, null, auraColor with { A = 0 } * Utils.GetLerpValue(255, 0, Projectile.alpha), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); } - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor * 0.3f, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor * 0.3f, 2); return true; } diff --git a/Projectiles/Rogue/TurbulanceProjectile.cs b/Projectiles/Rogue/TurbulanceProjectile.cs index 514385eaef..138663322f 100644 --- a/Projectiles/Rogue/TurbulanceProjectile.cs +++ b/Projectiles/Rogue/TurbulanceProjectile.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/TurbulanceWindSlash.cs b/Projectiles/Rogue/TurbulanceWindSlash.cs index 42853a34a6..b524a9179d 100644 --- a/Projectiles/Rogue/TurbulanceWindSlash.cs +++ b/Projectiles/Rogue/TurbulanceWindSlash.cs @@ -9,10 +9,10 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/TwistingThunderProj.cs b/Projectiles/Rogue/TwistingThunderProj.cs index 38e242db93..f0703df833 100644 --- a/Projectiles/Rogue/TwistingThunderProj.cs +++ b/Projectiles/Rogue/TwistingThunderProj.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 8; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 8; } public override void SetDefaults() @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/UrchinStingerProj.cs b/Projectiles/Rogue/UrchinStingerProj.cs index 51847ff991..d43e496b7d 100644 --- a/Projectiles/Rogue/UrchinStingerProj.cs +++ b/Projectiles/Rogue/UrchinStingerProj.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/ValedictionBoomerang.cs b/Projectiles/Rogue/ValedictionBoomerang.cs index 30d2881c68..739bd2364b 100644 --- a/Projectiles/Rogue/ValedictionBoomerang.cs +++ b/Projectiles/Rogue/ValedictionBoomerang.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/VeneratedKnife.cs b/Projectiles/Rogue/VeneratedKnife.cs index 8efa1a6d19..11d4cf013e 100644 --- a/Projectiles/Rogue/VeneratedKnife.cs +++ b/Projectiles/Rogue/VeneratedKnife.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -72,13 +72,13 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.ai[0] == 0f) { - Texture2D knife1 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 3, knife1); + Texture2D knife1 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 3, knife1); } else if (Projectile.ai[0] == 1f) { Texture2D knife2 = ModContent.Request("CalamityMod/Projectiles/Rogue/VeneratedKnife2").Value; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 3, knife2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 3, knife2); } return false; } diff --git a/Projectiles/Rogue/WaveSkipperProjectile.cs b/Projectiles/Rogue/WaveSkipperProjectile.cs index 3d1277da7d..82ab76963c 100644 --- a/Projectiles/Rogue/WaveSkipperProjectile.cs +++ b/Projectiles/Rogue/WaveSkipperProjectile.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, Projectile.Calamity().stealthStrike ? 4 : 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, Projectile.Calamity().stealthStrike ? 4 : 2); return false; } } diff --git a/Projectiles/Rogue/WhitewaterProj.cs b/Projectiles/Rogue/WhitewaterProj.cs index 4815b5e882..f80670dde2 100644 --- a/Projectiles/Rogue/WhitewaterProj.cs +++ b/Projectiles/Rogue/WhitewaterProj.cs @@ -218,7 +218,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D rTexture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; Texture2D wTexture = ModContent.Request("CalamityMod/Particles/HalfStar").Value; Color drawColor2 = Color.LightBlue; diff --git a/Projectiles/Rogue/WrathwingCinder.cs b/Projectiles/Rogue/WrathwingCinder.cs index accba2f53e..ab70362863 100644 --- a/Projectiles/Rogue/WrathwingCinder.cs +++ b/Projectiles/Rogue/WrathwingCinder.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Rogue/WrathwingFireball.cs b/Projectiles/Rogue/WrathwingFireball.cs index 2d3428e84c..b5996c3d83 100644 --- a/Projectiles/Rogue/WrathwingFireball.cs +++ b/Projectiles/Rogue/WrathwingFireball.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; // Keep the fireball rotated the correct way because the sheet faces down, not up @@ -53,8 +53,8 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); if (CalamityClientConfig.Instance.Afterimages) diff --git a/Projectiles/Rogue/WrathwingSpear.cs b/Projectiles/Rogue/WrathwingSpear.cs index 0be8e931aa..93d1a16cf8 100644 --- a/Projectiles/Rogue/WrathwingSpear.cs +++ b/Projectiles/Rogue/WrathwingSpear.cs @@ -14,10 +14,10 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Rogue/WulfrumKnifeProj.cs b/Projectiles/Rogue/WulfrumKnifeProj.cs index a233eb1fa8..ed3d183604 100644 --- a/Projectiles/Rogue/WulfrumKnifeProj.cs +++ b/Projectiles/Rogue/WulfrumKnifeProj.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; } public static int Lifetime = 950; @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float opacitey = StealthEffectOpacity; if (Projectile.Calamity().stealthStrike) diff --git a/Projectiles/Summon/AmphibiansGuitarProjectile.cs b/Projectiles/Summon/AmphibiansGuitarProjectile.cs index 471a50ef54..5782e66785 100644 --- a/Projectiles/Summon/AmphibiansGuitarProjectile.cs +++ b/Projectiles/Summon/AmphibiansGuitarProjectile.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.MinionShot[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 generalDrawPos = Projectile.Center - Main.screenPosition; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], noteColor with { A = 0 } * 0.4f, 1, tex.Value, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], noteColor with { A = 0 } * 0.4f, 1, tex.Value, true, true); Main.EntitySpriteDraw(tex.Value, generalDrawPos, null, noteColor with { A = 0 }, Projectile.rotation, tex.Size() * 0.5f, new Vector2(0.9f * Utils.GetLerpValue(-5, 20, time, true), 1) * Projectile.scale, SpriteEffects.None); Main.EntitySpriteDraw(tex.Value, generalDrawPos, null, Color.Lerp(Color.White, noteColor, 0.15f) with { A = 0 }, Projectile.rotation, tex.Size() * 0.5f, new Vector2(0.9f * Utils.GetLerpValue(-5, 20, time, true), 1) * Projectile.scale * 0.88f, SpriteEffects.None); diff --git a/Projectiles/Summon/AndromedaDeathRay.cs b/Projectiles/Summon/AndromedaDeathRay.cs index c9e0b2819f..887b45d8a6 100644 --- a/Projectiles/Summon/AndromedaDeathRay.cs +++ b/Projectiles/Summon/AndromedaDeathRay.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/AndromedaRegislash.cs b/Projectiles/Summon/AndromedaRegislash.cs index cef379f099..e24bd84df7 100644 --- a/Projectiles/Summon/AndromedaRegislash.cs +++ b/Projectiles/Summon/AndromedaRegislash.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } @@ -66,9 +66,9 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 startPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); Vector2 origin = rectangle.Size() / 2f; diff --git a/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs b/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs index 5546744709..a2094971eb 100644 --- a/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs +++ b/Projectiles/Summon/AndromedaUI/AndromedaUI_Background.cs @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Summon.AndromedaUI Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, Main.Rasterizer, null, perspective); // Draw the background UI - Main.spriteBatch.Draw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, + Main.spriteBatch.Draw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, diff --git a/Projectiles/Summon/AngelBolt.cs b/Projectiles/Summon/AngelBolt.cs index 794ff48ad4..fddc5914d7 100644 --- a/Projectiles/Summon/AngelBolt.cs +++ b/Projectiles/Summon/AngelBolt.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/AngelOrb.cs b/Projectiles/Summon/AngelOrb.cs index ea400a3f84..25e78969da 100644 --- a/Projectiles/Summon/AngelOrb.cs +++ b/Projectiles/Summon/AngelOrb.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/AngelRay.cs b/Projectiles/Summon/AngelRay.cs index 80281bdd10..2aee50bd33 100644 --- a/Projectiles/Summon/AngelRay.cs +++ b/Projectiles/Summon/AngelRay.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/AngelicAllianceArchangel.cs b/Projectiles/Summon/AngelicAllianceArchangel.cs index 9f13089822..c3c46831be 100644 --- a/Projectiles/Summon/AngelicAllianceArchangel.cs +++ b/Projectiles/Summon/AngelicAllianceArchangel.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon private int lifeSpan = 900; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -147,8 +147,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/ApexShark.cs b/Projectiles/Summon/ApexShark.cs index 58ba156d6c..ecc9ecb312 100644 --- a/Projectiles/Summon/ApexShark.cs +++ b/Projectiles/Summon/ApexShark.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Summon private int HitCooldown = 0; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 8; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/ApparatusExplosion.cs b/Projectiles/Summon/ApparatusExplosion.cs index 1e3caa54c8..bdac9e8860 100644 --- a/Projectiles/Summon/ApparatusExplosion.cs +++ b/Projectiles/Summon/ApparatusExplosion.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - Main.projFrames[Projectile.type] = 10; + ProjectileID.Sets.MinionShot[Type] = true; + Main.projFrames[Type] = 10; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.Kill(); } diff --git a/Projectiles/Summon/AquasScepterRaindrop.cs b/Projectiles/Summon/AquasScepterRaindrop.cs index 876910da3f..4df8cfb6ad 100644 --- a/Projectiles/Summon/AquasScepterRaindrop.cs +++ b/Projectiles/Summon/AquasScepterRaindrop.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { // Sets the amount of frames this minion has on its spritesheet - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public sealed override void SetDefaults() //If you want to change the damage of this projectile, just change the base damage of AquasScepter, the item. Note that this will affect the damage of AquasScepterTeslaAura as well, because the damage of said projectile is set as a multiple of the base damage at the bottom of AquasScepterCloud.cs diff --git a/Projectiles/Summon/AquasScepterTeslaAura.cs b/Projectiles/Summon/AquasScepterTeslaAura.cs index d3d8c6d728..d55ee2ca0d 100644 --- a/Projectiles/Summon/AquasScepterTeslaAura.cs +++ b/Projectiles/Summon/AquasScepterTeslaAura.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { // Sets the amount of frames this minion has on its spritesheet - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public sealed override void SetDefaults() //If you want to change the damage of this projectile, look near the bottom of AquasScepterCloud.cs because this projectile's damage is set in Projectile.NewProjectile as a multiple of the AquasScepterCloud damage value diff --git a/Projectiles/Summon/AquaticStarMinion.cs b/Projectiles/Summon/AquaticStarMinion.cs index 74c039a521..f060849af8 100644 --- a/Projectiles/Summon/AquaticStarMinion.cs +++ b/Projectiles/Summon/AquaticStarMinion.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/AstrageldonLaser.cs b/Projectiles/Summon/AstrageldonLaser.cs index 2ed1ac7556..6b5f11be8b 100644 --- a/Projectiles/Summon/AstrageldonLaser.cs +++ b/Projectiles/Summon/AstrageldonLaser.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs index 4d1f353634..795b62514b 100644 --- a/Projectiles/Summon/AstrageldonSummon.cs +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -218,8 +218,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int height = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int height = texture.Height / Main.projFrames[Type]; int y6 = height * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/AstralProbeRound.cs b/Projectiles/Summon/AstralProbeRound.cs index 6f44db1d80..bc9ba0db92 100644 --- a/Projectiles/Summon/AstralProbeRound.cs +++ b/Projectiles/Summon/AstralProbeRound.cs @@ -16,10 +16,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.rotation = Projectile.velocity.ToRotation(); // The projectile looks at where it's going. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 3 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 3 % Main.projFrames[Type]; // The projectile does it's animation. Lighting.AddLight(Projectile.Center, Vector3.One * 0.1f); // The projectile emtis light. @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Summon/AstralProbeSummon.cs b/Projectiles/Summon/AstralProbeSummon.cs index c8e16422cd..64de6fe834 100644 --- a/Projectiles/Summon/AstralProbeSummon.cs +++ b/Projectiles/Summon/AstralProbeSummon.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/AtlasMunitionsAutocannon.cs b/Projectiles/Summon/AtlasMunitionsAutocannon.cs index 5161f2b0b5..fd34912391 100644 --- a/Projectiles/Summon/AtlasMunitionsAutocannon.cs +++ b/Projectiles/Summon/AtlasMunitionsAutocannon.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Summon // Handle frames. bool frameChangeInterval = Projectile.frameCounter % 6 == 5; Projectile.frameCounter++; - if (frameChangeInterval && Projectile.frame < Main.projFrames[Projectile.type] - 1) + if (frameChangeInterval && Projectile.frame < Main.projFrames[Type] - 1) Projectile.frame++; // Handle turret frames. diff --git a/Projectiles/Summon/AtlasMunitionsDropPod.cs b/Projectiles/Summon/AtlasMunitionsDropPod.cs index 63355a6e0e..a2850a87e0 100644 --- a/Projectiles/Summon/AtlasMunitionsDropPod.cs +++ b/Projectiles/Summon/AtlasMunitionsDropPod.cs @@ -32,9 +32,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 14; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 14; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -94,8 +94,8 @@ namespace CalamityMod.Projectiles.Summon } } } - if (Projectile.frame >= Main.projFrames[Projectile.type]) - Projectile.frame = Main.projFrames[Projectile.type] - 1; + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.frame = Main.projFrames[Type] - 1; } // Fall downward. @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Summon/AtlasMunitionsDropPodGlow").Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Summon/AtlasMunitionsDropPodUpper.cs b/Projectiles/Summon/AtlasMunitionsDropPodUpper.cs index 8688a7dc16..823f66367d 100644 --- a/Projectiles/Summon/AtlasMunitionsDropPodUpper.cs +++ b/Projectiles/Summon/AtlasMunitionsDropPodUpper.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Summon/AtlasMunitionsLaser.cs b/Projectiles/Summon/AtlasMunitionsLaser.cs index ac2e8bb612..2087709aef 100644 --- a/Projectiles/Summon/AtlasMunitionsLaser.cs +++ b/Projectiles/Summon/AtlasMunitionsLaser.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { Main.projFrames[Type] = 4; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frameCounter++; if (Projectile.frameCounter >= 5) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } diff --git a/Projectiles/Summon/AtlasMunitionsLaserOverdrive.cs b/Projectiles/Summon/AtlasMunitionsLaserOverdrive.cs index cd9a767bb5..b178aadb8e 100644 --- a/Projectiles/Summon/AtlasMunitionsLaserOverdrive.cs +++ b/Projectiles/Summon/AtlasMunitionsLaserOverdrive.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { Main.projFrames[Type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frameCounter++; if (Projectile.frameCounter >= 5) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 drawPosition = Projectile.Center - Main.screenPosition; Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(Color.White), Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, 0, 0); diff --git a/Projectiles/Summon/AureusBomber.cs b/Projectiles/Summon/AureusBomber.cs index 9bae18cf48..4dd7f1f898 100644 --- a/Projectiles/Summon/AureusBomber.cs +++ b/Projectiles/Summon/AureusBomber.cs @@ -16,12 +16,12 @@ namespace CalamityMod.Projectiles.Summon public Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 1; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 1; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -257,7 +257,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var dye = Owner?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } diff --git a/Projectiles/Summon/BabyBloodCrawler.cs b/Projectiles/Summon/BabyBloodCrawler.cs index 3bd8c32128..c3b33c47d2 100644 --- a/Projectiles/Summon/BabyBloodCrawler.cs +++ b/Projectiles/Summon/BabyBloodCrawler.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 11; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 11; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BabyPlaguebringer.cs b/Projectiles/Summon/BabyPlaguebringer.cs index 862928f071..a16bb53690 100644 --- a/Projectiles/Summon/BabyPlaguebringer.cs +++ b/Projectiles/Summon/BabyPlaguebringer.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -227,8 +227,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Vector2 origin = new Vector2(texture.Width / 2f, framing / 2f); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture.Width, framing), Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); diff --git a/Projectiles/Summon/BelladonnaPetal.cs b/Projectiles/Summon/BelladonnaPetal.cs index 245f4f820c..427ed5680b 100644 --- a/Projectiles/Summon/BelladonnaPetal.cs +++ b/Projectiles/Summon/BelladonnaPetal.cs @@ -23,10 +23,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { if (CheckForFiring == 1f) - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return true; } diff --git a/Projectiles/Summon/BelladonnaSpirit.cs b/Projectiles/Summon/BelladonnaSpirit.cs index 81183ea2ce..755728b461 100644 --- a/Projectiles/Summon/BelladonnaSpirit.cs +++ b/Projectiles/Summon/BelladonnaSpirit.cs @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 position = Projectile.Center - Main.screenPosition; Rectangle sourceRectangle = texture.Frame(verticalFrames: AnimationFrames, frameY: Projectile.frame); Vector2 origin = sourceRectangle.Size() * 0.5f; diff --git a/Projectiles/Summon/BetterHornetStinger.cs b/Projectiles/Summon/BetterHornetStinger.cs index a390bb3802..f926621823 100644 --- a/Projectiles/Summon/BetterHornetStinger.cs +++ b/Projectiles/Summon/BetterHornetStinger.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/BlackDragonHead.cs b/Projectiles/Summon/BlackDragonHead.cs index db0b8331bc..752417d970 100644 --- a/Projectiles/Summon/BlackDragonHead.cs +++ b/Projectiles/Summon/BlackDragonHead.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.minionSlots = 2; Projectile.minion = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 100; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 100; } public override void AI() @@ -185,7 +185,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D texBody = ModContent.Request("CalamityMod/Projectiles/Summon/BlackDragonBody").Value; Texture2D texBody2 = ModContent.Request("CalamityMod/Projectiles/Summon/BlackDragonBody2").Value; Texture2D texTail = ModContent.Request("CalamityMod/Projectiles/Summon/BlackDragonTail").Value; diff --git a/Projectiles/Summon/BlackHawkBullet.cs b/Projectiles/Summon/BlackHawkBullet.cs index e327863c9d..7d43617505 100644 --- a/Projectiles/Summon/BlackHawkBullet.cs +++ b/Projectiles/Summon/BlackHawkBullet.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index 44502c4b9f..a3b25021a1 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -304,7 +304,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Summon/BloodBreath.cs b/Projectiles/Summon/BloodBreath.cs index 36ade4f63d..b486c23676 100644 --- a/Projectiles/Summon/BloodBreath.cs +++ b/Projectiles/Summon/BloodBreath.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon } public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BloodRain.cs b/Projectiles/Summon/BloodRain.cs index c54f31062a..9d79d29582 100644 --- a/Projectiles/Summon/BloodRain.cs +++ b/Projectiles/Summon/BloodRain.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BloodSpit.cs b/Projectiles/Summon/BloodSpit.cs index ba286dd60e..5071b436ef 100644 --- a/Projectiles/Summon/BloodSpit.cs +++ b/Projectiles/Summon/BloodSpit.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; if (Projectile.frameCounter++ > 4) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } } diff --git a/Projectiles/Summon/BoneMatter.cs b/Projectiles/Summon/BoneMatter.cs index a1034d2ec6..5b86428a3d 100644 --- a/Projectiles/Summon/BoneMatter.cs +++ b/Projectiles/Summon/BoneMatter.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.frameCounter++ % 9 == 8) { Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); } } diff --git a/Projectiles/Summon/BoneMatter2.cs b/Projectiles/Summon/BoneMatter2.cs index 8ad45c4663..f13ef7e259 100644 --- a/Projectiles/Summon/BoneMatter2.cs +++ b/Projectiles/Summon/BoneMatter2.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.frameCounter % 9 == 8) { Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); } } diff --git a/Projectiles/Summon/BrimseekerAuraBall.cs b/Projectiles/Summon/BrimseekerAuraBall.cs index 243c888d82..5579bd266e 100644 --- a/Projectiles/Summon/BrimseekerAuraBall.cs +++ b/Projectiles/Summon/BrimseekerAuraBall.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BrimstoneDartMinion.cs b/Projectiles/Summon/BrimstoneDartMinion.cs index 60f7c8aee1..d0161a2496 100644 --- a/Projectiles/Summon/BrimstoneDartMinion.cs +++ b/Projectiles/Summon/BrimstoneDartMinion.cs @@ -14,10 +14,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Projectile.Opacity = Utils.GetLerpValue(300f, 285f, Projectile.timeLeft, true) * Utils.GetLerpValue(0f, 15f, Projectile.timeLeft, true); Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { lightColor.R = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/BrimstoneDartSummon.cs b/Projectiles/Summon/BrimstoneDartSummon.cs index 61cc1c5666..a422cd416c 100644 --- a/Projectiles/Summon/BrimstoneDartSummon.cs +++ b/Projectiles/Summon/BrimstoneDartSummon.cs @@ -12,10 +12,10 @@ namespace CalamityMod.Projectiles.Summon public override string Texture => "CalamityMod/Projectiles/Boss/BrimstoneBarrage"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frameCounter++; if (Projectile.frameCounter % 5 == 4) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.Opacity = Utils.GetLerpValue(0f, 40f, Projectile.timeLeft, true); @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { lightColor.R = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/BrimstoneElementalMinion.cs b/Projectiles/Summon/BrimstoneElementalMinion.cs index 7abda0562d..9def69225a 100644 --- a/Projectiles/Summon/BrimstoneElementalMinion.cs +++ b/Projectiles/Summon/BrimstoneElementalMinion.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BrimstoneExplosionMinion.cs b/Projectiles/Summon/BrimstoneExplosionMinion.cs index c9c5c3e6cc..2e2db8edf5 100644 --- a/Projectiles/Summon/BrimstoneExplosionMinion.cs +++ b/Projectiles/Summon/BrimstoneExplosionMinion.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BrimstoneFireSummon.cs b/Projectiles/Summon/BrimstoneFireSummon.cs index 166873d105..d3399e3df5 100644 --- a/Projectiles/Summon/BrimstoneFireSummon.cs +++ b/Projectiles/Summon/BrimstoneFireSummon.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/BrimstoneFireballMinion.cs b/Projectiles/Summon/BrimstoneFireballMinion.cs index b547525944..3f6fa09d13 100644 --- a/Projectiles/Summon/BrimstoneFireballMinion.cs +++ b/Projectiles/Summon/BrimstoneFireballMinion.cs @@ -14,10 +14,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/BrimstoneLaserSummon.cs b/Projectiles/Summon/BrimstoneLaserSummon.cs index 5c7607822d..4e5fda6383 100644 --- a/Projectiles/Summon/BrimstoneLaserSummon.cs +++ b/Projectiles/Summon/BrimstoneLaserSummon.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CalamarisLamentMinion.cs b/Projectiles/Summon/CalamarisLamentMinion.cs index a52f6bf1ef..126fe4e9d6 100644 --- a/Projectiles/Summon/CalamarisLamentMinion.cs +++ b/Projectiles/Summon/CalamarisLamentMinion.cs @@ -216,7 +216,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/CalamarisLamentProjectile.cs b/Projectiles/Summon/CalamarisLamentProjectile.cs index e15d03f94b..fc710a4973 100644 --- a/Projectiles/Summon/CalamarisLamentProjectile.cs +++ b/Projectiles/Summon/CalamarisLamentProjectile.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/Calamitamini.cs b/Projectiles/Summon/Calamitamini.cs index 7c2f5709c4..ed78f5fb49 100644 --- a/Projectiles/Summon/Calamitamini.cs +++ b/Projectiles/Summon/Calamitamini.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -238,8 +238,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int yStart = frameHeight * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/Cataclymini.cs b/Projectiles/Summon/Cataclymini.cs index 6b31ab97db..13d54779ca 100644 --- a/Projectiles/Summon/Cataclymini.cs +++ b/Projectiles/Summon/Cataclymini.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -232,8 +232,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int yStart = frameHeight * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/CataclysmSummon.cs b/Projectiles/Summon/CataclysmSummon.cs index 2a6fcb532d..8c2597e858 100644 --- a/Projectiles/Summon/CataclysmSummon.cs +++ b/Projectiles/Summon/CataclysmSummon.cs @@ -17,11 +17,11 @@ namespace CalamityMod.Projectiles.Summon public override string Texture => "CalamityMod/NPCs/SupremeCalamitas/SupremeCataclysm"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = false; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = false; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.MinionSacrificable[Type] = false; + ProjectileID.Sets.MinionTargettingFeature[Type] = false; } public override void SetDefaults() @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(3, 9, Projectile.frame / 9, Projectile.frame % 9); Vector2 origin = frame.Size() * 0.5f; for (int i = 0; i < Projectile.oldPos.Length; i++) diff --git a/Projectiles/Summon/Catastromini.cs b/Projectiles/Summon/Catastromini.cs index 7f7d256486..614ee703fe 100644 --- a/Projectiles/Summon/Catastromini.cs +++ b/Projectiles/Summon/Catastromini.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -84,8 +84,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int yStart = frameHeight * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/CatastropheSummon.cs b/Projectiles/Summon/CatastropheSummon.cs index 48198377b8..d44f9b9b8b 100644 --- a/Projectiles/Summon/CatastropheSummon.cs +++ b/Projectiles/Summon/CatastropheSummon.cs @@ -16,11 +16,11 @@ namespace CalamityMod.Projectiles.Summon public override string Texture => "CalamityMod/NPCs/SupremeCalamitas/SupremeCatastrophe"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = false; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = false; + Main.projFrames[Type] = 6; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.MinionSacrificable[Type] = false; + ProjectileID.Sets.MinionTargettingFeature[Type] = false; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(2, 8, Projectile.frame / 8, Projectile.frame % 8); Vector2 origin = frame.Size() * 0.5f; for (int i = 0; i < Projectile.oldPos.Length; i++) diff --git a/Projectiles/Summon/CausticStaffProjectile.cs b/Projectiles/Summon/CausticStaffProjectile.cs index 1a93a130b9..79ad9f70d0 100644 --- a/Projectiles/Summon/CausticStaffProjectile.cs +++ b/Projectiles/Summon/CausticStaffProjectile.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CausticStaffSummon.cs b/Projectiles/Summon/CausticStaffSummon.cs index 41f4126702..ca75b21aa9 100644 --- a/Projectiles/Summon/CausticStaffSummon.cs +++ b/Projectiles/Summon/CausticStaffSummon.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -220,7 +220,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/CelestialAxeMinion.cs b/Projectiles/Summon/CelestialAxeMinion.cs index 0701bef64a..888c97d688 100644 --- a/Projectiles/Summon/CelestialAxeMinion.cs +++ b/Projectiles/Summon/CelestialAxeMinion.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/Cinder.cs b/Projectiles/Summon/Cinder.cs index 4ed48a74b7..3645d9f464 100644 --- a/Projectiles/Summon/Cinder.cs +++ b/Projectiles/Summon/Cinder.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CinderBlossom.cs b/Projectiles/Summon/CinderBlossom.cs index c28866c326..0481ef8735 100644 --- a/Projectiles/Summon/CinderBlossom.cs +++ b/Projectiles/Summon/CinderBlossom.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CloudElementalMinion.cs b/Projectiles/Summon/CloudElementalMinion.cs index bb4b1eacb7..2a8fa900b4 100644 --- a/Projectiles/Summon/CloudElementalMinion.cs +++ b/Projectiles/Summon/CloudElementalMinion.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 8; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs index b8911f6de1..81967d5335 100644 --- a/Projectiles/Summon/CnidarianJellyfishOnTheString.cs +++ b/Projectiles/Summon/CnidarianJellyfishOnTheString.cs @@ -241,7 +241,7 @@ namespace CalamityMod.Projectiles.Summon PrimitiveRenderer.RenderTrail(segmentPositions, new(PrimWidthFunction, PrimColorFunction), 66); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 squish = new Vector2(2 - StretchRatio(), StretchRatio()); diff --git a/Projectiles/Summon/CorroslimeMinion.cs b/Projectiles/Summon/CorroslimeMinion.cs index fde825cff4..06d676e565 100644 --- a/Projectiles/Summon/CorroslimeMinion.cs +++ b/Projectiles/Summon/CorroslimeMinion.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -82,8 +82,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.cs b/Projectiles/Summon/CorruptionSlimeGodMinion.cs index 7127930079..3f0975c5ca 100644 --- a/Projectiles/Summon/CorruptionSlimeGodMinion.cs +++ b/Projectiles/Summon/CorruptionSlimeGodMinion.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 2; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CosmicBlast.cs b/Projectiles/Summon/CosmicBlast.cs index 157243ab88..1ae50a8b9d 100644 --- a/Projectiles/Summon/CosmicBlast.cs +++ b/Projectiles/Summon/CosmicBlast.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -66,8 +66,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/CosmicBlastBig.cs b/Projectiles/Summon/CosmicBlastBig.cs index 32a37bec78..0706b0aca0 100644 --- a/Projectiles/Summon/CosmicBlastBig.cs +++ b/Projectiles/Summon/CosmicBlastBig.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/CosmicEnergySpiral.cs b/Projectiles/Summon/CosmicEnergySpiral.cs index a57cf8ad25..bc06a90b67 100644 --- a/Projectiles/Summon/CosmicEnergySpiral.cs +++ b/Projectiles/Summon/CosmicEnergySpiral.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projPet[Type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CosmicViperConcussionMissile.cs b/Projectiles/Summon/CosmicViperConcussionMissile.cs index 2766a26437..933047d037 100644 --- a/Projectiles/Summon/CosmicViperConcussionMissile.cs +++ b/Projectiles/Summon/CosmicViperConcussionMissile.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/CosmicViperHomingRocket.cs b/Projectiles/Summon/CosmicViperHomingRocket.cs index 1518acef74..945bfb566d 100644 --- a/Projectiles/Summon/CosmicViperHomingRocket.cs +++ b/Projectiles/Summon/CosmicViperHomingRocket.cs @@ -11,11 +11,11 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/CosmicViperSplitRocket1.cs b/Projectiles/Summon/CosmicViperSplitRocket1.cs index 08b5b6355a..6b28bce238 100644 --- a/Projectiles/Summon/CosmicViperSplitRocket1.cs +++ b/Projectiles/Summon/CosmicViperSplitRocket1.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/CosmicViperSplittingRocket.cs b/Projectiles/Summon/CosmicViperSplittingRocket.cs index 1d69cf8c9f..47f09be8d6 100644 --- a/Projectiles/Summon/CosmicViperSplittingRocket.cs +++ b/Projectiles/Summon/CosmicViperSplittingRocket.cs @@ -11,11 +11,11 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -164,7 +164,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -195,7 +195,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/CosmicViperSummon.cs b/Projectiles/Summon/CosmicViperSummon.cs index 8f62806777..747eb5e5c6 100644 --- a/Projectiles/Summon/CosmicViperSummon.cs +++ b/Projectiles/Summon/CosmicViperSummon.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -311,8 +311,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int y6 = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) @@ -326,7 +326,7 @@ namespace CalamityMod.Projectiles.Summon public override void PostDraw(Color lightColor) { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/CosmicViperGlow").Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = texture.Height / Main.projFrames[Type]; int y6 = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Summon/CosmilampBeam.cs b/Projectiles/Summon/CosmilampBeam.cs index c6e9475390..59c85fe961 100644 --- a/Projectiles/Summon/CosmilampBeam.cs +++ b/Projectiles/Summon/CosmilampBeam.cs @@ -24,10 +24,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 32; } public override void SetDefaults() diff --git a/Projectiles/Summon/CosmilampMinion.cs b/Projectiles/Summon/CosmilampMinion.cs index 598b85622b..bf33608364 100644 --- a/Projectiles/Summon/CosmilampMinion.cs +++ b/Projectiles/Summon/CosmilampMinion.cs @@ -38,11 +38,11 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.TrailCacheLength[Type] = 8; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Summon public void DecideFrames() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Type]; } public void HoverInPlace() @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Summon/CrimslimeMinion.cs b/Projectiles/Summon/CrimslimeMinion.cs index f4239eba8b..2ce626218e 100644 --- a/Projectiles/Summon/CrimslimeMinion.cs +++ b/Projectiles/Summon/CrimslimeMinion.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -82,8 +82,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture2D13.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture2D13.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/CrimsonSlimeGodMinion.cs b/Projectiles/Summon/CrimsonSlimeGodMinion.cs index de7c9f436c..fa6f533cff 100644 --- a/Projectiles/Summon/CrimsonSlimeGodMinion.cs +++ b/Projectiles/Summon/CrimsonSlimeGodMinion.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 2; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/DaedalusCrystal.cs b/Projectiles/Summon/DaedalusCrystal.cs index 590cf7215a..67dd230937 100644 --- a/Projectiles/Summon/DaedalusCrystal.cs +++ b/Projectiles/Summon/DaedalusCrystal.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/DaedalusCrystalShot.cs b/Projectiles/Summon/DaedalusCrystalShot.cs index 10f72febfa..8cfb190581 100644 --- a/Projectiles/Summon/DaedalusCrystalShot.cs +++ b/Projectiles/Summon/DaedalusCrystalShot.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/DaedalusGolem.cs b/Projectiles/Summon/DaedalusGolem.cs index 2febf13996..0ac3d2a6ab 100644 --- a/Projectiles/Summon/DaedalusGolem.cs +++ b/Projectiles/Summon/DaedalusGolem.cs @@ -25,9 +25,9 @@ namespace CalamityMod.Projectiles.Summon public ref float StuckJumpSpeed => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 18; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 18; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Summon #region AI public override void AI() { - Main.projFrames[Projectile.type] = 16; + Main.projFrames[Type] = 16; bool isCorrectProjectile = Projectile.type == ModContent.ProjectileType(); Owner.AddBuff(ModContent.BuffType(), 3600); if (isCorrectProjectile) diff --git a/Projectiles/Summon/DaedalusLightning.cs b/Projectiles/Summon/DaedalusLightning.cs index 4d6959f07d..23d7b00dda 100644 --- a/Projectiles/Summon/DaedalusLightning.cs +++ b/Projectiles/Summon/DaedalusLightning.cs @@ -24,9 +24,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 100; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 100; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() diff --git a/Projectiles/Summon/DaedalusPellet.cs b/Projectiles/Summon/DaedalusPellet.cs index 6ff153d027..4589199980 100644 --- a/Projectiles/Summon/DaedalusPellet.cs +++ b/Projectiles/Summon/DaedalusPellet.cs @@ -10,10 +10,10 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } } diff --git a/Projectiles/Summon/DankCreeperMinion.cs b/Projectiles/Summon/DankCreeperMinion.cs index d18311e5fc..98dadc21e2 100644 --- a/Projectiles/Summon/DankCreeperMinion.cs +++ b/Projectiles/Summon/DankCreeperMinion.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -221,7 +221,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/DazzlingStabber.cs b/Projectiles/Summon/DazzlingStabber.cs index 887ba13c2f..45757eb7ee 100644 --- a/Projectiles/Summon/DazzlingStabber.cs +++ b/Projectiles/Summon/DazzlingStabber.cs @@ -16,11 +16,11 @@ namespace CalamityMod.Projectiles.Summon public ref float RestOffsetAngle => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 25; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 25; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frameCounter++; if (Projectile.frameCounter % 6 == 0) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public void SliceTarget(NPC target) diff --git a/Projectiles/Summon/DeathstareBeam.cs b/Projectiles/Summon/DeathstareBeam.cs index 0346ee2ea4..4c8b737425 100644 --- a/Projectiles/Summon/DeathstareBeam.cs +++ b/Projectiles/Summon/DeathstareBeam.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public ref float OwnerUUID => ref Projectile.ai[0]; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Summon } public override bool PreDraw(ref Color lightColor) { - Texture2D beamTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D beamTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; Vector2 drawScale = new Vector2(0.55f, Projectile.velocity.Length() / beamTexture.Height * 20f); Color color = Color.White * 2.1f * Projectile.Opacity; diff --git a/Projectiles/Summon/DeathstareEyeball.cs b/Projectiles/Summon/DeathstareEyeball.cs index fa43a54fce..6ef2b94958 100644 --- a/Projectiles/Summon/DeathstareEyeball.cs +++ b/Projectiles/Summon/DeathstareEyeball.cs @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D eyeTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D eyeTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = eyeTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); SpriteEffects spriteEffects = Owner.gravDir == 1 ? SpriteEffects.None : SpriteEffects.FlipVertically; Main.EntitySpriteDraw(eyeTexture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); diff --git a/Projectiles/Summon/DormantBrimseekerAura.cs b/Projectiles/Summon/DormantBrimseekerAura.cs index e92f6098c6..8f9fea1c46 100644 --- a/Projectiles/Summon/DormantBrimseekerAura.cs +++ b/Projectiles/Summon/DormantBrimseekerAura.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/DormantBrimseekerBab.cs b/Projectiles/Summon/DormantBrimseekerBab.cs index cfa29fec4b..f26f66f14a 100644 --- a/Projectiles/Summon/DormantBrimseekerBab.cs +++ b/Projectiles/Summon/DormantBrimseekerBab.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 2; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; } public override void SetDefaults() @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Summon { if ((Projectile.ai[0] > 0f && Projectile.ai[0] <= MaxChargeTime && Projectile.velocity.Length() >= 8f) || SeekingTarget) { - Texture2D projectileTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D projectileTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D flameTexture = TextureAssets.Extra[ExtrasID.MeteorHeadFlame].Value; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) @@ -167,7 +167,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.ai[0] > 30f) completionRatio = 1f - (30f - Projectile.ai[0]) / 30f; - Vector2 modifiedProjectileTexture = new Vector2(projectileTexture.Width / 2, projectileTexture.Height / Main.projFrames[Projectile.type] / 2); + Vector2 modifiedProjectileTexture = new Vector2(projectileTexture.Width / 2, projectileTexture.Height / Main.projFrames[Type] / 2); for (int oldPositionDrawIndex = 6; oldPositionDrawIndex >= 0; oldPositionDrawIndex--) { Color drawColor = Color.Lerp(Color.LightGoldenrodYellow, new Color(142, 24, 67), completionRatio); @@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.Summon Rectangle flameFrameRectangle = flameTexture.Frame(1, 4, 0, yFrame); Vector2 flameOrigin = new Vector2(flameTexture.Width / 2, flameTexture.Height / 8 + 14); Main.EntitySpriteDraw(flameTexture, - new Vector2(Projectile.oldPos[oldPositionDrawIndex].X - Main.screenPosition.X + Projectile.width / 2 - projectileTexture.Width * Projectile.scale / 2f + modifiedProjectileTexture.X * Projectile.scale, Projectile.oldPos[oldPositionDrawIndex].Y - Main.screenPosition.Y + Projectile.height - projectileTexture.Height * Projectile.scale / Main.projFrames[Projectile.type] + 4f + modifiedProjectileTexture.Y * Projectile.scale + Projectile.gfxOffY), + new Vector2(Projectile.oldPos[oldPositionDrawIndex].X - Main.screenPosition.X + Projectile.width / 2 - projectileTexture.Width * Projectile.scale / 2f + modifiedProjectileTexture.X * Projectile.scale, Projectile.oldPos[oldPositionDrawIndex].Y - Main.screenPosition.Y + Projectile.height - projectileTexture.Height * Projectile.scale / Main.projFrames[Type] + 4f + modifiedProjectileTexture.Y * Projectile.scale + Projectile.gfxOffY), new Rectangle?(flameFrameRectangle), drawColor, Projectile.oldRot[oldPositionDrawIndex] + Projectile.oldSpriteDirection[oldPositionDrawIndex] * MathHelper.PiOver2, diff --git a/Projectiles/Summon/DormantBrimseekerSummoner.cs b/Projectiles/Summon/DormantBrimseekerSummoner.cs index e9371d0064..3f8591ac99 100644 --- a/Projectiles/Summon/DormantBrimseekerSummoner.cs +++ b/Projectiles/Summon/DormantBrimseekerSummoner.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/Dreadmine.cs b/Projectiles/Summon/Dreadmine.cs index 31ba1a3c59..6a71d0f425 100644 --- a/Projectiles/Summon/Dreadmine.cs +++ b/Projectiles/Summon/Dreadmine.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/DreadmineTurret.cs b/Projectiles/Summon/DreadmineTurret.cs index ee71f068e6..eb8f33d7f9 100644 --- a/Projectiles/Summon/DreadmineTurret.cs +++ b/Projectiles/Summon/DreadmineTurret.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/EXPLODINGFROG.cs b/Projectiles/Summon/EXPLODINGFROG.cs index a52bc47d1c..a54e7caea0 100644 --- a/Projectiles/Summon/EXPLODINGFROG.cs +++ b/Projectiles/Summon/EXPLODINGFROG.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon public const float ExplosionAngleVariance = 0.8f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/EndoBeam.cs b/Projectiles/Summon/EndoBeam.cs index c2e96a448f..54675d40ef 100644 --- a/Projectiles/Summon/EndoBeam.cs +++ b/Projectiles/Summon/EndoBeam.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/EndoCooperBody.cs b/Projectiles/Summon/EndoCooperBody.cs index a2bbd06838..e4200d35ec 100644 --- a/Projectiles/Summon/EndoCooperBody.cs +++ b/Projectiles/Summon/EndoCooperBody.cs @@ -19,10 +19,10 @@ namespace CalamityMod.Projectiles.Summon private int laserdirection = 1; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -339,7 +339,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var dye = Main.player[Projectile.owner]?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } diff --git a/Projectiles/Summon/EndoCooperLimbs.cs b/Projectiles/Summon/EndoCooperLimbs.cs index cb9330fbc4..80b5efc46f 100644 --- a/Projectiles/Summon/EndoCooperLimbs.cs +++ b/Projectiles/Summon/EndoCooperLimbs.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Summon private int AttackMode = 0; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Summon return false; var dye = Main.player[Projectile.owner]?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } diff --git a/Projectiles/Summon/EndoFire.cs b/Projectiles/Summon/EndoFire.cs index 5f3687bdb6..697fa142f3 100644 --- a/Projectiles/Summon/EndoFire.cs +++ b/Projectiles/Summon/EndoFire.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/EndoHydraBody.cs b/Projectiles/Summon/EndoHydraBody.cs index 6d74607809..59dfdbf2f9 100644 --- a/Projectiles/Summon/EndoHydraBody.cs +++ b/Projectiles/Summon/EndoHydraBody.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Summon public const float DistanceToCheck = 2800f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.NeedsUUID[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.frameCounter++ > (potentialTarget is null ? 8 : 6)) { - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; Projectile.frameCounter = 0; } diff --git a/Projectiles/Summon/EndoHydraHead.cs b/Projectiles/Summon/EndoHydraHead.cs index 6fdcbd8e02..70066ab2dc 100644 --- a/Projectiles/Summon/EndoHydraHead.cs +++ b/Projectiles/Summon/EndoHydraHead.cs @@ -25,11 +25,11 @@ namespace CalamityMod.Projectiles.Summon } public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -114,13 +114,13 @@ namespace CalamityMod.Projectiles.Summon } if (Time % 40f >= 33f) - Projectile.frame = Main.projFrames[Projectile.type] - 1; + Projectile.frame = Main.projFrames[Type] - 1; else if (Time % 40f >= 27f) - Projectile.frame = Main.projFrames[Projectile.type] - 2; + Projectile.frame = Main.projFrames[Type] - 2; else if (Time % 40f >= 22f) - Projectile.frame = Main.projFrames[Projectile.type] - 3; + Projectile.frame = Main.projFrames[Type] - 3; else if (Time % 40f >= 17f) - Projectile.frame = Main.projFrames[Projectile.type] - 4; + Projectile.frame = Main.projFrames[Type] - 4; Projectile.direction = Projectile.spriteDirection = (player.Center.X - Projectile.Center.X > 0).ToDirectionInt(); if (Math.Abs(player.Center.X - Projectile.Center.X) < 80f) @@ -229,10 +229,10 @@ namespace CalamityMod.Projectiles.Summon // PreDraw is used instead of PostDraw because of draw order. Drawing the chains after the head // would cause them to be drawn on top of the head, which we do not want. - Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(headTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, - headTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), + headTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame), lightColor, Projectile.rotation, Projectile.Size * 0.5f, diff --git a/Projectiles/Summon/EndoHydraRay.cs b/Projectiles/Summon/EndoHydraRay.cs index 17a8fd6e1b..afc80011de 100644 --- a/Projectiles/Summon/EndoHydraRay.cs +++ b/Projectiles/Summon/EndoHydraRay.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/EndoIceShard.cs b/Projectiles/Summon/EndoIceShard.cs index 7613630e96..eb4dab939e 100644 --- a/Projectiles/Summon/EndoIceShard.cs +++ b/Projectiles/Summon/EndoIceShard.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/EyeOfNightCell.cs b/Projectiles/Summon/EyeOfNightCell.cs index fb4319e683..ffa1a756c0 100644 --- a/Projectiles/Summon/EyeOfNightCell.cs +++ b/Projectiles/Summon/EyeOfNightCell.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/EyeOfNightSummon.cs b/Projectiles/Summon/EyeOfNightSummon.cs index 25b0e139ac..ffeccfa56a 100644 --- a/Projectiles/Summon/EyeOfNightSummon.cs +++ b/Projectiles/Summon/EyeOfNightSummon.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Summon public const int ShootRate = 60; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FieryDraconid.cs b/Projectiles/Summon/FieryDraconid.cs index dcd0a2b075..0fe0cab325 100644 --- a/Projectiles/Summon/FieryDraconid.cs +++ b/Projectiles/Summon/FieryDraconid.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Projectiles.Summon public const int FireballShootRate = 20; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 10; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frame = 6; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 6; } @@ -239,8 +239,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Rectangle(0, y6, texture2D13.Width, framing), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture2D13.Width / 2f, framing / 2f), Projectile.scale, spriteEffects, 0); return false; diff --git a/Projectiles/Summon/FlameBlast.cs b/Projectiles/Summon/FlameBlast.cs index 58ec9363b6..b4b5709f1e 100644 --- a/Projectiles/Summon/FlameBlast.cs +++ b/Projectiles/Summon/FlameBlast.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/FlameBurst.cs b/Projectiles/Summon/FlameBurst.cs index 647f466890..275894d092 100644 --- a/Projectiles/Summon/FlameBurst.cs +++ b/Projectiles/Summon/FlameBurst.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/FleshBlood.cs b/Projectiles/Summon/FleshBlood.cs index cab404b853..7729f2a5fd 100644 --- a/Projectiles/Summon/FleshBlood.cs +++ b/Projectiles/Summon/FleshBlood.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/FlowersOfMortalityPetal.cs b/Projectiles/Summon/FlowersOfMortalityPetal.cs index 5f4b0f4b04..ebf2c80b15 100644 --- a/Projectiles/Summon/FlowersOfMortalityPetal.cs +++ b/Projectiles/Summon/FlowersOfMortalityPetal.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Summon public float Hue => OffsetAngle % MathHelper.TwoPi / MathHelper.TwoPi % 1f; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D petalTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D petalTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D coreTexture = ModContent.Request("CalamityMod/Projectiles/Summon/FlowersOfMortalityCore").Value; Color drawColor = Main.hslToRgb(Hue, 0.95f, 0.5f) * 2.3f; diff --git a/Projectiles/Summon/FlyingOrthocera.cs b/Projectiles/Summon/FlyingOrthocera.cs index 457566b0c8..11ce13b68c 100644 --- a/Projectiles/Summon/FlyingOrthocera.cs +++ b/Projectiles/Summon/FlyingOrthocera.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/FlyingOrthoceraStream.cs b/Projectiles/Summon/FlyingOrthoceraStream.cs index 7304b46fb2..b7a9f750ac 100644 --- a/Projectiles/Summon/FlyingOrthoceraStream.cs +++ b/Projectiles/Summon/FlyingOrthoceraStream.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/ForbiddenCircletEater.cs b/Projectiles/Summon/ForbiddenCircletEater.cs index 25079382cc..90472d54b1 100644 --- a/Projectiles/Summon/ForbiddenCircletEater.cs +++ b/Projectiles/Summon/ForbiddenCircletEater.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/FrogGore1.cs b/Projectiles/Summon/FrogGore1.cs index ebb7d39b47..7c325f64d6 100644 --- a/Projectiles/Summon/FrogGore1.cs +++ b/Projectiles/Summon/FrogGore1.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FrogGore2.cs b/Projectiles/Summon/FrogGore2.cs index 4fa8ad1efd..7edcfe8e55 100644 --- a/Projectiles/Summon/FrogGore2.cs +++ b/Projectiles/Summon/FrogGore2.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FrogGore3.cs b/Projectiles/Summon/FrogGore3.cs index a2ff4f7b71..aeeccd5a2a 100644 --- a/Projectiles/Summon/FrogGore3.cs +++ b/Projectiles/Summon/FrogGore3.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FrogGore4.cs b/Projectiles/Summon/FrogGore4.cs index 826b8a7745..9e6b404a0c 100644 --- a/Projectiles/Summon/FrogGore4.cs +++ b/Projectiles/Summon/FrogGore4.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FrogGore5.cs b/Projectiles/Summon/FrogGore5.cs index 6dfaba3b8b..59b42510c4 100644 --- a/Projectiles/Summon/FrogGore5.cs +++ b/Projectiles/Summon/FrogGore5.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FrostBeam.cs b/Projectiles/Summon/FrostBeam.cs index 4e60263f00..387742cada 100644 --- a/Projectiles/Summon/FrostBeam.cs +++ b/Projectiles/Summon/FrostBeam.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/FrostBlossom.cs b/Projectiles/Summon/FrostBlossom.cs index 3c203d287c..c430427aad 100644 --- a/Projectiles/Summon/FrostBlossom.cs +++ b/Projectiles/Summon/FrostBlossom.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/FrostMistFriendly.cs b/Projectiles/Summon/FrostMistFriendly.cs index 35076dce8d..b315063341 100644 --- a/Projectiles/Summon/FrostMistFriendly.cs +++ b/Projectiles/Summon/FrostMistFriendly.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 8; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -98,8 +98,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture2D13.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture2D13.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/GammaCanister.cs b/Projectiles/Summon/GammaCanister.cs index fdd740fc5e..e42c75fcde 100644 --- a/Projectiles/Summon/GammaCanister.cs +++ b/Projectiles/Summon/GammaCanister.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public const float Gravity = 0.2f; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/GammaHead.cs b/Projectiles/Summon/GammaHead.cs index 62059832a9..8ef0bd290e 100644 --- a/Projectiles/Summon/GammaHead.cs +++ b/Projectiles/Summon/GammaHead.cs @@ -31,9 +31,9 @@ namespace CalamityMod.Projectiles.Summon } public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -136,8 +136,8 @@ namespace CalamityMod.Projectiles.Summon // Open the mouth prior to firing. if (Time % canisterShootRate > canisterShootRate - 20) - Projectile.frame = (int)(Main.projFrames[Projectile.type] * Utils.GetLerpValue(canisterShootRate - 20, canisterShootRate - 4, Time % canisterShootRate, true)); - Projectile.frame %= Main.projFrames[Projectile.type]; + Projectile.frame = (int)(Main.projFrames[Type] * Utils.GetLerpValue(canisterShootRate - 20, canisterShootRate - 4, Time % canisterShootRate, true)); + Projectile.frame %= Main.projFrames[Type]; Vector2 spawnPosition = Projectile.Center; float shootSpeed = MathHelper.Lerp(8f, 29f, Utils.GetLerpValue(90f, 850f, target.Distance(spawnPosition), true)); @@ -251,10 +251,10 @@ namespace CalamityMod.Projectiles.Summon 0); } - Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D headTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(headTexture, Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY, - headTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), + headTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame), lightColor, Projectile.rotation, Projectile.Size * 0.5f, diff --git a/Projectiles/Summon/GastricBelcher.cs b/Projectiles/Summon/GastricBelcher.cs index 3be0bd40f2..12856293d4 100644 --- a/Projectiles/Summon/GastricBelcher.cs +++ b/Projectiles/Summon/GastricBelcher.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -303,8 +303,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int y6 = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Summon/GastricBelcherBubble.cs b/Projectiles/Summon/GastricBelcherBubble.cs index d071f10363..8a1aee8724 100644 --- a/Projectiles/Summon/GastricBelcherBubble.cs +++ b/Projectiles/Summon/GastricBelcherBubble.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/GastricBelcherVomit.cs b/Projectiles/Summon/GastricBelcherVomit.cs index 91a23b1890..f5c7e0265a 100644 --- a/Projectiles/Summon/GastricBelcherVomit.cs +++ b/Projectiles/Summon/GastricBelcherVomit.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon texture = ModContent.Request("CalamityMod/Projectiles/Summon/GastricBelcherVomit3").Value; break; default: - texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; break; } Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/GhostFire.cs b/Projectiles/Summon/GhostFire.cs index fa88888a45..d4f5d8136a 100644 --- a/Projectiles/Summon/GhostFire.cs +++ b/Projectiles/Summon/GhostFire.cs @@ -17,10 +17,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() diff --git a/Projectiles/Summon/GiantIbanRobotOfDoom.cs b/Projectiles/Summon/GiantIbanRobotOfDoom.cs index c79c442c8f..16d8746566 100644 --- a/Projectiles/Summon/GiantIbanRobotOfDoom.cs +++ b/Projectiles/Summon/GiantIbanRobotOfDoom.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/GlacialEmbracePointyThing.cs b/Projectiles/Summon/GlacialEmbracePointyThing.cs index 92fd4aaa07..f22e854e2f 100644 --- a/Projectiles/Summon/GlacialEmbracePointyThing.cs +++ b/Projectiles/Summon/GlacialEmbracePointyThing.cs @@ -53,8 +53,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 7; } public override void SetDefaults() @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Summon } if (circlingPlayer) { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; if (Projectile.penetrate == 1) { Projectile.penetrate++; @@ -308,7 +308,7 @@ namespace CalamityMod.Projectiles.Summon { if (!circling || (!circlingPlayer && recharging == 0)) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, !circlingPlayer ? 1 : 3); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, !circlingPlayer ? 1 : 3); } return true; } diff --git a/Projectiles/Summon/HallowedStarSummon.cs b/Projectiles/Summon/HallowedStarSummon.cs index c87acbafe7..e009601059 100644 --- a/Projectiles/Summon/HallowedStarSummon.cs +++ b/Projectiles/Summon/HallowedStarSummon.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -82,7 +82,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { Projectile.DrawStarTrail(Color.Purple, Color.White); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/HarvestStaffSentry.cs b/Projectiles/Summon/HarvestStaffSentry.cs index f4eeecaec9..04734f3ba3 100644 --- a/Projectiles/Summon/HarvestStaffSentry.cs +++ b/Projectiles/Summon/HarvestStaffSentry.cs @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Rectangle frame = texture.Frame(verticalFrames: Main.projFrames[Type], frameY: Projectile.frame); Color drawColor = Projectile.GetAlpha(lightColor); diff --git a/Projectiles/Summon/HauntedDishes.cs b/Projectiles/Summon/HauntedDishes.cs index 3e06fb2e60..6fc3619098 100644 --- a/Projectiles/Summon/HauntedDishes.cs +++ b/Projectiles/Summon/HauntedDishes.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - Main.projFrames[Projectile.type] = 19; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + Main.projFrames[Type] = 19; } public override void SetDefaults() diff --git a/Projectiles/Summon/HermitCrabMinion.cs b/Projectiles/Summon/HermitCrabMinion.cs index 924e296129..c40b5a5741 100644 --- a/Projectiles/Summon/HermitCrabMinion.cs +++ b/Projectiles/Summon/HermitCrabMinion.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 9; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 9; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/HerringAI.cs b/Projectiles/Summon/HerringAI.cs index 9e2f1e0400..1c5e8e6087 100644 --- a/Projectiles/Summon/HerringAI.cs +++ b/Projectiles/Summon/HerringAI.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/HerringMinion.cs b/Projectiles/Summon/HerringMinion.cs index 838e71f4ec..050a280eea 100644 --- a/Projectiles/Summon/HerringMinion.cs +++ b/Projectiles/Summon/HerringMinion.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 8; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon public void DoAnimation() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Type]; } public void PointInRightDirection(Projectile origin, NPC target) diff --git a/Projectiles/Summon/Hive.cs b/Projectiles/Summon/Hive.cs index 1c04ec50a5..7f93da745a 100644 --- a/Projectiles/Summon/Hive.cs +++ b/Projectiles/Summon/Hive.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/Hiveling.cs b/Projectiles/Summon/Hiveling.cs index 975c3bb882..5066e2c133 100644 --- a/Projectiles/Summon/Hiveling.cs +++ b/Projectiles/Summon/Hiveling.cs @@ -12,11 +12,11 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var dye = Main.player[Projectile.owner]?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } } diff --git a/Projectiles/Summon/HomingGammaBullet.cs b/Projectiles/Summon/HomingGammaBullet.cs index a01a4a13b7..55cbf798a7 100644 --- a/Projectiles/Summon/HomingGammaBullet.cs +++ b/Projectiles/Summon/HomingGammaBullet.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/HowlsHeartCalcifer.cs b/Projectiles/Summon/HowlsHeartCalcifer.cs index b09f42ac20..b82c23fd29 100644 --- a/Projectiles/Summon/HowlsHeartCalcifer.cs +++ b/Projectiles/Summon/HowlsHeartCalcifer.cs @@ -9,9 +9,9 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.LightPet[Projectile.type] = true; + Main.projFrames[Type] = 4; + Main.projPet[Type] = true; + ProjectileID.Sets.LightPet[Type] = true; } public override void SetDefaults() @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/HowlsHeartFireball.cs b/Projectiles/Summon/HowlsHeartFireball.cs index 947c20dbe2..a0a3af3ecf 100644 --- a/Projectiles/Summon/HowlsHeartFireball.cs +++ b/Projectiles/Summon/HowlsHeartFireball.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/HowlsHeartHowl.cs b/Projectiles/Summon/HowlsHeartHowl.cs index c2d346f8e8..8bfe2b7d4e 100644 --- a/Projectiles/Summon/HowlsHeartHowl.cs +++ b/Projectiles/Summon/HowlsHeartHowl.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -217,7 +217,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/HowlsHeartTurnipHead.cs b/Projectiles/Summon/HowlsHeartTurnipHead.cs index 73dc75e9a5..5716b53c44 100644 --- a/Projectiles/Summon/HowlsHeartTurnipHead.cs +++ b/Projectiles/Summon/HowlsHeartTurnipHead.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - Main.projPet[Projectile.type] = true; + Main.projFrames[Type] = 5; + Main.projPet[Type] = true; } public override void SetDefaults() @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/HydrothermicVent.cs b/Projectiles/Summon/HydrothermicVent.cs index fb4e86f626..a90d0b2d32 100644 --- a/Projectiles/Summon/HydrothermicVent.cs +++ b/Projectiles/Summon/HydrothermicVent.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/IceClasperMinion.cs b/Projectiles/Summon/IceClasperMinion.cs index 89aded9c6b..a879814e10 100644 --- a/Projectiles/Summon/IceClasperMinion.cs +++ b/Projectiles/Summon/IceClasperMinion.cs @@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/IceSentry.cs b/Projectiles/Summon/IceSentry.cs index e6532ff2ba..204cf095bf 100644 --- a/Projectiles/Summon/IceSentry.cs +++ b/Projectiles/Summon/IceSentry.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 18; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 18; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/IceSentryFrostBolt.cs b/Projectiles/Summon/IceSentryFrostBolt.cs index 6dee2bd3a4..c63cf1ebdf 100644 --- a/Projectiles/Summon/IceSentryFrostBolt.cs +++ b/Projectiles/Summon/IceSentryFrostBolt.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/IceSentryShard.cs b/Projectiles/Summon/IceSentryShard.cs index 05734d51ff..8b2be7394b 100644 --- a/Projectiles/Summon/IceSentryShard.cs +++ b/Projectiles/Summon/IceSentryShard.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void AI() diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index d0623e72a9..9316bbf1ba 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public bool Firing = false; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 7; } public override void SetDefaults() diff --git a/Projectiles/Summon/IgneousBladeStrike.cs b/Projectiles/Summon/IgneousBladeStrike.cs index aa3ec7daa4..6762bec590 100644 --- a/Projectiles/Summon/IgneousBladeStrike.cs +++ b/Projectiles/Summon/IgneousBladeStrike.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/LanternFlame.cs b/Projectiles/Summon/LanternFlame.cs index ec3e3b3e10..0707bd5bbf 100644 --- a/Projectiles/Summon/LanternFlame.cs +++ b/Projectiles/Summon/LanternFlame.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.SentryShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/LanternSoul.cs b/Projectiles/Summon/LanternSoul.cs index 98817c5858..82211048fc 100644 --- a/Projectiles/Summon/LanternSoul.cs +++ b/Projectiles/Summon/LanternSoul.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/LiliesOfFinalityAriane.cs b/Projectiles/Summon/LiliesOfFinalityAriane.cs index a6e2b0c3bf..30af68653b 100644 --- a/Projectiles/Summon/LiliesOfFinalityAriane.cs +++ b/Projectiles/Summon/LiliesOfFinalityAriane.cs @@ -379,7 +379,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowTexture = Request(GlowTexture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(3, 9, (int)Animation, Projectile.frame); diff --git a/Projectiles/Summon/LiliesOfFinalityElster.cs b/Projectiles/Summon/LiliesOfFinalityElster.cs index 04baf4f098..d089bfc4a6 100644 --- a/Projectiles/Summon/LiliesOfFinalityElster.cs +++ b/Projectiles/Summon/LiliesOfFinalityElster.cs @@ -403,7 +403,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(5, 9, (int)Animation, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/LostSoulGiant.cs b/Projectiles/Summon/LostSoulGiant.cs index 8de55f9d94..c50208768b 100644 --- a/Projectiles/Summon/LostSoulGiant.cs +++ b/Projectiles/Summon/LostSoulGiant.cs @@ -14,11 +14,11 @@ namespace CalamityMod.Projectiles.Summon public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -73,8 +73,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 0; i < 4; i++) { for (int j = 0; j < Projectile.oldPos.Length / 2; j++) diff --git a/Projectiles/Summon/LostSoulGold.cs b/Projectiles/Summon/LostSoulGold.cs index 7e9d96ac49..c9b0b3853d 100644 --- a/Projectiles/Summon/LostSoulGold.cs +++ b/Projectiles/Summon/LostSoulGold.cs @@ -14,11 +14,11 @@ namespace CalamityMod.Projectiles.Summon public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -44,8 +44,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 0; i < 4; i++) { for (int j = 0; j < Projectile.oldPos.Length / 2; j++) diff --git a/Projectiles/Summon/LostSoulLarge.cs b/Projectiles/Summon/LostSoulLarge.cs index 73deead7d2..819ffc07be 100644 --- a/Projectiles/Summon/LostSoulLarge.cs +++ b/Projectiles/Summon/LostSoulLarge.cs @@ -14,11 +14,11 @@ namespace CalamityMod.Projectiles.Summon public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -45,8 +45,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 0; i < 4; i++) { for (int j = 0; j < Projectile.oldPos.Length / 2; j++) diff --git a/Projectiles/Summon/LostSoulSmall.cs b/Projectiles/Summon/LostSoulSmall.cs index 394f0a5f75..6e2bf53586 100644 --- a/Projectiles/Summon/LostSoulSmall.cs +++ b/Projectiles/Summon/LostSoulSmall.cs @@ -14,11 +14,11 @@ namespace CalamityMod.Projectiles.Summon public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -44,8 +44,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); for (int i = 0; i < 4; i++) { for (int j = 0; j < Projectile.oldPos.Length / 2; j++) diff --git a/Projectiles/Summon/LuxorsGiftSummon.cs b/Projectiles/Summon/LuxorsGiftSummon.cs index b15614439d..c26bbef323 100644 --- a/Projectiles/Summon/LuxorsGiftSummon.cs +++ b/Projectiles/Summon/LuxorsGiftSummon.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var dye = Main.player[Projectile.owner]?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2, armorShaderToUse: dye); return false; } } diff --git a/Projectiles/Summon/MK2FlaskSummon.cs b/Projectiles/Summon/MK2FlaskSummon.cs index 13769a795a..019830b134 100644 --- a/Projectiles/Summon/MK2FlaskSummon.cs +++ b/Projectiles/Summon/MK2FlaskSummon.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MK2RocketHoming.cs b/Projectiles/Summon/MK2RocketHoming.cs index 38096a4cbd..89e47ab7bd 100644 --- a/Projectiles/Summon/MK2RocketHoming.cs +++ b/Projectiles/Summon/MK2RocketHoming.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/MK2RocketNormal.cs b/Projectiles/Summon/MK2RocketNormal.cs index 0e785f7f96..4e64dacdbb 100644 --- a/Projectiles/Summon/MK2RocketNormal.cs +++ b/Projectiles/Summon/MK2RocketNormal.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 071383cb99..7d68b13af9 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -193,7 +193,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Main.EntitySpriteDraw(tex, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index d84c7adc57..796d528f9f 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -44,9 +44,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -396,7 +396,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/MechwormLaser.cs b/Projectiles/Summon/MechwormLaser.cs index 2790acbd81..8237d39a03 100644 --- a/Projectiles/Summon/MechwormLaser.cs +++ b/Projectiles/Summon/MechwormLaser.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index 703902e240..3e4257fb5f 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Main.EntitySpriteDraw(tex, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/MechwormTeleportRift.cs b/Projectiles/Summon/MechwormTeleportRift.cs index 97406ecd5d..913d734f22 100644 --- a/Projectiles/Summon/MechwormTeleportRift.cs +++ b/Projectiles/Summon/MechwormTeleportRift.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Summon public ref float GeneralRotationalOffset => ref Projectile.ai[0]; public override void SetStaticDefaults() { - ProjectileID.Sets.NeedsUUID[Projectile.type] = true; + ProjectileID.Sets.NeedsUUID[Type] = true; } public override void SetDefaults() @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Summon float currentFade = Utils.GetLerpValue(0f, 5f, Projectile.timeLeft, true) * Utils.GetLerpValue(Projectile.ai[0], Projectile.ai[0] - 5f, Projectile.timeLeft, true); currentFade *= (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f * MathHelper.Pi * 3f)) * 0.8f; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color baseColor = new Color(150, 100, 255, 255) * Projectile.Opacity; baseColor *= 0.5f; diff --git a/Projectiles/Summon/MidnightSunBeaconProj.cs b/Projectiles/Summon/MidnightSunBeaconProj.cs index 23e4f18854..25a08a7c8e 100644 --- a/Projectiles/Summon/MidnightSunBeaconProj.cs +++ b/Projectiles/Summon/MidnightSunBeaconProj.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MidnightSunBeam.cs b/Projectiles/Summon/MidnightSunBeam.cs index f921c8feae..a6fef63506 100644 --- a/Projectiles/Summon/MidnightSunBeam.cs +++ b/Projectiles/Summon/MidnightSunBeam.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MidnightSunShot.cs b/Projectiles/Summon/MidnightSunShot.cs index 372bad85f1..94f9863b41 100644 --- a/Projectiles/Summon/MidnightSunShot.cs +++ b/Projectiles/Summon/MidnightSunShot.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public static int MaxUpdate = 4; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 1; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Summon/MidnightSunUFO.cs b/Projectiles/Summon/MidnightSunUFO.cs index fe93e7ab10..c809587298 100644 --- a/Projectiles/Summon/MidnightSunUFO.cs +++ b/Projectiles/Summon/MidnightSunUFO.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Summon public ref float Timer => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/MiniGuardianAttack.cs b/Projectiles/Summon/MiniGuardianAttack.cs index 1add2c4813..d710a38028 100644 --- a/Projectiles/Summon/MiniGuardianAttack.cs +++ b/Projectiles/Summon/MiniGuardianAttack.cs @@ -85,11 +85,11 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -395,7 +395,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.direction = Projectile.spriteDirection = Math.Sign(Projectile.velocity.X); Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Type]; } // Vanity stuff can't damage @@ -453,7 +453,7 @@ namespace CalamityMod.Projectiles.Summon if (!ForcedVanity && SpawnedFromPSC) { var dye = Owner?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } return true; diff --git a/Projectiles/Summon/MiniGuardianDefense.cs b/Projectiles/Summon/MiniGuardianDefense.cs index 4df35a04f4..5ec0668b23 100644 --- a/Projectiles/Summon/MiniGuardianDefense.cs +++ b/Projectiles/Summon/MiniGuardianDefense.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Summon } //dust and framing Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Type]; var psc = Owner.Calamity().profanedCrystal; if (psc && !SpawnedFromPSC || !psc && SpawnedFromPSC) @@ -283,7 +283,7 @@ namespace CalamityMod.Projectiles.Summon if (SpawnedFromPSC && !ForcedVanity) { var dye = Owner?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } return true; diff --git a/Projectiles/Summon/MiniGuardianHealer.cs b/Projectiles/Summon/MiniGuardianHealer.cs index c8c3632534..92b2796588 100644 --- a/Projectiles/Summon/MiniGuardianHealer.cs +++ b/Projectiles/Summon/MiniGuardianHealer.cs @@ -27,11 +27,11 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public bool isEmpowered => Main.player[Projectile.owner].Calamity().pscState == (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Empowered; @@ -330,7 +330,7 @@ namespace CalamityMod.Projectiles.Summon if (SpawnedFromPSC && !ForcedVanity && Owner.Calamity().pscState == (int)ProfanedSoulCrystalState.Empowered) { var dye = Owner?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1, armorShaderToUse: dye); return false; } return true; diff --git a/Projectiles/Summon/MiniGuardianHolyRay.cs b/Projectiles/Summon/MiniGuardianHolyRay.cs index a5c7f9dd29..e1f5d8d286 100644 --- a/Projectiles/Summon/MiniGuardianHolyRay.cs +++ b/Projectiles/Summon/MiniGuardianHolyRay.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() diff --git a/Projectiles/Summon/MiniGuardianRock.cs b/Projectiles/Summon/MiniGuardianRock.cs index be009d6bbe..a2470c21ef 100644 --- a/Projectiles/Summon/MiniGuardianRock.cs +++ b/Projectiles/Summon/MiniGuardianRock.cs @@ -21,10 +21,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MiniGuardianStars.cs b/Projectiles/Summon/MiniGuardianStars.cs index 94fec64eb7..8e5f385ee4 100644 --- a/Projectiles/Summon/MiniGuardianStars.cs +++ b/Projectiles/Summon/MiniGuardianStars.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Summon { float lerpMult = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * (MathHelper.Pi * 2f) * 3f)) * 0.8f; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color baseColor = ProfanedSoulCrystal.GetColorForPsc(Main.player[Projectile.owner].Calamity().pscState, Main.dayTime); baseColor *= 0.5f; diff --git a/Projectiles/Summon/MiniSandShark.cs b/Projectiles/Summon/MiniSandShark.cs index e3d59bb319..fd1ef345c5 100644 --- a/Projectiles/Summon/MiniSandShark.cs +++ b/Projectiles/Summon/MiniSandShark.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs b/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs index 062b95b202..f7199ae813 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/AtzirisDisfavor.cs @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs index 240bb95b91..6789b67e45 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredder.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions { Projectile.frameCounter++; if (Projectile.frameCounter % MirrorofKalandra.Vile_BowChargeTime == 0) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public void ShootTarget() @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs index 1d1faac2f7..fceccf875a 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/HopeShredderArrow.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs index 98bab8425f..34d42f7ebe 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/Paradoxica.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; ProjectileID.Sets.MinionTargettingFeature[Type] = true; } @@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs index c2fdddd74b..4cacdd4e90 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/Starforge.cs @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs b/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs index 9495ba6c3a..3da0112863 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/WindRipper.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions { Projectile.frameCounter++; if (Projectile.frameCounter % MirrorofKalandra.Wind_BowChargeTime == 0) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } public void ShootTarget() @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs index 006b16a2e1..e0d0fb232c 100644 --- a/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs +++ b/Projectiles/Summon/MirrorofKalandraMinions/WindRipperArrow.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Summon.MirrorofKalandraMinions public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/MoonFist.cs b/Projectiles/Summon/MoonFist.cs index 75f720a819..9381e65c1b 100644 --- a/Projectiles/Summon/MoonFist.cs +++ b/Projectiles/Summon/MoonFist.cs @@ -44,8 +44,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { Main.projFrames[Type] = 18; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Summon/MoonFistTeleportVisual.cs b/Projectiles/Summon/MoonFistTeleportVisual.cs index 7b8a3fe0df..bea41c2742 100644 --- a/Projectiles/Summon/MoonFistTeleportVisual.cs +++ b/Projectiles/Summon/MoonFistTeleportVisual.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D telegraphTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D telegraphTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color telegraphColor = Color.White * Projectile.Opacity * 0.2f; telegraphColor.A = 0; diff --git a/Projectiles/Summon/MortalityBeam.cs b/Projectiles/Summon/MortalityBeam.cs index 019a753622..49e9e13c28 100644 --- a/Projectiles/Summon/MortalityBeam.cs +++ b/Projectiles/Summon/MortalityBeam.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MortalityBolt.cs b/Projectiles/Summon/MortalityBolt.cs index 26a6c2fcc0..040465d30e 100644 --- a/Projectiles/Summon/MortalityBolt.cs +++ b/Projectiles/Summon/MortalityBolt.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public Color ProjectileColor => Main.hslToRgb(Projectile.localAI[0], 1f, 0.5f); public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/MutatedTruffleMinion.cs b/Projectiles/Summon/MutatedTruffleMinion.cs index 498383c09d..120e3cadb0 100644 --- a/Projectiles/Summon/MutatedTruffleMinion.cs +++ b/Projectiles/Summon/MutatedTruffleMinion.cs @@ -260,7 +260,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/OldDukeHeadCorpse.cs b/Projectiles/Summon/OldDukeHeadCorpse.cs index e546d39384..24986fdf07 100644 --- a/Projectiles/Summon/OldDukeHeadCorpse.cs +++ b/Projectiles/Summon/OldDukeHeadCorpse.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 2; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/OldDukeSharkVomit.cs b/Projectiles/Summon/OldDukeSharkVomit.cs index c27c7a6aa4..fd7b640122 100644 --- a/Projectiles/Summon/OldDukeSharkVomit.cs +++ b/Projectiles/Summon/OldDukeSharkVomit.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/PhantomGuy.cs b/Projectiles/Summon/PhantomGuy.cs index fbaf86c064..a86a9b90d6 100644 --- a/Projectiles/Summon/PhantomGuy.cs +++ b/Projectiles/Summon/PhantomGuy.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/PhantomicDagger.cs b/Projectiles/Summon/PhantomicDagger.cs index 95fdf5345a..114b11ab6c 100644 --- a/Projectiles/Summon/PhantomicDagger.cs +++ b/Projectiles/Summon/PhantomicDagger.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 7; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 7; } public override void SetDefaults() @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Summon int cap = 3; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); // Bypass a portion of the target's DR @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Summon { if (CalamityClientConfig.Instance.Afterimages) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); } return true; } diff --git a/Projectiles/Summon/PhantomicShield.cs b/Projectiles/Summon/PhantomicShield.cs index 52bcfcef30..e8cde40735 100644 --- a/Projectiles/Summon/PhantomicShield.cs +++ b/Projectiles/Summon/PhantomicShield.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() diff --git a/Projectiles/Summon/PinkButterfly.cs b/Projectiles/Summon/PinkButterfly.cs index fc97d9b5bf..62400663b8 100644 --- a/Projectiles/Summon/PinkButterfly.cs +++ b/Projectiles/Summon/PinkButterfly.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -239,8 +239,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, spriteEffects, 0); return false; diff --git a/Projectiles/Summon/PlagueBeeSmall.cs b/Projectiles/Summon/PlagueBeeSmall.cs index fdc40e5225..3bf84e8362 100644 --- a/Projectiles/Summon/PlagueBeeSmall.cs +++ b/Projectiles/Summon/PlagueBeeSmall.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -158,8 +158,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int drawStart = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Summon/PlaguePrincess.cs b/Projectiles/Summon/PlaguePrincess.cs index d605fc559e..da95876d37 100644 --- a/Projectiles/Summon/PlaguePrincess.cs +++ b/Projectiles/Summon/PlaguePrincess.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.TrailCacheLength[Type] = 8; ProjectileID.Sets.MinionSacrificable[Type] = true; @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Summon public void DecideFrames() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Type]; } public void DoBehavior_HoverNearOwner(NPC potentialTarget) @@ -378,7 +378,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Summon/PlaguebringerMK2.cs b/Projectiles/Summon/PlaguebringerMK2.cs index 04167de9f5..45bb6d1396 100644 --- a/Projectiles/Summon/PlaguebringerMK2.cs +++ b/Projectiles/Summon/PlaguebringerMK2.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Summon public const float DistanceToCheck = 1000.0001f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/PlaguebringerSummon.cs b/Projectiles/Summon/PlaguebringerSummon.cs index 359b783e52..93401191a7 100644 --- a/Projectiles/Summon/PlaguebringerSummon.cs +++ b/Projectiles/Summon/PlaguebringerSummon.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/PlantationStaffSeed.cs b/Projectiles/Summon/PlantationStaffSeed.cs index e891f75ec4..afec1f3ece 100644 --- a/Projectiles/Summon/PlantationStaffSeed.cs +++ b/Projectiles/Summon/PlantationStaffSeed.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (RandomTexture == 0f) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Summon/PlantationStaffSeed2").Value; + Texture2D texture = (RandomTexture == 0f) ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Summon/PlantationStaffSeed2").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/PlantationStaffSporeCloud.cs b/Projectiles/Summon/PlantationStaffSporeCloud.cs index d483f5e8d6..d41d8bc0d3 100644 --- a/Projectiles/Summon/PlantationStaffSporeCloud.cs +++ b/Projectiles/Summon/PlantationStaffSporeCloud.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (RandomTexture == 1f) tex = ModContent.Request("CalamityMod/Projectiles/Summon/PlantationStaffSporeCloud2").Value; if (RandomTexture == 2f) diff --git a/Projectiles/Summon/PlantationStaffSummon.cs b/Projectiles/Summon/PlantationStaffSummon.cs index 7d8bd78097..1cf0962dda 100644 --- a/Projectiles/Summon/PlantationStaffSummon.cs +++ b/Projectiles/Summon/PlantationStaffSummon.cs @@ -336,7 +336,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/PlateProjectile.cs b/Projectiles/Summon/PlateProjectile.cs index 951280b1a6..a5b13efe10 100644 --- a/Projectiles/Summon/PlateProjectile.cs +++ b/Projectiles/Summon/PlateProjectile.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - Main.projFrames[Projectile.type] = 5; + ProjectileID.Sets.MinionShot[Type] = true; + Main.projFrames[Type] = 5; } public override void SetDefaults() diff --git a/Projectiles/Summon/PolypLauncherProjectile.cs b/Projectiles/Summon/PolypLauncherProjectile.cs index d82595cdee..d73745b2f2 100644 --- a/Projectiles/Summon/PolypLauncherProjectile.cs +++ b/Projectiles/Summon/PolypLauncherProjectile.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public const float Gravity = 0.4f; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/PolypLauncherSentry.cs b/Projectiles/Summon/PolypLauncherSentry.cs index 74214ad952..1c30e6c755 100644 --- a/Projectiles/Summon/PolypLauncherSentry.cs +++ b/Projectiles/Summon/PolypLauncherSentry.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/PolypLauncherShrapnel.cs b/Projectiles/Summon/PolypLauncherShrapnel.cs index 77b3440b76..28274fc0ff 100644 --- a/Projectiles/Summon/PolypLauncherShrapnel.cs +++ b/Projectiles/Summon/PolypLauncherShrapnel.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { //Changes the texture of the projectile - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == 1f) { texture = ModContent.Request("CalamityMod/Projectiles/Summon/PolypLauncherShrapnel2").Value; diff --git a/Projectiles/Summon/PowerfulRaven.cs b/Projectiles/Summon/PowerfulRaven.cs index 3a0113fe1d..379971a921 100644 --- a/Projectiles/Summon/PowerfulRaven.cs +++ b/Projectiles/Summon/PowerfulRaven.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon public const float SeparationAnxietyDistance = 2000f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Summon } if (Projectile.ai[1] % 45f >= 28f) { - Projectile.frame = Main.projFrames[Projectile.type] - 1; + Projectile.frame = Main.projFrames[Type] - 1; Lighting.AddLight(Projectile.Center, 1f, 1f, 1f); } else @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type] - 1) + if (Projectile.frame >= Main.projFrames[Type] - 1) { Projectile.frame = 0; } @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type] - 1) + if (Projectile.frame >= Main.projFrames[Type] - 1) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index 66da00abc3..29c66a829a 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index 366309c1b3..29c04b1b82 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -30,10 +30,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } private void Split(bool hit, bool chaseable) @@ -142,8 +142,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; - int num214 = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; + int num214 = texture.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); @@ -207,9 +207,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; ProjectileID.Sets.SummonTagDamageMultiplier[Type] = 0.3f; } @@ -332,8 +332,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; - int num214 = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; + int num214 = texture.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); @@ -411,8 +411,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; ProjectileID.Sets.SummonTagDamageMultiplier[Type] = 0.6f; } @@ -502,8 +502,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha), 1); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Type].Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha), 1); return false; } @@ -663,9 +663,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 3; ProjectileID.Sets.SummonTagDamageMultiplier[Type] = 0.4f; } @@ -744,8 +744,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Summon/ProfanedCrystalRangedHugesNight").Value; - int num214 = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Summon/ProfanedCrystalRangedHugesNight").Value; + int num214 = texture.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); @@ -845,7 +845,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -948,8 +948,8 @@ namespace CalamityMod.Projectiles.Summon } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int num214 = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int num214 = texture.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); @@ -1449,7 +1449,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.NoLiquidDistortion[Type] = true; } @@ -1568,8 +1568,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; ProjectileID.Sets.NoLiquidDistortion[Type] = true; } @@ -1798,8 +1798,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var psc = Projectile.ai[0] > 0f; - Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime && psc, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], ProvUtils.GetDayNightColor(!Main.dayTime && psc, Projectile.alpha), 1); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime && psc, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Type].Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], ProvUtils.GetDayNightColor(!Main.dayTime && psc, Projectile.alpha), 1); return false; } @@ -1850,10 +1850,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; } private void Split() @@ -1922,8 +1922,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; - int num214 = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; + int num214 = texture.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); @@ -1989,9 +1989,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; ProjectileID.Sets.SummonTagDamageMultiplier[Type] = 0.3f; } @@ -2062,8 +2062,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; - int num214 = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; + int num214 = texture.Height / Main.projFrames[Type]; int y6 = num214 * Projectile.frame; Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/PuffCloud.cs b/Projectiles/Summon/PuffCloud.cs index a273d0d622..1239e67bef 100644 --- a/Projectiles/Summon/PuffCloud.cs +++ b/Projectiles/Summon/PuffCloud.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 7; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.frameCounter % 4 == 3) { Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); } } diff --git a/Projectiles/Summon/PuffWarrior.cs b/Projectiles/Summon/PuffWarrior.cs index 3ca4803c5e..91dc1aa0a2 100644 --- a/Projectiles/Summon/PuffWarrior.cs +++ b/Projectiles/Summon/PuffWarrior.cs @@ -29,9 +29,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 10; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 10; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -108,15 +108,15 @@ namespace CalamityMod.Projectiles.Summon internal void DetermineFrames() { - int startingFrame = Jumping ? Main.projFrames[Projectile.type] - 3 : 0; - int endingFrame = Jumping ? Main.projFrames[Projectile.type] - 4 : Main.projFrames[Projectile.type] - 4; + int startingFrame = Jumping ? Main.projFrames[Type] - 3 : 0; + int endingFrame = Jumping ? Main.projFrames[Type] - 4 : Main.projFrames[Type] - 4; if (Jumping) JumpCountdown = 12f; else if (Math.Abs(Projectile.velocity.Y) <= Gravity && JumpCountdown > 0) { - startingFrame = Main.projFrames[Projectile.type] - 1; - endingFrame = Main.projFrames[Projectile.type] - 1; + startingFrame = Main.projFrames[Type] - 1; + endingFrame = Main.projFrames[Type] - 1; JumpCountdown--; } diff --git a/Projectiles/Summon/PurpleButterfly.cs b/Projectiles/Summon/PurpleButterfly.cs index ad2212ddd2..790c60d81a 100644 --- a/Projectiles/Summon/PurpleButterfly.cs +++ b/Projectiles/Summon/PurpleButterfly.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -90,8 +90,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, spriteEffects, 0); return false; diff --git a/Projectiles/Summon/RustyBeaconPulse.cs b/Projectiles/Summon/RustyBeaconPulse.cs index b562ab9a46..db6d3a5737 100644 --- a/Projectiles/Summon/RustyBeaconPulse.cs +++ b/Projectiles/Summon/RustyBeaconPulse.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color drawColor = Projectile.GetAlpha(lightColor) * 0.33f; for (int i = 0; i < 8; i++) { diff --git a/Projectiles/Summon/RustyDrone.cs b/Projectiles/Summon/RustyDrone.cs index be4f3b428f..4435cc6f3d 100644 --- a/Projectiles/Summon/RustyDrone.cs +++ b/Projectiles/Summon/RustyDrone.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 12; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon { // Determine frames. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; // Hover in place. Projectile.velocity = -Vector2.UnitY * (float)Math.Sin(MathHelper.TwoPi * Projectile.timeLeft / 96f) * 3f; diff --git a/Projectiles/Summon/SageNeedle.cs b/Projectiles/Summon/SageNeedle.cs index d015b5019f..0efecc2a3b 100644 --- a/Projectiles/Summon/SageNeedle.cs +++ b/Projectiles/Summon/SageNeedle.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public const int OnDeathHealValue = 1; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SageSpirit.cs b/Projectiles/Summon/SageSpirit.cs index 467ab93077..c7925c58ac 100644 --- a/Projectiles/Summon/SageSpirit.cs +++ b/Projectiles/Summon/SageSpirit.cs @@ -24,9 +24,9 @@ namespace CalamityMod.Projectiles.Summon internal const int ShootRate = 40; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frameCounter++; if (Projectile.frameCounter % 5 == 4) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } internal void ResetOwnerFlyValues() @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Summon { Vector2 destination = Owner.Center + Vector2.UnitX * Owner.width * 1.6f * Owner.direction; - int totalSageSpirits = Owner.ownedProjectileCounts[Projectile.type]; + int totalSageSpirits = Owner.ownedProjectileCounts[Type]; destination += (SageSpiritIndex * MathHelper.TwoPi / totalSageSpirits).ToRotationVector2() * 70f; if (PlayerFlyTime >= 1f) { @@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Summon { AttackTimer++; - int totalSageSpirits = Owner.ownedProjectileCounts[Projectile.type]; + int totalSageSpirits = Owner.ownedProjectileCounts[Type]; Vector2 destinationOffsetFactor = Vector2.Max(target.Size, new Vector2(160f)) * new Vector2(0.3f, 0.2f); Vector2 destination = target.Center + (AttackTimer / 12f).ToRotationVector2() * destinationOffsetFactor; destination += (SageSpiritIndex * MathHelper.TwoPi / totalSageSpirits).ToRotationVector2() * 130f; diff --git a/Projectiles/Summon/SakuraBullet.cs b/Projectiles/Summon/SakuraBullet.cs index 238553190b..594ec3ea27 100644 --- a/Projectiles/Summon/SakuraBullet.cs +++ b/Projectiles/Summon/SakuraBullet.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/SandBolt.cs b/Projectiles/Summon/SandBolt.cs index 1a29b4cb0c..409da292f1 100644 --- a/Projectiles/Summon/SandBolt.cs +++ b/Projectiles/Summon/SandBolt.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SandElementalHealer.cs b/Projectiles/Summon/SandElementalHealer.cs index f1f2029331..8ec3c83484 100644 --- a/Projectiles/Summon/SandElementalHealer.cs +++ b/Projectiles/Summon/SandElementalHealer.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - Main.projPet[Projectile.type] = true; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + Main.projFrames[Type] = 6; + Main.projPet[Type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; } public override void SetDefaults() @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/SandElementalMinion.cs b/Projectiles/Summon/SandElementalMinion.cs index c748e8c0da..59c7f9c2bf 100644 --- a/Projectiles/Summon/SandElementalMinion.cs +++ b/Projectiles/Summon/SandElementalMinion.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 12; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SandMark.cs b/Projectiles/Summon/SandMark.cs index e48e12b4ff..42213e2c88 100644 --- a/Projectiles/Summon/SandMark.cs +++ b/Projectiles/Summon/SandMark.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -143,8 +143,8 @@ namespace CalamityMod.Projectiles.Summon { Color originalColor = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); Vector2 drawPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangle = texture2D27.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D27 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangle = texture2D27.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color alphaColor = Projectile.GetAlpha(originalColor); Vector2 origin7 = rectangle.Size() / 2f; Color sandyColor = Main.hslToRgb(0.25f, 1f, 1f).MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Summon/SandTornado.cs b/Projectiles/Summon/SandTornado.cs index 0b5b84344e..5a125e9ce1 100644 --- a/Projectiles/Summon/SandTornado.cs +++ b/Projectiles/Summon/SandTornado.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 sizeModdingPos = new Vector2(0f, sizeModdingVector2.Y - sizeModdingVector.Y); sizeModdingPos.X = sizeModdingPos.Y * vectorMult; new Vector2(sizeModdingVector.X - sizeModdingPos.X / 2f, sizeModdingVector.Y); - Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D23 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle drawRectangle = texture2D23.Frame(1, 1, 0, 0); Vector2 smallRect = drawRectangle.Size() / 2f; float aiTrackMult = -0.06283186f * aiTracker; diff --git a/Projectiles/Summon/SandnadoMinion.cs b/Projectiles/Summon/SandnadoMinion.cs index 6beba7d3f1..4fcc69068f 100644 --- a/Projectiles/Summon/SandnadoMinion.cs +++ b/Projectiles/Summon/SandnadoMinion.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Summon public void DoAnimation() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 8 % Main.projFrames[Type]; } public void Idle() diff --git a/Projectiles/Summon/SarosAura.cs b/Projectiles/Summon/SarosAura.cs index ecb2894157..1439646bd5 100644 --- a/Projectiles/Summon/SarosAura.cs +++ b/Projectiles/Summon/SarosAura.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon { ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.TrailCacheLength[Type] = 8; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SarosMicrosun.cs b/Projectiles/Summon/SarosMicrosun.cs index 0e359bf1bd..b15f328943 100644 --- a/Projectiles/Summon/SarosMicrosun.cs +++ b/Projectiles/Summon/SarosMicrosun.cs @@ -14,10 +14,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -54,12 +54,12 @@ namespace CalamityMod.Projectiles.Summon public void DoAnimation() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 6 % Main.projFrames[Type]; } public override bool PreDraw(ref Color lightColor) // Makes the afterimages of the disk. { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; diff --git a/Projectiles/Summon/SarosSunfire.cs b/Projectiles/Summon/SarosSunfire.cs index 5b63b91ce6..d454f593ac 100644 --- a/Projectiles/Summon/SarosSunfire.cs +++ b/Projectiles/Summon/SarosSunfire.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/SeekerSummonProj.cs b/Projectiles/Summon/SeekerSummonProj.cs index 99a0bc8d05..19acb71cf0 100644 --- a/Projectiles/Summon/SeekerSummonProj.cs +++ b/Projectiles/Summon/SeekerSummonProj.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public ref float Time => ref Projectile.ai[1]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; } public override void SetDefaults() @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.FinalExtraUpdate()) Projectile.frameCounter++; if (Projectile.frameCounter % 6 == 5) - Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type]; + Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Type]; } internal void FlyNearOwner() diff --git a/Projectiles/Summon/SepulcherMinion.cs b/Projectiles/Summon/SepulcherMinion.cs index 971d9601d8..cf2a157bd4 100644 --- a/Projectiles/Summon/SepulcherMinion.cs +++ b/Projectiles/Summon/SepulcherMinion.cs @@ -105,10 +105,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; } diff --git a/Projectiles/Summon/Shellfish.cs b/Projectiles/Summon/Shellfish.cs index 0417c1e67a..068dd6f266 100644 --- a/Projectiles/Summon/Shellfish.cs +++ b/Projectiles/Summon/Shellfish.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 2; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 2; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SilvaCrystal.cs b/Projectiles/Summon/SilvaCrystal.cs index 34b378dcc7..3cbe3f521a 100644 --- a/Projectiles/Summon/SilvaCrystal.cs +++ b/Projectiles/Summon/SilvaCrystal.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -182,8 +182,8 @@ namespace CalamityMod.Projectiles.Summon { Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); Vector2 projPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangular = texture2D34.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangular = texture2D34.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color colorAlpha = Projectile.GetAlpha(colorArea); Vector2 halfRectangle = rectangular.Size() / 2f; float scaleFactor = (float)Math.Cos((double)(6.28318548f * (Projectile.localAI[0] / 60f))) + 3f + 3f; diff --git a/Projectiles/Summon/SilvaCrystalExplosion.cs b/Projectiles/Summon/SilvaCrystalExplosion.cs index 75143d5646..70fcf7d03b 100644 --- a/Projectiles/Summon/SilvaCrystalExplosion.cs +++ b/Projectiles/Summon/SilvaCrystalExplosion.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -138,8 +138,8 @@ namespace CalamityMod.Projectiles.Summon { Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); Vector2 projPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangular = texture2D34.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangular = texture2D34.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color colorAlpha = Projectile.GetAlpha(colorArea); Vector2 halfRectangle = rectangular.Size() / 2f; Color projColor = Main.hslToRgb(Projectile.ai[0], 1f, 0.5f).MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Summon/SiriusBeam.cs b/Projectiles/Summon/SiriusBeam.cs index 4b29bcd771..8f4c544141 100644 --- a/Projectiles/Summon/SiriusBeam.cs +++ b/Projectiles/Summon/SiriusBeam.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/SiriusExplosion.cs b/Projectiles/Summon/SiriusExplosion.cs index 99670e593b..2dc85a8276 100644 --- a/Projectiles/Summon/SiriusExplosion.cs +++ b/Projectiles/Summon/SiriusExplosion.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -139,8 +139,8 @@ namespace CalamityMod.Projectiles.Summon { Color colorArea = Lighting.GetColor((int)((double)Projectile.position.X + (double)Projectile.width * 0.5) / 16, (int)(((double)Projectile.position.Y + (double)Projectile.height * 0.5) / 16.0)); Vector2 projPos = Projectile.position + new Vector2((float)Projectile.width, (float)Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; - Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle rectangular = texture2D34.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture2D34 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle rectangular = texture2D34.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Color colorAlpha = Projectile.GetAlpha(colorArea); Vector2 halfRectangle = rectangular.Size() / 2f; Color projColor = Main.hslToRgb(0.5f, 1f, Projectile.ai[0]).MultiplyRGBA(new Color(255, 255, 255, 0)); diff --git a/Projectiles/Summon/SiriusMinion.cs b/Projectiles/Summon/SiriusMinion.cs index 1b40d31d96..6ecab62ba8 100644 --- a/Projectiles/Summon/SiriusMinion.cs +++ b/Projectiles/Summon/SiriusMinion.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SkeletalDragonChild.cs b/Projectiles/Summon/SkeletalDragonChild.cs index ec95b09ac2..1c8edf6dc0 100644 --- a/Projectiles/Summon/SkeletalDragonChild.cs +++ b/Projectiles/Summon/SkeletalDragonChild.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/SkeletalDragonMother.cs b/Projectiles/Summon/SkeletalDragonMother.cs index b8864fe285..31e9cdbcaf 100644 --- a/Projectiles/Summon/SkeletalDragonMother.cs +++ b/Projectiles/Summon/SkeletalDragonMother.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Summon public const float DistanceToCheck = 1100f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/SlimePuppet.cs b/Projectiles/Summon/SlimePuppet.cs index 0272f08163..37f791b7a1 100644 --- a/Projectiles/Summon/SlimePuppet.cs +++ b/Projectiles/Summon/SlimePuppet.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 1; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 1; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var dye = Owner?.cMinion ?? 0; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, armorShaderToUse: dye); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, armorShaderToUse: dye); return false; } } diff --git a/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs b/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs index 4307be1609..d59573fd37 100644 --- a/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs +++ b/Projectiles/Summon/SmallAresArms/CannonLaserbeam.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() { @@ -98,9 +98,9 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms return false; Color beamColor = LaserOverlayColor; - Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); - Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); // Start texture drawing. Main.EntitySpriteDraw(LaserBeginTexture, @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms 0); incrementalBodyLength += laserOffset; centerOnLaser += Projectile.velocity * laserOffset; - middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[Projectile.type]; + middleFrameArea.Y += LaserMiddleTexture.Height / Main.projFrames[Type]; if (middleFrameArea.Y + middleFrameArea.Height > LaserMiddleTexture.Height) middleFrameArea.Y = 0; } diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs index bf709d1a85..9a86d97a56 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonCannon.cs @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public void DefaultDrawCannon(Texture2D glowmask) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(2, Main.projFrames[Type], TargetingSomething.ToInt(), Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonGaussNukeCannon.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonGaussNukeCannon.cs index 9364b9f124..de8d848196 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonGaussNukeCannon.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonGaussNukeCannon.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Summon/SmallAresArms/ExoskeletonGaussNukeCannonGlowmask").Value; // The two stabilizers have two different shades of lighting, thus necessitating two different textures. diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs index bb7dfcce40..1637fc380c 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs @@ -235,7 +235,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms if (Main.myPlayer != Projectile.owner) return false; - Texture2D panelTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D panelTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D plasmaTexture = ModContent.Request("CalamityMod/Projectiles/Summon/SmallAresArms/ExoskeletonPanelPlasma").Value; Texture2D arrowTexture = ModContent.Request("CalamityMod/Projectiles/Summon/SmallAresArms/Arrow").Value; Vector2 area = plasmaTexture.Frame(1, 7, 0, 0).Size(); diff --git a/Projectiles/Summon/SmallAresArms/MinionGaussBoom.cs b/Projectiles/Summon/SmallAresArms/MinionGaussBoom.cs index fc42f7a1c5..67c70ca822 100644 --- a/Projectiles/Summon/SmallAresArms/MinionGaussBoom.cs +++ b/Projectiles/Summon/SmallAresArms/MinionGaussBoom.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override float GetScreenshakePower(float pulseCompletionRatio) => 0f; public override Color GetCurrentExplosionColor(float pulseCompletionRatio) => Color.Lerp(Color.Yellow * 1.6f, Color.White, MathHelper.Clamp(pulseCompletionRatio * 2.2f, 0f, 1f)); - public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Projectile.type] = true; + public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Type] = true; public override void SetDefaults() { diff --git a/Projectiles/Summon/SmallAresArms/MinionGaussNuke.cs b/Projectiles/Summon/SmallAresArms/MinionGaussNuke.cs index a8162edc09..4dcd98841d 100644 --- a/Projectiles/Summon/SmallAresArms/MinionGaussNuke.cs +++ b/Projectiles/Summon/SmallAresArms/MinionGaussNuke.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/SmallAresArms/MinionLaserBurst.cs b/Projectiles/Summon/SmallAresArms/MinionLaserBurst.cs index 6cec678d28..c16562f71f 100644 --- a/Projectiles/Summon/SmallAresArms/MinionLaserBurst.cs +++ b/Projectiles/Summon/SmallAresArms/MinionLaserBurst.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override void SetStaticDefaults() { Main.projFrames[Type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms // Handle frames and rotation. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Projectile.rotation = Projectile.velocity.ToRotation(); } @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/SmallAresArms/MinionPlasmaBlast.cs b/Projectiles/Summon/SmallAresArms/MinionPlasmaBlast.cs index 0f471a310d..8b3cd052b1 100644 --- a/Projectiles/Summon/SmallAresArms/MinionPlasmaBlast.cs +++ b/Projectiles/Summon/SmallAresArms/MinionPlasmaBlast.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms { Main.projFrames[Type] = 6; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms // Handle frames and rotation. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; // Home towards targets. @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/SmallAresArms/MinionPlasmaGas.cs b/Projectiles/Summon/SmallAresArms/MinionPlasmaGas.cs index a2aa2e83ad..10a4fd4d31 100644 --- a/Projectiles/Summon/SmallAresArms/MinionPlasmaGas.cs +++ b/Projectiles/Summon/SmallAresArms/MinionPlasmaGas.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public ref float Time => ref Projectile.ai[1]; - public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Projectile.type] = true; + public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Type] = true; public override void SetDefaults() { @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public void AdditiveDraw(SpriteBatch spriteBatch) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.3f; diff --git a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs index 7e24206cd7..44f5dd439d 100644 --- a/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs +++ b/Projectiles/Summon/SmallAresArms/MinionTeslaOrb.cs @@ -22,11 +22,11 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms // Handle frames. Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Time++; } @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/SmallSkeletonMinion.cs b/Projectiles/Summon/SmallSkeletonMinion.cs index a0ace7991c..2cc5640838 100644 --- a/Projectiles/Summon/SmallSkeletonMinion.cs +++ b/Projectiles/Summon/SmallSkeletonMinion.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Summon public int Variant; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - Main.projFrames[Projectile.type] = 7; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frame = 1; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 1; } @@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Summon { Rectangle frame = new Rectangle(Variant * Projectile.width, Projectile.frame * Projectile.height, Projectile.width, Projectile.height); SpriteEffects spriteEffects = (Projectile.spriteDirection == 1) ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2f, 1f, spriteEffects, 0); + Main.EntitySpriteDraw(Terraria.GameContent.TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, Projectile.Size / 2f, 1f, spriteEffects, 0); return false; } diff --git a/Projectiles/Summon/SolarBeam.cs b/Projectiles/Summon/SolarBeam.cs index 5c06c551c7..cee2d0e534 100644 --- a/Projectiles/Summon/SolarBeam.cs +++ b/Projectiles/Summon/SolarBeam.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } diff --git a/Projectiles/Summon/SolarGod.cs b/Projectiles/Summon/SolarGod.cs index 5f9ee985f2..890f7bbf8c 100644 --- a/Projectiles/Summon/SolarGod.cs +++ b/Projectiles/Summon/SolarGod.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index fd06939b02..3ca4ff1c0f 100644 --- a/Projectiles/Summon/SolarPixie.cs +++ b/Projectiles/Summon/SolarPixie.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/Spikecrag.cs b/Projectiles/Summon/Spikecrag.cs index 219ca81408..f78e7076b2 100644 --- a/Projectiles/Summon/Spikecrag.cs +++ b/Projectiles/Summon/Spikecrag.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/SpikecragSpike.cs b/Projectiles/Summon/SpikecragSpike.cs index 6431b5561c..64bbebe33c 100644 --- a/Projectiles/Summon/SpikecragSpike.cs +++ b/Projectiles/Summon/SpikecragSpike.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.SentryShot[Projectile.type] = true; + ProjectileID.Sets.SentryShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/StellarTorusSummon.cs b/Projectiles/Summon/StellarTorusSummon.cs index f3d67efc07..0be79f013e 100644 --- a/Projectiles/Summon/StellarTorusSummon.cs +++ b/Projectiles/Summon/StellarTorusSummon.cs @@ -263,7 +263,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; diff --git a/Projectiles/Summon/StormjawBaby.cs b/Projectiles/Summon/StormjawBaby.cs index e196726c0a..2d75e0c803 100644 --- a/Projectiles/Summon/StormjawBaby.cs +++ b/Projectiles/Summon/StormjawBaby.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - Main.projFrames[Projectile.type] = 10; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + Main.projFrames[Type] = 10; } public override void SetDefaults() diff --git a/Projectiles/Summon/StormjawSpark.cs b/Projectiles/Summon/StormjawSpark.cs index 6c06785a0a..4bba548bec 100644 --- a/Projectiles/Summon/StormjawSpark.cs +++ b/Projectiles/Summon/StormjawSpark.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Summon public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; // Clone of Typeless/GenericElectricSpark but specfically benefits from whips - public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Projectile.type] = true; + public override void SetStaticDefaults() => ProjectileID.Sets.MinionShot[Type] = true; public override void SetDefaults() { diff --git a/Projectiles/Summon/SummonAstralExplosion.cs b/Projectiles/Summon/SummonAstralExplosion.cs index eb4e8d567e..d2b1fd96f1 100644 --- a/Projectiles/Summon/SummonAstralExplosion.cs +++ b/Projectiles/Summon/SummonAstralExplosion.cs @@ -8,8 +8,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - Main.projFrames[Projectile.type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.height = 48; Projectile.friendly = true; Projectile.penetrate = 2; - Projectile.timeLeft = Main.projFrames[Projectile.type] * 5; + Projectile.timeLeft = Main.projFrames[Type] * 5; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 30; Projectile.DamageType = DamageClass.Summon; diff --git a/Projectiles/Summon/SummonBrimstoneExplosion.cs b/Projectiles/Summon/SummonBrimstoneExplosion.cs index f2c539e6aa..2dfde5204e 100644 --- a/Projectiles/Summon/SummonBrimstoneExplosion.cs +++ b/Projectiles/Summon/SummonBrimstoneExplosion.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - Main.projFrames[Projectile.type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.friendly = true; Projectile.hostile = true; Projectile.penetrate = -1; - Projectile.timeLeft = Main.projFrames[Projectile.type] * 5; + Projectile.timeLeft = Main.projFrames[Type] * 5; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; Projectile.DamageType = DamageClass.Summon; diff --git a/Projectiles/Summon/SummonBrimstoneExplosionSmall.cs b/Projectiles/Summon/SummonBrimstoneExplosionSmall.cs index f827f85f65..888231d2f1 100644 --- a/Projectiles/Summon/SummonBrimstoneExplosionSmall.cs +++ b/Projectiles/Summon/SummonBrimstoneExplosionSmall.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - Main.projFrames[Projectile.type] = 6; + ProjectileID.Sets.MinionShot[Type] = true; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.friendly = true; Projectile.hostile = false; Projectile.penetrate = -1; - Projectile.timeLeft = Main.projFrames[Projectile.type] * 5; + Projectile.timeLeft = Main.projFrames[Type] * 5; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; } diff --git a/Projectiles/Summon/TacticalPlagueJet.cs b/Projectiles/Summon/TacticalPlagueJet.cs index 1a98dfb84c..0fad924ff2 100644 --- a/Projectiles/Summon/TacticalPlagueJet.cs +++ b/Projectiles/Summon/TacticalPlagueJet.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.frame = 0; player.AddBuff(ModContent.BuffType(), 3600); diff --git a/Projectiles/Summon/TundraFlameBlossom.cs b/Projectiles/Summon/TundraFlameBlossom.cs index 2b34cb6953..9329e094e4 100644 --- a/Projectiles/Summon/TundraFlameBlossom.cs +++ b/Projectiles/Summon/TundraFlameBlossom.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/TundraFlameBlossomsOrb.cs b/Projectiles/Summon/TundraFlameBlossomsOrb.cs index d1b4a55320..f818350390 100644 --- a/Projectiles/Summon/TundraFlameBlossomsOrb.cs +++ b/Projectiles/Summon/TundraFlameBlossomsOrb.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Summon/Umbrella/MagicArrow.cs b/Projectiles/Summon/Umbrella/MagicArrow.cs index 428d4e79f8..81cb37803c 100644 --- a/Projectiles/Summon/Umbrella/MagicArrow.cs +++ b/Projectiles/Summon/Umbrella/MagicArrow.cs @@ -161,7 +161,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/Summon/Umbrella/MagicAxe.cs b/Projectiles/Summon/Umbrella/MagicAxe.cs index 6e5a9657da..8c58102600 100644 --- a/Projectiles/Summon/Umbrella/MagicAxe.cs +++ b/Projectiles/Summon/Umbrella/MagicAxe.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 40; - ProjectileID.Sets.TrailingMode[Projectile.type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 40; + ProjectileID.Sets.TrailingMode[Type] = 4; } public override void SetDefaults() @@ -246,7 +246,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/Summon/Umbrella/MagicBird.cs b/Projectiles/Summon/Umbrella/MagicBird.cs index 2941ed51a6..33389e5744 100644 --- a/Projectiles/Summon/Umbrella/MagicBird.cs +++ b/Projectiles/Summon/Umbrella/MagicBird.cs @@ -10,11 +10,11 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Summon/Umbrella/MagicBullet.cs b/Projectiles/Summon/Umbrella/MagicBullet.cs index 10938fe054..d65f48bb37 100644 --- a/Projectiles/Summon/Umbrella/MagicBullet.cs +++ b/Projectiles/Summon/Umbrella/MagicBullet.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella if (Projectile.alpha != 0) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, 1, 0, 0); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella Main.spriteBatch.Draw(texture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); // Draw Afterimages - CalamityUtils.DrawAfterimagesFromEdge(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesFromEdge(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } } diff --git a/Projectiles/Summon/Umbrella/MagicBulletBig.cs b/Projectiles/Summon/Umbrella/MagicBulletBig.cs index 5a0b5c307c..4c6080aca4 100644 --- a/Projectiles/Summon/Umbrella/MagicBulletBig.cs +++ b/Projectiles/Summon/Umbrella/MagicBulletBig.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella if (Projectile.alpha != 0) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, 1, 0, 0); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella Main.spriteBatch.Draw(texture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); // Draw Afterimages - CalamityUtils.DrawAfterimagesFromEdge(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); + CalamityUtils.DrawAfterimagesFromEdge(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); return false; } } diff --git a/Projectiles/Summon/Umbrella/MagicBunny.cs b/Projectiles/Summon/Umbrella/MagicBunny.cs index c2bb997aa2..fd493f033b 100644 --- a/Projectiles/Summon/Umbrella/MagicBunny.cs +++ b/Projectiles/Summon/Umbrella/MagicBunny.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/Umbrella/MagicHammer.cs b/Projectiles/Summon/Umbrella/MagicHammer.cs index d38ce96b8d..dbfb69f4b1 100644 --- a/Projectiles/Summon/Umbrella/MagicHammer.cs +++ b/Projectiles/Summon/Umbrella/MagicHammer.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 40; - ProjectileID.Sets.TrailingMode[Projectile.type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 40; + ProjectileID.Sets.TrailingMode[Type] = 4; } public override void SetDefaults() @@ -311,7 +311,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/Summon/Umbrella/MagicHat.cs b/Projectiles/Summon/Umbrella/MagicHat.cs index 3da5df70a1..3845b1ad52 100644 --- a/Projectiles/Summon/Umbrella/MagicHat.cs +++ b/Projectiles/Summon/Umbrella/MagicHat.cs @@ -18,10 +18,10 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella Player player = Main.player[Projectile.owner]; // Use a different texture if the player is invisible or has at least 50% stealth - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float stealthPercent = player.Calamity().rogueStealthMax != 0 ? (player.Calamity().rogueStealth / player.Calamity().rogueStealthMax) : 0f; //0 to 1 bool hasStealth = player.Calamity().rogueStealth > 0f && stealthPercent > 0.5f && player.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility; if (player.ShouldNotDraw || hasStealth) diff --git a/Projectiles/Summon/Umbrella/MagicRifle.cs b/Projectiles/Summon/Umbrella/MagicRifle.cs index 292020898d..cd8b8b46d0 100644 --- a/Projectiles/Summon/Umbrella/MagicRifle.cs +++ b/Projectiles/Summon/Umbrella/MagicRifle.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 40; - ProjectileID.Sets.TrailingMode[Projectile.type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 40; + ProjectileID.Sets.TrailingMode[Type] = 4; } public override void SetDefaults() @@ -280,7 +280,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/Summon/Umbrella/MagicTree.cs b/Projectiles/Summon/Umbrella/MagicTree.cs index a02cfacb31..725df0f5ca 100644 --- a/Projectiles/Summon/Umbrella/MagicTree.cs +++ b/Projectiles/Summon/Umbrella/MagicTree.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella if (Projectile.ai[1] == 0f) return false; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; switch (TreeType) { case Tree.Astral: diff --git a/Projectiles/Summon/Umbrella/MagicUmbrella.cs b/Projectiles/Summon/Umbrella/MagicUmbrella.cs index c15f6f8102..093f93a876 100644 --- a/Projectiles/Summon/Umbrella/MagicUmbrella.cs +++ b/Projectiles/Summon/Umbrella/MagicUmbrella.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 40; - ProjectileID.Sets.TrailingMode[Projectile.type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 40; + ProjectileID.Sets.TrailingMode[Type] = 4; } public override void SetDefaults() @@ -333,7 +333,7 @@ namespace CalamityMod.Projectiles.Summon.Umbrella public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); diff --git a/Projectiles/Summon/UniverseSplitterHugeBeam.cs b/Projectiles/Summon/UniverseSplitterHugeBeam.cs index ee2d47c20a..0d4b0b518f 100644 --- a/Projectiles/Summon/UniverseSplitterHugeBeam.cs +++ b/Projectiles/Summon/UniverseSplitterHugeBeam.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/UniverseSplitterSmallBeam.cs b/Projectiles/Summon/UniverseSplitterSmallBeam.cs index 16edc6ca77..e8fc84e72c 100644 --- a/Projectiles/Summon/UniverseSplitterSmallBeam.cs +++ b/Projectiles/Summon/UniverseSplitterSmallBeam.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/UrchinSpike.cs b/Projectiles/Summon/UrchinSpike.cs index 86f95b21ca..bb7dd11f81 100644 --- a/Projectiles/Summon/UrchinSpike.cs +++ b/Projectiles/Summon/UrchinSpike.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/Valkyrie.cs b/Projectiles/Summon/Valkyrie.cs index 82120f71b2..ddcf3733dc 100644 --- a/Projectiles/Summon/Valkyrie.cs +++ b/Projectiles/Summon/Valkyrie.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -97,8 +97,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, spriteEffects, 0); return false; diff --git a/Projectiles/Summon/VictideSeaSnail.cs b/Projectiles/Summon/VictideSeaSnail.cs index 52e1cc5bf2..64a6a06fbe 100644 --- a/Projectiles/Summon/VictideSeaSnail.cs +++ b/Projectiles/Summon/VictideSeaSnail.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - Main.projFrames[Projectile.type] = 7; + ProjectileID.Sets.MinionSacrificable[Type] = true; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -216,7 +216,7 @@ namespace CalamityMod.Projectiles.Summon { Player owner = Main.player[Projectile.owner]; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = new Rectangle(0, 36 * Projectile.frame, 38, 34); Vector2 origin = !CanComePeekOut ? new Vector2(15, 23) : frame.Size() / 2f; diff --git a/Projectiles/Summon/VileFeederSummon.cs b/Projectiles/Summon/VileFeederSummon.cs index e3ee0abc14..d17ed5e292 100644 --- a/Projectiles/Summon/VileFeederSummon.cs +++ b/Projectiles/Summon/VileFeederSummon.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 3; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -261,8 +261,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Summon/ViridVanguardBlade.cs b/Projectiles/Summon/ViridVanguardBlade.cs index 260d3e8e78..d8180d7698 100644 --- a/Projectiles/Summon/ViridVanguardBlade.cs +++ b/Projectiles/Summon/ViridVanguardBlade.cs @@ -361,7 +361,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; diff --git a/Projectiles/Summon/VoidConcentrationAura.cs b/Projectiles/Summon/VoidConcentrationAura.cs index 371dc5272b..da91640c95 100644 --- a/Projectiles/Summon/VoidConcentrationAura.cs +++ b/Projectiles/Summon/VoidConcentrationAura.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Summon mp.voidAura = false; Projectile.Kill(); } - if (owner.whoAmI == Main.myPlayer && owner.ownedProjectileCounts[Projectile.type] <= 25 && timer > 0 && timer % 4 == 0) + if (owner.whoAmI == Main.myPlayer && owner.ownedProjectileCounts[Type] <= 25 && timer > 0 && timer % 4 == 0) { NPC target = CalamityUtils.MinionHoming(Projectile.Center, 1800f, owner); if (target != null) diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.cs b/Projectiles/Summon/VoidConcentrationBlackhole.cs index b92eae0d7f..b79ca5a550 100644 --- a/Projectiles/Summon/VoidConcentrationBlackhole.cs +++ b/Projectiles/Summon/VoidConcentrationBlackhole.cs @@ -27,9 +27,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -125,9 +125,9 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - int height = texture.Height / Main.projFrames[Projectile.type]; + int height = texture.Height / Main.projFrames[Type]; int frameHeight = height * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameHeight, texture.Width, height); Vector2 origin = new Vector2(texture.Width / 2f, height / 2f); @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type] - 1) + if (Projectile.frame >= Main.projFrames[Type] - 1) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/VoidConcentrationOrb.cs b/Projectiles/Summon/VoidConcentrationOrb.cs index 730915ff8f..7de9d93ea7 100644 --- a/Projectiles/Summon/VoidConcentrationOrb.cs +++ b/Projectiles/Summon/VoidConcentrationOrb.cs @@ -11,10 +11,10 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type] - 1) + if (Projectile.frame >= Main.projFrames[Type] - 1) { Projectile.frame = 0; } diff --git a/Projectiles/Summon/VolcanicFireballSummon.cs b/Projectiles/Summon/VolcanicFireballSummon.cs index 203f191d63..3bdb255644 100644 --- a/Projectiles/Summon/VolcanicFireballSummon.cs +++ b/Projectiles/Summon/VolcanicFireballSummon.cs @@ -12,10 +12,10 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Summon { Projectile.frame++; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.timeLeft == 300) return false; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Summon/WaterElementalMinion.cs b/Projectiles/Summon/WaterElementalMinion.cs index 86e7a1de94..2e5ea2d82f 100644 --- a/Projectiles/Summon/WaterElementalMinion.cs +++ b/Projectiles/Summon/WaterElementalMinion.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/WaterElementalSong.cs b/Projectiles/Summon/WaterElementalSong.cs index b5725388d7..6cb4b317d4 100644 --- a/Projectiles/Summon/WaterElementalSong.cs +++ b/Projectiles/Summon/WaterElementalSong.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Summon/WaterSpearFriendly.cs b/Projectiles/Summon/WaterSpearFriendly.cs index c13ae788a4..55ad239937 100644 --- a/Projectiles/Summon/WaterSpearFriendly.cs +++ b/Projectiles/Summon/WaterSpearFriendly.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; + ProjectileID.Sets.MinionShot[Type] = true; } public override void SetDefaults() @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Summon/WhiteDragonHead.cs b/Projectiles/Summon/WhiteDragonHead.cs index 0915f26c63..cca1b5c9a2 100644 --- a/Projectiles/Summon/WhiteDragonHead.cs +++ b/Projectiles/Summon/WhiteDragonHead.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.minionSlots = 2; Projectile.minion = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 100; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 100; } public override void AI() @@ -184,7 +184,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D texBody = ModContent.Request("CalamityMod/Projectiles/Summon/WhiteDragonBody").Value; Texture2D texBody2 = ModContent.Request("CalamityMod/Projectiles/Summon/WhiteDragonBody2").Value; Texture2D texTail = ModContent.Request("CalamityMod/Projectiles/Summon/WhiteDragonTail").Value; diff --git a/Projectiles/Summon/WitherBolt.cs b/Projectiles/Summon/WitherBolt.cs index b6c4934c04..1d05ddf020 100644 --- a/Projectiles/Summon/WitherBolt.cs +++ b/Projectiles/Summon/WitherBolt.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D boltTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D boltTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { float completionRatio = i / (float)Projectile.oldPos.Length; diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index 1a5083b4db..a71d1b10fa 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -98,9 +98,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 12; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Summon bool buffMode = BuffModeBuffer <= 0; //Do frame stuff i guess - Projectile.frame = Projectile.frame % (Main.projFrames[Projectile.type] / 2); + Projectile.frame = Projectile.frame % (Main.projFrames[Type] / 2); Projectile.frameCounter++; if (Projectile.frameCounter > 8) @@ -185,13 +185,13 @@ namespace CalamityMod.Projectiles.Summon Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type] / 2) + if (Projectile.frame >= Main.projFrames[Type] / 2) { Projectile.frame = 0; } if (buffMode) - Projectile.frame += Main.projFrames[Projectile.type] / 2; + Projectile.frame += Main.projFrames[Type] / 2; //Buff stuff diff --git a/Projectiles/Summon/WulfrumEnergyBurst.cs b/Projectiles/Summon/WulfrumEnergyBurst.cs index 836cfab051..3aa9aab80d 100644 --- a/Projectiles/Summon/WulfrumEnergyBurst.cs +++ b/Projectiles/Summon/WulfrumEnergyBurst.cs @@ -44,9 +44,9 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.MinionShot[Projectile.type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -189,7 +189,7 @@ namespace CalamityMod.Projectiles.Summon Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float stretchy = MathHelper.Clamp((Projectile.velocity.Length() - 6f) / 16f, 0f, 1f); Vector2 scale = new Vector2(1f + stretchy * -0.2f, stretchy * 0.5f + 1f); Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation + MathHelper.PiOver2, tex.Size() / 2f, Projectile.scale * scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/WulfrumFusionBolt.cs b/Projectiles/Summon/WulfrumFusionBolt.cs index 056314dfca..6b1d5808af 100644 --- a/Projectiles/Summon/WulfrumFusionBolt.cs +++ b/Projectiles/Summon/WulfrumFusionBolt.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Summon/YharonMinionFireball.cs b/Projectiles/Summon/YharonMinionFireball.cs index 6f43faf571..de570b3bec 100644 --- a/Projectiles/Summon/YharonMinionFireball.cs +++ b/Projectiles/Summon/YharonMinionFireball.cs @@ -15,11 +15,11 @@ namespace CalamityMod.Projectiles.Summon public override string Texture => "CalamityMod/Projectiles/Boss/YharonFireball"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionShot[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionShot[Type] = true; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 8; } public override void SetDefaults() @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Projectile.type]; + Projectile.frame = Projectile.frameCounter / 5 % Main.projFrames[Type]; Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; Projectile.Opacity = MathHelper.Clamp(Projectile.Opacity + 0.075f, 0f, 1f); @@ -59,8 +59,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); SpriteEffects direction = SpriteEffects.None; if (Projectile.spriteDirection == -1) direction = SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Turret/FireShot.cs b/Projectiles/Turret/FireShot.cs index 563e0b7c6c..4ce822853f 100644 --- a/Projectiles/Turret/FireShot.cs +++ b/Projectiles/Turret/FireShot.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Turret public bool ableToHit = true; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 16; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 16; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Turret/IceExplosion.cs b/Projectiles/Turret/IceExplosion.cs index f26d9ac54b..9b8a1cf7c9 100644 --- a/Projectiles/Turret/IceExplosion.cs +++ b/Projectiles/Turret/IceExplosion.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Turret return; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = 0.9f; diff --git a/Projectiles/Turret/LaserShot.cs b/Projectiles/Turret/LaserShot.cs index 72a11e960f..ae852dfc63 100644 --- a/Projectiles/Turret/LaserShot.cs +++ b/Projectiles/Turret/LaserShot.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Turret public NPC struckNPC = null; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Turret { // This is the drawcode from surge driver // Start texture drawing. - Rectangle beginFrame = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle beginFrame = LaserBeginTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Main.EntitySpriteDraw(LaserBeginTexture, Projectile.Center - Main.screenPosition, beginFrame, @@ -91,14 +91,14 @@ namespace CalamityMod.Projectiles.Turret // Prepare things for body drawing. float laserBodyLength = LaserLength; - laserBodyLength -= (LaserBeginTexture.Height * 0.5f + LaserEndTexture.Height) * Projectile.scale / Main.projFrames[Projectile.type]; + laserBodyLength -= (LaserBeginTexture.Height * 0.5f + LaserEndTexture.Height) * Projectile.scale / Main.projFrames[Type]; Vector2 centerOnLaser = Projectile.Center; // Body drawing. - Rectangle middleFrame = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle middleFrame = LaserMiddleTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); if (laserBodyLength > 30f) { - float laserOffset = (LaserMiddleTexture.Height - 10f) * Projectile.scale / Main.projFrames[Projectile.type]; + float laserOffset = (LaserMiddleTexture.Height - 10f) * Projectile.scale / Main.projFrames[Type]; float incrementalBodyLength = 0f; while (incrementalBodyLength + 1f < laserBodyLength) { @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Turret } // End texture drawing. - Rectangle endFrame = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle endFrame = LaserEndTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 laserEndCenter = centerOnLaser - Main.screenPosition; Main.EntitySpriteDraw(LaserEndTexture, laserEndCenter, diff --git a/Projectiles/Turret/OnyxShot.cs b/Projectiles/Turret/OnyxShot.cs index ecbfb2d06f..a1b6c4716c 100644 --- a/Projectiles/Turret/OnyxShot.cs +++ b/Projectiles/Turret/OnyxShot.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Turret public bool ableToHit = true; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Turret/PlagueExplosionGas.cs b/Projectiles/Turret/PlagueExplosionGas.cs index fa76879a54..a4102fba0f 100644 --- a/Projectiles/Turret/PlagueExplosionGas.cs +++ b/Projectiles/Turret/PlagueExplosionGas.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Turret return; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = texture.Size() * 0.5f; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = 1f; diff --git a/Projectiles/Turret/WaterShot.cs b/Projectiles/Turret/WaterShot.cs index bf3555dee9..2ec3d66d03 100644 --- a/Projectiles/Turret/WaterShot.cs +++ b/Projectiles/Turret/WaterShot.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Turret public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Typeless/ArcZap.cs b/Projectiles/Typeless/ArcZap.cs index 4a66e6b033..15c838ea73 100644 --- a/Projectiles/Typeless/ArcZap.cs +++ b/Projectiles/Typeless/ArcZap.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 90; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 90; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() diff --git a/Projectiles/Typeless/ArtifactOfResilienceShards.cs b/Projectiles/Typeless/ArtifactOfResilienceShards.cs index 782c9d73ab..a9f0af6ded 100644 --- a/Projectiles/Typeless/ArtifactOfResilienceShards.cs +++ b/Projectiles/Typeless/ArtifactOfResilienceShards.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxRadius = 240f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() @@ -146,7 +146,7 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxRadius = 660f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() @@ -185,7 +185,7 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxRadius = 660f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() @@ -223,7 +223,7 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxRadius = 660f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() @@ -261,7 +261,7 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxRadius = 660f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() @@ -299,7 +299,7 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxRadius = 660f; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 1; + Main.projFrames[Type] = 1; } public override void SetDefaults() diff --git a/Projectiles/Typeless/AstralStar.cs b/Projectiles/Typeless/AstralStar.cs index fed26b266e..c393d028f3 100644 --- a/Projectiles/Typeless/AstralStar.cs +++ b/Projectiles/Typeless/AstralStar.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { Projectile.DrawStarTrail(Color.Coral, Color.White); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Typeless/BasicPlagueBee.cs b/Projectiles/Typeless/BasicPlagueBee.cs index c60a1d85f3..584818b179 100644 --- a/Projectiles/Typeless/BasicPlagueBee.cs +++ b/Projectiles/Typeless/BasicPlagueBee.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Typeless public int tileCollisions = 0; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; + Main.projFrames[Type] = 4; ProjectileID.Sets.CultistIsResistantTo[Type] = true; } @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -183,8 +183,8 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int frameHeight = texture.Height / Main.projFrames[Projectile.type]; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; int drawStart = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) diff --git a/Projectiles/Typeless/BlazingStarHeal.cs b/Projectiles/Typeless/BlazingStarHeal.cs index 3fc91c4f9f..e8c2d75b79 100644 --- a/Projectiles/Typeless/BlazingStarHeal.cs +++ b/Projectiles/Typeless/BlazingStarHeal.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D starTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D starTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color healGreen = new Color(54, 209, 54, 0); Vector2 projPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color healGreenDraw = healGreen; diff --git a/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs b/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs index 1498b0c95f..3414996386 100644 --- a/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs +++ b/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless { float lerpMult = Utils.GetLerpValue(15f, 30f, Projectile.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, Projectile.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f / 0.5f * (MathHelper.Pi * 2f) * 3f)) * 0.8f; - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); Color baseColor = new Color(250, 100, 100, 255); baseColor *= 0.5f; diff --git a/Projectiles/Typeless/BlunderBoosterAura.cs b/Projectiles/Typeless/BlunderBoosterAura.cs index 9ef3c27837..4a534b93c1 100644 --- a/Projectiles/Typeless/BlunderBoosterAura.cs +++ b/Projectiles/Typeless/BlunderBoosterAura.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; } public override void SetDefaults() @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color drawColour = Color.White; Rectangle sourceRect = new Rectangle(Projectile.width * (int)Projectile.localAI[1], Projectile.height * (int)Projectile.localAI[0], Projectile.width, Projectile.height); diff --git a/Projectiles/Typeless/ChaoticGeyser.cs b/Projectiles/Typeless/ChaoticGeyser.cs index b3eabf5aef..174b62342d 100644 --- a/Projectiles/Typeless/ChaoticGeyser.cs +++ b/Projectiles/Typeless/ChaoticGeyser.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Typeless { int cap = 3; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } diff --git a/Projectiles/Typeless/ChlorophyteLifePulse.cs b/Projectiles/Typeless/ChlorophyteLifePulse.cs index 32d4f715df..98e98e702e 100644 --- a/Projectiles/Typeless/ChlorophyteLifePulse.cs +++ b/Projectiles/Typeless/ChlorophyteLifePulse.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color drawColor = Projectile.GetAlpha(lightColor) * 0.4f; for (int i = 0; i < 8; i++) { diff --git a/Projectiles/Typeless/ChronoClock.cs b/Projectiles/Typeless/ChronoClock.cs index 565a8ed14a..b699426f5d 100644 --- a/Projectiles/Typeless/ChronoClock.cs +++ b/Projectiles/Typeless/ChronoClock.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 8; + Main.projFrames[Type] = 8; } diff --git a/Projectiles/Typeless/CoralBubble.cs b/Projectiles/Typeless/CoralBubble.cs index c3218486a7..9d4cd5e92e 100644 --- a/Projectiles/Typeless/CoralBubble.cs +++ b/Projectiles/Typeless/CoralBubble.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Typeless/CoralBubbleSmall.cs b/Projectiles/Typeless/CoralBubbleSmall.cs index 1ab46a05b0..d6bc051dae 100644 --- a/Projectiles/Typeless/CoralBubbleSmall.cs +++ b/Projectiles/Typeless/CoralBubbleSmall.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Typeless/CryonicShield.cs b/Projectiles/Typeless/CryonicShield.cs index cf4f131080..d32a00d7f5 100644 --- a/Projectiles/Typeless/CryonicShield.cs +++ b/Projectiles/Typeless/CryonicShield.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; } public override void SetDefaults() diff --git a/Projectiles/Typeless/CursorProj.cs b/Projectiles/Typeless/CursorProj.cs index dc51a83b5f..a84c07f3e1 100644 --- a/Projectiles/Typeless/CursorProj.cs +++ b/Projectiles/Typeless/CursorProj.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index ccac361080..3c2174243a 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } diff --git a/Projectiles/Typeless/CyanLabSeeker.cs b/Projectiles/Typeless/CyanLabSeeker.cs index f876fb8975..07f7da0ee5 100644 --- a/Projectiles/Typeless/CyanLabSeeker.cs +++ b/Projectiles/Typeless/CyanLabSeeker.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Time > 80f && Projectile.ai[1] == 0f) { for (int i = 0; i < 24; i += 2) diff --git a/Projectiles/Typeless/DemonshadeRedDevil.cs b/Projectiles/Typeless/DemonshadeRedDevil.cs index df25b38ec2..2e1a342110 100644 --- a/Projectiles/Typeless/DemonshadeRedDevil.cs +++ b/Projectiles/Typeless/DemonshadeRedDevil.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 5; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -254,8 +254,8 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, spriteEffects, 0); return false; diff --git a/Projectiles/Typeless/EmpyreanStellarDetritus.cs b/Projectiles/Typeless/EmpyreanStellarDetritus.cs index 675d6cd6da..0e33d4b217 100644 --- a/Projectiles/Typeless/EmpyreanStellarDetritus.cs +++ b/Projectiles/Typeless/EmpyreanStellarDetritus.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Typeless/EnergyShell.cs b/Projectiles/Typeless/EnergyShell.cs index 291cd761a3..7850d6aadb 100644 --- a/Projectiles/Typeless/EnergyShell.cs +++ b/Projectiles/Typeless/EnergyShell.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() diff --git a/Projectiles/Typeless/FlameLickedBarrage.cs b/Projectiles/Typeless/FlameLickedBarrage.cs index 494f9b6096..f94d416372 100644 --- a/Projectiles/Typeless/FlameLickedBarrage.cs +++ b/Projectiles/Typeless/FlameLickedBarrage.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Typeless { lightColor.R = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Typeless/FlameLickedHellblast.cs b/Projectiles/Typeless/FlameLickedHellblast.cs index d9071df464..944ca206b1 100644 --- a/Projectiles/Typeless/FlameLickedHellblast.cs +++ b/Projectiles/Typeless/FlameLickedHellblast.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Projectiles.Typeless public override string Texture => "CalamityMod/Projectiles/Boss/BrimstoneHellblast"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + Main.projFrames[Type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Typeless { lightColor.R = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Typeless/FuckYou.cs b/Projectiles/Typeless/FuckYou.cs index 67aef36b36..76dee98268 100644 --- a/Projectiles/Typeless/FuckYou.cs +++ b/Projectiles/Typeless/FuckYou.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Typeless public new string LocalizationCategory => "Projectiles.Typeless"; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.ai[1] += 0.01f; Projectile.scale = Projectile.ai[1] * 0.5f; Projectile.ai[0] += 1f; - if (Projectile.ai[0] >= (float)(3 * Main.projFrames[Projectile.type])) + if (Projectile.ai[0] >= (float)(3 * Main.projFrames[Type])) { Projectile.Kill(); return; @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frameCounter = 0; incrementer = Projectile.frame + 1; Projectile.frame = incrementer; - if (incrementer >= Main.projFrames[Projectile.type]) + if (incrementer >= Main.projFrames[Type]) { Projectile.hide = true; } diff --git a/Projectiles/Typeless/FungalClumpMinion.cs b/Projectiles/Typeless/FungalClumpMinion.cs index 4b5c5923b8..ba09c8d1a9 100644 --- a/Projectiles/Typeless/FungalClumpMinion.cs +++ b/Projectiles/Typeless/FungalClumpMinion.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; - ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true; + Main.projFrames[Type] = 6; + ProjectileID.Sets.MinionSacrificable[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Typeless/GemTechArmorGem.cs b/Projectiles/Typeless/GemTechArmorGem.cs index 8fc477ff90..d31ffe8079 100644 --- a/Projectiles/Typeless/GemTechArmorGem.cs +++ b/Projectiles/Typeless/GemTechArmorGem.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Typeless { case (int)GemTechArmorGemType.Melee: default: - texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; break; case (int)GemTechArmorGemType.Ranged: texture = ModContent.Request("CalamityMod/Projectiles/Typeless/GemTechGreenGem").Value; @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Typeless public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { Projectile.velocity = Vector2.Zero; - Projectile.timeLeft = ProjectileID.Sets.TrailCacheLength[Projectile.type]; + Projectile.timeLeft = ProjectileID.Sets.TrailCacheLength[Type]; Projectile.netUpdate = true; } } diff --git a/Projectiles/Typeless/GodKiller.cs b/Projectiles/Typeless/GodKiller.cs index 3fcb907ad8..13cfd33eec 100644 --- a/Projectiles/Typeless/GodKiller.cs +++ b/Projectiles/Typeless/GodKiller.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 1; } public override void SetDefaults() @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 2); return false; } } diff --git a/Projectiles/Typeless/GreenLabSeeker.cs b/Projectiles/Typeless/GreenLabSeeker.cs index f9cadeddd6..65a48dec84 100644 --- a/Projectiles/Typeless/GreenLabSeeker.cs +++ b/Projectiles/Typeless/GreenLabSeeker.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Time > 80f && Projectile.ai[1] == 0f) { for (int i = 0; i < 24; i += 2) diff --git a/Projectiles/Typeless/JewelSpike.cs b/Projectiles/Typeless/JewelSpike.cs index ae5ea54418..a2de1dd804 100644 --- a/Projectiles/Typeless/JewelSpike.cs +++ b/Projectiles/Typeless/JewelSpike.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() diff --git a/Projectiles/Typeless/KelvinCatalystStar.cs b/Projectiles/Typeless/KelvinCatalystStar.cs index 1879c8e154..5442bf8c6e 100644 --- a/Projectiles/Typeless/KelvinCatalystStar.cs +++ b/Projectiles/Typeless/KelvinCatalystStar.cs @@ -12,8 +12,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; } public override void SetDefaults() @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Typeless/MagnusBeam.cs b/Projectiles/Typeless/MagnusBeam.cs index 83a9136e8b..5ee3538016 100644 --- a/Projectiles/Typeless/MagnusBeam.cs +++ b/Projectiles/Typeless/MagnusBeam.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 30; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 30; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Typeless { GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"]), 30); - Texture2D glow = TextureAssets.Projectile[Projectile.type].Value; + Texture2D glow = TextureAssets.Projectile[Type].Value; Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); } diff --git a/Projectiles/Typeless/MythrilFlare.cs b/Projectiles/Typeless/MythrilFlare.cs index 712a6f992b..d3c1b2d01d 100644 --- a/Projectiles/Typeless/MythrilFlare.cs +++ b/Projectiles/Typeless/MythrilFlare.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 15; } public override void SetDefaults() diff --git a/Projectiles/Typeless/Nanotech.cs b/Projectiles/Typeless/Nanotech.cs index 697c8bc0c8..7be094e82b 100644 --- a/Projectiles/Typeless/Nanotech.cs +++ b/Projectiles/Typeless/Nanotech.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Typeless { int cap = 5; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } diff --git a/Projectiles/Typeless/NebulaDust.cs b/Projectiles/Typeless/NebulaDust.cs index 1577d47e52..001369b0f8 100644 --- a/Projectiles/Typeless/NebulaDust.cs +++ b/Projectiles/Typeless/NebulaDust.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Typeless lightColor.R = (byte)(255 * Projectile.Opacity); lightColor.G = (byte)(255 * Projectile.Opacity); lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } } diff --git a/Projectiles/Typeless/NebulaStar.cs b/Projectiles/Typeless/NebulaStar.cs index 2ef868b341..224ac1e258 100644 --- a/Projectiles/Typeless/NebulaStar.cs +++ b/Projectiles/Typeless/NebulaStar.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Typeless public override void PostDraw(Color lightColor) { - Rectangle frame = new Rectangle(0, 0, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Width, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height); + Rectangle frame = new Rectangle(0, 0, Terraria.GameContent.TextureAssets.Projectile[Type].Value.Width, Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height); Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Typeless/NebulaStarGlow").Value, Projectile.Center - Main.screenPosition, frame, Color.White * ((255 - Projectile.alpha) / 255f), Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); } } diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index b908dd04a6..3bb6f28ae9 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -206,7 +206,7 @@ namespace CalamityMod.Projectiles.Typeless Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); GameShaders.Armor.ApplySecondary(Main.player[Projectile.owner].cBody, Main.player[Projectile.owner], new DrawData?()); - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Texture2D segmentSprite = ModContent.Request("CalamityMod/Projectiles/Typeless/OmegaBlueTentacleSegment1").Value; for (int i = 0; i < 5; i++) { diff --git a/Projectiles/Typeless/OnyxLabSeeker.cs b/Projectiles/Typeless/OnyxLabSeeker.cs index a5bc8e7f78..97a26da02c 100644 --- a/Projectiles/Typeless/OnyxLabSeeker.cs +++ b/Projectiles/Typeless/OnyxLabSeeker.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Time > 80f && Projectile.ai[1] == 0f) { for (int i = 0; i < 24; i += 2) diff --git a/Projectiles/Typeless/ReaverThornBase.cs b/Projectiles/Typeless/ReaverThornBase.cs index afc80dbf28..a908340bf9 100644 --- a/Projectiles/Typeless/ReaverThornBase.cs +++ b/Projectiles/Typeless/ReaverThornBase.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Typeless // Draw the tip for the final thorn public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Projectile.ai[0] == TotalSegments) texture = ModContent.Request("CalamityMod/Projectiles/Melee/ThornTip").Value; diff --git a/Projectiles/Typeless/RedLabSeeker.cs b/Projectiles/Typeless/RedLabSeeker.cs index 929d83d3d8..7a57f2aada 100644 --- a/Projectiles/Typeless/RedLabSeeker.cs +++ b/Projectiles/Typeless/RedLabSeeker.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Time > 80f && Projectile.ai[1] == 0f) { for (int i = 0; i < 24; i += 2) diff --git a/Projectiles/Typeless/RelicOfConvergenceCrystal.cs b/Projectiles/Typeless/RelicOfConvergenceCrystal.cs index 8cf5bdf606..d8d919c405 100644 --- a/Projectiles/Typeless/RelicOfConvergenceCrystal.cs +++ b/Projectiles/Typeless/RelicOfConvergenceCrystal.cs @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.ai[0] >= CrystalsDrawTime) return true; float opacity = Projectile.ai[0] / CrystalsDrawTime; - Texture2D crystalTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D crystalTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; for (int i = 0; i < TotalCrystalsToDraw; i++) { float angle = MathHelper.TwoPi / TotalCrystalsToDraw * i + Projectile.ai[0] / 10f; diff --git a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs index 1c2161af35..0353aa8d9a 100644 --- a/Projectiles/Typeless/RelicOfDeliveranceSpear.cs +++ b/Projectiles/Typeless/RelicOfDeliveranceSpear.cs @@ -24,9 +24,9 @@ namespace CalamityMod.Projectiles.Typeless public const float MaxChargeSpeed = 30f; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 4; + ProjectileID.Sets.TrailCacheLength[Type] = 5; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 4; } public override void SetDefaults() @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frame++; Projectile.frameCounter = 0; } - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } @@ -226,7 +226,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } // Force the spear to have "priority" when drawing so that it draws over the player. diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index a68256bee6..fa7c51d161 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { // Sprite Circle - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; float scaleStep = 0.03f; float rotationOffset = 0.03f; Color drawCol = Projectile.GetAlpha(lightColor); diff --git a/Projectiles/Typeless/SepulcherSoul.cs b/Projectiles/Typeless/SepulcherSoul.cs index 8d42f839a1..1973b199de 100644 --- a/Projectiles/Typeless/SepulcherSoul.cs +++ b/Projectiles/Typeless/SepulcherSoul.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Typeless public ref float Time => ref Projectile.ai[0]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 3; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Typeless { if (Projectile.localAI[0] == 0f) { - Projectile.frame = Main.rand.Next(Main.projFrames[Projectile.type]); + Projectile.frame = Main.rand.Next(Main.projFrames[Type]); Projectile.localAI[0] = 1f; } Vector2 idealVelocity = Vector2.Zero; diff --git a/Projectiles/Typeless/ShadeNimbus.cs b/Projectiles/Typeless/ShadeNimbus.cs index 593d90780c..c09fe95f9f 100644 --- a/Projectiles/Typeless/ShadeNimbus.cs +++ b/Projectiles/Typeless/ShadeNimbus.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 6; + Main.projFrames[Type] = 6; } public override void SetDefaults() @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Typeless { Projectile.frameCounter = 0; Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) { Projectile.frame = 0; } diff --git a/Projectiles/Typeless/SkyFlareFriendly.cs b/Projectiles/Typeless/SkyFlareFriendly.cs index 13d6819e0d..629bd290f6 100644 --- a/Projectiles/Typeless/SkyFlareFriendly.cs +++ b/Projectiles/Typeless/SkyFlareFriendly.cs @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Typeless public new string LocalizationCategory => "Projectiles.Typeless"; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - Main.projFrames[Projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[Type] = 2; + ProjectileID.Sets.TrailingMode[Type] = 0; + Main.projFrames[Type] = 3; } public override void SetDefaults() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); return false; } diff --git a/Projectiles/Typeless/SuicideBomberDemon.cs b/Projectiles/Typeless/SuicideBomberDemon.cs index 95ed8f5715..06254b320c 100644 --- a/Projectiles/Typeless/SuicideBomberDemon.cs +++ b/Projectiles/Typeless/SuicideBomberDemon.cs @@ -23,10 +23,10 @@ namespace CalamityMod.Projectiles.Typeless public Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 12; + Main.projFrames[Type] = 12; ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 11; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.TrailCacheLength[Type] = 11; } public override void SetDefaults() @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Typeless if (Time == 90f) SoundEngine.PlaySound(SoundID.DD2_WyvernDiveDown, Projectile.Center); - Projectile.frame = Main.projFrames[Projectile.type] - 1; + Projectile.frame = Main.projFrames[Type] - 1; // Fly away if no valid target was found. if (target is null) @@ -242,7 +242,7 @@ namespace CalamityMod.Projectiles.Typeless glowmask = ModContent.Request("CalamityMod/Projectiles/Typeless/SuicideBomberDemonGlowmaskFriendly").Value; orbTexture = ModContent.Request("CalamityMod/Projectiles/Typeless/SuicideBomberDemonOrbFriendly").Value; } - Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame); Vector2 drawPosition = Projectile.Center - Main.screenPosition; SpriteEffects direction = Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs index 39500ded01..2f3cab56f4 100644 --- a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs +++ b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Typeless private bool fromArmour = false; public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 7; + Main.projFrames[Type] = 7; } public override void SetDefaults() @@ -101,8 +101,8 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; - int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; + Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; Main.spriteBatch.Draw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; diff --git a/Projectiles/Typeless/TarraEnergy.cs b/Projectiles/Typeless/TarraEnergy.cs index 7d71c32950..47fb6ba6a7 100644 --- a/Projectiles/Typeless/TarraEnergy.cs +++ b/Projectiles/Typeless/TarraEnergy.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Typeless { int cap = 2; float capDamageFactor = 0.05f; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Projectile.type] - cap; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); } diff --git a/Projectiles/Typeless/TerminusHoldout.cs b/Projectiles/Typeless/TerminusHoldout.cs index 5014080271..71e8385dd0 100644 --- a/Projectiles/Typeless/TerminusHoldout.cs +++ b/Projectiles/Typeless/TerminusHoldout.cs @@ -161,7 +161,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Main.zenithWorld ? ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value : Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Main.zenithWorld ? ModContent.Request("CalamityMod/Items/SummonItems/Terminus_GFB").Value : Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 baseDrawPosition = Projectile.Center - Main.screenPosition; Vector2 origin = texture.Size() * 0.5f; Color baseColor = Color.Lerp(Projectile.GetAlpha(lightColor), Color.White, Utils.GetLerpValue(40f, 120f, Time, true)); diff --git a/Projectiles/Typeless/TeslaAura.cs b/Projectiles/Typeless/TeslaAura.cs index 1185a9aa11..26e2976644 100644 --- a/Projectiles/Typeless/TeslaAura.cs +++ b/Projectiles/Typeless/TeslaAura.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.MinionSacrificable[Projectile.type] = true; + ProjectileID.Sets.MinionSacrificable[Type] = true; } public override void SetDefaults() @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Color drawColour = Color.White; Rectangle sourceRect = new Rectangle(Projectile.width * (int)Projectile.localAI[1], Projectile.height * (int)Projectile.localAI[0], Projectile.width, Projectile.height); diff --git a/Projectiles/Typeless/WhiteLabSeeker.cs b/Projectiles/Typeless/WhiteLabSeeker.cs index 374eae49c3..e524e7f0e8 100644 --- a/Projectiles/Typeless/WhiteLabSeeker.cs +++ b/Projectiles/Typeless/WhiteLabSeeker.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Time > 80f && Projectile.ai[1] == 0f) { for (int i = 0; i < 24; i += 2) diff --git a/Projectiles/Typeless/WulfrumDrillProj.cs b/Projectiles/Typeless/WulfrumDrillProj.cs index 05eb75eab1..17d6d0cd41 100644 --- a/Projectiles/Typeless/WulfrumDrillProj.cs +++ b/Projectiles/Typeless/WulfrumDrillProj.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Typeless if (!Projectile.active) return false; - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Vector2 origin = new Vector2(9f, tex.Height / 2f); Vector2 shake = Main.rand.NextVector2Circular(1f, 1f) * ((float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.25f + 0.75f); SpriteEffects effect = SpriteEffects.None; diff --git a/Projectiles/Typeless/WulfrumHook.cs b/Projectiles/Typeless/WulfrumHook.cs index 259e955588..687ac2c0ca 100644 --- a/Projectiles/Typeless/WulfrumHook.cs +++ b/Projectiles/Typeless/WulfrumHook.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { //Expand the draw distance. Should never happen really , but just in case the player basically walks away from the hook. - ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 3000; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 3000; } public override void SetDefaults() diff --git a/Projectiles/Typeless/WulfrumScaffoldKitHoldout.cs b/Projectiles/Typeless/WulfrumScaffoldKitHoldout.cs index 610fbe8bad..ec144b568c 100644 --- a/Projectiles/Typeless/WulfrumScaffoldKitHoldout.cs +++ b/Projectiles/Typeless/WulfrumScaffoldKitHoldout.cs @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Typeless if (Main.myPlayer != Owner.whoAmI) return false; - Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Effect tileEffect = Filters.Scene["CalamityMod:WulfrumScaffoldSelection"].GetShader().Shader; diff --git a/Projectiles/Typeless/XykDeathAnim.cs b/Projectiles/Typeless/XykDeathAnim.cs index 61700202c9..96b2bb29b9 100644 --- a/Projectiles/Typeless/XykDeathAnim.cs +++ b/Projectiles/Typeless/XykDeathAnim.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index 87e3fa20ed..0f2755e6af 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - Main.projFrames[Projectile.type] = 5; + Main.projFrames[Type] = 5; } public override void SetDefaults() @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Typeless if (Projectile.frameCounter % 7 == 0) { Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Projectile.type]) + if (Projectile.frame >= Main.projFrames[Type]) Projectile.Kill(); } diff --git a/Projectiles/Typeless/YellowLabSeeker.cs b/Projectiles/Typeless/YellowLabSeeker.cs index e81976b4dd..b2668fff1a 100644 --- a/Projectiles/Typeless/YellowLabSeeker.cs +++ b/Projectiles/Typeless/YellowLabSeeker.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Typeless public override void SetStaticDefaults() { - ProjectileID.Sets.TrailingMode[Projectile.type] = 1; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 1; + ProjectileID.Sets.TrailCacheLength[Type] = 20; } public override void SetDefaults() @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; if (Time > 80f && Projectile.ai[1] == 0f) { for (int i = 0; i < 24; i += 2)