From 49a068d7739205c813f720010fe25f5fba76440d Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:07:17 -0500 Subject: [PATCH 01/14] Player and item cleanups --- CalPlayer/CalamityPlayerOnHit.cs | 128 ++++---- EntitySources/ProjectileSource_ReaverHeal.cs | 11 + Items/Accessories/AbyssalDivingGear.cs | 2 +- Items/Accessories/BlunderBooster.cs | 2 +- Items/Accessories/CalamityRing.cs | 2 +- Items/Accessories/CounterScarf.cs | 2 +- Items/Accessories/EvasionScarf.cs | 2 +- Items/Accessories/EyeoftheStorm.cs | 2 +- Items/Accessories/FungalClump.cs | 2 +- Items/Accessories/GladiatorsLocket.cs | 2 +- Items/Accessories/HeartoftheElements.cs | 2 +- Items/Accessories/HowlsHeart.cs | 2 +- Items/Accessories/LureofEnthrallment.cs | 2 +- Items/Accessories/PlaguedFuelPack.cs | 2 +- Items/Accessories/ProfanedSoulArtifact.cs | 2 +- Items/Accessories/ProfanedSoulCrystal.cs | 2 +- Items/Accessories/RoseStone.cs | 2 +- Items/Accessories/ShatteredCommunity.cs | 32 +- Items/Accessories/TheCommunity.cs | 2 +- Items/Accessories/ThiefsDime.cs | 2 +- Items/Accessories/VoidofExtinction.cs | 2 +- Items/Accessories/WifeinaBottle.cs | 2 +- Items/Accessories/WifeinaBottlewithBoobs.cs | 7 +- Items/Ammo/AstralSolution.cs | 4 +- Items/Armor/DemonshadeHelm.cs | 6 +- Items/Armor/Vanity/ApolloMask.cs | 8 +- Items/CalamityGlobalItem.cs | 217 ++++++------- Items/CalamityGlobalItemTooltip.cs | 290 +++++++++--------- Items/CalamityGlobalItemTweaks.cs | 4 +- .../Fishing/AstralCatches/GacruxianMollusk.cs | 7 +- .../AstralCatches/PolarisParrotfish.cs | 11 +- .../DragoonDrizzlefish.cs | 12 +- Items/Fishing/FishingRods/ChaoticSpreadRod.cs | 14 +- Items/Fishing/FishingRods/EarlyBloomRod.cs | 12 +- Items/Fishing/FishingRods/FeralDoubleRod.cs | 12 +- .../Fishing/FishingRods/TheDevourerofCods.cs | 11 +- Items/Pets/IbarakiBox.cs | 12 +- Items/Pets/PrimroseKeepsake.cs | 9 +- Items/Weapons/Ranged/Animosity.cs | 2 +- Items/Weapons/Ranged/Auralis.cs | 2 +- Items/Weapons/Ranged/AuroraBlazer.cs | 2 +- Items/Weapons/Ranged/BulletFilledShotgun.cs | 2 +- Items/Weapons/Ranged/ChickenCannon.cs | 2 +- Items/Weapons/Ranged/CleansingBlaze.cs | 2 +- Items/Weapons/Ranged/ClockGatlignum.cs | 2 +- Items/Weapons/Ranged/DragonsBreath.cs | 2 +- Items/Weapons/Ranged/ElementalEruption.cs | 2 +- Items/Weapons/Ranged/FetidEmesis.cs | 2 +- Items/Weapons/Ranged/FirestormCannon.cs | 2 +- Items/Weapons/Ranged/FlurrystormCannon.cs | 2 +- Items/Weapons/Ranged/HalleysInferno.cs | 2 +- Items/Weapons/Ranged/HeavenlyGale.cs | 2 +- Items/Weapons/Ranged/Interfacer.cs | 2 +- Items/Weapons/Ranged/Karasawa.cs | 2 +- Items/Weapons/Ranged/MagnomalyCannon.cs | 2 +- Items/Weapons/Ranged/Megafleet.cs | 2 +- Items/Weapons/Ranged/Megalodon.cs | 2 +- Items/Weapons/Ranged/Meowthrower.cs | 2 +- Items/Weapons/Ranged/Minigun.cs | 2 +- Items/Weapons/Ranged/OnyxChainBlaster.cs | 2 +- Items/Weapons/Ranged/Onyxia.cs | 2 +- Items/Weapons/Ranged/OverloadedBlaster.cs | 2 +- Items/Weapons/Ranged/P90.cs | 2 +- Items/Weapons/Ranged/Photoviscerator.cs | 2 +- .../Ranged/PrideHuntersPlanarRipper.cs | 2 +- Items/Weapons/Ranged/SDFMG.cs | 2 +- Items/Weapons/Ranged/SandstormGun.cs | 2 +- Items/Weapons/Ranged/ScorchedEarth.cs | 2 +- Items/Weapons/Ranged/Seadragon.cs | 2 +- Items/Weapons/Ranged/Shadethrower.cs | 2 +- Items/Weapons/Ranged/SomaPrime.cs | 2 +- Items/Weapons/Ranged/SparkSpreader.cs | 2 +- Items/Weapons/Ranged/SpectralstormCannon.cs | 2 +- Items/Weapons/Ranged/StarSputter.cs | 2 +- Items/Weapons/Ranged/StormDragoon.cs | 2 +- Items/Weapons/Ranged/Svantechnical.cs | 2 +- Items/Weapons/Ranged/TerraFlameburster.cs | 2 +- Items/Weapons/Ranged/TheEmpyrean.cs | 2 +- Items/Weapons/Ranged/TrueConferenceCall.cs | 2 +- Items/Weapons/Ranged/Ultima.cs | 2 +- Items/Weapons/Ranged/UniversalGenesis.cs | 2 +- Items/Weapons/Typeless/Aestheticus.cs | 13 +- Items/Weapons/Typeless/AethersWhisper.cs | 9 +- Items/Weapons/Typeless/FiniteUse/Bazooka.cs | 9 +- .../Typeless/FiniteUse/ElephantKiller.cs | 11 +- Items/Weapons/Typeless/FiniteUse/Hydra.cs | 15 +- .../Typeless/FiniteUse/LightningHawk.cs | 11 +- Items/Weapons/Typeless/FiniteUse/Magnum.cs | 11 +- Items/Weapons/Typeless/GoldenGun.cs | 7 +- Items/Weapons/Typeless/MarkedMagnum.cs | 13 +- Items/Weapons/Typeless/RelicOfResilience.cs | 10 +- Items/Weapons/Typeless/YanmeisKnife.cs | 9 +- 92 files changed, 522 insertions(+), 527 deletions(-) create mode 100644 EntitySources/ProjectileSource_ReaverHeal.cs diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 2ce2c8ac7e..df843bba04 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -24,6 +24,7 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using Terraria.Audio; +using CalamityMod.EntitySources; namespace CalamityMod.CalPlayer { @@ -163,7 +164,7 @@ namespace CalamityMod.CalPlayer ItemLifesteal(target, item, damage); ItemOnHit(item, damage, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue); - NPCDebuffs(target, item.melee, item.ranged, item.magic, item.summon, item.Calamity().rogue, false); + NPCDebuffs(target, item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.Calamity().rogue, false); // Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies). if (target.type == NPCID.TargetDummy || target.type == NPCType()) @@ -181,7 +182,7 @@ namespace CalamityMod.CalPlayer CalamityGlobalNPC cgn = target.Calamity(); // Handle on-hit melee effects for the gem tech armor set. - if (proj.melee) + if (proj.CountsAsClass(DamageClass.Melee)) GemTechState.MeleeOnHitEffects(target); // Handle on-hit projectiles effects for the mythril armor set. @@ -362,7 +363,7 @@ namespace CalamityMod.CalPlayer ProjLifesteal(target, proj, damage, crit); ProjOnHit(proj, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue); - NPCDebuffs(target, proj.melee, proj.ranged, proj.magic, proj.IsSummon(), cgp.rogue, true); + NPCDebuffs(target, proj.CountsAsClass(DamageClass.Melee), proj.CountsAsClass(DamageClass.Ranged), proj.CountsAsClass(DamageClass.Magic), proj.IsSummon(), cgp.rogue, true); // Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies). if (target.type == NPCID.TargetDummy || target.type == NPCType()) @@ -449,7 +450,7 @@ namespace CalamityMod.CalPlayer break; } ItemOnHit(item, damage, target.Center, crit, true); - PvpDebuffs(target, item.melee, item.ranged, item.magic, item.summon, item.Calamity().rogue, false); + PvpDebuffs(target, item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.Calamity().rogue, false); } public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) @@ -584,7 +585,7 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 300); } ProjOnHit(proj, target.Center, crit, true); - PvpDebuffs(target, proj.melee, proj.ranged, proj.magic, proj.IsSummon(), proj.Calamity().rogue, true); + PvpDebuffs(target, proj.CountsAsClass(DamageClass.Melee), proj.CountsAsClass(DamageClass.Ranged), proj.CountsAsClass(DamageClass.Magic), proj.IsSummon(), proj.Calamity().rogue, true); } } #endregion @@ -592,24 +593,25 @@ namespace CalamityMod.CalPlayer #region Item public void ItemOnHit(Item item, int damage, Vector2 position, bool crit, bool npcCheck) { - if (!item.melee && Player.meleeEnchant == 7) - Projectile.NewProjectile(position, Player.velocity, ProjectileID.ConfettiMelee, 0, 0f, Player.whoAmI); + var source = Player.GetProjectileSource_Item(item); + if (!item.CountsAsClass() && Player.meleeEnchant == 7) + Projectile.NewProjectile(source, position, Player.velocity, ProjectileID.ConfettiMelee, 0, 0f, Player.whoAmI); if (reaverDefense) Player.lifeRegenTime += 1; - if (Player.whoAmI == Main.myPlayer && desertProwler && crit && item.ranged) + if (Player.whoAmI == Main.myPlayer && desertProwler && crit && item.CountsAsClass()) { bool noTornado = Player.ownedProjectileCounts[ProjectileType()] < 1 && Player.ownedProjectileCounts[ProjectileType()] < 1; if (noTornado && Main.rand.NextBool(15)) { - Projectile.NewProjectile(position, Vector2.Zero, ProjectileType(), damage, item.knockBack, Player.whoAmI); + Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType(), damage, item.knockBack, Player.whoAmI); } } if (npcCheck) { - if (item.melee && aBulwarkRare && aBulwarkRareTimer == 0) + if (item.CountsAsClass() && aBulwarkRare && aBulwarkRareTimer == 0) { aBulwarkRareTimer = 10; for (int n = 0; n < 3; n++) @@ -620,7 +622,7 @@ namespace CalamityMod.CalPlayer for (int s = 0; s < 3; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f); - Projectile.NewProjectile(position, velocity, ProjectileType(), (int)(15 * Player.AverageDamage()), 0f, Player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ProjectileType(), (int)(15 * Player.AverageDamage()), 0f, Player.whoAmI); } } if (astralStarRain && crit && astralStarRainCooldown <= 0) @@ -641,7 +643,7 @@ namespace CalamityMod.CalPlayer } } - if (item.melee) + if (item.CountsAsClass()) { titanBoost = 600; if (npcCheck) @@ -650,7 +652,7 @@ namespace CalamityMod.CalPlayer { // Ataxia True Melee Geysers: 15%, softcap starts at 300 base damage int geyserDamage = CalamityUtils.DamageSoftCap(damage * 0.15, 45); - Projectile.NewProjectile(position, Vector2.Zero, ProjectileType(), geyserDamage, 2f, Player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType(), geyserDamage, 2f, Player.whoAmI, 0f, 0f); } if (soaring) { @@ -664,7 +666,7 @@ namespace CalamityMod.CalPlayer if (Player.wingTime > Player.wingTimeMax) Player.wingTime = Player.wingTimeMax; } - if (bloodflareMelee && item.melee && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID)) + if (bloodflareMelee && item.CountsAsClass() && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID)) bloodflareMeleeHits++; } } @@ -675,11 +677,12 @@ namespace CalamityMod.CalPlayer public void ProjOnHit(Projectile proj, Vector2 position, bool crit, bool npcCheck) { CalamityGlobalProjectile modProj = proj.Calamity(); - bool hasClass = proj.melee || proj.ranged || proj.magic || proj.IsSummon() || modProj.rogue; + var source = proj.GetProjectileSource_FromThis(); + bool hasClass = proj.CountsAsClass(DamageClass.Melee) || proj.CountsAsClass(DamageClass.Ranged) || proj.CountsAsClass(DamageClass.Magic) || proj.IsSummon() || modProj.rogue; - //flask of party affects all types of weapons, !proj.melee is to prevent double flask effects - if (!proj.melee && Player.meleeEnchant == 7) - Projectile.NewProjectile(position, proj.velocity, ProjectileID.ConfettiMelee, 0, 0f, proj.owner); + //flask of party affects all types of weapons, !proj.CountsAsClass(DamageClass.Melee) is to prevent double flask effects + if (!proj.CountsAsClass(DamageClass.Melee) && Player.meleeEnchant == 7) + Projectile.NewProjectile(source, position, proj.velocity, ProjectileID.ConfettiMelee, 0, 0f, proj.owner); if (alchFlask && Player.ownedProjectileCounts[ProjectileType()] < 3 && hasClass) { @@ -701,7 +704,7 @@ namespace CalamityMod.CalPlayer for (int s = 0; s < 3; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f); - Projectile.NewProjectile(position, velocity, ProjectileType(), (int)(15 * Player.AverageDamage()), 0f, Player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ProjectileType(), (int)(15 * Player.AverageDamage()), 0f, Player.whoAmI); } } @@ -723,11 +726,11 @@ namespace CalamityMod.CalPlayer } } - if (proj.melee) + if (proj.CountsAsClass(DamageClass.Melee)) MeleeOnHit(proj, modProj, position, crit, npcCheck); - if (proj.ranged) + if (proj.CountsAsClass(DamageClass.Ranged)) RangedOnHit(proj, modProj, position, crit, npcCheck); - if (proj.magic) + if (proj.CountsAsClass(DamageClass.Magic)) MagicOnHit(proj, modProj, position, crit, npcCheck); if (proj.IsSummon()) SummonOnHit(proj, modProj, position, crit, npcCheck); @@ -738,6 +741,7 @@ namespace CalamityMod.CalPlayer #region Melee private void MeleeOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck) { + var source = proj.GetProjectileSource_FromThis(); Item heldItem = Player.ActiveItem(); if (modProj.trueMelee) @@ -769,7 +773,7 @@ namespace CalamityMod.CalPlayer { // Ataxia Melee Geysers: 15%, softcap starts at 240 base damage int geyserDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.15, 36); - Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), geyserDamage, 0f, Player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType(), geyserDamage, 0f, Player.whoAmI, 0f, 0f); } if (bloodflareMelee && modProj.trueMelee && bloodflareMeleeHits < 15 && !bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID)) bloodflareMeleeHits++; @@ -780,25 +784,26 @@ namespace CalamityMod.CalPlayer #region Ranged private void RangedOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck) { + var source = proj.GetProjectileSource_FromThis(); if (Player.whoAmI == Main.myPlayer && desertProwler && crit) { bool noTornado = Player.ownedProjectileCounts[ProjectileType()] < 1 && Player.ownedProjectileCounts[ProjectileType()] < 1; if (noTornado && Main.rand.NextBool(15)) { - Projectile.NewProjectile(position, Vector2.Zero, ProjectileType(), proj.damage, proj.knockBack, Player.whoAmI); + Projectile.NewProjectile(source, position, Vector2.Zero, ProjectileType(), proj.damage, proj.knockBack, Player.whoAmI); } } if (npcCheck) { - if (tarraRanged && proj.ranged && tarraRangedCooldown <= 0) + if (tarraRanged && proj.CountsAsClass(DamageClass.Ranged) && tarraRangedCooldown <= 0) { tarraRangedCooldown = 60; for (int l = 0; l < 2; l++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int leafDamage = (int)(0.25 * proj.damage); - int leaf = Projectile.NewProjectile(position, velocity, ProjectileID.Leaf, leafDamage, 0f, Player.whoAmI); + int leaf = Projectile.NewProjectile(source, position, velocity, ProjectileID.Leaf, leafDamage, 0f, Player.whoAmI); if (leaf.WithinBounds(Main.maxProjectiles)) { Main.projectile[leaf].Calamity().forceTypeless = true; @@ -811,7 +816,7 @@ namespace CalamityMod.CalPlayer { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int energyDamage = (int)(0.33 * proj.damage); - Projectile.NewProjectile(proj.Center, velocity, ProjectileType(), energyDamage, 0f, proj.owner); + Projectile.NewProjectile(source, proj.Center, velocity, ProjectileType(), energyDamage, 0f, proj.owner); } } } @@ -826,6 +831,7 @@ namespace CalamityMod.CalPlayer #region Magic private void MagicOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck) { + var source = proj.GetProjectileSource_FromThis(); if (ataxiaMage && ataxiaDmg <= 0) { int orbDamage = (int)(proj.damage * 0.6); @@ -847,7 +853,7 @@ namespace CalamityMod.CalPlayer Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); // Bloodflare Mage Fireballs: 3 x 50%, softcap starts at 500 base damage to not overly punish slow weapons int bloodflareFireballDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.5, 250); - int fire = Projectile.NewProjectile(position, velocity, ProjectileID.BallofFire, bloodflareFireballDamage, 0f, Player.whoAmI); + int fire = Projectile.NewProjectile(source, position, velocity, ProjectileID.BallofFire, bloodflareFireballDamage, 0f, Player.whoAmI); if (fire.WithinBounds(Main.maxProjectiles)) { Main.projectile[fire].Calamity().forceTypeless = true; @@ -862,7 +868,7 @@ namespace CalamityMod.CalPlayer SoundEngine.PlaySound(SoundID.Zombie, (int)proj.position.X, (int)proj.position.Y, 103); // Silva Mage Blasts: 800 + 60%, softcap on the whole combined thing starts at 1400 int silvaBurstDamage = CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400); - Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), silvaBurstDamage, 8f, Player.whoAmI); + Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType(), silvaBurstDamage, 8f, Player.whoAmI); } } #endregion @@ -870,6 +876,7 @@ namespace CalamityMod.CalPlayer #region Summon private void SummonOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck) { + var source = proj.GetProjectileSource_FromThis(); if (npcCheck) { if (phantomicArtifact) @@ -891,7 +898,7 @@ namespace CalamityMod.CalPlayer Vector2 target = proj.Center; target.Y += Main.rand.Next(-50, 50); target.X += Main.rand.Next(-50, 50); - Projectile.NewProjectile(target, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, 0f); + Projectile.NewProjectile(source, target, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, 0f); } } else if (buffType == empowerBuff) @@ -899,7 +906,7 @@ namespace CalamityMod.CalPlayer if (Player.ownedProjectileCounts[ProjectileType()] < 3 && Main.rand.NextBool(10)) { int damage = (int)(75 * Player.MinionDamage()); - int dagger = Projectile.NewProjectile(proj.position, proj.velocity, ProjectileType(), damage, 1f, Player.whoAmI, 0f); + int dagger = Projectile.NewProjectile(source, proj.position, proj.velocity, ProjectileType(), damage, 1f, Player.whoAmI, 0f); if (dagger.WithinBounds(Main.maxProjectiles)) Main.projectile[dagger].Calamity().forceTypeless = true; } @@ -907,7 +914,7 @@ namespace CalamityMod.CalPlayer else { if (Player.ownedProjectileCounts[ProjectileType()] == 0 && phantomicBulwarkCooldown == 0) - Projectile.NewProjectile(Player.position, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, 0f); + Projectile.NewProjectile(source, Player.position, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, 0f); } } else if (hallowedRune) @@ -956,21 +963,21 @@ namespace CalamityMod.CalPlayer { if (nucleogenesis) { - int projectile = Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), (int)(60 * Player.MinionDamage()), 4f, proj.owner); + int projectile = Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType(), (int)(60 * Player.MinionDamage()), 4f, proj.owner); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; jellyDmg = 100f; } else if (starbusterCore) { - int projectile = Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), (int)(40 * Player.MinionDamage()), 3.5f, proj.owner); + int projectile = Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType(), (int)(40 * Player.MinionDamage()), 3.5f, proj.owner); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; jellyDmg = 60f; } else if (nuclearRod) { - int projectile = Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), (int)(20 * Player.MinionDamage()), 0f, proj.owner); + int projectile = Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType(), (int)(20 * Player.MinionDamage()), 0f, proj.owner); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; jellyDmg = 60f; @@ -989,7 +996,7 @@ namespace CalamityMod.CalPlayer hallowedRuneCooldown = 180; Vector2 spawnPosition = position - new Vector2(0f, 920f).RotatedByRandom(0.3f); float speed = Main.rand.NextFloat(17f, 23f); - int projectile = Projectile.NewProjectile(spawnPosition, Vector2.Normalize(position - spawnPosition) * speed, ProjectileType(), (int)(30 * Player.MinionDamage()), 3f, proj.owner); + int projectile = Projectile.NewProjectile(source, spawnPosition, Vector2.Normalize(position - spawnPosition) * speed, ProjectileType(), (int)(30 * Player.MinionDamage()), 3f, proj.owner); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } @@ -1001,6 +1008,7 @@ namespace CalamityMod.CalPlayer #region Rogue private void RogueOnHit(Projectile proj, CalamityGlobalProjectile modProj, Vector2 position, bool crit, bool npcCheck) { + var spawnSource = proj.GetProjectileSource_FromThis(); if (modProj.stealthStrike && dragonScales && CalamityUtils.CountProjectiles(ProjectileType()) < 1) { int projTileX = (int)(proj.Center.X / 16f); @@ -1031,7 +1039,7 @@ namespace CalamityMod.CalPlayer break; } } - int projectileIndex = Projectile.NewProjectile(projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType(), (int)(550 * Player.RogueDamage()), 15f, Main.myPlayer, 16f, 16f); + int projectileIndex = Projectile.NewProjectile(spawnSource, projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType(), (int)(550 * Player.RogueDamage()), 15f, Main.myPlayer, 16f, 16f); if (projectileIndex.WithinBounds(Main.maxProjectiles)) { Main.projectile[projectileIndex].Calamity().forceTypeless = true; @@ -1064,13 +1072,13 @@ namespace CalamityMod.CalPlayer case 2: // Exodus Rogue Fire: 15% int fireDamage = (int)(proj.damage * 0.15); - Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), fireDamage, 0f, proj.owner, 0f, 0f); + Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), fireDamage, 0f, proj.owner, 0f, 0f); break; case 3: // Exodus Rogue Blast: 20% int blastDamage = (int)(proj.damage * 0.2); - Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), blastDamage, 0f, proj.owner, 0f, 0f); + Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), blastDamage, 0f, proj.owner, 0f, 0f); break; case 4: @@ -1094,7 +1102,7 @@ namespace CalamityMod.CalPlayer { Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (position - source) / 40f; - Projectile.NewProjectile(source, velocity, ProjectileType(), (int)(120 * Player.RogueDamage()), 3f, proj.owner); + Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType(), (int)(120 * Player.RogueDamage()), 3f, proj.owner); } } else if (moonCrown) @@ -1105,7 +1113,7 @@ namespace CalamityMod.CalPlayer { Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (position - source) / 10f; - int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner); + int flare = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner); if (flare.WithinBounds(Main.maxProjectiles)) Main.projectile[flare].Calamity().forceTypeless = true; } @@ -1119,7 +1127,7 @@ namespace CalamityMod.CalPlayer float speedY = (position.Y - source.Y) * 8; Vector2 velocity = new Vector2(speedX, speedY); int featherDamage = (int)(15 * Player.RogueDamage()); - int feather = Projectile.NewProjectile(source, velocity, ProjectileType(), featherDamage, 3f, proj.owner); + int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType(), featherDamage, 3f, proj.owner); if (feather.WithinBounds(Main.maxProjectiles)) Main.projectile[feather].Calamity().forceTypeless = true; } @@ -1136,7 +1144,7 @@ namespace CalamityMod.CalPlayer float yVector = Main.rand.Next(-35, 36) * 0.02f; xVector *= 10f; yVector *= 10f; - int eater = Projectile.NewProjectile(proj.Center.X, proj.Center.Y, xVector, yVector, ProjectileType(), (int)(40 * Player.RogueDamage()), proj.knockBack, proj.owner); + int eater = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, xVector, yVector, ProjectileType(), (int)(40 * Player.RogueDamage()), proj.knockBack, proj.owner); if (eater.WithinBounds(Main.maxProjectiles)) Main.projectile[eater].Calamity().forceTypeless = true; forbiddenCooldown = 15; @@ -1145,7 +1153,7 @@ namespace CalamityMod.CalPlayer if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 5) { - Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), (int)(50 * Player.RogueDamage()), proj.knockBack, proj.owner, 1f, 0f); + Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), (int)(50 * Player.RogueDamage()), proj.knockBack, proj.owner, 1f, 0f); SoundEngine.PlaySound(SoundID.Item14, proj.Center); for (int dustexplode = 0; dustexplode < 360; dustexplode++) { @@ -1181,7 +1189,7 @@ namespace CalamityMod.CalPlayer if (type != -1) { float speed = Main.rand.NextFloat(5f, 11f); - int cloud = Projectile.NewProjectile(position, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed, type, (int)(30 * Player.RogueDamage()), proj.knockBack, Player.whoAmI); + int cloud = Projectile.NewProjectile(spawnSource, position, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed, type, (int)(30 * Player.RogueDamage()), proj.knockBack, Player.whoAmI); if (cloud.WithinBounds(Main.maxProjectiles)) Main.projectile[cloud].Calamity().forceTypeless = true; } @@ -1195,14 +1203,14 @@ namespace CalamityMod.CalPlayer { int randrot = Main.rand.Next(-30, 391); Vector2 SoulSpeed = new Vector2(13f, 13f).RotatedBy(MathHelper.ToRadians(randrot)); - int soul = Projectile.NewProjectile(proj.Center, SoulSpeed, ProjectileType(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f); + int soul = Projectile.NewProjectile(spawnSource, proj.Center, SoulSpeed, ProjectileType(), (int)(proj.damage * 0.1), 3f, proj.owner, 0f, 0f); if (soul.WithinBounds(Main.maxProjectiles)) Main.projectile[soul].Calamity().forceTypeless = true; shadowPotCooldown = 30; } if (CalamityLists.spikyBallProjList.Contains(proj.type)) { - int scythe = Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), (int)(proj.damage * 0.05), 3f, proj.owner, 1f, 0f); + int scythe = Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), (int)(proj.damage * 0.05), 3f, proj.owner, 1f, 0f); if (scythe.WithinBounds(Main.maxProjectiles)) Main.projectile[scythe].Calamity().forceTypeless = true; Main.projectile[scythe].usesLocalNPCImmunity = true; @@ -1215,7 +1223,7 @@ namespace CalamityMod.CalPlayer Vector2 shardVelocity = new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-1f, 1f)); shardVelocity.Normalize(); shardVelocity *= 5f; - int shard = Projectile.NewProjectile(proj.Center, shardVelocity, ProjectileType(), (int)(proj.damage * 0.15), 0f, proj.owner); + int shard = Projectile.NewProjectile(spawnSource, proj.Center, shardVelocity, ProjectileType(), (int)(proj.damage * 0.15), 0f, proj.owner); if (shard.WithinBounds(Main.maxProjectiles)) Main.projectile[shard].Calamity().forceTypeless = true; Main.projectile[shard].timeLeft = 150; @@ -1234,7 +1242,7 @@ namespace CalamityMod.CalPlayer } if (CalamityLists.flaskBombProjList.Contains(proj.type)) { - int blackhole = Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), (int)(proj.damage * 0.05), 3f, proj.owner, 0f, 0f); + int blackhole = Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), (int)(proj.damage * 0.05), 3f, proj.owner, 0f, 0f); if (blackhole.WithinBounds(Main.maxProjectiles)) Main.projectile[blackhole].Calamity().forceTypeless = true; Main.projectile[blackhole].Center = proj.Center; @@ -1249,7 +1257,7 @@ namespace CalamityMod.CalPlayer { // Umbraphile Rogue Blasts: 25%, softcap starts at 200 base damage int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.25, 50); - Projectile.NewProjectile(proj.Center, Vector2.Zero, ProjectileType(), umbraBlastDamage, 0f, Player.whoAmI); + Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), umbraBlastDamage, 0f, Player.whoAmI); } if (raiderTalisman && raiderStack < 150 && crit && raiderCooldown <= 0) @@ -1262,7 +1270,7 @@ namespace CalamityMod.CalPlayer for (int s = 0; s < 3; s++) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f); - int spark = Projectile.NewProjectile(position, velocity, ProjectileType(), (int)(20 * Player.RogueDamage()), 0f, Player.whoAmI); + int spark = Projectile.NewProjectile(spawnSource, position, velocity, ProjectileType(), (int)(20 * Player.RogueDamage()), 0f, Player.whoAmI); if (spark.WithinBounds(Main.maxProjectiles)) { Main.projectile[spark].Calamity().forceTypeless = true; @@ -1571,7 +1579,7 @@ namespace CalamityMod.CalPlayer { if (Player.ghostHurt) { - proj.ghostHurt(damage, target.Center); + proj.ghostHurt(damage, target.Center, target); } if (Player.setNebula && Player.nebulaCD == 0 && Main.rand.NextBool(3)) @@ -1583,7 +1591,8 @@ namespace CalamityMod.CalPlayer ItemID.NebulaPickup2, ItemID.NebulaPickup3 }); - int nebulaBooster = Item.NewItem(target.Center, target.Size, boosterType, 1, false, 0, false, false); + var source = Player.GetItemSource_Misc(ItemSourceID.SetBonus_Nebula); + int nebulaBooster = Item.NewItem(source, target.Center, target.Size, boosterType, 1, false, 0, false, false); Main.item[nebulaBooster].velocity.Y = Main.rand.Next(-20, 1) * 0.2f; Main.item[nebulaBooster].velocity.X = Main.rand.Next(10, 31) * 0.2f * proj.direction; if (Main.netMode == NetmodeID.MultiplayerClient) @@ -1670,7 +1679,7 @@ namespace CalamityMod.CalPlayer bool otherHealTypes = auricSet || silvaSet || tarraMage || ataxiaMage; - if (proj.magic && Player.ActiveItem().magic) + if (proj.CountsAsClass(DamageClass.Magic) && Player.ActiveItem().CountsAsClass()) { if (manaOverloader && otherHealTypes) { @@ -1719,7 +1728,7 @@ namespace CalamityMod.CalPlayer CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType(), 1200f, 3f); } - else if (proj.magic && Player.ActiveItem().magic) + else if (proj.CountsAsClass(DamageClass.Magic) && Player.ActiveItem().CountsAsClass()) { if (manaOverloader) { @@ -1828,7 +1837,7 @@ namespace CalamityMod.CalPlayer if ((target.damage > 5 || target.boss) && !target.SpawnedFromStatue && target.canGhostHeal && !Player.moonLeech) { - if (bloodflareMelee && item.melee) + if (bloodflareMelee && item.CountsAsClass()) { int healAmount = Main.rand.Next(2) + 1; Player.statLife += healAmount; @@ -1868,7 +1877,8 @@ namespace CalamityMod.CalPlayer } } - Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, healTarget, heal); + var source = new ProjectileSource_ReaverHeal(Player); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ProjectileType(), 0, 0f, Player.whoAmI, healTarget, heal); } } } @@ -1905,7 +1915,9 @@ namespace CalamityMod.CalPlayer Vector2 spawnPos = new Vector2(x, y); Vector2 velocity = Main.npc[targetIdx].DirectionFrom(spawnPos); velocity *= speed; - int projectile = Projectile.NewProjectile(spawnPos, velocity, type, damage, knockback, player.whoAmI, targetIdx, 0f); + + var source = player.GetProjectileSource_Item(player.ActiveItem()); + int projectile = Projectile.NewProjectile(source, spawnPos, velocity, type, damage, knockback, player.whoAmI, targetIdx, 0f); Main.projectile[projectile].extraUpdates += extraUpdateAmt; } #endregion diff --git a/EntitySources/ProjectileSource_ReaverHeal.cs b/EntitySources/ProjectileSource_ReaverHeal.cs new file mode 100644 index 0000000000..5d7812296d --- /dev/null +++ b/EntitySources/ProjectileSource_ReaverHeal.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_ReaverHeal : IEntitySource + { + public Player player; + public ProjectileSource_ReaverHeal(Player p) => player = p; + } +} diff --git a/Items/Accessories/AbyssalDivingGear.cs b/Items/Accessories/AbyssalDivingGear.cs index 73e4315c86..72ad695b28 100644 --- a/Items/Accessories/AbyssalDivingGear.cs +++ b/Items/Accessories/AbyssalDivingGear.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories } } - public override void UpdateVanity(Player player, EquipType type) + public override void UpdateVanity(Player player) { player.Calamity().abyssDivingGear = true; //this bool is just used for drawing } diff --git a/Items/Accessories/BlunderBooster.cs b/Items/Accessories/BlunderBooster.cs index dea506371e..079f0e9756 100644 --- a/Items/Accessories/BlunderBooster.cs +++ b/Items/Accessories/BlunderBooster.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories } //Todo - Check if its trying to replace the other rogue jetpack. If its the case, return true. - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().hasJetpack; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().hasJetpack; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/CalamityRing.cs b/Items/Accessories/CalamityRing.cs index b8d685e067..7d236c20ea 100644 --- a/Items/Accessories/CalamityRing.cs +++ b/Items/Accessories/CalamityRing.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().calamityRing; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().calamityRing; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index 1f17327873..6c696a031e 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().dodgeScarf; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().dodgeScarf; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/EvasionScarf.cs b/Items/Accessories/EvasionScarf.cs index 8b15ead1fb..32e644e9be 100644 --- a/Items/Accessories/EvasionScarf.cs +++ b/Items/Accessories/EvasionScarf.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories Item.Calamity().donorItem = true; } - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().dodgeScarf; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().dodgeScarf; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/EyeoftheStorm.cs b/Items/Accessories/EyeoftheStorm.cs index a6402bb594..e04b9a6266 100644 --- a/Items/Accessories/EyeoftheStorm.cs +++ b/Items/Accessories/EyeoftheStorm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) diff --git a/Items/Accessories/FungalClump.cs b/Items/Accessories/FungalClump.cs index 77435cca04..9ba87c7ce3 100644 --- a/Items/Accessories/FungalClump.cs +++ b/Items/Accessories/FungalClump.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().fungalClump; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().fungalClump; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/GladiatorsLocket.cs b/Items/Accessories/GladiatorsLocket.cs index 201b28ae53..0366c8e03b 100644 --- a/Items/Accessories/GladiatorsLocket.cs +++ b/Items/Accessories/GladiatorsLocket.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { if (player.Calamity().gladiatorSword) return false; diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 1f220c27a5..036380fbe9 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories Item.Calamity().customRarity = CalamityRarity.Rainbow; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.brimstoneWaifu || modPlayer.sandWaifu || modPlayer.sandBoobWaifu || modPlayer.cloudWaifu || modPlayer.sirenWaifu) diff --git a/Items/Accessories/HowlsHeart.cs b/Items/Accessories/HowlsHeart.cs index dd0d7f6fbf..11d0fb69a4 100644 --- a/Items/Accessories/HowlsHeart.cs +++ b/Items/Accessories/HowlsHeart.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories Item.Calamity().donorItem = true; } - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().howlsHeart; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().howlsHeart; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/LureofEnthrallment.cs b/Items/Accessories/LureofEnthrallment.cs index bb0d937773..9378841907 100644 --- a/Items/Accessories/LureofEnthrallment.cs +++ b/Items/Accessories/LureofEnthrallment.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) diff --git a/Items/Accessories/PlaguedFuelPack.cs b/Items/Accessories/PlaguedFuelPack.cs index ea6c676f0f..8f2243193a 100644 --- a/Items/Accessories/PlaguedFuelPack.cs +++ b/Items/Accessories/PlaguedFuelPack.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories } //Todo : Check if the slot contains the other rogue jetpack, in which case, let the player swap accs - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().hasJetpack; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().hasJetpack; public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index 92b1b74bce..efd22fdce9 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories Item.Calamity().donorItem = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { return !player.Calamity().pArtifact; } diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 085a8635c9..bc683afc4f 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories Item.Calamity().devItem = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { return !player.Calamity().pArtifact; } diff --git a/Items/Accessories/RoseStone.cs b/Items/Accessories/RoseStone.cs index 43fee7bf73..d656c90034 100644 --- a/Items/Accessories/RoseStone.cs +++ b/Items/Accessories/RoseStone.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) diff --git a/Items/Accessories/ShatteredCommunity.cs b/Items/Accessories/ShatteredCommunity.cs index 8022529ea4..a7a1faee46 100644 --- a/Items/Accessories/ShatteredCommunity.cs +++ b/Items/Accessories/ShatteredCommunity.cs @@ -1,4 +1,4 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using System.Collections.Generic; using System.IO; @@ -55,16 +55,9 @@ namespace CalamityMod.Items.Accessories } // Not overriding these Clones makes tooltips fail to function correctly due to HoverItem spaghetti. - public override ModItem Clone() - { - var clone = (ShatteredCommunity)base.Clone(); - clone.level = level; - clone.totalRageDamage = totalRageDamage; - return clone; - } public override ModItem Clone(Item item) { - var clone = (ShatteredCommunity)base.Clone(); + var clone = (ShatteredCommunity)base.Clone(Item); clone.level = level; clone.totalRageDamage = totalRageDamage; return clone; @@ -79,7 +72,7 @@ namespace CalamityMod.Items.Accessories // Shattered Community gives (mostly) the same boosts as normal Community // It does not give melee speed or minion knockback, but always gives life regen (instead of only conditionally) - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; modPlayer.AllCritBoost(5); player.statDefense += 10; player.endurance += 0.05f; @@ -91,7 +84,7 @@ namespace CalamityMod.Items.Accessories } // Community and Shattered Community are mutually exclusive - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().community; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().community; public override bool CanUseItem(Player player) => false; // Produces purple light while in the world. @@ -115,7 +108,7 @@ namespace CalamityMod.Items.Accessories { Item acc = player.armor[i]; if (acc.type == thisItemID) - sc = acc.modItem as ShatteredCommunity; + sc = acc.ModItem as ShatteredCommunity; } // Safety check in case for some reason the equipped Shattered Community isn't found. @@ -136,9 +129,10 @@ namespace CalamityMod.Items.Accessories private void LevelUpEffects(Player player) { // Spawn the purple laser beam from failing the Dungeon Defenders event. + var source = player.GetProjectileSource_Accessory(Item); int projID = ProjectileID.DD2ElderWins; Vector2 offset = new Vector2(0f, 800f); // The effect is extremely tall, so start it very low down - Projectile fx = Projectile.NewProjectileDirect(player.Center + offset, Vector2.Zero, projID, 0, 0f, player.whoAmI); + Projectile fx = Projectile.NewProjectileDirect(source, player.Center + offset, Vector2.Zero, projID, 0, 0f, player.whoAmI); fx.friendly = false; fx.hostile = false; // On the 108th update, crystal debris is spawned, so we avoid that. @@ -190,17 +184,13 @@ namespace CalamityMod.Items.Accessories tooltips.Add(new TooltipLine(Mod, "Tooltip8", sb.ToString())); } - public override TagCompound Save() + public override void SaveData(TagCompound tag) { - TagCompound tag = new TagCompound - { - { "level", level }, - { "totalDamage", totalRageDamage } - }; - return tag; + tag["level"] = level; + tag["totalDamage"] = totalRageDamage; } - public override void Load(TagCompound tag) + public override void LoadData(TagCompound tag) { level = tag.GetInt("level"); // Shattered Community's level cap was reduced from 60 to 25, so cap out ones that were made higher previously. diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 1faa8041a3..b4d4efba1a 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -36,6 +36,6 @@ namespace CalamityMod.Items.Accessories } // Community and Shattered Community are mutually exclusive - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().shatteredCommunity; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().shatteredCommunity; } } diff --git a/Items/Accessories/ThiefsDime.cs b/Items/Accessories/ThiefsDime.cs index 0f7c3bea6f..15330fce13 100644 --- a/Items/Accessories/ThiefsDime.cs +++ b/Items/Accessories/ThiefsDime.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { return !player.Calamity().thiefsDime; } diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index 92405a9e6c..62efe1ac9b 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().calamityRing; + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().calamityRing; public override void AddRecipes() { diff --git a/Items/Accessories/WifeinaBottle.cs b/Items/Accessories/WifeinaBottle.cs index e50954ad54..bccb504c36 100644 --- a/Items/Accessories/WifeinaBottle.cs +++ b/Items/Accessories/WifeinaBottle.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) diff --git a/Items/Accessories/WifeinaBottlewithBoobs.cs b/Items/Accessories/WifeinaBottlewithBoobs.cs index b027198d45..c5b6693f20 100644 --- a/Items/Accessories/WifeinaBottlewithBoobs.cs +++ b/Items/Accessories/WifeinaBottlewithBoobs.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Summon; +using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Summon; using Terraria; @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } - public override bool CanEquipAccessory(Player player, int slot) + public override bool CanEquipAccessory(Player player, int slot, bool modded) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) @@ -47,7 +47,8 @@ namespace CalamityMod.Items.Accessories } if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(45 * player.MinionDamage()), 2f, Main.myPlayer, 0f, 0f); + var source = player.GetProjectileSource_Accessory(Item); + Projectile.NewProjectile(source, player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(45 * player.MinionDamage()), 2f, Main.myPlayer, 0f, 0f); } } } diff --git a/Items/Ammo/AstralSolution.cs b/Items/Ammo/AstralSolution.cs index cfe0f200ad..58529378c1 100644 --- a/Items/Ammo/AstralSolution.cs +++ b/Items/Ammo/AstralSolution.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Ammo return; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { return !(player.itemAnimation < player.ActiveItem().useAnimation - 3); } diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 04fdcfee32..38b195e196 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -6,8 +6,8 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; -using static CalamityMod.CalPlayer.CalamityPlayer; using System.Linq; +using Terraria.DataStructures; namespace CalamityMod.Items.Armor { @@ -86,7 +86,7 @@ namespace CalamityMod.Items.Armor } public string ExtensionTexture => "CalamityMod/Items/Armor/DemonshadeHelm_Extension"; - public Vector2 ExtensionSpriteOffset(PlayerDrawInfo drawInfo) => new Vector2(-10f, -14f); - public bool PreDrawExtension(PlayerDrawInfo drawInfo) => true; + public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2(-10f, -14f); + public bool PreDrawExtension(PlayerDrawSet drawInfo) => true; } } diff --git a/Items/Armor/Vanity/ApolloMask.cs b/Items/Armor/Vanity/ApolloMask.cs index 1ccf18298c..dbfcf9bf54 100644 --- a/Items/Armor/Vanity/ApolloMask.cs +++ b/Items/Armor/Vanity/ApolloMask.cs @@ -1,7 +1,7 @@ -using Terraria.ModLoader; +using Terraria.ModLoader; using Terraria.ID; -using static CalamityMod.CalPlayer.CalamityPlayer; using Microsoft.Xna.Framework; +using Terraria.DataStructures; namespace CalamityMod.Items.Armor.Vanity { @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity public override bool DrawHead() => false; public string ExtensionTexture => "CalamityMod/Items/Armor/Vanity/ApolloMask_Extra"; - public Vector2 ExtensionSpriteOffset(PlayerDrawInfo drawInfo) => new Vector2(drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10); - public bool PreDrawExtension(PlayerDrawInfo drawInfo) => true; + public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2(drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10); + public bool PreDrawExtension(PlayerDrawSet drawInfo) => true; } } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 3210bfb6ea..7625f8b3e1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -29,13 +29,14 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.IO; using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; namespace CalamityMod.Items { public partial class CalamityGlobalItem : GlobalItem { public override bool InstancePerEntity => true; - public override bool CloneNewInstances => true; public bool rogue = false; public float StealthGenBonus; @@ -177,7 +178,7 @@ namespace CalamityMod.Items #endregion #region Shoot - public override bool Shoot(Item item, Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Item item, Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockBack) { CalamityPlayer modPlayer = player.Calamity(); if (Main.myPlayer == player.whoAmI && player.Calamity().cursedSummonsEnchant && NPC.CountNPCS(ModContent.NPCType()) < 2) @@ -191,27 +192,18 @@ namespace CalamityMod.Items { int monsterDamage = (int)(165000 * player.MagicDamage()); Vector2 shootVelocity = player.SafeDirectionTo(Main.MouseWorld, -Vector2.UnitY).RotatedByRandom(0.07f) * Main.rand.NextFloat(4f, 5f); - Projectile.NewProjectile(player.Center + shootVelocity, shootVelocity, ModContent.ProjectileType(), monsterDamage, 0f, player.whoAmI); + Projectile.NewProjectile(source, player.Center + shootVelocity, shootVelocity, ModContent.ProjectileType(), monsterDamage, 0f, player.whoAmI); } if (rogue) { - speedX *= modPlayer.throwingVelocity; - speedY *= modPlayer.throwingVelocity; + velocity *= modPlayer.throwingVelocity; if (modPlayer.gloveOfRecklessness && item.useTime == item.useAnimation) - { - Vector2 rotated = new Vector2(speedX, speedY); - rotated = rotated.RotatedByRandom(MathHelper.ToRadians(6f)); - speedX = rotated.X; - speedY = rotated.Y; - } + velocity = velocity.RotatedByRandom(MathHelper.ToRadians(6f)); } - if (modPlayer.eArtifact && item.ranged) - { - speedX *= 1.25f; - speedY *= 1.25f; - } - Vector2 velocity = new Vector2(speedX, speedY); + if (modPlayer.eArtifact && item.CountsAsClass()) + velocity *= 1.25f; + if (modPlayer.luxorsGift) { // useTime 9 = 0.9 useTime 2 = 0.2 @@ -223,33 +215,33 @@ namespace CalamityMod.Items if (player.whoAmI == Main.myPlayer) { - if (item.melee) + if (item.CountsAsClass()) { - int projectile = Projectile.NewProjectile(position, velocity * 0.5f, ModContent.ProjectileType(), (int)(newDamage * 0.25), 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, velocity * 0.5f, ModContent.ProjectileType(), (int)(newDamage * 0.25), 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } else if (rogue) { - int projectile = Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), (int)(newDamage * 0.2), 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), (int)(newDamage * 0.2), 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } - else if (item.ranged) + else if (item.CountsAsClass()) { - int projectile = Projectile.NewProjectile(position, velocity * 1.5f, ModContent.ProjectileType(), (int)(newDamage * 0.15), 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, velocity * 1.5f, ModContent.ProjectileType(), (int)(newDamage * 0.15), 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } - else if (item.magic) + else if (item.CountsAsClass()) { - int projectile = Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), (int)(newDamage * 0.3), 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), (int)(newDamage * 0.3), 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } - else if (item.summon && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) + else if (item.CountsAsClass() && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - int projectile = Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } @@ -257,20 +249,20 @@ namespace CalamityMod.Items } if (modPlayer.bloodflareMage && modPlayer.canFireBloodflareMageProjectile) { - if (item.magic) + if (item.CountsAsClass()) { modPlayer.canFireBloodflareMageProjectile = false; if (player.whoAmI == Main.myPlayer) { // Bloodflare Mage Bolt: 130%, soft cap starts at 2000 base damage int bloodflareBoltDamage = CalamityUtils.DamageSoftCap(damage * 1.3, 2600); - Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), bloodflareBoltDamage, 1f, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), bloodflareBoltDamage, 1f, player.whoAmI); } } } if (modPlayer.bloodflareRanged && modPlayer.canFireBloodflareRangedProjectile) { - if (item.ranged) + if (item.CountsAsClass()) { modPlayer.canFireBloodflareRangedProjectile = false; if (player.whoAmI == Main.myPlayer) @@ -278,7 +270,7 @@ namespace CalamityMod.Items // Bloodflare Ranged Bloodsplosion: 80%, soft cap starts at 150 base damage // This is intentionally extremely low because this effect can be grossly overpowered with sniper rifles and the like. int bloodsplosionDamage = CalamityUtils.DamageSoftCap(damage * 0.8, 120); - Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), bloodsplosionDamage, 2f, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), bloodsplosionDamage, 2f, player.whoAmI); } } } @@ -294,13 +286,13 @@ namespace CalamityMod.Items for (int l = 0; l < leafAmt; l++) { float spreadMult = 0.025f * l; - float xDiff = speedX + Main.rand.Next(-25, 26) * spreadMult; - float yDiff = speedY + Main.rand.Next(-25, 26) * spreadMult; - float speed = (float)Math.Sqrt(speedX * speedX + speedY * speedY); + float xDiff = velocity.X + Main.rand.Next(-25, 26) * spreadMult; + float yDiff = velocity.Y + Main.rand.Next(-25, 26) * spreadMult; + float speed = velocity.Length(); speed = item.shootSpeed / speed; xDiff *= speed; yDiff *= speed; - int projectile = Projectile.NewProjectile(position, new Vector2(xDiff, yDiff), ProjectileID.Leaf, leafDamage, knockBack, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, new Vector2(xDiff, yDiff), ProjectileID.Leaf, leafDamage, knockBack, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } @@ -308,26 +300,26 @@ namespace CalamityMod.Items } if (modPlayer.ataxiaBolt && modPlayer.canFireAtaxiaRangedProjectile) { - if (item.ranged) + if (item.CountsAsClass()) { modPlayer.canFireAtaxiaRangedProjectile = false; if (player.whoAmI == Main.myPlayer) { int ataxiaFlareDamage = (int)(damage * 0.25); - Projectile.NewProjectile(position, velocity * 1.25f, ModContent.ProjectileType(), ataxiaFlareDamage, 2f, player.whoAmI); + Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType(), ataxiaFlareDamage, 2f, player.whoAmI); } } } if (modPlayer.godSlayerRanged && modPlayer.canFireGodSlayerRangedProjectile) { - if (item.ranged) + if (item.CountsAsClass()) { modPlayer.canFireGodSlayerRangedProjectile = false; if (player.whoAmI == Main.myPlayer) { // God Slayer Ranged Shrapnel: 100%, soft cap starts at 800 base damage int shrapnelRoundDamage = CalamityUtils.DamageSoftCap(damage, 800); - Projectile.NewProjectile(position, velocity * 1.25f, ModContent.ProjectileType(), shrapnelRoundDamage, 2f, player.whoAmI); + Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType(), shrapnelRoundDamage, 2f, player.whoAmI); } } } @@ -350,27 +342,29 @@ namespace CalamityMod.Items for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI); - Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI); + Projectile.NewProjectile(source, player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI); + Projectile.NewProjectile(source, player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI); } } } } if (modPlayer.victideSet) { - if ((item.ranged || item.melee || item.magic || item.thrown || rogue || item.summon) && Main.rand.NextBool(10)) + if ((item.CountsAsClass() || item.CountsAsClass() || item.CountsAsClass() || + item.CountsAsClass() || rogue || item.CountsAsClass()) && + Main.rand.NextBool(10)) { if (player.whoAmI == Main.myPlayer) { // Victide All-class Seashells: 200%, soft cap starts at 23 base damage int seashellDamage = CalamityUtils.DamageSoftCap(damage * 2, 46); - Projectile.NewProjectile(position, velocity * 1.25f, ModContent.ProjectileType(), seashellDamage, 1f, player.whoAmI); + Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType(), seashellDamage, 1f, player.whoAmI); } } } if (modPlayer.dynamoStemCells) { - if (item.ranged && Main.rand.NextBool(20)) + if (item.CountsAsClass() && Main.rand.NextBool(20)) { double damageMult = item.useTime / 30D; if (damageMult < 0.35) @@ -380,7 +374,7 @@ namespace CalamityMod.Items if (player.whoAmI == Main.myPlayer) { - int projectile = Projectile.NewProjectile(position, velocity * 1.25f, ModContent.ProjectileType(), newDamage, 2f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType(), newDamage, 2f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; } @@ -388,7 +382,7 @@ namespace CalamityMod.Items } if (modPlayer.prismaticRegalia) { - if (item.magic && Main.rand.NextBool(20)) + if (item.CountsAsClass() && Main.rand.NextBool(20)) { if (player.whoAmI == Main.myPlayer) { @@ -397,7 +391,7 @@ namespace CalamityMod.Items if (i != 0) { Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i)); - int rocket = Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType(), (int)(damage * 0.25), 2f, player.whoAmI); + int rocket = Projectile.NewProjectile(source, position, perturbedSpeed, ModContent.ProjectileType(), (int)(damage * 0.25), 2f, player.whoAmI); if (rocket.WithinBounds(Main.maxProjectiles)) Main.projectile[rocket].Calamity().forceTypeless = true; } @@ -411,9 +405,9 @@ namespace CalamityMod.Items { if (player.whoAmI == Main.myPlayer) { - float spreadX = speedX + Main.rand.NextFloat(-0.75f, 0.75f); - float spreadY = speedY + Main.rand.NextFloat(-0.75f, 0.75f); - int feather = Projectile.NewProjectile(position, new Vector2(spreadX, spreadY) * 1.25f, ModContent.ProjectileType(), (int)(damage * 0.3), 2f, player.whoAmI); + float spreadX = velocity.X + Main.rand.NextFloat(-0.75f, 0.75f); + float spreadY = velocity.X + Main.rand.NextFloat(-0.75f, 0.75f); + int feather = Projectile.NewProjectile(source, position, new Vector2(spreadX, spreadY) * 1.25f, ModContent.ProjectileType(), (int)(damage * 0.3), 2f, player.whoAmI); if (feather.WithinBounds(Main.maxProjectiles)) { Main.projectile[feather].usesLocalNPCImmunity = true; @@ -425,12 +419,12 @@ namespace CalamityMod.Items } if (item.type == ItemID.StarCannon) { - Vector2 muzzleOffset = Vector2.Normalize(new Vector2(speedX, speedY)) * 5f; + Vector2 muzzleOffset = velocity.SafeNormalize(Vector2.Zero) * 5f; if (Collision.CanHit(position, 0, 0, position + muzzleOffset, 0, 0)) { position += muzzleOffset; } - Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); SoundEngine.PlaySound(SoundID.Item11.WithPitchVariance(0.05f), position); return false; } @@ -446,7 +440,7 @@ namespace CalamityMod.Items for (int i = -8; i <= 8; i += 8) { Vector2 perturbedSpeed = velocity.RotatedBy(MathHelper.ToRadians(i)); - Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType(), damage, 0f, player.whoAmI); + Projectile.NewProjectile(source, position, perturbedSpeed, ModContent.ProjectileType(), damage, 0f, player.whoAmI); } } return true; @@ -454,28 +448,20 @@ namespace CalamityMod.Items #endregion #region Saving And Loading - public override bool NeedsSaving(Item item) + public override void SaveData(Item item, TagCompound tag) { - return rogue || canFirePointBlankShots || trueMelee || timesUsed != 0 || customRarity != 0 || Charge != 0 || reforgeTier != 0 || AppliedEnchantment.HasValue || DischargeEnchantExhaustion != 0; + tag["rogue"] = rogue; + tag["timesUsed"] = timesUsed; + tag["rarity"] = (int)customRarity; + tag["charge"] = Charge; + tag["reforgeTier"] = reforgeTier; + tag["enchantmentID"] = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0; + tag["DischargeEnchantExhaustion"] = DischargeEnchantExhaustion; + tag["canFirePointBlankShots"] = canFirePointBlankShots; + tag["trueMelee"] = trueMelee; } - public override TagCompound Save(Item item) - { - return new TagCompound - { - ["rogue"] = rogue, - ["timesUsed"] = timesUsed, - ["rarity"] = (int)customRarity, - ["charge"] = Charge, - ["reforgeTier"] = reforgeTier, - ["enchantmentID"] = AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0, - ["DischargeEnchantExhaustion"] = DischargeEnchantExhaustion, - ["canFirePointBlankShots"] = canFirePointBlankShots, - ["trueMelee"] = trueMelee - }; - } - - public override void Load(Item item, TagCompound tag) + public override void LoadData(Item item, TagCompound tag) { rogue = tag.GetBool("rogue"); canFirePointBlankShots = tag.GetBool("canFirePointBlankShots"); @@ -500,27 +486,6 @@ namespace CalamityMod.Items } } - public override void LoadLegacy(Item item, BinaryReader reader) - { - int loadVersion = reader.ReadInt32(); - customRarity = (CalamityRarity)reader.ReadInt32(); - timesUsed = reader.ReadInt32(); - Charge = reader.ReadSingle(); - reforgeTier = reader.ReadInt32(); - - if (loadVersion == 0) - { - BitsByte flags = reader.ReadByte(); - rogue = flags[0]; - canFirePointBlankShots = flags[1]; - trueMelee = flags[2]; - } - else - { - ModContent.GetInstance().Logger.Error("Unknown loadVersion: " + loadVersion); - } - } - public override void NetSend(Item item, BinaryWriter writer) { BitsByte flags = new BitsByte(); @@ -618,7 +583,7 @@ namespace CalamityMod.Items public override bool AltFunctionUse(Item item, Player player) { - if (player.Calamity().profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.magic || item.ranged || item.melee)) + if (player.Calamity().profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (item.Calamity().rogue || item.CountsAsClass() || item.CountsAsClass() || item.CountsAsClass())) { NPC closest = Main.MouseWorld.ClosestNPCAt(1000f, true); if (closest != null) @@ -646,7 +611,7 @@ namespace CalamityMod.Items int bladeIndex = 0; for (int i = 0; i < Main.maxProjectiles; i++) { - if (Main.projectile[i].modProjectile is ViridVanguardBlade) + if (Main.projectile[i].ModProjectile is ViridVanguardBlade) { if (Main.projectile[i].ModProjectile().FiringTime > 0f) continue; @@ -677,7 +642,7 @@ namespace CalamityMod.Items { for (int i = 0; i < Main.maxProjectiles; i++) { - if (Main.projectile[i].modProjectile is IgneousBlade) + if (Main.projectile[i].ModProjectile is IgneousBlade) { if (Main.projectile[i].ModProjectile().Firing) continue; @@ -700,7 +665,7 @@ namespace CalamityMod.Items { for (int i = 0; i < Main.maxProjectiles; i++) { - if (Main.projectile[i].modProjectile is VoidConcentrationAura) + if (Main.projectile[i].ModProjectile is VoidConcentrationAura) { if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI) { @@ -726,7 +691,7 @@ namespace CalamityMod.Items } else if (Main.projectile[i].ai[1] == 0f) { - if (((ColdDivinityPointyThing)Main.projectile[i].modProjectile).circlingPlayer) + if (((ColdDivinityPointyThing)Main.projectile[i].ModProjectile).circlingPlayer) count++; } } @@ -736,17 +701,16 @@ namespace CalamityMod.Items NPC unluckyTarget = CalamityUtils.MinionHoming(Main.MouseWorld, 1000f, player); if (unluckyTarget != null) { - int height = unluckyTarget.getRect().Height; - int width = unluckyTarget.getRect().Width; int pointyThingyAmount = count; float angleVariance = MathHelper.TwoPi / pointyThingyAmount; float angle = 0f; + var source = player.GetProjectileSource_Item(player.ActiveItem()); for (int i = 0; i < pointyThingyAmount; i++) { if (Main.projectile.Length == Main.maxProjectiles) break; - int projj = Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType(), (int)(80 * player.MinionDamage()), 1f, player.whoAmI, angle, 2f); + int projj = Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, ModContent.ProjectileType(), (int)(80 * player.MinionDamage()), 1f, player.whoAmI, angle, 2f); angle += angleVariance; for (int j = 0; j < 22; j++) { @@ -785,12 +749,12 @@ namespace CalamityMod.Items if (item.pick > 0 || item.axe > 0 || item.hammer > 0 || item.fishingPole > 0) return false; // compiler optimization: && short-circuits, so if altFunctionUse != 0, Andromeda code is never called. - if (item.Calamity().rogue || item.magic || item.ranged || item.melee) + if (item.Calamity().rogue || item.CountsAsClass() || item.CountsAsClass() || item.CountsAsClass()) return player.altFunctionUse == 0 && PrototypeAndromechaRing.TransformItemUsage(item, player); } // Conversion for Profaned Soul Crystal - if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (modItem.rogue || item.magic || item.ranged || item.melee)) + if (modPlayer.profanedCrystalBuffs && item.pick == 0 && item.axe == 0 && item.hammer == 0 && item.autoReuse && (modItem.rogue || item.CountsAsClass() || item.CountsAsClass() || item.CountsAsClass())) return player.altFunctionUse == 0 ? ProfanedSoulCrystal.TransformItemUsage(item, player) : AltFunctionUse(item, player); if (!item.IsAir) @@ -823,7 +787,7 @@ namespace CalamityMod.Items // If you have enough charge, decrement charge on the spot because this hook runs exactly once every time you use an item. // Mana has to be checked separately or you'll fail to use the weapon on a mana check later and still have consumed charge. - if (player.CheckMana(item) && item.modItem.CanUseItem(player)) + if (player.CheckMana(item) && item.ModItem.CanUseItem(player)) Charge -= chargeNeeded; } } @@ -906,15 +870,15 @@ namespace CalamityMod.Items #endregion #region Modify Weapon Damage - public override void ModifyWeaponDamage(Item item, Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Item item, Player player, ref StatModifier damage, ref float flat) { // Nerf yoyo glove and bag because it's bad and stupid and dumb and bad. if (player.yoyoGlove && ItemID.Sets.Yoyo[item.type]) - mult *= 0.66f; + damage *= 0.66f; // Nerf archery potion damage buff from 1.2x to 1.05x. if (item.useAmmo == AmmoID.Arrow && player.archery) - mult *= 0.875f; + damage *= 0.875f; if (item.type < ItemID.Count) return; @@ -922,16 +886,16 @@ namespace CalamityMod.Items // Summon weapons specifically do not have their damage affected by charge. They still require charge to function however. CalamityGlobalItem modItem = item.Calamity(); - if (!item.summon && modItem.DischargeEnchantExhaustion > 0f) - mult *= DischargeEnchantmentDamageFormula(); + if (!item.CountsAsClass() && modItem.DischargeEnchantExhaustion > 0f) + damage *= DischargeEnchantmentDamageFormula(); - if (!item.summon && (modItem?.UsesCharge ?? false)) + if (!item.CountsAsClass() && (modItem?.UsesCharge ?? false)) { // At exactly zero charge, do not perform any multiplication. // This makes charge-using weapons show up at full damage when previewed in crafting, Recipe Browser, etc. if (Charge == 0f) return; - mult *= ChargeDamageFormula(); + damage *= ChargeDamageFormula(); } } @@ -959,7 +923,7 @@ namespace CalamityMod.Items #region Armor Set Changes public override string IsArmorSet(Item head, Item body, Item legs) { - string managedArmorSetName = VanillaArmorChangeManager.GetSetBonusName(Main.player[head.owner]); + string managedArmorSetName = VanillaArmorChangeManager.GetSetBonusName(Main.player[head.playerIndexTheItemIsReservedFor]); if (!string.IsNullOrEmpty(managedArmorSetName)) return managedArmorSetName; @@ -1153,7 +1117,7 @@ namespace CalamityMod.Items } else if (item.type == ItemID.DemonWings) // Boost to all damage and crit { - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; modPlayer.AllCritBoost(5); player.noFallDmg = true; } @@ -1194,7 +1158,7 @@ namespace CalamityMod.Items if (!Main.dayTime || Main.eclipse) { player.jumpSpeedBoost += 0.5f; - player.allDamage += 0.07f; + player.GetDamage() += 0.07f; modPlayer.AllCritBoost(3); player.moveSpeed += 0.1f; } @@ -1220,7 +1184,7 @@ namespace CalamityMod.Items else if (item.type == ItemID.MothronWings) // Spawn baby mothrons over time to attack enemies, max of 3 { player.statDefense += 5; - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; player.moveSpeed += 0.1f; player.jumpSpeedBoost += 0.6f; player.noFallDmg = true; @@ -1315,9 +1279,10 @@ namespace CalamityMod.Items player.statLifeMax2 += 40; if (modPlayer.icicleCooldown <= 0) { - if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart) + var source = player.GetProjectileSource_Accessory(item); + if (player.controlJump && !player.canJumpAgain_Cloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart) { - int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 2f, ProjectileID.OrnamentFriendly, (int)(100 * player.AverageDamage()), 5f, player.whoAmI); + int p = Projectile.NewProjectile(source, player.Center, Vector2.UnitY * 2f, ProjectileID.OrnamentFriendly, (int)(100 * player.AverageDamage()), 5f, player.whoAmI); if (p.WithinBounds(Main.maxProjectiles)) { Main.projectile[p].Calamity().forceTypeless = true; @@ -1338,14 +1303,14 @@ namespace CalamityMod.Items } else if (item.type == ItemID.TatteredFairyWings) { - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; modPlayer.AllCritBoost(5); player.noFallDmg = true; } else if (item.type == ItemID.SteampunkWings) { player.statDefense += 8; - player.allDamage += 0.04f; + player.GetDamage() += 0.04f; modPlayer.AllCritBoost(2); player.moveSpeed += 0.1f; player.noFallDmg = true; @@ -1564,14 +1529,14 @@ namespace CalamityMod.Items #endregion #region Ammo - public override bool ConsumeAmmo(Item item, Player player) => Main.rand.NextFloat() <= player.Calamity().rangedAmmoCost; + public override bool CanConsumeAmmo(Item item, Player player) => Main.rand.NextFloat() <= player.Calamity().rangedAmmoCost; public static bool HasEnoughAmmo(Player player, Item item, int ammoConsumed) { bool flag = false; bool canShoot = false; - for (int i = 54; i < Main.maxInventory; i++) + for (int i = 54; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable)) { @@ -1601,7 +1566,7 @@ namespace CalamityMod.Items bool flag = false; bool dontConsumeAmmo = false; - for (int i = 54; i < Main.maxInventory; i++) + for (int i = 54; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable)) { @@ -1665,7 +1630,7 @@ namespace CalamityMod.Items public override bool PreDrawInInventory(Item item, SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { // I want to strangle somebody. - Texture2D itemTexture = Main.itemTexture[item.type]; + Texture2D itemTexture = TextureAssets.Item[item.type].Value; Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); if (!EnchantmentManager.ItemUpgradeRelationship.ContainsKey(item.type) || !Main.LocalPlayer.InventoryHas(ModContent.ItemType())) @@ -1802,7 +1767,7 @@ namespace CalamityMod.Items break; } } - else if (item.melee) + else if (item.CountsAsClass()) { // Yoyos, Flails, Spears, etc. if (item.channel || item.noMelee) @@ -1986,7 +1951,7 @@ namespace CalamityMod.Items } } } - else if (item.ranged) + else if (item.CountsAsClass()) { switch (reforgeTier) { @@ -2095,7 +2060,7 @@ namespace CalamityMod.Items break; } } - else if (item.magic) + else if (item.CountsAsClass()) { switch (reforgeTier) { @@ -2201,7 +2166,7 @@ namespace CalamityMod.Items break; } } - else if (item.summon) + else if (item.CountsAsClass()) { switch (reforgeTier) { diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index dd5be5aaf2..8269036a10 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -89,48 +89,48 @@ namespace CalamityMod.Items // Apply standard post-ML rarities to the item's color first. Color? standardRarityColor = CalamityUtils.GetRarityColor(customRarity); if (!item.expert && standardRarityColor.HasValue) - nameLine.overrideColor = standardRarityColor.Value; + nameLine.OverrideColor = standardRarityColor.Value; #region Uniquely Colored Developer Items if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(Main.DiscoR, 100, 255); + nameLine.OverrideColor = new Color(Main.DiscoR, 100, 255); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(0, 0, 255); + nameLine.OverrideColor = new Color(0, 0, 255); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = Judgement.GetSyncedLightColor(); + nameLine.OverrideColor = Judgement.GetSyncedLightColor(); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f); + nameLine.OverrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = ShatteredCommunity.GetRarityColor(); + nameLine.OverrideColor = ShatteredCommunity.GetRarityColor(); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f); //alternates between emerald green and amber (BanditHueh) + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f); //alternates between emerald green and amber (BanditHueh) if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 4f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 4f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 4f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(204, 86, 80), new Color(237, 69, 141), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(204, 86, 80), new Color(237, 69, 141), 4f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(129, 29, 149); + nameLine.OverrideColor = new Color(129, 29, 149); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(255, 255, 255), new Color(0xD1, 0xCC, 0x6F), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 255, 255), new Color(0xD1, 0xCC, 0x6F), 4f); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(220, 20, 60); + nameLine.OverrideColor = new Color(220, 20, 60); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(207, 17, 117); + nameLine.OverrideColor = new Color(207, 17, 117); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = new Color(227, 226, 180); + nameLine.OverrideColor = new Color(227, 226, 180); if (item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - nameLine.overrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f); + nameLine.OverrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f); if (item.type == ModContent.ItemType()) { - nameLine.overrideColor = CalamityUtils.MulticolorLerp(Main.GlobalTimeWrappedHourly / 2f % 1f, new Color[] + nameLine.OverrideColor = CalamityUtils.MulticolorLerp(Main.GlobalTimeWrappedHourly / 2f % 1f, new Color[] { new Color(255, 196, 55), new Color(255, 231, 107), @@ -158,22 +158,22 @@ namespace CalamityMod.Items int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 2 % colorSet.Count); Color currentColor = colorSet[colorIndex]; Color nextColor = colorSet[(colorIndex + 1) % colorSet.Count]; - nameLine.overrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f); + nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f); } } if (item.type == ModContent.ItemType()) { if (Main.GlobalTimeWrappedHourly % 1f < 0.6f) { - nameLine.overrideColor = new Color(89, 229, 255); + nameLine.OverrideColor = new Color(89, 229, 255); } else if (Main.GlobalTimeWrappedHourly % 1f < 0.8f) { - nameLine.overrideColor = Color.Lerp(new Color(89, 229, 255), Color.White, (Main.GlobalTimeWrappedHourly % 1f - 0.6f) / 0.2f); + nameLine.OverrideColor = Color.Lerp(new Color(89, 229, 255), Color.White, (Main.GlobalTimeWrappedHourly % 1f - 0.6f) / 0.2f); } else { - nameLine.overrideColor = Color.Lerp(Color.White, new Color(89, 229, 255), (Main.GlobalTimeWrappedHourly % 1f - 0.8f) / 0.2f); + nameLine.OverrideColor = Color.Lerp(Color.White, new Color(89, 229, 255), (Main.GlobalTimeWrappedHourly % 1f - 0.8f) / 0.2f); } } if (item.type == ModContent.ItemType()) @@ -189,7 +189,7 @@ namespace CalamityMod.Items int colorIndex = (int)(Main.GlobalTimeWrappedHourly / 2 % earthColors.Count); Color currentColor = earthColors[colorIndex]; Color nextColor = earthColors[(colorIndex + 1) % earthColors.Count]; - nameLine.overrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f); + nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f); } } #endregion @@ -243,115 +243,115 @@ namespace CalamityMod.Items // Teleporters not working while a boss is alive. if (item.type == ItemID.Teleporter) - EditTooltipByName("Placeable", (line) => line.text += "\nCannot be used while a boss is alive"); + EditTooltipByName("Placeable", (line) => line.Text += "\nCannot be used while a boss is alive"); // Flesh Knuckles giving extra max life. if (item.type == ItemID.FleshKnuckles) - EditTooltipByNum(0, (line) => line.text += "\nMax life increased by 45"); + EditTooltipByNum(0, (line) => line.Text += "\nMax life increased by 45"); // Mirrors and Recall Potions cannot be used while a boss is alive. if (item.type == ItemID.MagicMirror || item.type == ItemID.IceMirror || item.type == ItemID.CellPhone || item.type == ItemID.RecallPotion) ApplyTooltipEdits(tooltips, (i, l) => l.Mod == "Terraria" && l.Name == (i.type == ItemID.CellPhone ? "Tooltip1" : "Tooltip0"), - (line) => line.text += "\nCannot be used while you have the Boss Effects buff"); + (line) => line.Text += "\nCannot be used while you have the Boss Effects buff"); // Rod of Discord cannot be used multiple times to hurt yourself if (item.type == ItemID.RodofDiscord) - EditTooltipByNum(0, (line) => line.text += "\nTeleportation is disabled while Chaos State is active"); + EditTooltipByNum(0, (line) => line.Text += "\nTeleportation is disabled while Chaos State is active"); // Indicate that the Ankh Shield provides sandstorm wind push immunity if (item.type == ItemID.AnkhShield) - EditTooltipByNum(1, (line) => line.text += ", including Mighty Wind"); + EditTooltipByNum(1, (line) => line.Text += ", including Mighty Wind"); // Water removing items cannot be used in the Abyss string noAbyssLine = "\nCannot be used in the Abyss"; if (item.type == ItemID.SuperAbsorbantSponge) - EditTooltipByNum(0, (line) => line.text += noAbyssLine); + EditTooltipByNum(0, (line) => line.Text += noAbyssLine); if (item.type == ItemID.EmptyBucket) - EditTooltipByName("Defense", (line) => line.text += noAbyssLine); + EditTooltipByName("Defense", (line) => line.Text += noAbyssLine); // If Early Hardmode Rework is enabled: Remind users that ores will NOT spawn when an altar is smashed. if (CalamityConfig.Instance.EarlyHardmodeProgressionRework && (item.type == ItemID.Pwnhammer || item.type == ItemID.Hammush)) - EditTooltipByNum(0, (line) => line.text += "\nDemon Altars no longer spawn ores when destroyed"); + EditTooltipByNum(0, (line) => line.Text += "\nDemon Altars no longer spawn ores when destroyed"); // Bottled Honey gives the Honey buff if (item.type == ItemID.BottledHoney) - EditTooltipByName("HealLife", (line) => line.text += "\nGrants the Honey buff for 2 minutes"); + EditTooltipByName("HealLife", (line) => line.Text += "\nGrants the Honey buff for 2 minutes"); // Warmth Potion provides debuff immunities if (item.type == ItemID.WarmthPotion) { string immunityLine = "\nMakes you immune to the Chilled, Frozen, and Glacial State debuffs"; - EditTooltipByNum(0, (line) => line.text += immunityLine); + EditTooltipByNum(0, (line) => line.Text += immunityLine); } // Nerfed Archery Potion tooltip if (item.type == ItemID.ArcheryPotion) - EditTooltipByNum(0, (line) => line.text = "20% increased arrow speed and 1.05x arrow damage"); + EditTooltipByNum(0, (line) => line.Text = "20% increased arrow speed and 1.05x arrow damage"); // Nerfed Swiftness Potion tooltip if (item.type == ItemID.SwiftnessPotion) - EditTooltipByNum(0, (line) => line.text = "15% increased movement speed"); + EditTooltipByNum(0, (line) => line.Text = "15% increased movement speed"); // Nerfed Endurance Potion tooltip if (item.type == ItemID.EndurancePotion) - EditTooltipByNum(0, (line) => line.text = "Reduces damage taken by 5%"); + EditTooltipByNum(0, (line) => line.Text = "Reduces damage taken by 5%"); // Hand Warmer has a side bonus with Eskimo armor if (item.type == ItemID.HandWarmer) { string extraLine = "\nProvides a regeneration boost while wearing the Eskimo armor"; - EditTooltipByNum(0, (line) => line.text += extraLine); + EditTooltipByNum(0, (line) => line.Text += extraLine); } // Invisibility Potion provides various rogue boosts if (item.type == ItemID.InvisibilityPotion) - EditTooltipByNum(0, (line) => line.text += "\nBoosts various rogue stats depending on held weapon"); + EditTooltipByNum(0, (line) => line.Text += "\nBoosts various rogue stats depending on held weapon"); // Golden Fishing Rod inherently contains High Test Fishing Line if (item.type == ItemID.GoldenFishingRod) - EditTooltipByName("NeedsBait", (line) => line.text += "\nIts fishing line will never break"); + EditTooltipByName("NeedsBait", (line) => line.Text += "\nIts fishing line will never break"); // Eternity Crystal notifies the player that they can accelerate the invasion if (item.type == ItemID.DD2ElderCrystal) - EditTooltipByNum(0, (line) => line.text += "\nOnce placed you can right click the crystal to skip waves or increase the spawn rate of the invaders"); + EditTooltipByNum(0, (line) => line.Text += "\nOnce placed you can right click the crystal to skip waves or increase the spawn rate of the invaders"); // Fix a vanilla mistake in Magic Quiver's tooltip // TODO -- in 1.4 this mistake is already corrected if (item.type == ItemID.MagicQuiver) - EditTooltipByNum(0, (line) => line.text = line.text.Replace(" damage", " arrow damage")); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" damage", " arrow damage")); // Aerial Bane is no longer the real bane of aerial enemies (50% dmg bonus removed) if (item.type == ItemID.DD2BetsyBow) - EditTooltipByNum(0, (line) => line.text = "Shoots splitting arrows"); + EditTooltipByNum(0, (line) => line.Text = "Shoots splitting arrows"); #endregion // For boss summon item clarity #region Boss Summon Tooltip Edits if (item.type == ItemID.Abeemination) - EditTooltipByNum(0, (line) => line.text += " when used in the jungle"); + EditTooltipByNum(0, (line) => line.Text += " when used in the jungle"); if (item.type == ItemID.BloodySpine) - EditTooltipByNum(0, (line) => line.text += " when used in the crimson"); + EditTooltipByNum(0, (line) => line.Text += " when used in the crimson"); if (item.type == ItemID.ClothierVoodooDoll) - EditTooltipByNum(0, (line) => line.text += "\nWhile equipped, summons Skeletron when the Clothier is killed during nighttime"); + EditTooltipByNum(0, (line) => line.Text += "\nWhile equipped, summons Skeletron when the Clothier is killed during nighttime"); if (item.type == ItemID.GuideVoodooDoll) - EditTooltipByNum(0, (line) => line.text += "\nSummons the Wall of Flesh if thrown into lava in the underworld while the Guide is alive"); + EditTooltipByNum(0, (line) => line.Text += "\nSummons the Wall of Flesh if thrown into lava in the underworld while the Guide is alive"); if (item.type == ItemID.LihzahrdPowerCell) - EditTooltipByNum(0, (line) => line.text += " to summon the Golem"); + EditTooltipByNum(0, (line) => line.Text += " to summon the Golem"); if (item.type == ItemID.MechanicalEye || item.type == ItemID.MechanicalSkull || item.type == ItemID.MechanicalWorm || item.type == ItemID.SuspiciousLookingEye) - EditTooltipByNum(0, (line) => line.text += " when used during nighttime"); + EditTooltipByNum(0, (line) => line.Text += " when used during nighttime"); if (item.type == ItemID.TruffleWorm) - EditTooltipByName("Consumable", (line) => line.text += "\nSummons Duke Fishron if used as bait in the ocean"); + EditTooltipByName("Consumable", (line) => line.Text += "\nSummons Duke Fishron if used as bait in the ocean"); if (item.type == ItemID.WormFood) - EditTooltipByNum(0, (line) => line.text += " when used in the corruption"); + EditTooltipByNum(0, (line) => line.Text += " when used in the corruption"); #endregion // Black Belt and Master Ninja Gear have guaranteed dodges on a 90 second cooldown. @@ -359,9 +359,9 @@ namespace CalamityMod.Items string beltDodgeLine = "Grants the ability to dodge attacks\n" + $"The dodge has a {CalamityPlayer.BeltDodgeCooldown / 60} second cooldown which is shared with all other dodges and reflects"; if (item.type == ItemID.BlackBelt) - EditTooltipByNum(0, (line) => line.text = beltDodgeLine); + EditTooltipByNum(0, (line) => line.Text = beltDodgeLine); if (item.type == ItemID.MasterNinjaGear) - EditTooltipByNum(1, (line) => line.text = beltDodgeLine); + EditTooltipByNum(1, (line) => line.Text = beltDodgeLine); #endregion // Early Hardmode ore melee weapons have new on-hit effects. @@ -369,54 +369,54 @@ namespace CalamityMod.Items // Cobalt if (item.type == ItemID.CobaltSword || item.type == ItemID.CobaltNaginata) - EditTooltipByName("Knockback", (line) => line.text += "\nDecreases enemy defense by 25% on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nDecreases enemy defense by 25% on hit"); // Palladium if (item.type == ItemID.PalladiumSword || item.type == ItemID.PalladiumPike) - EditTooltipByName("Knockback", (line) => line.text += "\nIncreases life regen on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nIncreases life regen on hit"); // Mythril if (item.type == ItemID.MythrilSword || item.type == ItemID.MythrilHalberd) - EditTooltipByName("Knockback", (line) => line.text += "\nDecreases enemy contact damage by 10% on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nDecreases enemy contact damage by 10% on hit"); // Orichalcum if (item.type == ItemID.OrichalcumSword || item.type == ItemID.OrichalcumHalberd) - EditTooltipByName("Knockback", (line) => line.text += "\nIncreases how frequently the Orichalcum set bonus triggers on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nIncreases how frequently the Orichalcum set bonus triggers on hit"); // Adamantite if (item.type == ItemID.AdamantiteSword || item.type == ItemID.AdamantiteGlaive) - EditTooltipByName("Knockback", (line) => line.text += "\nSlows enemies on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nSlows enemies on hit"); // Titanium if (item.type == ItemID.TitaniumSword || item.type == ItemID.TitaniumTrident) - EditTooltipByName("Knockback", (line) => line.text += "\nDeals increased damage to enemies with high knockback resistance"); + EditTooltipByName("Knockback", (line) => line.Text += "\nDeals increased damage to enemies with high knockback resistance"); // Hallowed (and True Excalibur) if (item.type == ItemID.Excalibur || item.type == ItemID.Gungnir || item.type == ItemID.TrueExcalibur) - EditTooltipByName("Knockback", (line) => line.text += "\nInflicts Holy Flames\nDeals double damage to enemies above 75% life"); + EditTooltipByName("Knockback", (line) => line.Text += "\nInflicts Holy Flames\nDeals double damage to enemies above 75% life"); #endregion // Other melee weapon tooltips #region Other Melee Tooltips if (item.type == ItemID.CandyCaneSword || item.type == ItemID.FruitcakeChakram) - EditTooltipByName("Knockback", (line) => line.text += "\nHeals you on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nHeals you on hit"); // Stylish Scissors, all Phaseblades, and all Phasesabers if (item.type == ItemID.StylistKilLaKillScissorsIWish || (item.type >= ItemID.BluePhaseblade && item.type <= ItemID.YellowPhaseblade) || (item.type >= ItemID.BluePhasesaber && item.type <= ItemID.YellowPhasesaber)) - EditTooltipByName("Knockback", (line) => line.text += "\nIgnores 100% of enemy defense"); + EditTooltipByName("Knockback", (line) => line.Text += "\nIgnores 100% of enemy defense"); if (item.type == ItemID.AntlionClaw || item.type == ItemID.BoneSword || item.type == ItemID.BreakerBlade) - EditTooltipByName("Knockback", (line) => line.text += "\nIgnores 50% of enemy defense"); + EditTooltipByName("Knockback", (line) => line.Text += "\nIgnores 50% of enemy defense"); if (item.type == ItemID.LightsBane || item.type == ItemID.NightsEdge || item.type == ItemID.TrueNightsEdge || item.type == ItemID.BallOHurt || item.type == ItemID.CorruptYoyo) - EditTooltipByName("Knockback", (line) => line.text += "\nInflicts Shadowflame on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nInflicts Shadowflame on hit"); if (item.type == ItemID.BloodButcherer || item.type == ItemID.TheRottedFork || item.type == ItemID.TheMeatball || item.type == ItemID.CrimsonYoyo || item.type == ItemID.CrimsonRod) - EditTooltipByName("Knockback", (line) => line.text += "\nInflicts Burning Blood on hit"); + EditTooltipByName("Knockback", (line) => line.Text += "\nInflicts Burning Blood on hit"); if (item.type == ItemID.DeathSickle) - EditTooltipByNum(0, (line) => line.text += "\nInflicts Whispering Death on hit"); + EditTooltipByNum(0, (line) => line.Text += "\nInflicts Whispering Death on hit"); #endregion // Light pets, accessories, and other items which boost the player's Abyss light stat @@ -426,26 +426,26 @@ namespace CalamityMod.Items string abyssSmallLightLine = "\nProvides a small amount of light in the abyss"; if (item.type == ItemID.CrimsonHeart || item.type == ItemID.ShadowOrb || item.type == ItemID.MagicLantern || item.type == ItemID.JellyfishNecklace || item.type == ItemID.MiningHelmet) - EditTooltipByNum(0, (line) => line.text += abyssSmallLightLine); + EditTooltipByNum(0, (line) => line.Text += abyssSmallLightLine); if (item.type == ItemID.JellyfishDivingGear) - EditTooltipByNum(1, (line) => line.text += abyssSmallLightLine); + EditTooltipByNum(1, (line) => line.Text += abyssSmallLightLine); // +2 to Abyss light level string abyssMediumLightLine = "\nProvides a moderate amount of light in the abyss"; if (item.type == ItemID.ShinePotion) - EditTooltipByName("BuffTime", (line) => line.text += abyssMediumLightLine); + EditTooltipByName("BuffTime", (line) => line.Text += abyssMediumLightLine); if (item.type == ItemID.FairyBell || item.type == ItemID.DD2PetGhost) - EditTooltipByNum(0, (line) => line.text += abyssMediumLightLine); + EditTooltipByNum(0, (line) => line.Text += abyssMediumLightLine); // +3 to Abyss light level string abyssLargeLightLine = "\nProvides a large amount of light in the abyss"; if (item.type == ItemID.WispinaBottle) - EditTooltipByNum(0, (line) => line.text += abyssLargeLightLine); + EditTooltipByNum(0, (line) => line.Text += abyssLargeLightLine); if (item.type == ItemID.SuspiciousLookingTentacle) - EditTooltipByNum(1, (line) => line.text += abyssLargeLightLine); + EditTooltipByNum(1, (line) => line.Text += abyssLargeLightLine); #endregion // Accessories and other items which boost the player's ability to breathe in the Abyss @@ -455,41 +455,41 @@ namespace CalamityMod.Items string abyssModerateBreathLine = "\nModerately reduces breath loss in the abyss"; if (item.type == ItemID.DivingHelmet) - EditTooltipByNum(0, (line) => line.text += abyssModerateBreathLine); + EditTooltipByNum(0, (line) => line.Text += abyssModerateBreathLine); if (item.type == ItemID.ArcticDivingGear) - EditTooltipByNum(1, (line) => line.text += abyssSmallLightLine + abyssModerateBreathLine); + EditTooltipByNum(1, (line) => line.Text += abyssSmallLightLine + abyssModerateBreathLine); // Great breath boost string abyssGreatBreathLine = "\nGreatly reduces breath loss in the abyss"; if (item.type == ItemID.GillsPotion) - EditTooltipByName("BuffTime", (line) => line.text += abyssGreatBreathLine); + EditTooltipByName("BuffTime", (line) => line.Text += abyssGreatBreathLine); if (item.type == ItemID.NeptunesShell || item.type == ItemID.MoonShell) - EditTooltipByNum(0, (line) => line.text += abyssGreatBreathLine); + EditTooltipByNum(0, (line) => line.Text += abyssGreatBreathLine); if (item.type == ItemID.CelestialShell) - EditTooltipByNum(1, (line) => line.text += abyssModerateBreathLine); + EditTooltipByNum(1, (line) => line.Text += abyssModerateBreathLine); #endregion // Flasks apply to Rogue weapons #region Rogue Flask Tooltips if (item.type == ItemID.FlaskofCursedFlames) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks inflict enemies with cursed flames"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks inflict enemies with cursed flames"); if (item.type == ItemID.FlaskofFire) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks set enemies on fire"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks set enemies on fire"); if (item.type == ItemID.FlaskofGold) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks make enemies drop more gold"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks make enemies drop more gold"); if (item.type == ItemID.FlaskofIchor) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks decrease enemy defense"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks decrease enemy defense"); if (item.type == ItemID.FlaskofNanites) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks confuse enemies"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks confuse enemies"); // party flask is unique because it affects ALL projectiles in Calamity, not just "also rogue ones" if (item.type == ItemID.FlaskofParty) - EditTooltipByNum(0, (line) => line.text = "All attacks cause confetti to appear"); + EditTooltipByNum(0, (line) => line.Text = "All attacks cause confetti to appear"); if (item.type == ItemID.FlaskofPoison) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks poison enemies"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks poison enemies"); if (item.type == ItemID.FlaskofVenom) - EditTooltipByNum(0, (line) => line.text += "\nRogue attacks inflict Venom on enemies"); + EditTooltipByNum(0, (line) => line.Text += "\nRogue attacks inflict Venom on enemies"); #endregion // Rebalances to vanilla item stats @@ -497,134 +497,134 @@ namespace CalamityMod.Items // Magic Power Potion nerf if (item.type == ItemID.MagicPowerPotion) - EditTooltipByNum(0, (line) => line.text = "10% increased magic damage"); + EditTooltipByNum(0, (line) => line.Text = "10% increased magic damage"); // Magic and Wizard Hat nerfs // Magic Hat if (item.type == ItemID.MagicHat) - EditTooltipByNum(0, (line) => line.text = "5% increased magic damage and critical strike chance"); + EditTooltipByNum(0, (line) => line.Text = "5% increased magic damage and critical strike chance"); // Wizard Hat if (item.type == ItemID.WizardHat) - EditTooltipByNum(0, (line) => line.text = "5% increased magic damage"); + EditTooltipByNum(0, (line) => line.Text = "5% increased magic damage"); // Edit individual tooltips for early hardmode armor sets. // Cobalt Hat. if (item.type == ItemID.CobaltHat) - EditTooltipByNum(0, (line) => line.text = $"Increases maximum mana by {CobaltArmorSetChange.MaxManaBoost + 40}"); + EditTooltipByNum(0, (line) => line.Text = $"Increases maximum mana by {CobaltArmorSetChange.MaxManaBoost + 40}"); // Palladium Breastplate. if (item.type == ItemID.PalladiumBreastplate) - EditTooltipByNum(0, (line) => line.text = $"{PalladiumArmorSetChange.ChestplateDamagePercentageBoost + 3}% increased damage."); + EditTooltipByNum(0, (line) => line.Text = $"{PalladiumArmorSetChange.ChestplateDamagePercentageBoost + 3}% increased damage."); // Palladium Leggings. if (item.type == ItemID.PalladiumLeggings) - EditTooltipByNum(0, (line) => line.text = $"{PalladiumArmorSetChange.LeggingsDamagePercentageBoost + 2}% increased damage."); + EditTooltipByNum(0, (line) => line.Text = $"{PalladiumArmorSetChange.LeggingsDamagePercentageBoost + 2}% increased damage."); // Mythril Hood. if (item.type == ItemID.MythrilHood) - EditTooltipByNum(0, (line) => line.text = $"Increases maximum mana by {MythrilArmorSetChange.MaxManaBoost + 60}"); + EditTooltipByNum(0, (line) => line.Text = $"Increases maximum mana by {MythrilArmorSetChange.MaxManaBoost + 60}"); // Mythril Chainmail. if (item.type == ItemID.MythrilChainmail) - EditTooltipByNum(0, (line) => line.text = $"{MythrilArmorSetChange.ChestplateDamagePercentageBoost + 7}% increased damage"); + EditTooltipByNum(0, (line) => line.Text = $"{MythrilArmorSetChange.ChestplateDamagePercentageBoost + 7}% increased damage"); // Mythril Hood. if (item.type == ItemID.MythrilGreaves) - EditTooltipByNum(0, (line) => line.text = $"{MythrilArmorSetChange.LeggingsCritChanceBoost + 10}% increased critical strike chance"); + EditTooltipByNum(0, (line) => line.Text = $"{MythrilArmorSetChange.LeggingsCritChanceBoost + 10}% increased critical strike chance"); // Orichalcum Breastplate. if (item.type == ItemID.OrichalcumBreastplate) - EditTooltipByNum(0, (line) => line.text = $"{OrichalcumArmorSetChange.ChestplateCritChanceBoost + 6}% increased critical strike chance"); + EditTooltipByNum(0, (line) => line.Text = $"{OrichalcumArmorSetChange.ChestplateCritChanceBoost + 6}% increased critical strike chance"); // Adamantite Headgear. if (item.type == ItemID.AdamantiteHeadgear) - EditTooltipByNum(0, (line) => line.text = $"Increases maximum mana by {AdamantiteArmorSetChange.MaxManaBoost + 80}"); + EditTooltipByNum(0, (line) => line.Text = $"Increases maximum mana by {AdamantiteArmorSetChange.MaxManaBoost + 80}"); // Reduce DD2 armor piece bonuses because they're overpowered // Squire armor if (item.type == ItemID.SquirePlating) - EditTooltipByNum(0, (line) => line.text = "10% increased minion and melee damage"); + EditTooltipByNum(0, (line) => line.Text = "10% increased minion and melee damage"); if (item.type == ItemID.SquireGreaves) - EditTooltipByNum(0, (line) => line.text = "5% increased minion damage and melee critical strike chance\n" + + EditTooltipByNum(0, (line) => line.Text = "5% increased minion damage and melee critical strike chance\n" + "15% increased movement speed"); // Monk armor if (item.type == ItemID.MonkBrows) - EditTooltipByNum(0, (line) => line.text = "Increases your max number of sentries by 1 and increases melee attack speed by 10%"); + EditTooltipByNum(0, (line) => line.Text = "Increases your max number of sentries by 1 and increases melee attack speed by 10%"); if (item.type == ItemID.MonkShirt) - EditTooltipByNum(0, (line) => line.text = "10% increased minion and melee damage"); + EditTooltipByNum(0, (line) => line.Text = "10% increased minion and melee damage"); if (item.type == ItemID.MonkPants) { - EditTooltipByNum(0, (line) => line.text = "5% increased minion damage and melee critical strike chance"); - EditTooltipByNum(1, (line) => line.text = "20% increased movement speed"); + EditTooltipByNum(0, (line) => line.Text = "5% increased minion damage and melee critical strike chance"); + EditTooltipByNum(1, (line) => line.Text = "20% increased movement speed"); } // Huntress armor if (item.type == ItemID.HuntressJerkin) - EditTooltipByNum(0, (line) => line.text = "10% increased minion and ranged damage\n" + + EditTooltipByNum(0, (line) => line.Text = "10% increased minion and ranged damage\n" + "10% chance to not consume ammo"); // Apprentice armor if (item.type == ItemID.ApprenticeTrousers) - EditTooltipByNum(0, (line) => line.text = "5% increased minion damage and magic critical strike chance\n" + + EditTooltipByNum(0, (line) => line.Text = "5% increased minion damage and magic critical strike chance\n" + "20% increased movement speed"); // Valhalla Knight armor if (item.type == ItemID.SquireAltShirt) - EditTooltipByNum(0, (line) => line.text = "30% increased minion damage and increased life regeneration"); + EditTooltipByNum(0, (line) => line.Text = "30% increased minion damage and increased life regeneration"); if (item.type == ItemID.SquireAltPants) - EditTooltipByNum(0, (line) => line.text = "10% increased minion damage and melee critical strike chance\n" + + EditTooltipByNum(0, (line) => line.Text = "10% increased minion damage and melee critical strike chance\n" + "20% increased movement speed"); // Shinobi Infiltrator armor if (item.type == ItemID.MonkAltHead) - EditTooltipByNum(0, (line) => line.text = "Increases your max number of sentries by 2\n" + + EditTooltipByNum(0, (line) => line.Text = "Increases your max number of sentries by 2\n" + "10% increased melee and minion damage"); if (item.type == ItemID.MonkAltShirt) - EditTooltipByNum(0, (line) => line.text = "10% increased minion damage and melee speed\n" + + EditTooltipByNum(0, (line) => line.Text = "10% increased minion damage and melee speed\n" + "5% increased melee critical strike chance"); if (item.type == ItemID.MonkAltPants) - EditTooltipByNum(0, (line) => line.text = "10% increased minion damage and melee critical strike chance\n" + + EditTooltipByNum(0, (line) => line.Text = "10% increased minion damage and melee critical strike chance\n" + "30% increased movement speed"); // Red Riding armor if (item.type == ItemID.HuntressAltShirt) - EditTooltipByNum(0, (line) => line.text = "15% increased minion and ranged damage and 20% chance to not consume ammo"); + EditTooltipByNum(0, (line) => line.Text = "15% increased minion and ranged damage and 20% chance to not consume ammo"); // Dark Artist armor if (item.type == ItemID.ApprenticeAltPants) - EditTooltipByNum(0, (line) => line.text = "10% increased minion damage and magic critical strike chance\n" + + EditTooltipByNum(0, (line) => line.Text = "10% increased minion damage and magic critical strike chance\n" + "20% increased movement speed"); // Worm Scarf only gives 10% DR instead of 17% if (item.type == ItemID.WormScarf) - EditTooltipByNum(0, (line) => line.text = line.text.Replace("17%", "10%")); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("17%", "10%")); if (item.type == ItemID.TitanGlove) - EditTooltipByNum(0, (line) => line.text += "\n10% increased true melee damage"); + EditTooltipByNum(0, (line) => line.Text += "\n10% increased true melee damage"); if (item.type == ItemID.PowerGlove || item.type == ItemID.MechanicalGlove) - EditTooltipByNum(1, (line) => line.text += "\n10% increased true melee damage"); + EditTooltipByNum(1, (line) => line.Text += "\n10% increased true melee damage"); if (item.type == ItemID.FireGauntlet) { string extraLine = "\n10% increased true melee damage"; - EditTooltipByNum(1, (line) => line.text = line.text.Replace("10%", "14%") + extraLine); + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("10%", "14%") + extraLine); } // On Fire! debuff immunities if (item.type == ItemID.ObsidianSkull || item.type == ItemID.AnkhShield) - EditTooltipByNum(0, (line) => line.text = line.text.Replace("fire blocks", "the Burning and On Fire! debuffs")); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("fire blocks", "the Burning and On Fire! debuffs")); if (item.type == ItemID.ObsidianHorseshoe || item.type == ItemID.ObsidianShield || item.type == ItemID.ObsidianWaterWalkingBoots || item.type == ItemID.LavaWaders) - EditTooltipByNum(1, (line) => line.text = line.text.Replace("fire blocks", "the Burning and On Fire! debuffs")); + EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("fire blocks", "the Burning and On Fire! debuffs")); // Spectre Hood's lifesteal is heavily nerfed, so it only reduces magic damage by 20% instead of 40% if (item.type == ItemID.SpectreHood) - EditTooltipByNum(0, (line) => line.text = line.text.Replace("40%", "20%")); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("40%", "20%")); // Yoyo Glove/Bag apply a 0.66x damage multiplier on yoyos if (item.type == ItemID.YoyoBag || item.type == ItemID.YoYoGlove) - EditTooltipByNum(0, (line) => line.text += "\nYoyos will do 33% less damage"); + EditTooltipByNum(0, (line) => line.Text += "\nYoyos will do 33% less damage"); #endregion // Non-consumable boss summon items @@ -635,48 +635,48 @@ namespace CalamityMod.Items item.type == ItemID.NaughtyPresent ||item.type == ItemID.PumpkinMoonMedallion || item.type == ItemID.SolarTablet ||item.type == ItemID.SolarTablet || item.type == ItemID.CelestialSigil) - EditTooltipByNum(0, (line) => line.text += "\nNot consumable"); + EditTooltipByNum(0, (line) => line.Text += "\nNot consumable"); #endregion // Add mentions of what Calamity ores vanilla pickaxes can mine #region Pickaxe New Ore Tooltips if (item.type == ItemID.Picksaw) - EditTooltipByNum(0, (line) => line.text += "\nCan mine Scoria Ore located in the Abyss"); + EditTooltipByNum(0, (line) => line.Text += "\nCan mine Scoria Ore located in the Abyss"); if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe) - EditTooltipByName("Material", (line) => line.text += "\nCan mine Uelibloom Ore"); + EditTooltipByName("Material", (line) => line.Text += "\nCan mine Uelibloom Ore"); #endregion // Rebalances and information about vanilla set bonuses #region Vanilla Set Bonus Tooltips - EditTooltipByName("SetBonus", (line) => VanillaArmorChangeManager.ApplySetBonusTooltipChanges(item, ref line.text)); + EditTooltipByName("SetBonus", (line) => VanillaArmorChangeManager.ApplySetBonusTooltipChanges(item, ref line.Text)); // Gladiator if (item.type == ItemID.GladiatorHelmet) - EditTooltipByName("Defense", (line) => line.text += $"\n{GladiatorArmorSetChange.HelmetRogueDamageBoostPercent}% increased rogue damage"); + EditTooltipByName("Defense", (line) => line.Text += $"\n{GladiatorArmorSetChange.HelmetRogueDamageBoostPercent}% increased rogue damage"); if (item.type == ItemID.GladiatorBreastplate) - EditTooltipByName("Defense", (line) => line.text += $"\n{GladiatorArmorSetChange.ChestplateRogueCritBoostPercent}% increased rogue critical strike chance"); + EditTooltipByName("Defense", (line) => line.Text += $"\n{GladiatorArmorSetChange.ChestplateRogueCritBoostPercent}% increased rogue critical strike chance"); if (item.type == ItemID.GladiatorLeggings) - EditTooltipByName("Defense", (line) => line.text += $"\n{GladiatorArmorSetChange.LeggingRogueVelocityBoostPercent}% increased rogue velocity"); + EditTooltipByName("Defense", (line) => line.Text += $"\n{GladiatorArmorSetChange.LeggingRogueVelocityBoostPercent}% increased rogue velocity"); // Obsidian if (item.type == ItemID.ObsidianHelm) - EditTooltipByName("Defense", (line) => line.text += $"\n{ObsidianArmorSetChange.HelmetRogueDamageBoostPercent}% increased rogue damage"); + EditTooltipByName("Defense", (line) => line.Text += $"\n{ObsidianArmorSetChange.HelmetRogueDamageBoostPercent}% increased rogue damage"); if (item.type == ItemID.ObsidianShirt) - EditTooltipByName("Defense", (line) => line.text += $"\n{ObsidianArmorSetChange.ChestplateRogueCritBoostPercent}% increased rogue critical strike chance"); + EditTooltipByName("Defense", (line) => line.Text += $"\n{ObsidianArmorSetChange.ChestplateRogueCritBoostPercent}% increased rogue critical strike chance"); if (item.type == ItemID.ObsidianPants) - EditTooltipByName("Defense", (line) => line.text += $"\n{ObsidianArmorSetChange.LeggingRogueVelocityBoostPercent}% increased rogue velocity"); + EditTooltipByName("Defense", (line) => line.Text += $"\n{ObsidianArmorSetChange.LeggingRogueVelocityBoostPercent}% increased rogue velocity"); // Forbidden (UNLESS you are wearing the Circlet, which is Summon/Rogue and does not get this line) if (item.type == ItemID.AncientBattleArmorHat || item.type == ItemID.AncientBattleArmorShirt || item.type == ItemID.AncientBattleArmorPants && !Main.LocalPlayer.Calamity().forbiddenCirclet) - EditTooltipByName("SetBonus", (line) => line.text += "\nThe minion damage nerf is reduced while wielding magic weapons"); + EditTooltipByName("SetBonus", (line) => line.Text += "\nThe minion damage nerf is reduced while wielding magic weapons"); // Stardust // 1) Chest and Legs only give 1 minion slot each instead of 2 each. if (item.type == ItemID.StardustBreastplate || item.type == ItemID.StardustLeggings) - EditTooltipByNum(0, (line) => line.text = line.text.Replace('2', '1')); + EditTooltipByNum(0, (line) => line.Text = line.Text.Replace('2', '1')); #endregion // Provide the full stats of every vanilla set of wings @@ -703,8 +703,8 @@ namespace CalamityMod.Items } // This function is shorthand for appending a stat sheet to a pair of wings. - void AddWingStats(float h, float a, int v, int f, string s = null) => EditTooltipByNum(0, (line) => line.text += WingStatsTooltip(h, a, v, f, s)); - void AddWingStats2(float h, float a, int v, int f, string s = null, string lineName = null) => EditTooltipByName(lineName, (line) => line.text += WingStatsTooltip(h, a, v, f, s)); + void AddWingStats(float h, float a, int v, int f, string s = null) => EditTooltipByNum(0, (line) => line.Text += WingStatsTooltip(h, a, v, f, s)); + void AddWingStats2(float h, float a, int v, int f, string s = null, string lineName = null) => EditTooltipByName(lineName, (line) => line.Text += WingStatsTooltip(h, a, v, f, s)); if (item.type == ItemID.AngelWings) AddWingStats(6.25f, 1f, 0, 100, "+20 max life, +10 defense and +2 life regen"); @@ -830,7 +830,7 @@ namespace CalamityMod.Items } // This function is shorthand for appending a stat sheet to a grappling hook. - void AddGrappleStats(float r, float l, float e, float p) => EditTooltipByName("Equipable", (line) => line.text += HookStatsTooltip(r, l, e, p)); + void AddGrappleStats(float r, float l, float e, float p) => EditTooltipByName("Equipable", (line) => line.Text += HookStatsTooltip(r, l, e, p)); if (item.type == ItemID.GrapplingHook) AddGrappleStats(18.75f, 11.5f, 11f, 11f); @@ -891,19 +891,19 @@ namespace CalamityMod.Items { case PrefixID.Hard: EditTooltipByName("PrefixAccDefense", - (line) => line.text = line.text.Replace("1", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(0.25f)); + (line) => line.Text = line.Text.Replace("1", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(0.25f)); return; case PrefixID.Guarding: EditTooltipByName("PrefixAccDefense", - (line) => line.text = line.text.Replace("2", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(0.5f)); + (line) => line.Text = line.Text.Replace("2", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(0.5f)); return; case PrefixID.Armored: EditTooltipByName("PrefixAccDefense", - (line) => line.text = line.text.Replace("3", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(0.75f)); + (line) => line.Text = line.Text.Replace("3", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(0.75f)); return; case PrefixID.Warding: EditTooltipByName("PrefixAccDefense", - (line) => line.text = line.text.Replace("4", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(1f)); + (line) => line.Text = line.Text.Replace("4", CalamityUtils.GetScalingDefense(item.prefix).ToString()) + DRString(1f)); return; } #endregion @@ -921,7 +921,7 @@ namespace CalamityMod.Items // Start with the existing line of melee damage. StringBuilder sb = new StringBuilder(64); - sb.Append(line.text).Append(" : "); + sb.Append(line.Text).Append(" : "); Player p = Main.LocalPlayer; float itemCurrentDamage = item.damage * p.MeleeDamage(); @@ -933,7 +933,7 @@ namespace CalamityMod.Items // These two pieces are split apart for ease of translation sb.Append(' '); sb.Append("true melee damage"); - line.text = sb.ToString(); + line.Text = sb.ToString(); } #endregion @@ -961,11 +961,11 @@ namespace CalamityMod.Items // Special enchantment line color. if (line.Name == "ItemName" && line.Mod == "Terraria" && item.IsEnchanted()) { - Color rarityColor = line.overrideColor ?? line.color; + Color rarityColor = line.OverrideColor ?? line.Color; Vector2 basePosition = new Vector2(line.X, line.Y); float backInterpolant = (float)Math.Pow(Main.GlobalTimeWrappedHourly * 0.81f % 1f, 1.5f); - Vector2 backScale = line.baseScale * MathHelper.Lerp(1f, 1.2f, backInterpolant); + Vector2 backScale = line.BaseScale * MathHelper.Lerp(1f, 1.2f, backInterpolant); Color backColor = Color.Lerp(rarityColor, Color.DarkRed, backInterpolant) * (float)Math.Pow(1f - backInterpolant, 0.46f); Vector2 backPosition = basePosition - new Vector2(1f, 0.1f) * backInterpolant * 10f; @@ -974,13 +974,13 @@ namespace CalamityMod.Items // Draw the back text as an ominous pulse. for (int i = 0; i < 2; i++) - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.font, line.text, backPosition, backColor, line.rotation, line.origin, backScale, line.maxWidth, line.spread); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread); Main.spriteBatch.End(); Main.spriteBatch.Begin(); // Draw the front text as usual. - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.font, line.text, basePosition, rarityColor, line.rotation, line.origin, line.baseScale, line.maxWidth, line.spread); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread); return false; } diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 7d0ff17a65..8e0f4d523c 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -550,9 +550,9 @@ namespace CalamityMod.Items internal static bool HasKnockback(Item it) => !it.accessory & !it.vanity; // how to check if something is wearable armor? internal static bool IsAxe(Item it) => it.axe > 0; internal static bool IsHammer(Item it) => it.hammer > 0; - internal static bool IsMelee(Item it) => it.melee; + internal static bool IsMelee(Item it) => it.CountsAsClass(); internal static bool IsPickaxe(Item it) => it.pick > 0; - internal static bool IsScalable(Item it) => it.damage > 0 && it.melee; // sanity check: only melee weapons get scaled + internal static bool IsScalable(Item it) => it.damage > 0 && it.CountsAsClass(); // sanity check: only melee weapons get scaled internal static bool IsUsable(Item it) => it.useStyle != 0 && it.useTime > 0 && it.useAnimation > 0; internal static bool UsesMana(Item it) => IsUsable(it); // Only usable items cost mana, but items must be able to have their mana cost disabled or enabled at will. #endregion diff --git a/Items/Fishing/AstralCatches/GacruxianMollusk.cs b/Items/Fishing/AstralCatches/GacruxianMollusk.cs index 3b586192a1..bedc1210d6 100644 --- a/Items/Fishing/AstralCatches/GacruxianMollusk.cs +++ b/Items/Fishing/AstralCatches/GacruxianMollusk.cs @@ -1,7 +1,8 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,11 +41,11 @@ namespace CalamityMod.Items.Fishing.AstralCatches Item.Calamity().rogue = true; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { - int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 1f); + int stealth = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 1f); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; return false; diff --git a/Items/Fishing/AstralCatches/PolarisParrotfish.cs b/Items/Fishing/AstralCatches/PolarisParrotfish.cs index 9be3f4a87e..c61d5a46eb 100644 --- a/Items/Fishing/AstralCatches/PolarisParrotfish.cs +++ b/Items/Fishing/AstralCatches/PolarisParrotfish.cs @@ -1,7 +1,8 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,23 +32,23 @@ namespace CalamityMod.Items.Fishing.AstralCatches Item.knockBack = 2.25f; Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"); //pew pew + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/LaserCannon"); //pew pew Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.polarisBoostThree) //Homes in and explodes { - Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 2f); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 2f); return false; } else if (modPlayer.polarisBoostTwo) //Splits on enemy or tile hits { - Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), (int)(damage * 1.25), knockBack, player.whoAmI, 0f, 1f); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), (int)(damage * 1.25), knockback, player.whoAmI, 0f, 1f); return false; } return true; diff --git a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs index 997b01ca9e..00b0c72f57 100644 --- a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs +++ b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs @@ -1,6 +1,7 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -41,12 +42,9 @@ Revenge is a dish best served flaming hot"); return new Vector2(10, 10); } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 rotated = new Vector2(speedX, speedY); - rotated = rotated.RotatedByRandom(MathHelper.ToRadians(10f)); - speedX = rotated.X; - speedY = rotated.Y; + velocity = velocity.RotatedByRandom(MathHelper.ToRadians(10f)); int shotType = ModContent.ProjectileType(); if (Main.rand.NextBool(2)) { @@ -56,7 +54,7 @@ Revenge is a dish best served flaming hot"); { shotType = ModContent.ProjectileType(); } - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, shotType, damage, knockBack, player.whoAmI, 0f, Main.rand.Next(2)); + Projectile.NewProjectile(source, position, velocity, shotType, damage, knockback, player.whoAmI, 0f, Main.rand.Next(2)); return false; } } diff --git a/Items/Fishing/FishingRods/ChaoticSpreadRod.cs b/Items/Fishing/FishingRods/ChaoticSpreadRod.cs index 91323c15ba..a2e29f3d3b 100644 --- a/Items/Fishing/FishingRods/ChaoticSpreadRod.cs +++ b/Items/Fishing/FishingRods/ChaoticSpreadRod.cs @@ -1,9 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Materials; +using Terraria.DataStructures; + namespace CalamityMod.Items.Fishing.FishingRods { public class ChaoticSpreadRod : ModItem @@ -30,14 +32,14 @@ namespace CalamityMod.Items.Fishing.FishingRods Item.value = Item.buyPrice(0, 80, 0, 0); Item.rare = ItemRarityID.Yellow; } - - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { for (int index = 0; index < Main.rand.Next(3,6); ++index) //3 to 5 bobbers { - float SpeedX = speedX + Main.rand.NextFloat(-3.75f, 3.75f); - float SpeedY = speedY + Main.rand.NextFloat(-3.75f, 3.75f); - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); + float SpeedX = velocity.X + Main.rand.NextFloat(-3.75f, 3.75f); + float SpeedY = velocity.Y + Main.rand.NextFloat(-3.75f, 3.75f); + Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); } return false; } diff --git a/Items/Fishing/FishingRods/EarlyBloomRod.cs b/Items/Fishing/FishingRods/EarlyBloomRod.cs index 8cdcb041f9..b14017a11e 100644 --- a/Items/Fishing/FishingRods/EarlyBloomRod.cs +++ b/Items/Fishing/FishingRods/EarlyBloomRod.cs @@ -1,9 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Materials; +using Terraria.DataStructures; + namespace CalamityMod.Items.Fishing.FishingRods { public class EarlyBloomRod : ModItem @@ -31,13 +33,13 @@ namespace CalamityMod.Items.Fishing.FishingRods Item.Calamity().customRarity = CalamityRarity.Turquoise; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { for (int index = 0; index < 6; ++index) { - float SpeedX = speedX + Main.rand.NextFloat(-3.75f, 3.75f); - float SpeedY = speedY + Main.rand.NextFloat(-3.75f, 3.75f); - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); + float SpeedX = velocity.X + Main.rand.NextFloat(-3.75f, 3.75f); + float SpeedY = velocity.Y + Main.rand.NextFloat(-3.75f, 3.75f); + Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); } return false; } diff --git a/Items/Fishing/FishingRods/FeralDoubleRod.cs b/Items/Fishing/FishingRods/FeralDoubleRod.cs index 59b9cc8077..4c89356d64 100644 --- a/Items/Fishing/FishingRods/FeralDoubleRod.cs +++ b/Items/Fishing/FishingRods/FeralDoubleRod.cs @@ -1,9 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Materials; +using Terraria.DataStructures; + namespace CalamityMod.Items.Fishing.FishingRods { public class FeralDoubleRod : ModItem @@ -30,13 +32,13 @@ namespace CalamityMod.Items.Fishing.FishingRods Item.rare = ItemRarityID.Lime; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { for (int index = 0; index < 2; ++index) { - float SpeedX = speedX + Main.rand.NextFloat(-3.75f, 3.75f); - float SpeedY = speedY + Main.rand.NextFloat(-3.75f, 3.75f); - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); + float SpeedX = velocity.X + Main.rand.NextFloat(-3.75f, 3.75f); + float SpeedY = velocity.Y + Main.rand.NextFloat(-3.75f, 3.75f); + Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); } return false; } diff --git a/Items/Fishing/FishingRods/TheDevourerofCods.cs b/Items/Fishing/FishingRods/TheDevourerofCods.cs index edb65533dc..ff0dc2a7a0 100644 --- a/Items/Fishing/FishingRods/TheDevourerofCods.cs +++ b/Items/Fishing/FishingRods/TheDevourerofCods.cs @@ -1,10 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria.DataStructures; namespace CalamityMod.Items.Fishing.FishingRods { @@ -33,13 +34,13 @@ namespace CalamityMod.Items.Fishing.FishingRods Item.Calamity().customRarity = CalamityRarity.DarkBlue; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { for (int index = 0; index < 10; ++index) { - float SpeedX = speedX + Main.rand.NextFloat(-3.75f, 3.75f); - float SpeedY = speedY + Main.rand.NextFloat(-3.75f, 3.75f); - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); + float SpeedX = velocity.X + Main.rand.NextFloat(-3.75f, 3.75f); + float SpeedY = velocity.Y + Main.rand.NextFloat(-3.75f, 3.75f); + Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI); } return false; } diff --git a/Items/Pets/IbarakiBox.cs b/Items/Pets/IbarakiBox.cs index 2930fcbc57..63b9aed067 100644 --- a/Items/Pets/IbarakiBox.cs +++ b/Items/Pets/IbarakiBox.cs @@ -1,7 +1,8 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -14,7 +15,7 @@ namespace CalamityMod.Items.Pets { DisplayName.SetDefault("Hermit's Box of One Hundred Medicines"); Tooltip.SetDefault("As the ice melts in the springs\n" + - "And waves wash the old moss’ hair...\n" + + "And waves wash the old moss’ hair...\n" + "Thank you, Goodbye.\n" + "Summons the Third Sage\n" + "Use the item with right click in the hotbar to toggle the Third Sage's blessing.\n" + @@ -41,7 +42,7 @@ namespace CalamityMod.Items.Pets public override bool AltFunctionUse(Player player) => true; - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5) && Main.myPlayer == player.whoAmI) { @@ -72,9 +73,6 @@ namespace CalamityMod.Items.Pets } } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - return false; - } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) => false; } } diff --git a/Items/Pets/PrimroseKeepsake.cs b/Items/Pets/PrimroseKeepsake.cs index 653affb5d9..cf6172679e 100644 --- a/Items/Pets/PrimroseKeepsake.cs +++ b/Items/Pets/PrimroseKeepsake.cs @@ -1,8 +1,9 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { @@ -42,11 +43,11 @@ namespace CalamityMod.Items.Pets } } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { List pets = new List { ModContent.ProjectileType(), ModContent.ProjectileType() }; foreach(int petProjID in pets) - Projectile.NewProjectile(position, new Vector2(speedX, speedY), petProjID, damage, knockBack, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, petProjID, damage, knockback, player.whoAmI); return false; } diff --git a/Items/Weapons/Ranged/Animosity.cs b/Items/Weapons/Ranged/Animosity.cs index 24940c42ce..c47a7f5c87 100644 --- a/Items/Weapons/Ranged/Animosity.cs +++ b/Items/Weapons/Ranged/Animosity.cs @@ -85,7 +85,7 @@ Right click to fire a burst of bullets"); } } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/Auralis.cs b/Items/Weapons/Ranged/Auralis.cs index 8254372437..7424ed6157 100644 --- a/Items/Weapons/Ranged/Auralis.cs +++ b/Items/Weapons/Ranged/Auralis.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) >= 50; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(100) >= 50; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/AuroraBlazer.cs b/Items/Weapons/Ranged/AuroraBlazer.cs index 378620fb1a..65b74e952f 100644 --- a/Items/Weapons/Ranged/AuroraBlazer.cs +++ b/Items/Weapons/Ranged/AuroraBlazer.cs @@ -53,6 +53,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) >= 60; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(100) >= 60; } } diff --git a/Items/Weapons/Ranged/BulletFilledShotgun.cs b/Items/Weapons/Ranged/BulletFilledShotgun.cs index a8ceb8400f..2ea4e5ab20 100644 --- a/Items/Weapons/Ranged/BulletFilledShotgun.cs +++ b/Items/Weapons/Ranged/BulletFilledShotgun.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool CanUseItem(Player player) => CalamityGlobalItem.HasEnoughAmmo(player, Item, 5); // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) => false; + public override bool CanConsumeAmmo(Player player) => false; 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/Ranged/ChickenCannon.cs b/Items/Weapons/Ranged/ChickenCannon.cs index c0d330ca35..b0786b53d6 100644 --- a/Items/Weapons/Ranged/ChickenCannon.cs +++ b/Items/Weapons/Ranged/ChickenCannon.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool AltFunctionUse(Player player) => true; // Right click doesn't use ammo because it's a detonation signal. - public override bool ConsumeAmmo(Player player) => player.altFunctionUse != 2; + public override bool CanConsumeAmmo(Player player) => player.altFunctionUse != 2; public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0 || player.altFunctionUse == 2; diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index bd765a18c8..c3c0e55041 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-5, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 90) return false; diff --git a/Items/Weapons/Ranged/ClockGatlignum.cs b/Items/Weapons/Ranged/ClockGatlignum.cs index b49df781f9..6d8a5746ad 100644 --- a/Items/Weapons/Ranged/ClockGatlignum.cs +++ b/Items/Weapons/Ranged/ClockGatlignum.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 33) return false; diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index d711af2563..65e6e213ec 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().customRarity = CalamityRarity.Violet; Item.value = CalamityGlobalItem.Rarity15BuyPrice; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.66f; + public override bool CanConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.66f; public override Vector2? HoldoutOffset() => new Vector2(-5, 5); diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 7a07ca324a..6066205f81 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.9f; + public override bool CanConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.9f; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/FetidEmesis.cs b/Items/Weapons/Ranged/FetidEmesis.cs index 1e3fe98c85..c75334aa63 100644 --- a/Items/Weapons/Ranged/FetidEmesis.cs +++ b/Items/Weapons/Ranged/FetidEmesis.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.Calamity().canFirePointBlankShots = true; } - public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) > 40; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(100) > 40; public override Vector2? HoldoutOffset() => new Vector2(-5, 0); diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index e5d53dea03..69729f7c07 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) >= 70; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(100) >= 70; public override bool AltFunctionUse(Player player) => true; diff --git a/Items/Weapons/Ranged/FlurrystormCannon.cs b/Items/Weapons/Ranged/FlurrystormCannon.cs index 0c0523e2c8..d67ae66d11 100644 --- a/Items/Weapons/Ranged/FlurrystormCannon.cs +++ b/Items/Weapons/Ranged/FlurrystormCannon.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index be943d6b79..456e806c8f 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-15, 0); - public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) >= 50; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(100) >= 50; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index 3550a74f33..8c963d8efa 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 66) return false; diff --git a/Items/Weapons/Ranged/Interfacer.cs b/Items/Weapons/Ranged/Interfacer.cs index 794659cfc3..edc28eea66 100644 --- a/Items/Weapons/Ranged/Interfacer.cs +++ b/Items/Weapons/Ranged/Interfacer.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-10, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/Karasawa.cs b/Items/Weapons/Ranged/Karasawa.cs index 0cb67169fa..87ec647433 100644 --- a/Items/Weapons/Ranged/Karasawa.cs +++ b/Items/Weapons/Ranged/Karasawa.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Ranged } // Disable vanilla ammo consumption - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { return false; } diff --git a/Items/Weapons/Ranged/MagnomalyCannon.cs b/Items/Weapons/Ranged/MagnomalyCannon.cs index 491dd5db4e..f63c4d4c65 100644 --- a/Items/Weapons/Ranged/MagnomalyCannon.cs +++ b/Items/Weapons/Ranged/MagnomalyCannon.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 66) return false; diff --git a/Items/Weapons/Ranged/Megafleet.cs b/Items/Weapons/Ranged/Megafleet.cs index b2187f9477..7fbce146c7 100644 --- a/Items/Weapons/Ranged/Megafleet.cs +++ b/Items/Weapons/Ranged/Megafleet.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50 || shotType % 2 == 0) return false; diff --git a/Items/Weapons/Ranged/Megalodon.cs b/Items/Weapons/Ranged/Megalodon.cs index 0abb485d6d..235a7692b3 100644 --- a/Items/Weapons/Ranged/Megalodon.cs +++ b/Items/Weapons/Ranged/Megalodon.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (shotType == 2) return false; diff --git a/Items/Weapons/Ranged/Meowthrower.cs b/Items/Weapons/Ranged/Meowthrower.cs index 8bbe7cecee..f3ce458864 100644 --- a/Items/Weapons/Ranged/Meowthrower.cs +++ b/Items/Weapons/Ranged/Meowthrower.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-10, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/Minigun.cs b/Items/Weapons/Ranged/Minigun.cs index 839fda9424..c3e3644c09 100644 --- a/Items/Weapons/Ranged/Minigun.cs +++ b/Items/Weapons/Ranged/Minigun.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.8f; + public override bool CanConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.8f; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/OnyxChainBlaster.cs b/Items/Weapons/Ranged/OnyxChainBlaster.cs index bf3758ff5f..dd6a09fea8 100644 --- a/Items/Weapons/Ranged/OnyxChainBlaster.cs +++ b/Items/Weapons/Ranged/OnyxChainBlaster.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index f97805c674..d2cf4b09ed 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < NotConsumeAmmo) return false; diff --git a/Items/Weapons/Ranged/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 4e604ca70f..5ef4d33ba6 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-4, -5); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 33) return false; diff --git a/Items/Weapons/Ranged/P90.cs b/Items/Weapons/Ranged/P90.cs index 1b1b7fcae6..639b02e8dd 100644 --- a/Items/Weapons/Ranged/P90.cs +++ b/Items/Weapons/Ranged/P90.cs @@ -49,6 +49,6 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() < 0.5f; + public override bool CanConsumeAmmo(Player player) => Main.rand.NextFloat() < 0.5f; } } diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 22afc01a5a..248a89b0f4 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -102,7 +102,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() > AmmoNotConsumeChance; + public override bool CanConsumeAmmo(Player player) => Main.rand.NextFloat() > AmmoNotConsumeChance; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/PrideHuntersPlanarRipper.cs b/Items/Weapons/Ranged/PrideHuntersPlanarRipper.cs index 2da67d097c..f70dda87a9 100644 --- a/Items/Weapons/Ranged/PrideHuntersPlanarRipper.cs +++ b/Items/Weapons/Ranged/PrideHuntersPlanarRipper.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-12, -6); - public override bool ConsumeAmmo(Player player) => Main.rand.Next(0, 100) >= 33; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(0, 100) >= 33; 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/Ranged/SDFMG.cs b/Items/Weapons/Ranged/SDFMG.cs index b21d21c460..cb5cb59a66 100644 --- a/Items/Weapons/Ranged/SDFMG.cs +++ b/Items/Weapons/Ranged/SDFMG.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/SandstormGun.cs b/Items/Weapons/Ranged/SandstormGun.cs index 6cd46583c5..0b85c19a5f 100644 --- a/Items/Weapons/Ranged/SandstormGun.cs +++ b/Items/Weapons/Ranged/SandstormGun.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-10, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/ScorchedEarth.cs b/Items/Weapons/Ranged/ScorchedEarth.cs index e6d49df49d..4c3124c39a 100644 --- a/Items/Weapons/Ranged/ScorchedEarth.cs +++ b/Items/Weapons/Ranged/ScorchedEarth.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Ranged } // Consume two ammo per fire - public override bool ConsumeAmmo(Player player) => counter % 2 == 0; + public override bool CanConsumeAmmo(Player player) => counter % 2 == 0; public override Vector2? HoldoutOffset() => new Vector2(-30, 0); diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index fee5d47178..ca4bed7827 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (shotType % 2 == 0) return false; diff --git a/Items/Weapons/Ranged/Shadethrower.cs b/Items/Weapons/Ranged/Shadethrower.cs index f57266291b..8ae7911ca3 100644 --- a/Items/Weapons/Ranged/Shadethrower.cs +++ b/Items/Weapons/Ranged/Shadethrower.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-5, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 66) return false; diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index 6facb89fcd..2a39ae1d0b 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -74,6 +74,6 @@ Replaces standard bullets with High Velocity Bullets return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.8f; + public override bool CanConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.8f; } } diff --git a/Items/Weapons/Ranged/SparkSpreader.cs b/Items/Weapons/Ranged/SparkSpreader.cs index b899229d69..ac6df4bc23 100644 --- a/Items/Weapons/Ranged/SparkSpreader.cs +++ b/Items/Weapons/Ranged/SparkSpreader.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-4, 0); - public override bool ConsumeAmmo(Player player) => Main.rand.Next(100) >= 70; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(100) >= 70; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/SpectralstormCannon.cs b/Items/Weapons/Ranged/SpectralstormCannon.cs index e54b544fd3..b365332cd8 100644 --- a/Items/Weapons/Ranged/SpectralstormCannon.cs +++ b/Items/Weapons/Ranged/SpectralstormCannon.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 70) return false; diff --git a/Items/Weapons/Ranged/StarSputter.cs b/Items/Weapons/Ranged/StarSputter.cs index 576a35bc0b..38e3a3678e 100644 --- a/Items/Weapons/Ranged/StarSputter.cs +++ b/Items/Weapons/Ranged/StarSputter.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-5, 0); } - public override bool ConsumeAmmo(Player player) //consume ammo only once per round + public override bool CanConsumeAmmo(Player player) //consume ammo only once per round { if (counter == 1 || counter == 2 || counter == 4 || counter == 5 || counter == 7 || counter == 8 || counter == 10 || counter == 11) return false; diff --git a/Items/Weapons/Ranged/StormDragoon.cs b/Items/Weapons/Ranged/StormDragoon.cs index 4e4f9fc705..e61bb7d053 100644 --- a/Items/Weapons/Ranged/StormDragoon.cs +++ b/Items/Weapons/Ranged/StormDragoon.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 90) return false; diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index d822030f86..b42ae6c6c6 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-5, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 70) return false; diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index 9299899556..bb7a354e27 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-10, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 80) return false; diff --git a/Items/Weapons/Ranged/TheEmpyrean.cs b/Items/Weapons/Ranged/TheEmpyrean.cs index ead183a1a3..bb0b4be626 100644 --- a/Items/Weapons/Ranged/TheEmpyrean.cs +++ b/Items/Weapons/Ranged/TheEmpyrean.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-10, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 70) return false; diff --git a/Items/Weapons/Ranged/TrueConferenceCall.cs b/Items/Weapons/Ranged/TrueConferenceCall.cs index 2a9715cbc1..b06742291a 100644 --- a/Items/Weapons/Ranged/TrueConferenceCall.cs +++ b/Items/Weapons/Ranged/TrueConferenceCall.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged return new Vector2(-10, 0); } - public override bool ConsumeAmmo(Player player) + public override bool CanConsumeAmmo(Player player) { if (Main.rand.Next(0, 100) < 50) return false; diff --git a/Items/Weapons/Ranged/Ultima.cs b/Items/Weapons/Ranged/Ultima.cs index 4482629d06..33880fdfb6 100644 --- a/Items/Weapons/Ranged/Ultima.cs +++ b/Items/Weapons/Ranged/Ultima.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.Next(0, 100) >= 90; + public override bool CanConsumeAmmo(Player player) => Main.rand.Next(0, 100) >= 90; public override void AddRecipes() { CreateRecipe(1).AddIngredient(ItemID.PulseBow).AddIngredient(ItemID.LaserRifle).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType(), 15).AddIngredient(ModContent.ItemType(), 8).AddIngredient(ModContent.ItemType(), 8).AddTile(ModContent.TileType()).Register(); diff --git a/Items/Weapons/Ranged/UniversalGenesis.cs b/Items/Weapons/Ranged/UniversalGenesis.cs index 02f47caa81..82cb8b6a92 100644 --- a/Items/Weapons/Ranged/UniversalGenesis.cs +++ b/Items/Weapons/Ranged/UniversalGenesis.cs @@ -96,7 +96,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) => Main.rand.NextBool(); + public override bool CanConsumeAmmo(Player player) => Main.rand.NextBool(); public override void AddRecipes() { diff --git a/Items/Weapons/Typeless/Aestheticus.cs b/Items/Weapons/Typeless/Aestheticus.cs index 1c7b0f30ca..7940e94d01 100644 --- a/Items/Weapons/Typeless/Aestheticus.cs +++ b/Items/Weapons/Typeless/Aestheticus.cs @@ -1,9 +1,10 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -39,20 +40,20 @@ namespace CalamityMod.Items.Weapons.Typeless } // Aestheticus scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts). - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { - float formula = 5f * (player.allDamage - 1f); + float formula = 5f * (player.GetDamage(DamageClass.Generic) - 1f); formula += player.GetDamage(DamageClass.Melee) - 1f; formula += player.GetDamage(DamageClass.Ranged) - 1f; formula += player.GetDamage(DamageClass.Magic) - 1f; formula += player.GetDamage(DamageClass.Summon) - 1f; formula += player.Calamity().throwingDamage - 1f; - add += formula; + damage += formula; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f); return false; } diff --git a/Items/Weapons/Typeless/AethersWhisper.cs b/Items/Weapons/Typeless/AethersWhisper.cs index 529a6ba598..ec95c2116b 100644 --- a/Items/Weapons/Typeless/AethersWhisper.cs +++ b/Items/Weapons/Typeless/AethersWhisper.cs @@ -1,9 +1,10 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Projectiles.Hybrid; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Typeless Item.height = 44; Item.noMelee = true; Item.useStyle = ItemUseStyleID.Shoot; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/LaserCannon"); Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.Calamity().customRarity = CalamityRarity.Turquoise; @@ -83,12 +84,12 @@ namespace CalamityMod.Items.Weapons.Typeless mult *= 0f; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { // This is coded weirdly because it defaults to using magic boosts without this. int dmg = player.GetWeaponDamage(player.ActiveItem()); float ai0 = player.altFunctionUse == 2 ? 1f : 0f; - Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, dmg, knockBack, player.whoAmI, ai0, 0f); + Projectile.NewProjectile(source, position, velocity, type, dmg, knockback, player.whoAmI, ai0, 0f); return false; } diff --git a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs index ced912450c..a647f78749 100644 --- a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs +++ b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs @@ -1,8 +1,9 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Ammo.FiniteUse; using CalamityMod.Projectiles.Typeless.FiniteUse; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.knockBack = 10f; Item.value = Item.buyPrice(0, 36, 0, 0); Item.rare = ItemRarityID.Pink; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/BazookaFull"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/BazookaFull"); Item.autoReuse = true; Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); @@ -62,12 +63,12 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.Calamity().timesUsed = 0; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (CalamityPlayer.areThereAnyDamnBosses) { player.HeldItem.Calamity().timesUsed++; - for (int i = 0; i < Main.maxInventory; i++) + for (int i = 0; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].type == Item.type && player.inventory[i] != player.HeldItem) player.inventory[i].Calamity().timesUsed++; diff --git a/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs b/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs index 0efb4511ba..fe5d67d31f 100644 --- a/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs +++ b/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs @@ -1,8 +1,9 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Ammo.FiniteUse; using CalamityMod.Projectiles.Typeless.FiniteUse; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.knockBack = 8f; Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Magnum"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Magnum"); Item.autoReuse = true; Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse } // Terraria seems to really dislike high crit values in SetDefaults - public override void GetWeaponCrit(Player player, ref int crit) => crit += 66; + public override void ModifyWeaponCrit(Player player, ref int crit) => crit += 66; public override bool OnPickup(Player player) { @@ -59,12 +60,12 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.Calamity().timesUsed = 0; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (CalamityPlayer.areThereAnyDamnBosses) { player.HeldItem.Calamity().timesUsed++; - for (int i = 0; i < Main.maxInventory; i++) + for (int i = 0; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].type == Item.type && player.inventory[i] != player.HeldItem) player.inventory[i].Calamity().timesUsed++; diff --git a/Items/Weapons/Typeless/FiniteUse/Hydra.cs b/Items/Weapons/Typeless/FiniteUse/Hydra.cs index 9137eaa0f1..679cf21fb9 100644 --- a/Items/Weapons/Typeless/FiniteUse/Hydra.cs +++ b/Items/Weapons/Typeless/FiniteUse/Hydra.cs @@ -1,8 +1,9 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Ammo.FiniteUse; using CalamityMod.Projectiles.Typeless.FiniteUse; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.knockBack = 10f; Item.value = Item.buyPrice(0, 80, 0, 0); Item.rare = ItemRarityID.Yellow; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Hydra"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Hydra"); Item.autoReuse = true; Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); @@ -62,19 +63,19 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.Calamity().timesUsed = 0; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { for (int index = 0; index < 8; ++index) { - float SpeedX = speedX + Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = speedY + Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); + float SpeedX = velocity.X + Main.rand.Next(-40, 41) * 0.05f; + float SpeedY = velocity.Y + Main.rand.Next(-40, 41) * 0.05f; + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); } if (CalamityPlayer.areThereAnyDamnBosses) { player.HeldItem.Calamity().timesUsed++; - for (int i = 0; i < Main.maxInventory; i++) + for (int i = 0; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].type == Item.type && player.inventory[i] != player.HeldItem) player.inventory[i].Calamity().timesUsed++; diff --git a/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs b/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs index 94a2fd9b14..5dc1963586 100644 --- a/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs +++ b/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs @@ -1,8 +1,9 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Ammo.FiniteUse; using CalamityMod.Projectiles.Typeless.FiniteUse; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.knockBack = 8f; Item.value = Item.buyPrice(0, 48, 0, 0); Item.rare = ItemRarityID.LightPurple; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Magnum"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Magnum"); Item.autoReuse = true; Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse } // Terraria seems to really dislike high crit values in SetDefaults - public override void GetWeaponCrit(Player player, ref int crit) => crit += 56; + public override void ModifyWeaponCrit(Player player, ref int crit) => crit += 56; public override bool OnPickup(Player player) { @@ -59,12 +60,12 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.Calamity().timesUsed = 0; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (CalamityPlayer.areThereAnyDamnBosses) { player.HeldItem.Calamity().timesUsed++; - for (int i = 0; i < Main.maxInventory; i++) + for (int i = 0; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].type == Item.type && player.inventory[i] != player.HeldItem) player.inventory[i].Calamity().timesUsed++; diff --git a/Items/Weapons/Typeless/FiniteUse/Magnum.cs b/Items/Weapons/Typeless/FiniteUse/Magnum.cs index c8366c4404..3dd830a322 100644 --- a/Items/Weapons/Typeless/FiniteUse/Magnum.cs +++ b/Items/Weapons/Typeless/FiniteUse/Magnum.cs @@ -1,8 +1,9 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Ammo.FiniteUse; using CalamityMod.Projectiles.Typeless.FiniteUse; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.knockBack = 8f; Item.value = Item.buyPrice(0, 2, 0, 0); Item.rare = ItemRarityID.Green; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Magnum"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Magnum"); Item.autoReuse = true; Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse } // Terraria seems to really dislike high crit values in SetDefaults - public override void GetWeaponCrit(Player player, ref int crit) => crit += 46; + public override void ModifyWeaponCrit(Player player, ref int crit) => crit += 46; public override bool OnPickup(Player player) { @@ -59,12 +60,12 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.Calamity().timesUsed = 0; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (CalamityPlayer.areThereAnyDamnBosses) { player.HeldItem.Calamity().timesUsed++; - for (int i = 0; i < Main.maxInventory; i++) + for (int i = 0; i < Main.InventorySlotsTotal; i++) { if (player.inventory[i].type == Item.type && player.inventory[i] != player.HeldItem) player.inventory[i].Calamity().timesUsed++; diff --git a/Items/Weapons/Typeless/GoldenGun.cs b/Items/Weapons/Typeless/GoldenGun.cs index 52357497fb..f97f7de269 100644 --- a/Items/Weapons/Typeless/GoldenGun.cs +++ b/Items/Weapons/Typeless/GoldenGun.cs @@ -1,6 +1,7 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,9 +38,9 @@ namespace CalamityMod.Items.Weapons.Typeless return new Vector2(-5, 0); } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, position, velocity, type, damage, knockBack, player.whoAmI, 0f, 0f); return false; } diff --git a/Items/Weapons/Typeless/MarkedMagnum.cs b/Items/Weapons/Typeless/MarkedMagnum.cs index e1399b0c23..53a99b9022 100644 --- a/Items/Weapons/Typeless/MarkedMagnum.cs +++ b/Items/Weapons/Typeless/MarkedMagnum.cs @@ -1,6 +1,7 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -39,20 +40,20 @@ namespace CalamityMod.Items.Weapons.Typeless } // Marked Magnum scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts). - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { - float formula = 5f * (player.allDamage - 1f); + float formula = 5f * (player.GetDamage(DamageClass.Generic) - 1f); formula += player.GetDamage(DamageClass.Melee) - 1f; formula += player.GetDamage(DamageClass.Ranged) - 1f; formula += player.GetDamage(DamageClass.Magic) - 1f; formula += player.GetDamage(DamageClass.Summon) - 1f; formula += player.Calamity().throwingDamage - 1f; - add += formula; + damage += formula; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f); return false; } diff --git a/Items/Weapons/Typeless/RelicOfResilience.cs b/Items/Weapons/Typeless/RelicOfResilience.cs index c116497c3e..48359de458 100644 --- a/Items/Weapons/Typeless/RelicOfResilience.cs +++ b/Items/Weapons/Typeless/RelicOfResilience.cs @@ -1,8 +1,9 @@ -using CalamityMod.Projectiles.Damageable; +using CalamityMod.Projectiles.Damageable; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using System.Linq; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -41,7 +42,8 @@ namespace CalamityMod.Items.Weapons.Typeless } public override bool CanUseItem(Player player) => !player.HasCooldown(Cooldowns.RelicOfResilience.ID); public override bool? UseItem(Player player) => true; - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { player.AddCooldown(Cooldowns.RelicOfResilience.ID, CalamityUtils.SecondsToFrames(CooldownSeconds)); int[] shardTypes = new int[] @@ -65,9 +67,7 @@ namespace CalamityMod.Items.Weapons.Typeless } } else if (shardTypes.All(proj => player.ownedProjectileCounts[proj] == 0)) - { - Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 0f, 0f); - } + Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 0f); return false; } } diff --git a/Items/Weapons/Typeless/YanmeisKnife.cs b/Items/Weapons/Typeless/YanmeisKnife.cs index ff17d2932b..c9e4d519d9 100644 --- a/Items/Weapons/Typeless/YanmeisKnife.cs +++ b/Items/Weapons/Typeless/YanmeisKnife.cs @@ -1,7 +1,8 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Typeless } // Terraria seems to really dislike high crit values in SetDefaults - public override void GetWeaponCrit(Player player, ref int crit) => crit += 6; + public override void ModifyWeaponCrit(Player player, ref int crit) => crit += 6; public override bool CanUseItem(Player player) { @@ -47,10 +48,10 @@ namespace CalamityMod.Items.Weapons.Typeless return base.CanUseItem(player); } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { player.Calamity().KameiBladeUseDelay = 180; - Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f); return false; } From 7090e5968824ec97eaaa9d93a433b2dd8387ecff Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:31:58 -0500 Subject: [PATCH 02/14] Cleaned out Calamity Player Misc Effects --- CalPlayer/CalamityPlayerMiscEffects.cs | 208 ++++++++++-------- .../ProjectileSource_BloodflareSummonSet.cs | 11 + .../ProjectileSource_HydrothermalSmoke.cs | 11 + .../ProjectileSource_InfernoPotionBoost.cs | 11 + .../ProjectileSource_OmegaBlueTentacles.cs | 11 + .../ProjectileSource_PlaguebringerSetBoost.cs | 11 + .../ProjectileSource_PrismaticArmorLasers.cs | 11 + .../ProjectileSource_TarragonSummonAura.cs | 11 + EntitySources/ProjectileSource_TeslaPotion.cs | 11 + 9 files changed, 205 insertions(+), 91 deletions(-) create mode 100644 EntitySources/ProjectileSource_BloodflareSummonSet.cs create mode 100644 EntitySources/ProjectileSource_HydrothermalSmoke.cs create mode 100644 EntitySources/ProjectileSource_InfernoPotionBoost.cs create mode 100644 EntitySources/ProjectileSource_OmegaBlueTentacles.cs create mode 100644 EntitySources/ProjectileSource_PlaguebringerSetBoost.cs create mode 100644 EntitySources/ProjectileSource_PrismaticArmorLasers.cs create mode 100644 EntitySources/ProjectileSource_TarragonSummonAura.cs create mode 100644 EntitySources/ProjectileSource_TeslaPotion.cs diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 54a39a92ba..159ff803ec 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -52,6 +52,10 @@ using Terraria.ID; using Terraria.ModLoader; using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence; using Terraria.Audio; +using Terraria.DataStructures; +using CalamityMod.EntitySources; +using ReLogic.Content; +using Terraria.GameContent; namespace CalamityMod.CalPlayer { @@ -72,7 +76,11 @@ namespace CalamityMod.CalPlayer // Reduce the expert debuff time multiplier to the normal mode multiplier if (CalamityConfig.Instance.NerfExpertDebuffs) - Main.expertDebuffTime = 1f; + { + var copy = Main.RegisteredGameModes[GameModeID.Expert]; + copy.DebuffTimeMultiplier = 1f; + Main.RegisteredGameModes[GameModeID.Expert] = copy; + } // Bool for any existing bosses, true if any boss NPC is active areThereAnyDamnBosses = CalamityUtils.AnyBossNPCS(); @@ -461,7 +469,8 @@ namespace CalamityMod.CalPlayer } // Create a direct strike to hit this specific NPC. - Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ModContent.ProjectileType(), sigilDamage, 0f, Player.whoAmI, i); + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); + Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), sigilDamage, 0f, Player.whoAmI, i); // Incinerate the target with Vulnerability Hex. target.AddBuff(ModContent.BuffType(), VulnerabilityHex.CalamityDuration); @@ -602,8 +611,9 @@ namespace CalamityMod.CalPlayer if (!Main.npc[i].active || Main.npc[i].friendly || Main.npc[i].lifeMax < 5 || alreadyTargetedNPCs.Contains(i) || Main.npc[i].realLife >= 0 || Main.npc[i].dontTakeDamage || Main.npc[i].immortal) continue; + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); if (Main.myPlayer == Player.whoAmI && Main.npc[i].WithinRange(Player.Center, 2000f)) - Projectile.NewProjectile(Main.npc[i].Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, i); + Projectile.NewProjectile(source, Main.npc[i].Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, i); if (spiritOriginBullseyeShootCountdown <= 0) spiritOriginBullseyeShootCountdown = 45; } @@ -668,8 +678,9 @@ namespace CalamityMod.CalPlayer // Update the Providence Burn effect drawer if applicable. float providenceBurnIntensity = 0f; - if (Main.npc.IndexInRange(CalamityGlobalNPC.holyBoss) && Main.npc[CalamityGlobalNPC.holyBoss].active) - providenceBurnIntensity = (Main.npc[CalamityGlobalNPC.holyBoss].modNPC as ProvidenceBoss).CalculateBurnIntensity(); + int provID = ModContent.NPCType(); + if (Main.npc.IndexInRange(CalamityGlobalNPC.holyBoss) && Main.npc[CalamityGlobalNPC.holyBoss].active && Main.npc[CalamityGlobalNPC.holyBoss].type == provID) + providenceBurnIntensity = (Main.npc[CalamityGlobalNPC.holyBoss].ModNPC as ProvidenceBoss).CalculateBurnIntensity(); ProvidenceBurnEffectDrawer.ParticleSpawnRate = int.MaxValue; // If the burn intensity is great enough, cause the player to ignite into flames. @@ -756,10 +767,10 @@ namespace CalamityMod.CalPlayer Vector2 spawnPoint = new Vector2(Player.Center.X + Main.rand.Next(-1000, 1001), Player.Center.Y - Main.rand.Next(700, 801)); if (Player.miscCounter % slimeRainRate == 0f) - { + { if (DownedBossSystem.downedAquaticScourge && !DownedBossSystem.downedPolterghast && Main.rand.NextBool(12)) { - NPC.NewNPC((int)spawnPoint.X, (int)spawnPoint.Y, ModContent.NPCType()); + NPC.NewNPC(new EntitySource_SpawnNPC(), (int)spawnPoint.X, (int)spawnPoint.Y, ModContent.NPCType()); } } } @@ -772,7 +783,7 @@ namespace CalamityMod.CalPlayer { if (Math.Abs(Player.velocity.X) > 0.1f || Math.Abs(Player.velocity.Y) > 0.1f) { - Projectile.NewProjectile(Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + Projectile.NewProjectile(new ProjectileSource_HydrothermalSmoke(Player), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI); } } // Trying to find a workaround because apparently putting the bool in ResetEffects prevents it from working @@ -858,8 +869,9 @@ namespace CalamityMod.CalPlayer if (!tentaclesPresent[i]) { int damage = (int)(390 * Player.AverageDamage()); + var source = new ProjectileSource_OmegaBlueTentacles(Player); Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f; - Projectile.NewProjectile(Player.Center, vel, ModContent.ProjectileType(), damage, 8f, Main.myPlayer, Main.rand.Next(120), i); + Projectile.NewProjectile(source, Player.Center, vel, ModContent.ProjectileType(), damage, 8f, Main.myPlayer, Main.rand.Next(120), i); } } } @@ -871,7 +883,7 @@ namespace CalamityMod.CalPlayer damageUp *= 2f; critUp *= 2; } - Player.allDamage += damageUp; + Player.GetDamage() += damageUp; AllCritBoost(critUp); } @@ -1294,10 +1306,10 @@ namespace CalamityMod.CalPlayer } if (kamiBoost) - Player.allDamage += 0.15f; + Player.GetDamage() += 0.15f; if (avertorBonus) - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; if (roverDriveTimer < 616) { @@ -1335,7 +1347,7 @@ namespace CalamityMod.CalPlayer { Player.endurance += 0.07f; Player.statDefense += 13; - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; } // Ambrosial Ampoule bonus and other light-granting bonuses @@ -1481,7 +1493,7 @@ namespace CalamityMod.CalPlayer for (int j = 0; j < Main.maxItems; j++) { Item item = Main.item[j]; - if (item.active && item.noGrabDelay == 0 && item.owner == Player.whoAmI) + if (item.active && item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Player.whoAmI) { item.beingGrabbed = true; if (Player.Center.X > item.Center.X) @@ -1543,12 +1555,13 @@ namespace CalamityMod.CalPlayer if (blunderBooster) { int lightningCount = Main.rand.Next(2, 7); + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); for (int i = 0; i < lightningCount; i++) { Vector2 lightningVel = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); lightningVel.Normalize(); lightningVel *= Main.rand.NextFloat(1f, 2f); - int projectile = Projectile.NewProjectile(Player.Center, lightningVel, ModContent.ProjectileType(), (int)(30 * Player.RogueDamage()), 0, Player.whoAmI, Main.rand.Next(2), 0f); + int projectile = Projectile.NewProjectile(source, Player.Center, lightningVel, ModContent.ProjectileType(), (int)(30 * Player.RogueDamage()), 0, Player.whoAmI, Main.rand.Next(2), 0f); Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; @@ -1565,12 +1578,13 @@ namespace CalamityMod.CalPlayer else if (plaguedFuelPack) { int numClouds = Main.rand.Next(2, 10); + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); for (int i = 0; i < numClouds; i++) { Vector2 cloudVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); cloudVelocity.Normalize(); cloudVelocity *= Main.rand.NextFloat(0f, 1f); - int projectile = Projectile.NewProjectile(Player.Center, cloudVelocity, ModContent.ProjectileType(), (int)(20 * Player.RogueDamage()), 0, Player.whoAmI, 0, 0); + int projectile = Projectile.NewProjectile(source, Player.Center, cloudVelocity, ModContent.ProjectileType(), (int)(20 * Player.RogueDamage()), 0, Player.whoAmI, 0, 0); Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; @@ -1589,6 +1603,7 @@ namespace CalamityMod.CalPlayer // Gravistar Sabaton effects if (gSabaton && Player.whoAmI == Main.myPlayer) { + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); if (gSabatonCooldown <= 0 && !Player.mount.Active) { if (Player.controlDown && Player.releaseDown && Player.position.Y != Player.oldPosition.Y) @@ -1596,7 +1611,7 @@ namespace CalamityMod.CalPlayer gSabatonFall = 300; gSabatonCooldown = 480; //8 second cooldown Player.gravity *= 2f; - Projectile.NewProjectile(Player.Center.X, Player.Center.Y + (Player.height / 5f), Player.velocity.X, Player.velocity.Y, ModContent.ProjectileType(), 0, 0, Player.whoAmI); + Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y + (Player.height / 5f), Player.velocity.X, Player.velocity.Y, ModContent.ProjectileType(), 0, 0, Player.whoAmI); } } if (gSabatonCooldown == 1) //dust when ready to use again @@ -1932,14 +1947,14 @@ namespace CalamityMod.CalPlayer // New textures if (Main.netMode != NetmodeID.Server && Player.whoAmI == Main.myPlayer) { - Texture2D rain3 = ModContent.Request("CalamityMod/ExtraTextures/Rain3").Value; - Texture2D rainOriginal = ModContent.Request("CalamityMod/ExtraTextures/RainOriginal").Value; - Texture2D mana2 = ModContent.Request("CalamityMod/ExtraTextures/Mana2").Value; - Texture2D mana3 = ModContent.Request("CalamityMod/ExtraTextures/Mana3").Value; - Texture2D mana4 = ModContent.Request("CalamityMod/ExtraTextures/Mana4").Value; - Texture2D manaOriginal = ModContent.Request("CalamityMod/ExtraTextures/ManaOriginal").Value; - Texture2D carpetAuric = ModContent.Request("CalamityMod/ExtraTextures/AuricCarpet").Value; - Texture2D carpetOriginal = ModContent.Request("CalamityMod/ExtraTextures/Carpet").Value; + Asset rain3 = ModContent.Request("CalamityMod/ExtraTextures/Rain3"); + Asset rainOriginal = ModContent.Request("CalamityMod/ExtraTextures/RainOriginal"); + Asset mana2 = ModContent.Request("CalamityMod/ExtraTextures/Mana2"); + Asset mana3 = ModContent.Request("CalamityMod/ExtraTextures/Mana3"); + Asset mana4 = ModContent.Request("CalamityMod/ExtraTextures/Mana4"); + Asset manaOriginal = ModContent.Request("CalamityMod/ExtraTextures/ManaOriginal"); + Asset carpetAuric = ModContent.Request("CalamityMod/ExtraTextures/AuricCarpet"); + Asset carpetOriginal = ModContent.Request("CalamityMod/ExtraTextures/Carpet"); int totalManaBoost = (pHeart ? 1 : 0) + @@ -1948,30 +1963,30 @@ namespace CalamityMod.CalPlayer switch (totalManaBoost) { default: - Main.manaTexture = manaOriginal; + TextureAssets.Mana = manaOriginal; break; case 3: - Main.manaTexture = mana4; + TextureAssets.Mana = mana4; break; case 2: - Main.manaTexture = mana3; + TextureAssets.Mana = mana3; break; case 1: - Main.manaTexture = mana2; + TextureAssets.Mana = mana2; break; } if (Main.bloodMoon) - Main.rainTexture = rainOriginal; + TextureAssets.Rain = rainOriginal; else if (Main.raining && ZoneSulphur) - Main.rainTexture = rain3; + TextureAssets.Rain = rain3; else - Main.rainTexture = rainOriginal; + TextureAssets.Rain = rainOriginal; if (auricSet) - Main.flyingCarpetTexture = carpetAuric; + TextureAssets.FlyingCarpet = carpetAuric; else - Main.flyingCarpetTexture = carpetOriginal; + TextureAssets.FlyingCarpet = carpetOriginal; } } #endregion @@ -1987,7 +2002,7 @@ namespace CalamityMod.CalPlayer { if (trinketOfChiBuff) { - Player.allDamage += 0.5f; + Player.GetDamage() += 0.5f; if (Player.itemAnimation > 0) chiBuffTimer = 0; } @@ -2067,7 +2082,7 @@ namespace CalamityMod.CalPlayer } float damageBoost = (1f - modStealth) * 0.2f; - Player.allDamage += damageBoost; + Player.GetDamage() += damageBoost; int critBoost = (int)((1f - modStealth) * 10f); AllCritBoost(critBoost); @@ -2122,11 +2137,11 @@ namespace CalamityMod.CalPlayer bool usingScope = false; if (!Main.gameMenu && Main.netMode != NetmodeID.Server) { - if (Player.noThrow <= 0 && !Player.lastMouseInterface || (Main.zoomX != 0f || Main.zoomY != 0f)) + if (Player.noThrow <= 0 && !Player.lastMouseInterface || !(Main.CurrentPan == Vector2.Zero)) { if (PlayerInput.UsingGamepad) { - if (PlayerInput.GamepadThumbstickRight.Length() != 0f || !Main.SmartCursorEnabled) + if (PlayerInput.GamepadThumbstickRight.Length() != 0f || !Main.SmartCursorIsUsed) { usingScope = true; } @@ -2214,7 +2229,7 @@ namespace CalamityMod.CalPlayer NetMessage.SendData(MessageID.PlayerStealth, -1, -1, null, Player.whoAmI, 0f, 0f, 0f, 0, 0, 0); float damageBoost = (5f - shieldInvinc) * 0.03f; - Player.allDamage += damageBoost; + Player.GetDamage() += damageBoost; int critBoost = (int)((5f - shieldInvinc) * 2f); AllCritBoost(critBoost); @@ -2339,7 +2354,7 @@ namespace CalamityMod.CalPlayer { if (Player.FindBuffIndex(BuffID.Wrath) > -1) Player.ClearBuff(BuffID.Wrath); - Player.allDamage += 0.12f; + Player.GetDamage() += 0.12f; } if (profanedRage) @@ -2359,13 +2374,13 @@ namespace CalamityMod.CalPlayer { Player.statDefense -= 10; Player.moveSpeed -= 0.1f; - Player.allDamage += 0.05f; + Player.GetDamage() += 0.05f; Player.minionKB += 0.5f; } if (rRage) { - Player.allDamage += 0.3f; + Player.GetDamage() += 0.3f; Player.statDefense += 5; } @@ -2393,7 +2408,7 @@ namespace CalamityMod.CalPlayer Player.endurance += 0.06f; Player.statDefense += 8; Player.pickSpeed -= 0.05f; - Player.allDamage += 0.06f; + Player.GetDamage() += 0.06f; AllCritBoost(2); Player.minionKB += 1f; Player.moveSpeed += 0.06f; @@ -2416,7 +2431,7 @@ namespace CalamityMod.CalPlayer if (darkSunRing) { Player.maxMinions += 2; - Player.allDamage += 0.12f; + Player.GetDamage() += 0.12f; Player.minionKB += 1.2f; Player.pickSpeed -= 0.15f; if (Main.eclipse || !Main.dayTime) @@ -2434,7 +2449,7 @@ namespace CalamityMod.CalPlayer if (bloodPactBoost) { - Player.allDamage += 0.05f; + Player.GetDamage() += 0.05f; Player.statDefense += 20; Player.endurance += 0.1f; Player.longInvince = true; @@ -2445,11 +2460,11 @@ namespace CalamityMod.CalPlayer Player.moveSpeed -= 0.2f; if (fabsolVodka) - Player.allDamage += 0.08f; + Player.GetDamage() += 0.08f; if (vodka) { - Player.allDamage += 0.06f; + Player.GetDamage() += 0.06f; AllCritBoost(2); } @@ -2467,18 +2482,18 @@ namespace CalamityMod.CalPlayer if (whiskey) { - Player.allDamage += 0.04f; + Player.GetDamage() += 0.04f; AllCritBoost(2); } if (everclear) - Player.allDamage += 0.25f; + Player.GetDamage() += 0.25f; if (bloodyMary) { if (Main.bloodMoon) { - Player.allDamage += 0.15f; + Player.GetDamage() += 0.15f; AllCritBoost(7); Player.moveSpeed += 0.1f; } @@ -2489,7 +2504,7 @@ namespace CalamityMod.CalPlayer if (Main.dayTime) { Player.statDefense += 5; - Player.allDamage += 0.03f; + Player.GetDamage() += 0.03f; AllCritBoost(2); Player.endurance += 0.03f; } @@ -2500,7 +2515,7 @@ namespace CalamityMod.CalPlayer if (Main.dayTime) { Player.statDefense += 10; - Player.allDamage += 0.07f; + Player.GetDamage() += 0.07f; AllCritBoost(3); Player.endurance += 0.07f; } @@ -2523,7 +2538,7 @@ namespace CalamityMod.CalPlayer if (moscowMule) { - Player.allDamage += 0.09f; + Player.GetDamage() += 0.09f; AllCritBoost(3); } @@ -2651,7 +2666,7 @@ namespace CalamityMod.CalPlayer float damageBoost = floatTypeBoost * 0.5f; Player.endurance += floatTypeBoost * 0.25f; Player.statDefense += integerTypeBoost; - Player.allDamage += damageBoost; + Player.GetDamage() += damageBoost; AllCritBoost(critBoost); Player.minionKB += floatTypeBoost; Player.moveSpeed += floatTypeBoost * 0.5f; @@ -2759,7 +2774,7 @@ namespace CalamityMod.CalPlayer if (wDeath) { - Player.allDamage -= 0.2f; + Player.GetDamage() -= 0.2f; Player.moveSpeed -= 0.1f; } @@ -2774,14 +2789,14 @@ namespace CalamityMod.CalPlayer if (astralInfection) { - Player.allDamage -= 0.1f; + Player.GetDamage() -= 0.1f; Player.moveSpeed -= 0.15f; } if (pFlames) { Player.blind = !reducedPlagueDmg; - Player.allDamage -= 0.1f; + Player.GetDamage() -= 0.1f; Player.moveSpeed -= 0.15f; } @@ -2851,7 +2866,7 @@ namespace CalamityMod.CalPlayer if (crimEffigy) { - Player.allDamage += 0.15f; + Player.GetDamage() += 0.15f; Player.statDefense += 10; } @@ -2873,7 +2888,7 @@ namespace CalamityMod.CalPlayer if (rBrain) { if (Player.statLife <= (int)(Player.statLifeMax2 * 0.75)) - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) Player.moveSpeed -= 0.05f; } @@ -2927,7 +2942,7 @@ namespace CalamityMod.CalPlayer Player.buffImmune[BuffID.Frozen] = true; if (Player.statLife > (int)(Player.statLifeMax2 * 0.75)) - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; if (Player.statLife < (int)(Player.statLifeMax2 * 0.25)) Player.statDefense += 20; } @@ -2935,7 +2950,7 @@ namespace CalamityMod.CalPlayer if (vexation) { if (Player.statLife < (int)(Player.statLifeMax2 * 0.5)) - Player.allDamage += 0.2f; + Player.GetDamage() += 0.2f; } if (ataxiaBlaze) @@ -2968,10 +2983,11 @@ namespace CalamityMod.CalPlayer if (Player.whoAmI == Main.myPlayer && bloodflareSummonTimer <= 0) { bloodflareSummonTimer = 900; + var source = new ProjectileSource_BloodflareSummonSet(Player); for (int I = 0; I < 3; I++) { float ai1 = I * 120; - int projectile = Projectile.NewProjectile(Player.Center.X + (float)(Math.Sin(I * 120) * 550), Player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f, + int projectile = Projectile.NewProjectile(source, Player.Center.X + (float)(Math.Sin(I * 120) * 550), Player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f, ModContent.ProjectileType(), (int)(3750 * Player.MinionDamage()), 1f, Player.whoAmI, ai1, 0f); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].Calamity().forceTypeless = true; @@ -2984,12 +3000,12 @@ namespace CalamityMod.CalPlayer Player.GetDamage(DamageClass.Melee) += 0.1f; Player.lavaMax += 240; if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; } if (deepDiver && Player.IsUnderwater()) { - Player.allDamage += 0.15f; + Player.GetDamage() += 0.15f; Player.statDefense += 15; Player.moveSpeed += 0.15f; } @@ -3009,7 +3025,7 @@ namespace CalamityMod.CalPlayer if (coreOfTheBloodGod) { Player.endurance += 0.08f; - Player.allDamage += 0.08f; + Player.GetDamage() += 0.08f; } if (godSlayerThrowing) @@ -3036,6 +3052,7 @@ namespace CalamityMod.CalPlayer { const int BaseDamage = 120; int damage = (int)(BaseDamage * Player.MinionDamage()); + var source = new ProjectileSource_TarragonSummonAura(Player); float range = 300f; for (int i = 0; i < Main.maxNPCs; ++i) @@ -3045,7 +3062,7 @@ namespace CalamityMod.CalPlayer continue; if (Vector2.Distance(Player.Center, npc.Center) <= range) - Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); } } } @@ -3063,6 +3080,7 @@ namespace CalamityMod.CalPlayer { const int BaseDamage = 10; int damage = (int)(BaseDamage * Player.AverageDamage()); + var source = Player.GetProjectileSource_Item(Player.ActiveItem()); float range = 200f; for (int i = 0; i < Main.maxNPCs; ++i) @@ -3072,13 +3090,13 @@ namespace CalamityMod.CalPlayer continue; if (Vector2.Distance(Player.Center, npc.Center) <= range) - Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); // Occasionally spawn cute sparks so it looks like an electrical aura if (Main.rand.NextBool(10)) { Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f); - int spark = Projectile.NewProjectile(npc.Center, velocity, ModContent.ProjectileType(), damage / 2, 0f, Player.whoAmI); + int spark = Projectile.NewProjectile(source, npc.Center, velocity, ModContent.ProjectileType(), damage / 2, 0f, Player.whoAmI); if (spark.WithinBounds(Main.maxProjectiles)) { Main.projectile[spark].Calamity().forceTypeless = true; @@ -3104,6 +3122,7 @@ namespace CalamityMod.CalPlayer { const int BaseDamage = 50; int damage = (int)(BaseDamage * Player.AverageDamage()); + var source = new ProjectileSource_InfernoPotionBoost(Player); float range = 300f; for (int i = 0; i < Main.maxNPCs; ++i) @@ -3116,7 +3135,7 @@ namespace CalamityMod.CalPlayer { npc.AddBuff(ModContent.BuffType(), 120); if (brimLoreInfernoTimer == 0) - Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); + Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI, i); } } } @@ -3145,31 +3164,31 @@ namespace CalamityMod.CalPlayer Player.buffImmune[BuffID.Venom] = true; if (Player.statLife <= (int)(Player.statLifeMax2 * 0.75)) { - Player.allDamage += 0.06f; + Player.GetDamage() += 0.06f; AllCritBoost(3); } if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) { - Player.allDamage += 0.06f; + Player.GetDamage() += 0.06f; AllCritBoost(3); } if (Player.statLife <= (int)(Player.statLifeMax2 * 0.25)) { - Player.allDamage += 0.06f; + Player.GetDamage() += 0.06f; AllCritBoost(3); } if (Player.lifeRegen < 0) { - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; AllCritBoost(5); } } if (dArtifact) - Player.allDamage += 0.25f; + Player.GetDamage() += 0.25f; if (trippy) - Player.allDamage += 0.5f; + Player.GetDamage() += 0.5f; if (eArtifact) { @@ -3185,6 +3204,7 @@ namespace CalamityMod.CalPlayer { if (Player.whoAmI == Main.myPlayer) { + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); if (Player.FindBuffIndex(ModContent.BuffType()) == -1 && !profanedCrystalBuffs) Player.AddBuff(ModContent.BuffType(), 3600, true); @@ -3193,14 +3213,14 @@ namespace CalamityMod.CalPlayer int guardianAmt = 1; if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) - Projectile.NewProjectile(Player.Center.X, Player.Center.Y, 0f, -6f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -6f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, 0f); if (crystal || minionSlotStat >= 10) { gDefense = true; if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) - Projectile.NewProjectile(Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); } if (crystal || summonSet) @@ -3208,7 +3228,7 @@ namespace CalamityMod.CalPlayer gOffense = true; if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < guardianAmt) - Projectile.NewProjectile(Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType(), 1, 1f, Main.myPlayer, 0f, 0f); } } } @@ -3276,9 +3296,10 @@ namespace CalamityMod.CalPlayer if (Player.strongBees && Main.rand.NextBool(3)) ++beeCount; int damage = (int)(30 * Player.MinionDamage()); + var source = new ProjectileSource_PlaguebringerSetBoost(Player); for (int index = 0; index < beeCount; ++index) { - int bee = Projectile.NewProjectile(Player.Center.X, Player.Center.Y, Main.rand.NextFloat(-35f, 35f) * 0.02f, Main.rand.NextFloat(-35f, 35f) * 0.02f, (Main.rand.NextBool(4) ? ModContent.ProjectileType() : Player.beeType()), damage, Player.beeKB(0f), Player.whoAmI, 0f, 0f); + int bee = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, Main.rand.NextFloat(-35f, 35f) * 0.02f, Main.rand.NextFloat(-35f, 35f) * 0.02f, (Main.rand.NextBool(4) ? ModContent.ProjectileType() : Player.beeType()), damage, Player.beeKB(0f), Player.whoAmI, 0f, 0f); Main.projectile[bee].usesLocalNPCImmunity = true; Main.projectile[bee].localNPCHitCooldown = 10; Main.projectile[bee].penetrate = 2; @@ -3327,8 +3348,9 @@ namespace CalamityMod.CalPlayer { if (Player.whoAmI == Main.myPlayer) { + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - Projectile.NewProjectile(Player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(30 * Player.RogueDamage()), 0f, Player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(30 * Player.RogueDamage()), 0f, Player.whoAmI, 0f, 0f); } } else if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) @@ -3359,9 +3381,11 @@ namespace CalamityMod.CalPlayer Player.buffTime[l]--; } } + //Summon the aura + var source = new ProjectileSource_TeslaPotion(Player); if (Player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) - Projectile.NewProjectile(Player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(10 * Player.AverageDamage()), 0f, Player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(10 * Player.AverageDamage()), 0f, Player.whoAmI, 0f, 0f); } } else if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) @@ -3382,8 +3406,9 @@ namespace CalamityMod.CalPlayer if (CryoStone) { + var source = Player.GetProjectileSource_Accessory(FindAccessory(ModContent.ItemType())); if (Player.whoAmI == Main.myPlayer && Player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) - Projectile.NewProjectile(Player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Player.AverageDamage() * 70), 0f, Player.whoAmI); + Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Player.AverageDamage() * 70), 0f, Player.whoAmI); } else if (Player.whoAmI == Main.myPlayer) { @@ -3420,6 +3445,7 @@ namespace CalamityMod.CalPlayer travelDist = shootSpeed / travelDist; } + var source = new ProjectileSource_PrismaticArmorLasers(Player); int laserAmt = Main.rand.Next(2); for (int index = 0; index < laserAmt; index++) { @@ -3442,7 +3468,7 @@ namespace CalamityMod.CalPlayer velocity.Y *= travelDist; velocity.X += Main.rand.Next(-50, 51) * 0.02f; velocity.Y += Main.rand.Next(-50, 51) * 0.02f; - int laser = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType(), dmg, 4f, Player.whoAmI, 0f, 0f); + int laser = Projectile.NewProjectile(source, startPos, velocity, ModContent.ProjectileType(), dmg, 4f, Player.whoAmI, 0f, 0f); Main.projectile[laser].localNPCHitCooldown = 5; if (laser.WithinBounds(Main.maxProjectiles)) Main.projectile[laser].Calamity().forceTypeless = true; @@ -3508,7 +3534,7 @@ namespace CalamityMod.CalPlayer if (Player.statLife >= Player.statLifeMax2) { float beeBoost = Player.endurance / 2f; - Player.allDamage += beeBoost; + Player.GetDamage() += beeBoost; } } @@ -3614,7 +3640,7 @@ namespace CalamityMod.CalPlayer case BuffID.Obstructed: Player.headcovered = false; Player.statDefense += 50; - Player.allDamage += 0.5f; + Player.GetDamage() += 0.5f; AllCritBoost(25); break; case BuffID.Ichor: @@ -3640,19 +3666,19 @@ namespace CalamityMod.CalPlayer case BuffID.Confused: Player.confused = false; Player.statDefense += 30; - Player.allDamage += 0.25f; + Player.GetDamage() += 0.25f; AllCritBoost(10); break; case BuffID.Blackout: Player.blackout = false; Player.statDefense += 30; - Player.allDamage += 0.25f; + Player.GetDamage() += 0.25f; AllCritBoost(10); break; case BuffID.Darkness: Player.blind = false; Player.statDefense += 15; - Player.allDamage += 0.1f; + Player.GetDamage() += 0.1f; AllCritBoost(5); break; } @@ -3884,7 +3910,7 @@ namespace CalamityMod.CalPlayer float minionDmg = Player.GetDamage(DamageClass.Summon); if (minionDmg < rogueDmg) { - Player.GetDamage(DamageClass.Summon) = rogueDmg; + Player.GetDamage(DamageClass.Summon) += rogueDmg - Player.GetDamage(DamageClass.Summon); } if (rogueDmg < minionDmg) { @@ -3922,7 +3948,7 @@ namespace CalamityMod.CalPlayer #region Stat Meter private void UpdateStatMeter() { - float allDamageStat = Player.allDamage - 1f; + float allDamageStat = Player.GetDamage() - 1f; damageStats[0] = (int)((Player.GetDamage(DamageClass.Melee) + allDamageStat - 1f) * 100f); damageStats[1] = (int)((Player.GetDamage(DamageClass.Ranged) + allDamageStat - 1f) * 100f); damageStats[2] = (int)((Player.GetDamage(DamageClass.Magic) + allDamageStat - 1f) * 100f); @@ -4068,7 +4094,7 @@ namespace CalamityMod.CalPlayer if (PlayerInput.Triggers.JustPressed.QuickBuff) { - for (int i = 0; i < Main.maxInventory; ++i) + for (int i = 0; i < Main.InventorySlotsTotal; ++i) { Item item = Player.inventory[i]; diff --git a/EntitySources/ProjectileSource_BloodflareSummonSet.cs b/EntitySources/ProjectileSource_BloodflareSummonSet.cs new file mode 100644 index 0000000000..ca6018c8e1 --- /dev/null +++ b/EntitySources/ProjectileSource_BloodflareSummonSet.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_BloodflareSummonSet : IEntitySource + { + public Player player; + public ProjectileSource_BloodflareSummonSet(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_HydrothermalSmoke.cs b/EntitySources/ProjectileSource_HydrothermalSmoke.cs new file mode 100644 index 0000000000..4afc3e44a0 --- /dev/null +++ b/EntitySources/ProjectileSource_HydrothermalSmoke.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_HydrothermalSmoke : IEntitySource + { + public Player player; + public ProjectileSource_HydrothermalSmoke(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_InfernoPotionBoost.cs b/EntitySources/ProjectileSource_InfernoPotionBoost.cs new file mode 100644 index 0000000000..63785c404d --- /dev/null +++ b/EntitySources/ProjectileSource_InfernoPotionBoost.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_InfernoPotionBoost : IEntitySource + { + public Player player; + public ProjectileSource_InfernoPotionBoost(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_OmegaBlueTentacles.cs b/EntitySources/ProjectileSource_OmegaBlueTentacles.cs new file mode 100644 index 0000000000..e23f915d29 --- /dev/null +++ b/EntitySources/ProjectileSource_OmegaBlueTentacles.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_OmegaBlueTentacles : IEntitySource + { + public Player player; + public ProjectileSource_OmegaBlueTentacles(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_PlaguebringerSetBoost.cs b/EntitySources/ProjectileSource_PlaguebringerSetBoost.cs new file mode 100644 index 0000000000..514a2b9f3d --- /dev/null +++ b/EntitySources/ProjectileSource_PlaguebringerSetBoost.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_PlaguebringerSetBoost : IEntitySource + { + public Player player; + public ProjectileSource_PlaguebringerSetBoost(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_PrismaticArmorLasers.cs b/EntitySources/ProjectileSource_PrismaticArmorLasers.cs new file mode 100644 index 0000000000..10a90a9434 --- /dev/null +++ b/EntitySources/ProjectileSource_PrismaticArmorLasers.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_PrismaticArmorLasers : IEntitySource + { + public Player player; + public ProjectileSource_PrismaticArmorLasers(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_TarragonSummonAura.cs b/EntitySources/ProjectileSource_TarragonSummonAura.cs new file mode 100644 index 0000000000..962470cf40 --- /dev/null +++ b/EntitySources/ProjectileSource_TarragonSummonAura.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_TarragonSummonAura : IEntitySource + { + public Player player; + public ProjectileSource_TarragonSummonAura(Player p) => player = p; + } +} diff --git a/EntitySources/ProjectileSource_TeslaPotion.cs b/EntitySources/ProjectileSource_TeslaPotion.cs new file mode 100644 index 0000000000..00e925b496 --- /dev/null +++ b/EntitySources/ProjectileSource_TeslaPotion.cs @@ -0,0 +1,11 @@ +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.EntitySources +{ + public class ProjectileSource_TeslaPotion : IEntitySource + { + public Player player; + public ProjectileSource_TeslaPotion(Player p) => player = p; + } +} From 8c2128cd2f53adb5fdf44f5f66b2b3bcffcbb05b Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 12:10:15 -0500 Subject: [PATCH 03/14] Fixed some item parameters --- Items/Fishing/AstralCatches/AstrophageItem.cs | 5 +++-- Items/Fishing/SunkenSeaCatches/RustedJingleBell.cs | 5 +++-- Items/Materials/AuricBar.cs | 2 +- Items/Pets/BearEye.cs | 5 +++-- Items/Pets/BloodyVein.cs | 5 +++-- Items/Pets/BrimstoneJewel.cs | 5 +++-- Items/Pets/CharredRelic.cs | 5 +++-- Items/Pets/ChromaticOrb.cs | 5 +++-- Items/Pets/CosmicPlushie.cs | 5 +++-- Items/Pets/ForgottenDragonEgg.cs | 5 +++-- Items/Pets/FoxDrive.cs | 5 +++-- Items/Pets/GeyserShell.cs | 5 +++-- Items/Pets/JoyfulHeart.cs | 5 +++-- Items/Pets/Levi.cs | 5 +++-- Items/Pets/LittleLight.cs | 5 +++-- Items/Pets/McNuggets.cs | 5 +++-- Items/Pets/PineapplePet.cs | 5 +++-- Items/Pets/PlagueCaller.cs | 5 +++-- Items/Pets/RadiatingCrystal.cs | 5 +++-- Items/Pets/RomajedaOrchid.cs | 5 +++-- Items/Pets/RotomRemote.cs | 2 +- Items/Pets/RottingEyeball.cs | 5 +++-- Items/Pets/SparksSummon.cs | 5 +++-- Items/Pets/StrangeOrb.cs | 5 +++-- Items/Pets/TrashmanTrashcan.cs | 5 +++-- Items/Weapons/Melee/AegisBlade.cs | 4 ++-- Items/Weapons/Melee/Animus.cs | 6 +++--- Items/Weapons/Melee/BrimlashBuster.cs | 6 +++--- Items/Weapons/Melee/EvilSmasher.cs | 10 +++++----- Items/Weapons/Melee/GrandGuardian.cs | 2 +- Items/Weapons/Melee/PrismaticBreaker.cs | 6 +++--- Items/Weapons/Melee/Roxcalibur.cs | 1 - Items/Weapons/Ranged/Auralis.cs | 6 +++--- Items/Weapons/Ranged/Hellborn.cs | 6 +++--- 34 files changed, 94 insertions(+), 72 deletions(-) diff --git a/Items/Fishing/AstralCatches/AstrophageItem.cs b/Items/Fishing/AstralCatches/AstrophageItem.cs index fce8b9da30..e305467ddc 100644 --- a/Items/Fishing/AstralCatches/AstrophageItem.cs +++ b/Items/Fishing/AstralCatches/AstrophageItem.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches Item.rare = ItemRarityID.LightRed; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Fishing/SunkenSeaCatches/RustedJingleBell.cs b/Items/Fishing/SunkenSeaCatches/RustedJingleBell.cs index d4cf66f786..8d13cf4eef 100644 --- a/Items/Fishing/SunkenSeaCatches/RustedJingleBell.cs +++ b/Items/Fishing/SunkenSeaCatches/RustedJingleBell.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches Item.rare = ItemRarityID.Orange; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Materials/AuricBar.cs b/Items/Materials/AuricBar.cs index e9b72a7667..b5df0dff39 100644 --- a/Items/Materials/AuricBar.cs +++ b/Items/Materials/AuricBar.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Materials Item.consumable = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { player.itemLocation += new Vector2(-10f * player.direction, 10f * player.gravDir).RotatedBy(player.itemRotation); } diff --git a/Items/Pets/BearEye.cs b/Items/Pets/BearEye.cs index 7dc03c3bff..67112e6eeb 100644 --- a/Items/Pets/BearEye.cs +++ b/Items/Pets/BearEye.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Pets Item.UseSound = new Terraria.Audio.LegacySoundStyle(SoundID.Meowmere, 5); } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/BloodyVein.cs b/Items/Pets/BloodyVein.cs index 1f5cdaf1b4..008bc9c386 100644 --- a/Items/Pets/BloodyVein.cs +++ b/Items/Pets/BloodyVein.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/BrimstoneJewel.cs b/Items/Pets/BrimstoneJewel.cs index cad99d4871..a0d4556710 100644 --- a/Items/Pets/BrimstoneJewel.cs +++ b/Items/Pets/BrimstoneJewel.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/CharredRelic.cs b/Items/Pets/CharredRelic.cs index 865670efc3..546af9edc0 100644 --- a/Items/Pets/CharredRelic.cs +++ b/Items/Pets/CharredRelic.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Pets Item.UseSound = SoundID.NPCHit51; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/ChromaticOrb.cs b/Items/Pets/ChromaticOrb.cs index a0e2a084d9..b3560d3738 100644 --- a/Items/Pets/ChromaticOrb.cs +++ b/Items/Pets/ChromaticOrb.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/CosmicPlushie.cs b/Items/Pets/CosmicPlushie.cs index c1ee438c07..565ffab275 100644 --- a/Items/Pets/CosmicPlushie.cs +++ b/Items/Pets/CosmicPlushie.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/ForgottenDragonEgg.cs b/Items/Pets/ForgottenDragonEgg.cs index 8f6d24fb93..24fcf91064 100644 --- a/Items/Pets/ForgottenDragonEgg.cs +++ b/Items/Pets/ForgottenDragonEgg.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/FoxDrive.cs b/Items/Pets/FoxDrive.cs index 446dc53635..c56beee646 100644 --- a/Items/Pets/FoxDrive.cs +++ b/Items/Pets/FoxDrive.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/GeyserShell.cs b/Items/Pets/GeyserShell.cs index 4dcb95cc0d..b84b301449 100644 --- a/Items/Pets/GeyserShell.cs +++ b/Items/Pets/GeyserShell.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Pets Item.UseSound = SoundID.Item2; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/JoyfulHeart.cs b/Items/Pets/JoyfulHeart.cs index e53d59c54f..9232ce07d1 100644 --- a/Items/Pets/JoyfulHeart.cs +++ b/Items/Pets/JoyfulHeart.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Pets Item.UseSound = SoundID.Item2; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/Levi.cs b/Items/Pets/Levi.cs index bf445af055..0c22bca081 100644 --- a/Items/Pets/Levi.cs +++ b/Items/Pets/Levi.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/LittleLight.cs b/Items/Pets/LittleLight.cs index adbd46caa7..92c653565f 100644 --- a/Items/Pets/LittleLight.cs +++ b/Items/Pets/LittleLight.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) player.AddBuff(Item.buffType, 3600, true); diff --git a/Items/Pets/McNuggets.cs b/Items/Pets/McNuggets.cs index fa31d4adf5..e809966ddb 100644 --- a/Items/Pets/McNuggets.cs +++ b/Items/Pets/McNuggets.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().customRarity = CalamityRarity.Violet; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/PineapplePet.cs b/Items/Pets/PineapplePet.cs index 951cbbe6bf..8d4c3da253 100644 --- a/Items/Pets/PineapplePet.cs +++ b/Items/Pets/PineapplePet.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/PlagueCaller.cs b/Items/Pets/PlagueCaller.cs index d2d4668583..98feb1b908 100644 --- a/Items/Pets/PlagueCaller.cs +++ b/Items/Pets/PlagueCaller.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Pets Item.rare = ItemRarityID.Lime; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/RadiatingCrystal.cs b/Items/Pets/RadiatingCrystal.cs index 2a94cf5e03..f1e6debe88 100644 --- a/Items/Pets/RadiatingCrystal.cs +++ b/Items/Pets/RadiatingCrystal.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Pets Item.rare = ItemRarityID.Orange; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/RomajedaOrchid.cs b/Items/Pets/RomajedaOrchid.cs index 7b672456e2..390338b132 100644 --- a/Items/Pets/RomajedaOrchid.cs +++ b/Items/Pets/RomajedaOrchid.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/RotomRemote.cs b/Items/Pets/RotomRemote.cs index 3f5c33bc24..0d2526311e 100644 --- a/Items/Pets/RotomRemote.cs +++ b/Items/Pets/RotomRemote.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/RottingEyeball.cs b/Items/Pets/RottingEyeball.cs index 0f09e0c2a7..33d5c45d77 100644 --- a/Items/Pets/RottingEyeball.cs +++ b/Items/Pets/RottingEyeball.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/SparksSummon.cs b/Items/Pets/SparksSummon.cs index ffec4f3c51..b89cb17c3a 100644 --- a/Items/Pets/SparksSummon.cs +++ b/Items/Pets/SparksSummon.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().donorItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/StrangeOrb.cs b/Items/Pets/StrangeOrb.cs index 4471bc8b01..901427ed9d 100644 --- a/Items/Pets/StrangeOrb.cs +++ b/Items/Pets/StrangeOrb.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Pets/TrashmanTrashcan.cs b/Items/Pets/TrashmanTrashcan.cs index d1aa1de0db..57a85ac568 100644 --- a/Items/Pets/TrashmanTrashcan.cs +++ b/Items/Pets/TrashmanTrashcan.cs @@ -1,5 +1,6 @@ -using CalamityMod.Buffs.Pets; +using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Pets Item.Calamity().devItem = true; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0) { diff --git a/Items/Weapons/Melee/AegisBlade.cs b/Items/Weapons/Melee/AegisBlade.cs index b366c53082..9e4eb8784b 100644 --- a/Items/Weapons/Melee/AegisBlade.cs +++ b/Items/Weapons/Melee/AegisBlade.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - var source = player.GetProjectileSource_Item(); + var source = player.GetProjectileSource_Item(Item); if (crit) damage /= 2; @@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitPvp(Player player, Player target, int damage, bool crit) { - var source = player.GetProjectileSource_Item(); + var source = player.GetProjectileSource_Item(Item); if (crit) damage /= 2; diff --git a/Items/Weapons/Melee/Animus.cs b/Items/Weapons/Melee/Animus.cs index 8c5494e3c8..db99f82229 100644 --- a/Items/Weapons/Melee/Animus.cs +++ b/Items/Weapons/Melee/Animus.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; @@ -39,11 +39,11 @@ namespace CalamityMod.Items.Weapons.Melee CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType(), 5).AddTile(ModContent.TileType()).Register(); } - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { float damageMult = player.Calamity().animusBoost; damageMult -= 1f; - mult += damageMult; + damage *= damageMult; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/BrimlashBuster.cs b/Items/Weapons/Melee/BrimlashBuster.cs index 9e0227de64..b1d1fc16ce 100644 --- a/Items/Weapons/Melee/BrimlashBuster.cs +++ b/Items/Weapons/Melee/BrimlashBuster.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; @@ -49,12 +49,12 @@ namespace CalamityMod.Items.Weapons.Melee } } - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { float damageMult = 0f; if (player.Calamity().brimlashBusterBoost) damageMult = 2f; - mult += damageMult; + damage *= damageMult; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/EvilSmasher.cs b/Items/Weapons/Melee/EvilSmasher.cs index 1fbc6fac3b..01c429fc46 100644 --- a/Items/Weapons/Melee/EvilSmasher.cs +++ b/Items/Weapons/Melee/EvilSmasher.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Weapons.Melee Item.rare = ItemRarityID.LightRed; } - public override float UseTimeMultiplier (Player player) => 1f + (player.Calamity().evilSmasherBoost * 0.1f); + public override float UseTimeMultiplier(Player player) => 1f + (player.Calamity().evilSmasherBoost * 0.1f); + + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) => damage *= 1f + player.Calamity().evilSmasherBoost * 0.1f; - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) => mult += player.Calamity().evilSmasherBoost * 0.1f; - - public override void GetWeaponKnockback(Player player, ref float knockback) => knockback *= 1f + (player.Calamity().evilSmasherBoost * 0.1f); + public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback, ref float flat) => knockback *= 1f + (player.Calamity().evilSmasherBoost * 0.1f); public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { diff --git a/Items/Weapons/Melee/GrandGuardian.cs b/Items/Weapons/Melee/GrandGuardian.cs index ab5fd9c5ef..ecc3b8c020 100644 --- a/Items/Weapons/Melee/GrandGuardian.cs +++ b/Items/Weapons/Melee/GrandGuardian.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 12f; } - public override void UseStyle(Player player) + public override void UseStyle(Player player, Rectangle heldItemFrame) { player.itemLocation += new Vector2(-32f * player.direction, 12f * player.gravDir).RotatedBy(player.itemRotation); } diff --git a/Items/Weapons/Melee/PrismaticBreaker.cs b/Items/Weapons/Melee/PrismaticBreaker.cs index e9ce33826e..574b335a00 100644 --- a/Items/Weapons/Melee/PrismaticBreaker.cs +++ b/Items/Weapons/Melee/PrismaticBreaker.cs @@ -77,10 +77,10 @@ namespace CalamityMod.Items.Weapons.Melee //Cancel out normal melee damage boosts and replace it with the average of melee and ranged damage boosts //all damage boosts should still apply - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { - float damageMult = (player.GetDamage(DamageClass.Melee) + player.GetDamage(DamageClass.Ranged) - 2f) / 2f; - add += damageMult - player.GetDamage(DamageClass.Melee) + 1f; + float damageMult = (player.GetDamage(DamageClass.Melee).Additive + player.GetDamage(DamageClass.Ranged).Additive - 2f) / 2f; + damage += damageMult - player.GetDamage(DamageClass.Melee) + 1f; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/Roxcalibur.cs b/Items/Weapons/Melee/Roxcalibur.cs index cf169000c9..ab4f39c5f7 100644 --- a/Items/Weapons/Melee/Roxcalibur.cs +++ b/Items/Weapons/Melee/Roxcalibur.cs @@ -1,6 +1,5 @@ using Terraria.DataStructures; using Terraria.DataStructures; -using Terraria.DataStructures; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; diff --git a/Items/Weapons/Ranged/Auralis.cs b/Items/Weapons/Ranged/Auralis.cs index 7424ed6157..1599fa5f01 100644 --- a/Items/Weapons/Ranged/Auralis.cs +++ b/Items/Weapons/Ranged/Auralis.cs @@ -43,17 +43,17 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 34; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.UseSound = Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBlast"); + Item.UseSound = SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/PlasmaBlast"); Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.Calamity().customRarity = CalamityRarity.Turquoise; Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { float damageMult = MathHelper.Lerp(0f, 0.25f, player.Calamity().auralisStealthCounter / 300f); - add += damageMult; + damage += damageMult; } 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/Ranged/Hellborn.cs b/Items/Weapons/Ranged/Hellborn.cs index e50628342a..29ccb8e923 100644 --- a/Items/Weapons/Ranged/Hellborn.cs +++ b/Items/Weapons/Ranged/Hellborn.cs @@ -41,9 +41,9 @@ namespace CalamityMod.Items.Weapons.Ranged public override float UseTimeMultiplier(Player player) => 1f + (player.Calamity().hellbornBoost * (1f / 600f)); - public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) => mult += player.Calamity().hellbornBoost * (1f / 600f); + public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) => damage *= 1f + player.Calamity().hellbornBoost * (1f / 600f); - public override void GetWeaponKnockback(Player player, ref float knockback) => knockback *= 1f + (player.Calamity().hellbornBoost * (1f / 600f)); + public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback, ref float flat) => knockback *= 1f + (player.Calamity().hellbornBoost * (1f / 600f)); public override Vector2? HoldoutOffset() => new Vector2(-10, 0); @@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged { player.Calamity().hellbornBoost = 600; damage *= 10; - player.ApplyDamageToNPC(target, (int)(Item.damage * (player.GetDamage(DamageClass.Generic) + player.GetDamage(DamageClass.Ranged) - 1f)), 0f, 0, false); + player.ApplyDamageToNPC(target, (int)(Item.damage * (player.GetDamage(DamageClass.Generic).Additive + player.GetDamage(DamageClass.Ranged).Additive - 1f)), 0f, 0, false); float num50 = 3.4f; float num51 = 1.6f; float num52 = 4f; From fe9bb934044c65bcc31d851fcc8dcaa0b085d193 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 13:17:20 -0500 Subject: [PATCH 04/14] player.allDamage and prefix fixes --- Items/Accessories/AmalgamatedBrain.cs | 2 +- Items/Accessories/AngelicAlliance.cs | 2 +- Items/Accessories/CalamityRing.cs | 2 +- Items/Accessories/LeviathanAmbergris.cs | 4 +- Items/Accessories/NebulousCore.cs | 2 +- Items/Accessories/ReaperToothNecklace.cs | 2 +- Items/Accessories/SandSharkToothNecklace.cs | 2 +- Items/Accessories/TheAmalgam.cs | 2 +- Items/Accessories/TheCamper.cs | 2 +- Items/Accessories/VoidofExtinction.cs | 4 +- Items/Accessories/Wings/DiscordianWings.cs | 2 +- Items/Accessories/Wings/SoulofCryogen.cs | 2 +- Items/Accessories/Wings/StarlightWings.cs | 2 +- Items/Accessories/YharimsGift.cs | 2 +- Items/Armor/AstralHelm.cs | 2 +- Items/Armor/AtaxiaArmor.cs | 2 +- Items/Armor/AuricTeslaBodyArmor.cs | 2 +- Items/Armor/AuricTeslaCuisses.cs | 2 +- Items/Armor/BloodflareBodyArmor.cs | 2 +- Items/Armor/BloodflareCuisses.cs | 2 +- Items/Armor/DaedalusBreastplate.cs | 2 +- Items/Armor/DemonshadeBreastplate.cs | 2 +- Items/Armor/DemonshadeHelm.cs | 2 +- Items/Armor/FearmongerGreaves.cs | 2 +- Items/Armor/FearmongerPlateMail.cs | 2 +- Items/Armor/GodSlayerChestplate.cs | 2 +- Items/Armor/GodSlayerLeggings.cs | 2 +- Items/Armor/MolluskShelleggings.cs | 2 +- Items/Armor/MolluskShellmet.cs | 4 +- Items/Armor/MolluskShellplate.cs | 2 +- Items/Armor/OmegaBlueChestplate.cs | 2 +- Items/Armor/OmegaBlueHelmet.cs | 2 +- Items/Armor/OmegaBlueLeggings.cs | 2 +- Items/Armor/PrismaticGreaves.cs | 2 +- Items/Armor/PrismaticHelmet.cs | 2 +- Items/Armor/PrismaticRegalia.cs | 2 +- Items/Armor/ReaverHelm.cs | 2 +- Items/Armor/ReaverScaleMail.cs | 2 +- Items/Armor/SilvaArmor.cs | 2 +- Items/Armor/SilvaLeggings.cs | 2 +- Items/Armor/StatigelGreaves.cs | 2 +- Items/Armor/StatigelHood.cs | 4 +- Items/Armor/TarragonBreastplate.cs | 2 +- Items/Armor/TarragonLeggings.cs | 2 +- Items/Armor/VictideHelmet.cs | 2 +- .../CobaltArmorSetChange.cs | 2 +- .../MythrilArmorSetChange.cs | 2 +- .../PalladiumArmorSetChange.cs | 4 +- Items/Weapons/Melee/Aftershock.cs | 4 +- Items/Weapons/Melee/AncientShiv.cs | 4 +- Items/Weapons/Melee/Animus.cs | 4 +- Items/Weapons/Melee/AquaticDischarge.cs | 4 +- Items/Weapons/Melee/Avalanche.cs | 4 +- Items/Weapons/Melee/BloodyRupture.cs | 4 +- Items/Weapons/Melee/Carnage.cs | 2 +- Items/Weapons/Melee/Earth.cs | 4 +- Items/Weapons/Melee/ForbiddenOathblade.cs | 2 +- Items/Weapons/Melee/Greentide.cs | 4 +- Items/Weapons/Melee/Hellkite.cs | 2 +- Items/Weapons/Melee/HolyCollider.cs | 8 +- Items/Weapons/Melee/LeechingDagger.cs | 4 +- Items/Weapons/Melee/Mariana.cs | 4 +- Items/Weapons/Melee/NightsStabber.cs | 4 +- Items/Weapons/Melee/SoulHarvester.cs | 2 +- Items/Weapons/Melee/Terracotta.cs | 4 +- Items/Weapons/Melee/TheEnforcer.cs | 4 +- Items/Weapons/Melee/UltimusCleaver.cs | 2 +- Items/Weapons/Rogue/RogueWeapon.cs | 2 +- Items/Weapons/Typeless/EyeofMagnus.cs | 2 +- Items/Weapons/Typeless/LunicEye.cs | 2 +- Prefixes/AccessoryPrefix.cs | 79 --------- Prefixes/RogueAccessoryPrefix.cs | 65 +++++++ Prefixes/RoguePrefix.cs | 112 ------------- Prefixes/RogueWeaponPrefix.cs | 158 ++++++++++++++++++ Projectiles/Magic/SparkInfernal.cs | 2 +- TileEntities/TEDraedonLabTurret.cs | 4 +- Tiles/Astral/AstralNormalLargePiles.cs | 6 +- Tiles/AstralDesert/AstralDesertLargePiles.cs | 6 +- Tiles/AstralDesert/AstralDesertMediumPiles.cs | 6 +- Tiles/AstralDesert/AstralDesertSmallPiles.cs | 6 +- Tiles/AstralDesert/AstralDesertStalactite.cs | 6 +- Tiles/AstralSnow/AstralIceLargePiles.cs | 6 +- Tiles/AstralSnow/AstralIceMediumPiles.cs | 6 +- Tiles/AstralSnow/AstralIceSmallPiles.cs | 6 +- Tiles/AstralSnow/AstralIceStalactite.cs | 6 +- Utilities/PlayerUtils.cs | 14 +- 86 files changed, 350 insertions(+), 320 deletions(-) delete mode 100644 Prefixes/AccessoryPrefix.cs create mode 100644 Prefixes/RogueAccessoryPrefix.cs delete mode 100644 Prefixes/RoguePrefix.cs create mode 100644 Prefixes/RogueWeaponPrefix.cs diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs index 307e490644..36438a8795 100644 --- a/Items/Accessories/AmalgamatedBrain.cs +++ b/Items/Accessories/AmalgamatedBrain.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Accessories } } } - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; } public override void AddRecipes() diff --git a/Items/Accessories/AngelicAlliance.cs b/Items/Accessories/AngelicAlliance.cs index 5446d861ab..b5f2fccfb8 100644 --- a/Items/Accessories/AngelicAlliance.cs +++ b/Items/Accessories/AngelicAlliance.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.angelicAlliance = true; - player.allDamage += 0.08f; + player.GetDamage() += 0.08f; player.GetDamage(DamageClass.Summon) += 0.07f; //7% + 8% = 15% player.maxMinions += 2; if (player.controlJump) diff --git a/Items/Accessories/CalamityRing.cs b/Items/Accessories/CalamityRing.cs index 7d236c20ea..7b05d7aa4f 100644 --- a/Items/Accessories/CalamityRing.cs +++ b/Items/Accessories/CalamityRing.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.calamityRing = true; - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; player.endurance -= 0.1f; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/LeviathanAmbergris.cs b/Items/Accessories/LeviathanAmbergris.cs index 7ae7d6ce6f..934ae0ae07 100644 --- a/Items/Accessories/LeviathanAmbergris.cs +++ b/Items/Accessories/LeviathanAmbergris.cs @@ -35,11 +35,11 @@ namespace CalamityMod.Items.Accessories if (!Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { player.endurance += 0.05f; - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; } else { - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; player.statDefense += 10; player.moveSpeed += 0.3f; } diff --git a/Items/Accessories/NebulousCore.cs b/Items/Accessories/NebulousCore.cs index 0eba2d14bb..e03a47089e 100644 --- a/Items/Accessories/NebulousCore.cs +++ b/Items/Accessories/NebulousCore.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.nCore = true; - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; int damage = (int)(250 * player.AverageDamage()); float knockBack = 3f; if (Main.rand.NextBool(15)) diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index 69a94badeb..ef723b8c6d 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; player.armorPenetration += 15; } diff --git a/Items/Accessories/SandSharkToothNecklace.cs b/Items/Accessories/SandSharkToothNecklace.cs index f4e14940ea..3dc92ec989 100644 --- a/Items/Accessories/SandSharkToothNecklace.cs +++ b/Items/Accessories/SandSharkToothNecklace.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.allDamage += 0.06f; + player.GetDamage() += 0.06f; player.armorPenetration += 10; } diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index dd2486709d..4809f8b989 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.amalgam = true; - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; if (player.immune) { diff --git a/Items/Accessories/TheCamper.cs b/Items/Accessories/TheCamper.cs index 3cf469e58b..9cd6e90459 100644 --- a/Items/Accessories/TheCamper.cs +++ b/Items/Accessories/TheCamper.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories { if (player.StandingStill()) { - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; auraCounter++; float range = 200f; if (auraCounter == 9) diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index 62efe1ac9b..b637f9f5e3 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -54,10 +54,10 @@ namespace CalamityMod.Items.Accessories modPlayer.voidOfExtinction = true; player.lavaRose = true; player.lavaMax += 240; - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; if (player.lavaWet) { - player.allDamage += 0.25f; + player.GetDamage() += 0.25f; } if (player.immune) { diff --git a/Items/Accessories/Wings/DiscordianWings.cs b/Items/Accessories/Wings/DiscordianWings.cs index 8a5e1dc5ba..5c533bb9f7 100644 --- a/Items/Accessories/Wings/DiscordianWings.cs +++ b/Items/Accessories/Wings/DiscordianWings.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories.Wings player.armor[0].type == ModContent.ItemType()) && player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; } if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index b017b1ef58..b31d8f6088 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Accessories.Wings { CalamityPlayer modPlayer = player.Calamity(); modPlayer.cryogenSoul = true; - player.allDamage += 0.07f; + player.GetDamage() += 0.07f; player.wingTimeMax = 120; player.noFallDmg = true; if (modPlayer.icicleCooldown <= 0) diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index be539642b5..dfd8676c79 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories.Wings player.armor[0].type == ModContent.ItemType()) && player.armor[1].type == ModContent.ItemType() && player.armor[2].type == ModContent.ItemType()) { - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; player.Calamity().AllCritBoost(5); } diff --git a/Items/Accessories/YharimsGift.cs b/Items/Accessories/YharimsGift.cs index d8a05979e9..adbc24e81e 100644 --- a/Items/Accessories/YharimsGift.cs +++ b/Items/Accessories/YharimsGift.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed += 0.15f; - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; if (!player.StandingStill()) { dragonTimer--; diff --git a/Items/Armor/AstralHelm.cs b/Items/Armor/AstralHelm.cs index 3beb5e835f..c4509f5c4a 100644 --- a/Items/Armor/AstralHelm.cs +++ b/Items/Armor/AstralHelm.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.Calamity(); modPlayer.astralStarRain = true; player.moveSpeed += 0.05f; - player.allDamage += 0.35f; + player.GetDamage() += 0.35f; player.maxMinions += 3; modPlayer.AllCritBoost(25); player.Calamity().wearingRogueArmor = true; diff --git a/Items/Armor/AtaxiaArmor.cs b/Items/Armor/AtaxiaArmor.cs index c849893bb6..ecf42fbb11 100644 --- a/Items/Armor/AtaxiaArmor.cs +++ b/Items/Armor/AtaxiaArmor.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.statLifeMax2 += 20; - player.allDamage += 0.08f; + player.GetDamage() += 0.08f; player.Calamity().AllCritBoost(4); } diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index 0d81773561..ac0409c491 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor modPlayer.fBarrier = true; player.buffImmune[ModContent.BuffType()] = true; player.statLifeMax2 += 100; - player.allDamage += 0.08f; + player.GetDamage() += 0.08f; modPlayer.AllCritBoost(5); } diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 9d473da138..3a5bbbccab 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor { player.moveSpeed += 0.1f; player.carpet = true; - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(5); } diff --git a/Items/Armor/BloodflareBodyArmor.cs b/Items/Armor/BloodflareBodyArmor.cs index 03cbe1aa60..cab5276b7c 100644 --- a/Items/Armor/BloodflareBodyArmor.cs +++ b/Items/Armor/BloodflareBodyArmor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.statLifeMax2 += 40; - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(8); if (player.lavaWet) { diff --git a/Items/Armor/BloodflareCuisses.cs b/Items/Armor/BloodflareCuisses.cs index 2cd0e8f7c6..73bbf1640d 100644 --- a/Items/Armor/BloodflareCuisses.cs +++ b/Items/Armor/BloodflareCuisses.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.moveSpeed += 0.17f; - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; player.Calamity().AllCritBoost(7); } diff --git a/Items/Armor/DaedalusBreastplate.cs b/Items/Armor/DaedalusBreastplate.cs index b45147a937..df3a0c9883 100644 --- a/Items/Armor/DaedalusBreastplate.cs +++ b/Items/Armor/DaedalusBreastplate.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.03f; + player.GetDamage() += 0.03f; player.Calamity().AllCritBoost(3); } diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index b910d0e6ef..7fd9cda9e3 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor player.thorns += 100f; player.statLifeMax2 += 200; player.statManaMax2 += 200; - player.allDamage += 0.15f; + player.GetDamage() += 0.15f; modPlayer.AllCritBoost(15); player.meleeSpeed += 0.2f; } diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 38b195e196..28777152ec 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.3f; + player.GetDamage() += 0.3f; player.Calamity().AllCritBoost(15); } diff --git a/Items/Armor/FearmongerGreaves.cs b/Items/Armor/FearmongerGreaves.cs index 605a2a3b4f..e4d315c993 100644 --- a/Items/Armor/FearmongerGreaves.cs +++ b/Items/Armor/FearmongerGreaves.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.06f; + player.GetDamage() += 0.06f; player.minionKB += 0.5f; player.moveSpeed += 0.1f; player.panic = true; diff --git a/Items/Armor/FearmongerPlateMail.cs b/Items/Armor/FearmongerPlateMail.cs index 9a4493887e..8a84629348 100644 --- a/Items/Armor/FearmongerPlateMail.cs +++ b/Items/Armor/FearmongerPlateMail.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor { player.statLifeMax2 += 100; player.endurance += 0.08f; - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; player.Calamity().AllCritBoost(5); } diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index 7c4ee9ff7f..a9aefc2c85 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.Calamity(); player.thorns += 0.5f; player.statLifeMax2 += 60; - player.allDamage += 0.11f; + player.GetDamage() += 0.11f; modPlayer.AllCritBoost(6); } diff --git a/Items/Armor/GodSlayerLeggings.cs b/Items/Armor/GodSlayerLeggings.cs index a745baa7ea..352ce3a335 100644 --- a/Items/Armor/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayerLeggings.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.moveSpeed += 0.05f; - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; player.Calamity().AllCritBoost(10); } diff --git a/Items/Armor/MolluskShelleggings.cs b/Items/Armor/MolluskShelleggings.cs index ffeb36f475..bff038468d 100644 --- a/Items/Armor/MolluskShelleggings.cs +++ b/Items/Armor/MolluskShelleggings.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(4); player.moveSpeed -= 0.07f; } diff --git a/Items/Armor/MolluskShellmet.cs b/Items/Armor/MolluskShellmet.cs index 63ac420793..c6da5fbf2f 100644 --- a/Items/Armor/MolluskShellmet.cs +++ b/Items/Armor/MolluskShellmet.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.ignoreWater = true; - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; player.Calamity().AllCritBoost(4); } @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor "10% increased damage\n" + "Your horizontal movement is slowed"; CalamityPlayer modPlayer = player.Calamity(); - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; modPlayer.molluskSet = true; player.maxMinions += 4; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/MolluskShellplate.cs b/Items/Armor/MolluskShellplate.cs index c57deae1a5..74dd8cfa02 100644 --- a/Items/Armor/MolluskShellplate.cs +++ b/Items/Armor/MolluskShellplate.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; player.Calamity().AllCritBoost(6); player.moveSpeed -= 0.15f; } diff --git a/Items/Armor/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlueChestplate.cs index 7e72b3828c..a513356d67 100644 --- a/Items/Armor/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlueChestplate.cs @@ -31,7 +31,7 @@ No positive life regen"); public override void UpdateEquip(Player player) { CalamityPlayer modPlayer = player.Calamity(); - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; modPlayer.AllCritBoost(8); modPlayer.omegaBlueChestplate = true; modPlayer.noLifeRegen = true; diff --git a/Items/Armor/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlueHelmet.cs index 2daaa295f4..ae3b127496 100644 --- a/Items/Armor/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlueHelmet.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor { player.ignoreWater = true; - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(8); } diff --git a/Items/Armor/OmegaBlueLeggings.cs b/Items/Armor/OmegaBlueLeggings.cs index 6f10c92351..e86470a1ba 100644 --- a/Items/Armor/OmegaBlueLeggings.cs +++ b/Items/Armor/OmegaBlueLeggings.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(12); player.moveSpeed += 0.12f; } diff --git a/Items/Armor/PrismaticGreaves.cs b/Items/Armor/PrismaticGreaves.cs index 49721325a3..5350ac2b6c 100644 --- a/Items/Armor/PrismaticGreaves.cs +++ b/Items/Armor/PrismaticGreaves.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor player.GetDamage(DamageClass.Magic) += 0.1f; player.GetCritChance(DamageClass.Magic) += 12; player.jumpSpeedBoost += 0.1f; - player.allDamage -= 0.2f; + player.GetDamage() -= 0.2f; player.GetDamage(DamageClass.Magic) += 0.2f; } diff --git a/Items/Armor/PrismaticHelmet.cs b/Items/Armor/PrismaticHelmet.cs index d7d19e177b..9a7eb11a93 100644 --- a/Items/Armor/PrismaticHelmet.cs +++ b/Items/Armor/PrismaticHelmet.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.Calamity().prismaticHelmet = true; - player.allDamage -= 0.2f; + player.GetDamage() -= 0.2f; player.GetDamage(DamageClass.Magic) += 0.2f; player.GetDamage(DamageClass.Magic) += 0.18f; player.GetCritChance(DamageClass.Magic) += 12; diff --git a/Items/Armor/PrismaticRegalia.cs b/Items/Armor/PrismaticRegalia.cs index 7d3d8ba64a..97e195de36 100644 --- a/Items/Armor/PrismaticRegalia.cs +++ b/Items/Armor/PrismaticRegalia.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor player.statManaMax2 += 40; player.GetDamage(DamageClass.Magic) += 0.12f; player.GetCritChance(DamageClass.Magic) += 15; - player.allDamage -= 0.2f; + player.GetDamage() -= 0.2f; player.GetDamage(DamageClass.Magic) += 0.2f; } diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index c0f222a081..dbb6aa076c 100644 --- a/Items/Armor/ReaverHelm.cs +++ b/Items/Armor/ReaverHelm.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage -= 0.3f; + player.GetDamage() -= 0.3f; player.endurance += 0.15f; player.Calamity().reaverRegen = true; player.statLifeMax2 += 50; diff --git a/Items/Armor/ReaverScaleMail.cs b/Items/Armor/ReaverScaleMail.cs index e277aad250..4e026ce12f 100644 --- a/Items/Armor/ReaverScaleMail.cs +++ b/Items/Armor/ReaverScaleMail.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.statLifeMax2 += 20; - player.allDamage += 0.09f; + player.GetDamage() += 0.09f; player.Calamity().AllCritBoost(4); } diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index 0c3c638d6c..37b45c0180 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.statLifeMax2 += 80; - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(8); } diff --git a/Items/Armor/SilvaLeggings.cs b/Items/Armor/SilvaLeggings.cs index 264ad28d66..4f9165fb7d 100644 --- a/Items/Armor/SilvaLeggings.cs +++ b/Items/Armor/SilvaLeggings.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.moveSpeed += 0.1f; - player.allDamage += 0.12f; + player.GetDamage() += 0.12f; player.Calamity().AllCritBoost(12); } diff --git a/Items/Armor/StatigelGreaves.cs b/Items/Armor/StatigelGreaves.cs index 0b36e784d7..b80ff4375d 100644 --- a/Items/Armor/StatigelGreaves.cs +++ b/Items/Armor/StatigelGreaves.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.allDamage += 0.05f; + player.GetDamage() += 0.05f; player.moveSpeed += 0.05f; } diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index d6c8834605..42dd3e9bd6 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -55,11 +55,11 @@ namespace CalamityMod.Items.Armor } if (WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(33f * (player.allDamage + player.GetDamage(DamageClass.Summon) - 1f)), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(33f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Summon) - 1f)), 0f, Main.myPlayer, 0f, 0f); } else if (!WorldGen.crimson && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(33f * (player.allDamage + player.GetDamage(DamageClass.Summon) - 1f)), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(33f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Summon) - 1f)), 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/Items/Armor/TarragonBreastplate.cs b/Items/Armor/TarragonBreastplate.cs index 18cdd5a7cc..b231a88f00 100644 --- a/Items/Armor/TarragonBreastplate.cs +++ b/Items/Armor/TarragonBreastplate.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.statLifeMax2 += 40; - player.allDamage += 0.1f; + player.GetDamage() += 0.1f; player.Calamity().AllCritBoost(5); } diff --git a/Items/Armor/TarragonLeggings.cs b/Items/Armor/TarragonLeggings.cs index de2638be61..50a97bbebb 100644 --- a/Items/Armor/TarragonLeggings.cs +++ b/Items/Armor/TarragonLeggings.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.moveSpeed += 0.1f; - player.allDamage += 0.08f; + player.GetDamage() += 0.08f; player.Calamity().AllCritBoost(8); } diff --git a/Items/Armor/VictideHelmet.cs b/Items/Armor/VictideHelmet.cs index 1a5ebd61ca..ed439ebed7 100644 --- a/Items/Armor/VictideHelmet.cs +++ b/Items/Armor/VictideHelmet.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor } if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(7f * (player.allDamage + player.GetDamage(DamageClass.Summon) - 1f)), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType(), (int)(7f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Summon) - 1f)), 0f, Main.myPlayer, 0f, 0f); } } player.ignoreWater = true; diff --git a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs index c83a69f0f4..b3c60d9207 100644 --- a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public static void ApplyMovementSpeedBonuses(Player player) { float movementSpeedInterpolant = CalculateMovementSpeedInterpolant(player); - player.allDamage += MovementSpeedBoostPercentageMax * movementSpeedInterpolant * 0.01f; + player.GetDamage() += MovementSpeedBoostPercentageMax * movementSpeedInterpolant * 0.01f; player.Calamity().AllCritBoost((int)(MovementSpeedBoostPercentageMax * movementSpeedInterpolant)); } diff --git a/Items/VanillaArmorChanges/MythrilArmorSetChange.cs b/Items/VanillaArmorChanges/MythrilArmorSetChange.cs index c031c92402..1266c7525b 100644 --- a/Items/VanillaArmorChanges/MythrilArmorSetChange.cs +++ b/Items/VanillaArmorChanges/MythrilArmorSetChange.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyBodyPieceEffect(Player player) { - player.allDamage += ChestplateDamagePercentageBoost * 0.01f; + player.GetDamage() += ChestplateDamagePercentageBoost * 0.01f; } public override void ApplyLegPieceEffect(Player player) diff --git a/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs b/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs index 8ae600683a..5cf6e6444b 100644 --- a/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Items.VanillaArmorChanges public override void ApplyBodyPieceEffect(Player player) { - player.allDamage += ChestplateDamagePercentageBoost * 0.01f; + player.GetDamage() += ChestplateDamagePercentageBoost * 0.01f; } public override void ApplyLegPieceEffect(Player player) { - player.allDamage += LeggingsDamagePercentageBoost * 0.01f; + player.GetDamage() += LeggingsDamagePercentageBoost * 0.01f; } } } diff --git a/Items/Weapons/Melee/Aftershock.cs b/Items/Weapons/Melee/Aftershock.cs index 64daa348ee..fa2654b9f3 100644 --- a/Items/Weapons/Melee/Aftershock.cs +++ b/Items/Weapons/Melee/Aftershock.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-10, 11) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) @@ -125,7 +125,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-10, 11) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Melee/AncientShiv.cs b/Items/Weapons/Melee/AncientShiv.cs index 0634ea388c..c5629bb658 100644 --- a/Items/Weapons/Melee/AncientShiv.cs +++ b/Items/Weapons/Melee/AncientShiv.cs @@ -42,13 +42,13 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); } } } diff --git a/Items/Weapons/Melee/Animus.cs b/Items/Weapons/Melee/Animus.cs index db99f82229..6a787347d4 100644 --- a/Items/Weapons/Melee/Animus.cs +++ b/Items/Weapons/Melee/Animus.cs @@ -41,9 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void ModifyWeaponDamage(Player player, ref StatModifier damage, ref float flat) { - float damageMult = player.Calamity().animusBoost; - damageMult -= 1f; - damage *= damageMult; + damage *= player.Calamity().animusBoost; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/AquaticDischarge.cs b/Items/Weapons/Melee/AquaticDischarge.cs index 89b040d94d..4bcd2cc329 100644 --- a/Items/Weapons/Melee/AquaticDischarge.cs +++ b/Items/Weapons/Melee/AquaticDischarge.cs @@ -42,13 +42,13 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); } } } diff --git a/Items/Weapons/Melee/Avalanche.cs b/Items/Weapons/Melee/Avalanche.cs index 35424906ca..8af645c569 100644 --- a/Items/Weapons/Melee/Avalanche.cs +++ b/Items/Weapons/Melee/Avalanche.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Melee for (int k = 0; k < totalProjectiles; k++) { Vector2 vector255 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(source, target.Center, vector255, type, (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, vector255, type, (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); } } @@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee for (int k = 0; k < totalProjectiles; k++) { Vector2 vector255 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(source, target.Center, vector255, type, (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), 0f, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, vector255, type, (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), 0f, Main.myPlayer); } } diff --git a/Items/Weapons/Melee/BloodyRupture.cs b/Items/Weapons/Melee/BloodyRupture.cs index 9d80c8b49f..1943f4a6de 100644 --- a/Items/Weapons/Melee/BloodyRupture.cs +++ b/Items/Weapons/Melee/BloodyRupture.cs @@ -48,13 +48,13 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); } } } diff --git a/Items/Weapons/Melee/Carnage.cs b/Items/Weapons/Melee/Carnage.cs index a80ae30be3..8b4ca921a7 100644 --- a/Items/Weapons/Melee/Carnage.cs +++ b/Items/Weapons/Melee/Carnage.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Melee for (int i = 0; i < bloodAmt; i++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(source, targetPos, velocity, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), kBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, targetPos, velocity, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), kBack, player.whoAmI, 0f, 0f); } } } diff --git a/Items/Weapons/Melee/Earth.cs b/Items/Weapons/Melee/Earth.cs index 8420aa7d49..1617458b9c 100644 --- a/Items/Weapons/Melee/Earth.cs +++ b/Items/Weapons/Melee/Earth.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } if (target.Calamity().miscDefenseLoss < target.defense) @@ -147,7 +147,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); } if (player.moonLeech) diff --git a/Items/Weapons/Melee/ForbiddenOathblade.cs b/Items/Weapons/Melee/ForbiddenOathblade.cs index 7b2b3e06b9..291a275d1a 100644 --- a/Items/Weapons/Melee/ForbiddenOathblade.cs +++ b/Items/Weapons/Melee/ForbiddenOathblade.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee { target.AddBuff(BuffID.ShadowFlame, 360); target.AddBuff(BuffID.OnFire, 720); - player.ApplyDamageToNPC(target, (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)) * 2, 0f, 0, false); + player.ApplyDamageToNPC(target, (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)) * 2, 0f, 0, false); float num50 = 1.7f; float num51 = 0.8f; float num52 = 2f; diff --git a/Items/Weapons/Melee/Greentide.cs b/Items/Weapons/Melee/Greentide.cs index 0efb01f029..52e3da5151 100644 --- a/Items/Weapons/Melee/Greentide.cs +++ b/Items/Weapons/Melee/Greentide.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), num74, i, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), num74, i, 0f, (float)Main.rand.Next(10)); } } @@ -136,7 +136,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), num74, i, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), num74, i, 0f, (float)Main.rand.Next(10)); } } diff --git a/Items/Weapons/Melee/Hellkite.cs b/Items/Weapons/Melee/Hellkite.cs index 1b8138d0ef..f30afa09a0 100644 --- a/Items/Weapons/Melee/Hellkite.cs +++ b/Items/Weapons/Melee/Hellkite.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.OnFire, 300); - player.ApplyDamageToNPC(target, (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), 0f, 0, false); + player.ApplyDamageToNPC(target, (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), 0f, 0, false); float num50 = 1.7f; float num51 = 0.8f; float num52 = 2f; diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index bfc3e74bf6..1e969e9d94 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -49,8 +49,8 @@ namespace CalamityMod.Items.Weapons.Melee for (i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), knockback, Main.myPlayer); - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), knockback, Main.myPlayer); } } @@ -66,8 +66,8 @@ namespace CalamityMod.Items.Weapons.Melee for (i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), Item.knockBack, Main.myPlayer); - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f) * 0.3), Item.knockBack, Main.myPlayer); } } } diff --git a/Items/Weapons/Melee/LeechingDagger.cs b/Items/Weapons/Melee/LeechingDagger.cs index da4cccbb4a..93004b4e6e 100644 --- a/Items/Weapons/Melee/LeechingDagger.cs +++ b/Items/Weapons/Melee/LeechingDagger.cs @@ -48,13 +48,13 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * 0.5f * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); } } } diff --git a/Items/Weapons/Melee/Mariana.cs b/Items/Weapons/Melee/Mariana.cs index 1565d91d03..ce2a27a42b 100644 --- a/Items/Weapons/Melee/Mariana.cs +++ b/Items/Weapons/Melee/Mariana.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Melee } value15.Normalize(); value15 *= Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI, 0f, 0f); } for (int num621 = 0; num621 < 30; num621++) { @@ -89,7 +89,7 @@ namespace CalamityMod.Items.Weapons.Melee } value15.Normalize(); value15 *= Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI, 0f, 0f); } for (int num621 = 0; num621 < 30; num621++) { diff --git a/Items/Weapons/Melee/NightsStabber.cs b/Items/Weapons/Melee/NightsStabber.cs index daf13011be..1695a8ef1b 100644 --- a/Items/Weapons/Melee/NightsStabber.cs +++ b/Items/Weapons/Melee/NightsStabber.cs @@ -49,13 +49,13 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, Main.myPlayer); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { var source = player.GetProjectileSource_Item(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, Main.myPlayer); } } } diff --git a/Items/Weapons/Melee/SoulHarvester.cs b/Items/Weapons/Melee/SoulHarvester.cs index 06220fa637..005cf0c42f 100644 --- a/Items/Weapons/Melee/SoulHarvester.cs +++ b/Items/Weapons/Melee/SoulHarvester.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Melee if (target.life <= (target.lifeMax * 0.15f)) { SoundEngine.PlaySound(SoundID.Item14, target.position); - player.ApplyDamageToNPC(target, (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), 0f, 0, false); + player.ApplyDamageToNPC(target, (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), 0f, 0, false); for (int num621 = 0; num621 < 10; num621++) { int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); diff --git a/Items/Weapons/Melee/Terracotta.cs b/Items/Weapons/Melee/Terracotta.cs index 9dc396ffae..20162cff9e 100644 --- a/Items/Weapons/Melee/Terracotta.cs +++ b/Items/Weapons/Melee/Terracotta.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Melee Projectile.NewProjectile(source, target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType(), 0, 0f, player.whoAmI, player.whoAmI); Projectile.NewProjectile(source, target.Center.X, target.Center.Y, 0f, -randomSpeedY, ModContent.ProjectileType(), 0, 0f, player.whoAmI, player.whoAmI); } - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), knockback, player.whoAmI); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Melee Projectile.NewProjectile(source, target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType(), 0, 0f, player.whoAmI, player.whoAmI); Projectile.NewProjectile(source, target.Center.X, target.Center.Y, 0f, -randomSpeedY, ModContent.ProjectileType(), 0, 0f, player.whoAmI, player.whoAmI); } - Projectile.NewProjectile(source, target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI); + Projectile.NewProjectile(source, target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), Item.knockBack, player.whoAmI); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Melee/TheEnforcer.cs b/Items/Weapons/Melee/TheEnforcer.cs index f2f6b8631f..4563b8fb1c 100644 --- a/Items/Weapons/Melee/TheEnforcer.cs +++ b/Items/Weapons/Melee/TheEnforcer.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee } num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); num80 = num72 / num80; - Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f) * 0.25f), 0f, i, 0f, Main.rand.Next(3)); + Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f) * 0.25f), 0f, i, 0f, Main.rand.Next(3)); } } @@ -136,7 +136,7 @@ namespace CalamityMod.Items.Weapons.Melee } num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); num80 = num72 / num80; - Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f) * 0.25f), 0f, i, 0f, Main.rand.Next(3)); + Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType(), (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f) * 0.25f), 0f, i, 0f, Main.rand.Next(3)); } } diff --git a/Items/Weapons/Melee/UltimusCleaver.cs b/Items/Weapons/Melee/UltimusCleaver.cs index 6044aee253..63a1041ed8 100644 --- a/Items/Weapons/Melee/UltimusCleaver.cs +++ b/Items/Weapons/Melee/UltimusCleaver.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.OnFire, 360); - player.ApplyDamageToNPC(target, (int)(Item.damage * (player.allDamage + player.GetDamage(DamageClass.Melee) - 1f)), 0f, 0, false); + player.ApplyDamageToNPC(target, (int)(Item.damage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f)), 0f, 0, false); float num50 = 1.7f; float num51 = 0.8f; float num52 = 2f; diff --git a/Items/Weapons/Rogue/RogueWeapon.cs b/Items/Weapons/Rogue/RogueWeapon.cs index 16410a50a7..9d1a7334df 100644 --- a/Items/Weapons/Rogue/RogueWeapon.cs +++ b/Items/Weapons/Rogue/RogueWeapon.cs @@ -138,7 +138,7 @@ namespace CalamityMod.Items.Weapons.Rogue string restOfTooltip = text.Substring(damageNumberSubstringIndex); int damageWithStealth = int.Parse(text.Substring(0, damageNumberSubstringIndex)); - int damageWithoutStealth = (int)(Item.damage * (p.allDamage + p.GetDamage(DamageClass.Throwing) + mp.throwingDamage - 2f)); + int damageWithoutStealth = (int)(Item.damage * (p.GetDamage() + p.GetDamage(DamageClass.Throwing) + mp.throwingDamage - 2f)); text = damageWithoutStealth + restOfTooltip + " : " + damageWithStealth + " stealth strike damage"; } } diff --git a/Items/Weapons/Typeless/EyeofMagnus.cs b/Items/Weapons/Typeless/EyeofMagnus.cs index bb06a2db53..212f742a8b 100644 --- a/Items/Weapons/Typeless/EyeofMagnus.cs +++ b/Items/Weapons/Typeless/EyeofMagnus.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Typeless // Eye of Magnus scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts). public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { - float formula = 5f * (player.allDamage - 1f); + float formula = 5f * (player.GetDamage() - 1f); formula += player.GetDamage(DamageClass.Melee) - 1f; formula += player.GetDamage(DamageClass.Ranged) - 1f; formula += player.GetDamage(DamageClass.Magic) - 1f; diff --git a/Items/Weapons/Typeless/LunicEye.cs b/Items/Weapons/Typeless/LunicEye.cs index 600fbe5bf5..1fdc00c1b9 100644 --- a/Items/Weapons/Typeless/LunicEye.cs +++ b/Items/Weapons/Typeless/LunicEye.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Typeless // Lunic Eye scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts). public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { - float formula = 5f * (player.allDamage - 1f); + float formula = 5f * (player.GetDamage() - 1f); formula += player.GetDamage(DamageClass.Melee) - 1f; formula += player.GetDamage(DamageClass.Ranged) - 1f; formula += player.GetDamage(DamageClass.Magic) - 1f; diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs deleted file mode 100644 index b53e21d6d3..0000000000 --- a/Prefixes/AccessoryPrefix.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System.Collections.Generic; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Prefixes -{ - public class AccessoryPrefix : ModPrefix - { - //Thank you Thomas for helping me set this up =D - internal static List AccessoryModifiers; - internal float stealthGenBonus = 1f; - - public override PrefixCategory Category => PrefixCategory.Accessory; - - public AccessoryPrefix() - { - - } - - public AccessoryPrefix(float stealthGenBonus = 1f) - { - this.stealthGenBonus = stealthGenBonus; - } - - public override bool Autoload(ref string name) - { - if (base.Autoload(ref name)) - { - AccessoryModifiers = new List(); - AddAccessoryPrefix(Mod, AccPrefixType.Quiet, 1.02f); - AddAccessoryPrefix(Mod, AccPrefixType.Cloaked, 1.04f); - AddAccessoryPrefix(Mod, AccPrefixType.Camouflaged, 1.06f); - AddAccessoryPrefix(Mod, AccPrefixType.Silent, 1.08f); - } - return false; - } - - public override void Apply(Item item) - { - item.Calamity().StealthGenBonus = stealthGenBonus; - } - - public override void ModifyValue(ref float valueMult) - { - float extraValue = 1f + (2.5f * (stealthGenBonus - 1f)); - valueMult *= extraValue; - } - - public override float RollChance(Item item) - { - if (item.vanity) - return 0f; - if (item.type == ItemID.GuideVoodooDoll || item.type == ItemID.MusicBox || item.type == ItemID.ClothierVoodooDoll) - return 0f; - if (item.type >= ItemID.MusicBoxOverworldDay && item.type <= ItemID.MusicBoxBoss3) - return 0f; - if (item.type >= ItemID.MusicBoxSnow && item.type <= ItemID.MusicBoxMushrooms) - return 0f; - - return 1f; - } - - private static void AddAccessoryPrefix(Mod mod, AccPrefixType prefixType, float stealthGenBonus = 1f) - { - string name = prefixType.ToString(); - mod.AddPrefix(name, new AccessoryPrefix(stealthGenBonus)); - AccessoryModifiers.Add(mod.GetPrefix(name).Type); - } - } - - public enum AccPrefixType : byte - { - Quiet, - Cloaked, - Camouflaged, - Silent - } -} diff --git a/Prefixes/RogueAccessoryPrefix.cs b/Prefixes/RogueAccessoryPrefix.cs new file mode 100644 index 0000000000..45b96486d5 --- /dev/null +++ b/Prefixes/RogueAccessoryPrefix.cs @@ -0,0 +1,65 @@ +using System.Collections.Generic; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Prefixes +{ + public class QuietPrefix : RogueAccessoryPrefix + { + public QuietPrefix() : base(1.02f) { } + } + + public class CloakedPrefix : RogueAccessoryPrefix + { + public CloakedPrefix() : base(1.04f) { } + } + + public class CamouflagedPrefix : RogueAccessoryPrefix + { + public CamouflagedPrefix() : base(1.06f) { } + } + + public class SilentPrefix : RogueAccessoryPrefix + { + public SilentPrefix() : base(1.08f) { } + } + + public class RogueAccessoryPrefix : ModPrefix + { + internal float stealthGenBonus = 1f; + public override PrefixCategory Category => PrefixCategory.Accessory; + + public RogueAccessoryPrefix() { } + + public RogueAccessoryPrefix(float stealthGenBonus = 1f) + { + this.stealthGenBonus = stealthGenBonus; + } + + public override void Apply(Item item) + { + item.Calamity().StealthGenBonus = stealthGenBonus; + } + + public override void ModifyValue(ref float valueMult) + { + float extraValue = 1f + (2.5f * (stealthGenBonus - 1f)); + valueMult *= extraValue; + } + + public override float RollChance(Item item) + { + if (item.vanity) + return 0f; + if (item.type == ItemID.GuideVoodooDoll || item.type == ItemID.MusicBox || item.type == ItemID.ClothierVoodooDoll) + return 0f; + if (item.type >= ItemID.MusicBoxOverworldDay && item.type <= ItemID.MusicBoxBoss3) + return 0f; + if (item.type >= ItemID.MusicBoxSnow && item.type <= ItemID.MusicBoxMushrooms) + return 0f; + + return 1f; + } + } +} diff --git a/Prefixes/RoguePrefix.cs b/Prefixes/RoguePrefix.cs deleted file mode 100644 index 6f58223663..0000000000 --- a/Prefixes/RoguePrefix.cs +++ /dev/null @@ -1,112 +0,0 @@ -using CalamityMod.Items.Weapons.Rogue; -using System.Collections.Generic; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Prefixes -{ - public class RoguePrefix : ModPrefix - { - //Thank you Thomas for helping me set this up =D - internal static List RogueModifiers; - internal float damageMult = 1f; - internal float useTimeMult = 1f; - internal int critBonus = 0; - internal float shootSpeedMult = 1f; - internal float stealthDmgMult = 1f; - - public override PrefixCategory Category => PrefixCategory.Custom; - - public RoguePrefix() - { - - } - - public RoguePrefix(float damageMult = 1f, float useTimeMult = 1f, int critBonus = 0, float shootSpeedMult = 1f, float stealthDmgMult = 1f) - { - this.damageMult = damageMult; - this.useTimeMult = useTimeMult; - this.critBonus = critBonus; - this.shootSpeedMult = shootSpeedMult; - this.stealthDmgMult = stealthDmgMult; - } - - public override bool Autoload(ref string name) - { - if (base.Autoload(ref name)) - { - //Damage, Use Time, Crit, Velocity, SS Dmg - RogueModifiers = new List(); - AddRoguePrefix(Mod, RoguePrefixType.Pointy, 1.1f, 1f, 0, 1f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Sharp, 1.15f, 1f, 0, 1f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Feathered, 1f, 0.85f, 0, 1.1f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Sleek, 1f, 0.9f, 0, 1.15f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Hefty, 1.1f, 1f, 0, 1f, 1.15f); - AddRoguePrefix(Mod, RoguePrefixType.Mighty, 1.15f, 1f, 0, 1f, 1.05f); - AddRoguePrefix(Mod, RoguePrefixType.Glorious, 1.1f, 0.95f, 0, 1f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Serrated, 1.1f, 0.9f, 0, 1.05f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Vicious, 1.1f, 0.95f, 0, 1.15f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Lethal, 1.1f, 0.95f, 2, 1.05f, 1.05f); - AddRoguePrefix(Mod, RoguePrefixType.Flawless, 1.15f, 0.9f, 5, 1.1f, 1.15f); - AddRoguePrefix(Mod, RoguePrefixType.Radical, 1.05f, 0.95f, 0, 1.05f, 0.9f); - AddRoguePrefix(Mod, RoguePrefixType.Blunt, 0.85f, 1f, 0, 1f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Flimsy, 0.9f, 1f, 0, 1f, 0.9f); - AddRoguePrefix(Mod, RoguePrefixType.Unbalanced, 1f, 1.15f, 0, 0.95f, 1f); - AddRoguePrefix(Mod, RoguePrefixType.Atrocious, 0.85f, 1f, 0, 0.9f, 0.9f); - } - return false; - } - - public override void Apply(Item item) - { - ModItem moddedItem = item.modItem; - if (moddedItem != null && moddedItem is RogueWeapon rogueWep) - { - rogueWep.StealthStrikePrefixBonus = stealthDmgMult; - } - } - - public override void ModifyValue(ref float valueMult) - { - float extraValue = 1f + (1f * (stealthDmgMult - 1f)); - valueMult *= extraValue; - } - - public override bool CanRoll(Item item) => item.Calamity().rogue && item.maxStack == 1; - - public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus) - { - damageMult = this.damageMult; - useTimeMult = this.useTimeMult; - critBonus = this.critBonus; - shootSpeedMult = this.shootSpeedMult; - } - - private static void AddRoguePrefix(Mod mod, RoguePrefixType prefixType, float damageMult = 1f, float useTimeMult = 1f, int critBonus = 0, float shootSpeedMult = 1f, float stealthDmgMult = 1f) - { - string name = prefixType.ToString(); - mod.AddPrefix(name, new RoguePrefix(damageMult, useTimeMult, critBonus, shootSpeedMult, stealthDmgMult)); - RogueModifiers.Add(mod.GetPrefix(name).Type); - } - } - - public enum RoguePrefixType : byte - { - Pointy, - Sharp, - Feathered, - Sleek, - Hefty, - Mighty, - Glorious, - Serrated, - Vicious, - Lethal, - Flawless, - Radical, - Blunt, - Flimsy, - Unbalanced, - Atrocious - } -} diff --git a/Prefixes/RogueWeaponPrefix.cs b/Prefixes/RogueWeaponPrefix.cs new file mode 100644 index 0000000000..dd6788bb41 --- /dev/null +++ b/Prefixes/RogueWeaponPrefix.cs @@ -0,0 +1,158 @@ +using CalamityMod.Items.Weapons.Rogue; +using System.Collections.Generic; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Prefixes +{ + public enum RoguePrefixType : byte + { + Pointy, + Sharp, + Feathered, + Sleek, + Hefty, + Mighty, + Glorious, + Serrated, + Vicious, + Lethal, + Flawless, + Radical, + Blunt, + Flimsy, + Unbalanced, + Atrocious + } + + public class PointyWeaponPrefix : RogueWeaponPrefix + { + public PointyWeaponPrefix() : base(1.1f, 1f, 0, 1f, 1f) { } + } + + public class SharpWeaponPrefix : RogueWeaponPrefix + { + public SharpWeaponPrefix() : base(1.15f, 1f, 0, 1f, 1f) { } + } + + public class FeatheredWeaponPrefix : RogueWeaponPrefix + { + public FeatheredWeaponPrefix() : base(1f, 0.85f, 0, 1.1f, 1f) { } + } + + public class SleekWeaponPrefix : RogueWeaponPrefix + { + public SleekWeaponPrefix() : base(1f, 0.9f, 0, 1.15f, 1f) { } + } + + public class HeftyWeaponPrefix : RogueWeaponPrefix + { + public HeftyWeaponPrefix() : base(1.1f, 1f, 0, 1f, 1.15f) { } + } + + public class MightyWeaponPrefix : RogueWeaponPrefix + { + public MightyWeaponPrefix() : base(1.15f, 1f, 0, 1f, 1.05f) { } + } + + public class GloriousWeaponPrefix : RogueWeaponPrefix + { + public GloriousWeaponPrefix() : base(1.1f, 0.95f, 0, 1f, 1f) { } + } + + public class SerratedWeaponPrefix : RogueWeaponPrefix + { + public SerratedWeaponPrefix() : base(1.1f, 0.9f, 0, 1.05f, 1f) { } + } + + public class ViciousWeaponPrefix : RogueWeaponPrefix + { + public ViciousWeaponPrefix() : base(1.1f, 0.95f, 0, 1.15f, 1f) { } + } + + public class LethalWeaponPrefix : RogueWeaponPrefix + { + public LethalWeaponPrefix() : base(1.1f, 0.95f, 2, 1.05f, 1.05f) { } + } + + public class FlawlessWeaponPrefix : RogueWeaponPrefix + { + public FlawlessWeaponPrefix() : base(1.15f, 0.9f, 5, 1.1f, 1.15f) { } + } + + public class RadicalWeaponPrefix : RogueWeaponPrefix + { + public RadicalWeaponPrefix() : base(1.05f, 0.95f, 0, 1.05f, 0.9f) { } + } + + public class BluntWeaponPrefix : RogueWeaponPrefix + { + public BluntWeaponPrefix() : base(0.85f, 1f, 0, 1f, 1f) { } + } + + public class FlimsyWeaponPrefix : RogueWeaponPrefix + { + public FlimsyWeaponPrefix() : base(0.9f, 1f, 0, 1f, 0.9f) { } + } + + public class UnbalancedWeaponPrefix : RogueWeaponPrefix + { + public UnbalancedWeaponPrefix() : base(1f, 1.15f, 0, 0.95f, 1f) { } + } + + public class AtrociousWeaponPrefix : RogueWeaponPrefix + { + public AtrociousWeaponPrefix() : base(0.85f, 1f, 0, 0.9f, 0.9f) { } + } + + public class RogueWeaponPrefix : ModPrefix + { + //Thank you Thomas for helping me set this up =D + internal float damageMult = 1f; + internal float useTimeMult = 1f; + internal int critBonus = 0; + internal float shootSpeedMult = 1f; + internal float stealthDmgMult = 1f; + + public override PrefixCategory Category => PrefixCategory.Custom; + + public RogueWeaponPrefix() + { + + } + + public RogueWeaponPrefix(float damageMult = 1f, float useTimeMult = 1f, int critBonus = 0, float shootSpeedMult = 1f, float stealthDmgMult = 1f) + { + this.damageMult = damageMult; + this.useTimeMult = useTimeMult; + this.critBonus = critBonus; + this.shootSpeedMult = shootSpeedMult; + this.stealthDmgMult = stealthDmgMult; + } + + public override void Apply(Item item) + { + ModItem moddedItem = item.ModItem; + if (moddedItem != null && moddedItem is RogueWeapon rogueWep) + { + rogueWep.StealthStrikePrefixBonus = stealthDmgMult; + } + } + + public override void ModifyValue(ref float valueMult) + { + float extraValue = 1f + (1f * (stealthDmgMult - 1f)); + valueMult *= extraValue; + } + + public override bool CanRoll(Item item) => item.Calamity().rogue && item.maxStack == 1; + + public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus) + { + damageMult = this.damageMult; + useTimeMult = this.useTimeMult; + critBonus = this.critBonus; + shootSpeedMult = this.shootSpeedMult; + } + } +} diff --git a/Projectiles/Magic/SparkInfernal.cs b/Projectiles/Magic/SparkInfernal.cs index 49e195a988..a8c29917b9 100644 --- a/Projectiles/Magic/SparkInfernal.cs +++ b/Projectiles/Magic/SparkInfernal.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic public override void Kill(int timeLeft) { Player player = Main.player[Projectile.owner]; - Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(TheWand.BaseDamage * (player.allDamage + player.GetDamage(DamageClass.Magic) - 1f)), Projectile.knockBack, Projectile.owner, 0f, 0f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(TheWand.BaseDamage * (player.GetDamage().Additive + player.GetDamage(DamageClass.Magic) - 1f)), Projectile.knockBack, Projectile.owner, 0f, 0f); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/TileEntities/TEDraedonLabTurret.cs b/TileEntities/TEDraedonLabTurret.cs index dba1be5b6b..70d2c29c30 100644 --- a/TileEntities/TEDraedonLabTurret.cs +++ b/TileEntities/TEDraedonLabTurret.cs @@ -49,9 +49,9 @@ namespace CalamityMod.TileEntities // Lab turrets specifically must be placed on the top left corner of their host tile. // This restriction is not shared by general turrets for flexibility reasons. - public override bool ValidTile(int i, int j) + public override bool IsTileValidForEntity(int x, int y) { - Tile tile = Main.tile[i, j]; + Tile tile = Main.tile[x, y]; return tile.HasTile && tile.TileType == TileType && tile.TileFrameX == 0 && tile.TileFrameY == 0; } diff --git a/Tiles/Astral/AstralNormalLargePiles.cs b/Tiles/Astral/AstralNormalLargePiles.cs index 698e82f30c..0a4f6600b6 100644 --- a/Tiles/Astral/AstralNormalLargePiles.cs +++ b/Tiles/Astral/AstralNormalLargePiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -22,10 +22,10 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralDesert/AstralDesertLargePiles.cs b/Tiles/AstralDesert/AstralDesertLargePiles.cs index fe1935b8b1..789a696886 100644 --- a/Tiles/AstralDesert/AstralDesertLargePiles.cs +++ b/Tiles/AstralDesert/AstralDesertLargePiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -22,10 +22,10 @@ namespace CalamityMod.Tiles.AstralDesert AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralDesert/AstralDesertMediumPiles.cs b/Tiles/AstralDesert/AstralDesertMediumPiles.cs index 7bf12b87be..175eed49ee 100644 --- a/Tiles/AstralDesert/AstralDesertMediumPiles.cs +++ b/Tiles/AstralDesert/AstralDesertMediumPiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -22,10 +22,10 @@ namespace CalamityMod.Tiles.AstralDesert AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralDesert/AstralDesertSmallPiles.cs b/Tiles/AstralDesert/AstralDesertSmallPiles.cs index 263d1d670e..ce5d98155d 100644 --- a/Tiles/AstralDesert/AstralDesertSmallPiles.cs +++ b/Tiles/AstralDesert/AstralDesertSmallPiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -17,10 +17,10 @@ namespace CalamityMod.Tiles.AstralDesert DustType = ModContent.DustType(); AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralDesert/AstralDesertStalactite.cs b/Tiles/AstralDesert/AstralDesertStalactite.cs index 456283eaea..a242500ccd 100644 --- a/Tiles/AstralDesert/AstralDesertStalactite.cs +++ b/Tiles/AstralDesert/AstralDesertStalactite.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.AstralDesert AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) @@ -28,7 +28,7 @@ namespace CalamityMod.Tiles.AstralDesert return false; } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { Tile tile = Main.tile[i, j]; if (tile.TileFrameY <= 18 || tile.TileFrameY == 72) diff --git a/Tiles/AstralSnow/AstralIceLargePiles.cs b/Tiles/AstralSnow/AstralIceLargePiles.cs index 48ad9eb42f..52c63077db 100644 --- a/Tiles/AstralSnow/AstralIceLargePiles.cs +++ b/Tiles/AstralSnow/AstralIceLargePiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -22,10 +22,10 @@ namespace CalamityMod.Tiles.AstralSnow AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralSnow/AstralIceMediumPiles.cs b/Tiles/AstralSnow/AstralIceMediumPiles.cs index 42c70666e6..536e1e0402 100644 --- a/Tiles/AstralSnow/AstralIceMediumPiles.cs +++ b/Tiles/AstralSnow/AstralIceMediumPiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -22,10 +22,10 @@ namespace CalamityMod.Tiles.AstralSnow AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralSnow/AstralIceSmallPiles.cs b/Tiles/AstralSnow/AstralIceSmallPiles.cs index 8c80ab41e5..0f35bf2d49 100644 --- a/Tiles/AstralSnow/AstralIceSmallPiles.cs +++ b/Tiles/AstralSnow/AstralIceSmallPiles.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -17,10 +17,10 @@ namespace CalamityMod.Tiles.AstralSnow DustType = ModContent.DustType(); AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { offsetY = 2; } diff --git a/Tiles/AstralSnow/AstralIceStalactite.cs b/Tiles/AstralSnow/AstralIceStalactite.cs index cc35db9653..e5e04ea9b9 100644 --- a/Tiles/AstralSnow/AstralIceStalactite.cs +++ b/Tiles/AstralSnow/AstralIceStalactite.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -18,10 +18,10 @@ namespace CalamityMod.Tiles.AstralSnow DustType = ModContent.DustType(); AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } - public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) { Tile tile = Main.tile[i, j]; if (tile.TileFrameY <= 18 || tile.TileFrameY == 72) diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index c18cbd9a40..61b1e5a1f9 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -15,13 +15,13 @@ namespace CalamityMod { #region Damage // These functions factor in TML 0.11 allDamage to get the player's total damage boost which affects the specified class. - public static float MeleeDamage(this Player player) => player.allDamage + player.GetDamage(DamageClass.Melee) - 1f; - public static float RangedDamage(this Player player) => player.allDamage + player.GetDamage(DamageClass.Ranged) - 1f; - public static float MagicDamage(this Player player) => player.allDamage + player.GetDamage(DamageClass.Magic) - 1f; - public static float MinionDamage(this Player player) => player.allDamage + player.GetDamage(DamageClass.Summon) - 1f; - public static float ThrownDamage(this Player player) => player.allDamage + player.GetDamage(DamageClass.Throwing) - 1f; - public static float RogueDamage(this Player player) => player.allDamage + player.GetDamage(DamageClass.Throwing) + player.Calamity().throwingDamage - 2f; - public static float AverageDamage(this Player player) => player.allDamage + (player.GetDamage(DamageClass.Melee) + player.GetDamage(DamageClass.Ranged) + player.GetDamage(DamageClass.Magic) + player.GetDamage(DamageClass.Summon) + player.Calamity().throwingDamage - 5f) / 5f; + public static float MeleeDamage(this Player player) => player.GetDamage().Additive + player.GetDamage(DamageClass.Melee) - 1f; + public static float RangedDamage(this Player player) => player.GetDamage().Additive + player.GetDamage(DamageClass.Ranged) - 1f; + public static float MagicDamage(this Player player) => player.GetDamage().Additive + player.GetDamage(DamageClass.Magic) - 1f; + public static float MinionDamage(this Player player) => player.GetDamage().Additive + player.GetDamage(DamageClass.Summon) - 1f; + public static float ThrownDamage(this Player player) => player.GetDamage().Additive + player.GetDamage(DamageClass.Throwing) - 1f; + public static float RogueDamage(this Player player) => player.GetDamage().Additive + player.GetDamage(DamageClass.Throwing) + player.Calamity().throwingDamage - 2f; + public static float AverageDamage(this Player player) => player.GetDamage() + (player.GetDamage(DamageClass.Melee) + player.GetDamage(DamageClass.Ranged) + player.GetDamage(DamageClass.Magic) + player.GetDamage(DamageClass.Summon) + player.Calamity().throwingDamage - 5f) / 5f; #endregion public static bool StandingStill(this Player player, float velocity = 0.05f) => player.velocity.Length() < velocity; From 18571b6493e970f8880e416fe1ec23a17a5130ba Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 16:36:28 -0500 Subject: [PATCH 05/14] Bunch of misc things. Rogue projs are 100% clean --- Events/AcidRainEvent.cs | 22 ++--- ILEditing/MechanicILChanges.cs | 38 ++++----- Items/Accessories/ProfanedSoulCrystal.cs | 51 +++++------ Items/Accessories/Wings/MOAB.cs | 10 +-- Items/Armor/Vanity/ArtemisMask.cs | 8 +- Items/Tools/ClimateChange/TorrentialTear.cs | 8 +- NPCs/ExoMechs/Artemis/Artemis.cs | 14 ++-- NPCs/NormalNPCs/ArmoredDiggerBody.cs | 4 +- NPCs/NormalNPCs/ArmoredDiggerHead.cs | 4 +- NPCs/NormalNPCs/ArmoredDiggerTail.cs | 4 +- .../Damageable/DamageableProjectile.cs | 4 +- Projectiles/Magic/AcidicReed.cs | 16 ++-- Projectiles/Magic/ApotheosisWorm.cs | 12 +-- Projectiles/Magic/ArtAttackStar.cs | 2 +- Projectiles/Magic/AsteroidMolten.cs | 22 ++--- Projectiles/Magic/BeamingBolt2.cs | 4 +- Projectiles/Magic/CryoBlast.cs | 2 +- Projectiles/Magic/DarkSparkBeam.cs | 6 +- Projectiles/Magic/DarkSparkPrism.cs | 8 +- Projectiles/Magic/DeathhailBeam.cs | 8 +- Projectiles/Magic/EnormousConsumingVortex.cs | 2 +- Projectiles/Magic/EternityCrystal.cs | 2 +- Projectiles/Magic/EternityHex.cs | 2 +- Projectiles/Magic/EventHorizonStar.cs | 4 - Projectiles/Magic/FabBolt.cs | 2 +- Projectiles/Magic/FabRay.cs | 2 +- Projectiles/Magic/GhastlyBlast.cs | 10 +-- Projectiles/Magic/GhastlyVisageProj.cs | 2 +- Projectiles/Magic/GranitePulse.cs | 3 - Projectiles/Magic/IceBlockIcicle.cs | 4 +- Projectiles/Magic/InfernalBlade.cs | 4 +- Projectiles/Magic/InfernalBlade2.cs | 4 +- Projectiles/Magic/LiquidBlade.cs | 4 +- Projectiles/Magic/LiquidBlade2.cs | 4 +- Projectiles/Magic/MelterAmp.cs | 2 +- Projectiles/Magic/NebulaElementalBeam.cs | 14 ++-- Projectiles/Magic/PartySparkle.cs | 2 +- Projectiles/Magic/RainbowComet.cs | 2 +- Projectiles/Magic/RainbowRocket.cs | 2 +- Projectiles/Magic/RancorLaserbeam.cs | 2 +- Projectiles/Magic/RancorMagicCircle.cs | 2 +- Projectiles/Melee/CometQuasherMeteor.cs | 6 +- Projectiles/Ranged/AstralSandgun.cs | 1 - Projectiles/Ranged/BigNuke.cs | 4 +- Projectiles/Ranged/BouncingShotgunPellet.cs | 4 +- Projectiles/Ranged/MortarRoundProj.cs | 6 +- Projectiles/Ranged/NapalmArrowProj.cs | 8 +- Projectiles/Ranged/RealmRavagerBullet.cs | 4 +- Projectiles/Ranged/RocketFire.cs | 4 +- Projectiles/Ranged/RubberMortarRoundProj.cs | 6 +- Projectiles/Ranged/SeaDragonRocket.cs | 8 +- Projectiles/Ranged/SparkSpreaderFire.cs | 2 +- .../Rogue/AdamantiteThrowingAxeProjectile.cs | 2 +- Projectiles/Rogue/AlphaVirusProjectile.cs | 2 +- Projectiles/Rogue/AntumbraShardProjectile.cs | 2 +- Projectiles/Rogue/ApoctolithProj.cs | 2 +- Projectiles/Rogue/BallisticPoisonBombProj.cs | 4 +- Projectiles/Rogue/BlunderBoosterLightning.cs | 6 +- Projectiles/Rogue/Brick.cs | 2 +- Projectiles/Rogue/CobaltKunaiProjectile.cs | 2 +- Projectiles/Rogue/CraniumSmasherStealth.cs | 2 +- Projectiles/Rogue/CrystalPiercerProjectile.cs | 2 +- Projectiles/Rogue/EradicatorProjectile.cs | 2 +- Projectiles/Rogue/ExecutionersBladeProj.cs | 2 +- .../Rogue/ExecutionersBladeStealthProj.cs | 4 +- Projectiles/Rogue/ExplosiveSun.cs | 6 +- Projectiles/Rogue/FeatherKnifeProjectile.cs | 2 +- Projectiles/Rogue/FinalDawnFireSlash.cs | 4 +- Projectiles/Rogue/FinalDawnHorizontalSlash.cs | 2 +- Projectiles/Rogue/FinalDawnProjectile.cs | 2 +- Projectiles/Rogue/FinalDawnReticle.cs | 2 +- Projectiles/Rogue/FinalDawnThrow.cs | 4 +- Projectiles/Rogue/GelDartProjectile.cs | 2 +- Projectiles/Rogue/GhoulishGougerBoomerang.cs | 2 +- Projectiles/Rogue/Honeycomb.cs | 2 +- Projectiles/Rogue/HoneycombFragment.cs | 6 +- Projectiles/Rogue/HypothermiaShard.cs | 8 +- Projectiles/Rogue/InfernalKrisProjectile.cs | 2 +- Projectiles/Rogue/IronFranciscaProj.cs | 4 +- Projectiles/Rogue/LeadTomahawkProj.cs | 4 +- Projectiles/Rogue/LeonidCometBig.cs | 8 +- Projectiles/Rogue/LeonidCometSmall.cs | 2 +- .../Rogue/LeonidProgenitorBombshell.cs | 2 +- Projectiles/Rogue/LeviathanTooth.cs | 6 +- Projectiles/Rogue/LionfishProj.cs | 2 +- Projectiles/Rogue/MetalShard.cs | 8 +- Projectiles/Rogue/MonkeyDart.cs | 3 +- Projectiles/Rogue/MoonSigil.cs | 4 +- Projectiles/Rogue/MythrilKnifeProjectile.cs | 2 +- Projectiles/Rogue/NanoblackStealthSplit.cs | 3 +- Projectiles/Rogue/NightsGazeProjectile.cs | 2 +- Projectiles/Rogue/NychthemeronOrb.cs | 4 +- .../OrichalcumSpikedGemstoneProjectile.cs | 2 +- .../Rogue/PalladiumJavelinProjectile.cs | 2 +- Projectiles/Rogue/PanSpark.cs | 4 +- Projectiles/Rogue/PlaguenadeBee.cs | 4 +- Projectiles/Rogue/PlaguenadeProj.cs | 2 +- .../Rogue/RefractionRotorProjectile.cs | 2 +- Projectiles/Rogue/RotBallProjectile.cs | 2 +- Projectiles/Rogue/ScarletDevilProjectile.cs | 4 +- Projectiles/Rogue/SealedSingularityGore.cs | 6 +- Projectiles/Rogue/SearedPanProjectile.cs | 6 +- Projectiles/Rogue/SeraphimBeamLarge.cs | 6 +- Projectiles/Rogue/SupernovaBomb.cs | 4 +- Projectiles/Rogue/TotalityFire.cs | 4 +- Projectiles/Rogue/TotalityFlask.cs | 4 +- Projectiles/Rogue/TotalityTar.cs | 4 +- Projectiles/Summon/BlackHawkSummon.cs | 8 +- Projectiles/Summon/BloodClotMinion.cs | 46 +--------- Projectiles/Summon/ColdDivinityPointyThing.cs | 6 +- Projectiles/Summon/CorroslimeMinion.cs | 2 +- .../Summon/CorruptionSlimeGodMinion.cs | 2 +- Projectiles/Summon/CosmilampMinion.cs | 45 ++-------- Projectiles/Summon/DankCreeperMinion.cs | 41 +-------- .../Summon/DormantBrimseekerSummoner.cs | 4 +- Projectiles/Summon/GastricBelcher.cs | 2 +- Projectiles/Summon/GastricBelcherVomit.cs | 14 ++-- Projectiles/Summon/IgneousBlade.cs | 4 - Projectiles/Summon/SeekerSummonProj.cs | 2 +- Projectiles/Typeless/AeroExplosive.cs | 8 +- Projectiles/Typeless/AstralFallingSand.cs | 1 - Tiles/Abyss/AcidwoodTile.cs | 4 +- Tiles/Abyss/RustyChestTile.cs | 2 +- .../Abyss/Stalactite/SulphurousStalacmite1.cs | 4 +- .../Abyss/Stalactite/SulphurousStalacmite2.cs | 4 +- .../Abyss/Stalactite/SulphurousStalacmite3.cs | 4 +- .../Abyss/Stalactite/SulphurousStalacmite4.cs | 4 +- .../Abyss/Stalactite/SulphurousStalacmite5.cs | 4 +- .../Abyss/Stalactite/SulphurousStalacmite6.cs | 2 +- .../Abyss/Stalactite/SulphurousStalactite1.cs | 2 +- .../Abyss/Stalactite/SulphurousStalactite2.cs | 2 +- .../Abyss/Stalactite/SulphurousStalactite3.cs | 2 +- .../Abyss/Stalactite/SulphurousStalactite4.cs | 2 +- .../Abyss/Stalactite/SulphurousStalactite5.cs | 2 +- .../Abyss/Stalactite/SulphurousStalactite6.cs | 2 +- Tiles/Abyss/SteamGeyser.cs | 2 +- Tiles/Abyss/SulphurousColumn.cs | 2 +- Tiles/Abyss/SulphurousRib1.cs | 2 +- Tiles/Abyss/SulphurousRib2.cs | 2 +- Tiles/Abyss/SulphurousRib3.cs | 2 +- Tiles/Abyss/SulphurousRib4.cs | 2 +- Tiles/Abyss/SulphurousRib5.cs | 2 +- Tiles/Astral/AstralChestLocked.cs | 2 +- Tiles/Astral/AstralMonolith.cs | 16 ++-- Tiles/Astral/AstralNormalMediumPiles.cs | 2 +- Tiles/Astral/AstralNormalSmallPiles.cs | 2 +- Tiles/Astral/AstralNormalStalactite.cs | 2 +- Tiles/Astral/AstralShortPlants.cs | 2 +- Tiles/Astral/AstralTallPlants.cs | 2 +- .../AgedSecurityChestTile.cs | 2 +- Tiles/DraedonStructures/SecurityChestTile.cs | 2 +- Tiles/Furniture/BabyGhostBellJarTile.cs | 2 +- .../CraftingStations/AncientAltar.cs | 2 +- .../Furniture/CraftingStations/AshenAltar.cs | 2 +- .../Furniture/Fountains/AbyssFountainTile.cs | 7 +- Tiles/Furniture/SeaMinnowJarTile.cs | 2 +- Tiles/Furniture/TwinklerInABottleTile.cs | 2 +- Tiles/FurnitureAbyss/AbyssChest.cs | 4 +- Tiles/FurnitureAbyss/AbyssClock.cs | 4 +- Tiles/FurnitureAcidwood/AcidwoodChestTile.cs | 2 +- Tiles/FurnitureAcidwood/AcidwoodClockTile.cs | 2 +- Tiles/FurnitureAncient/AncientBasin.cs | 4 +- Tiles/FurnitureAncient/AncientMonolith.cs | 4 +- Tiles/FurnitureAshen/AshenCandelabra.cs | 6 +- Tiles/FurnitureAshen/AshenCandle.cs | 7 +- Tiles/FurnitureAshen/AshenChandelier.cs | 6 +- Tiles/FurnitureAshen/AshenChest.cs | 4 +- Tiles/FurnitureAshen/AshenMonolith.cs | 2 +- Tiles/FurnitureAshen/AshenSlab.cs | 14 ++-- Tiles/FurnitureAstral/MonolithChest.cs | 2 +- Tiles/FurnitureAstral/MonolithClock.cs | 2 +- Tiles/FurnitureBotanic/BotanicChest.cs | 2 +- Tiles/FurnitureBotanic/BotanicClock.cs | 2 +- .../FurnitureCosmilite/CosmiliteBasinTile.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteChest.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteClock.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicChest.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicClock.cs | 2 +- Tiles/FurnitureExo/ExoChestTile.cs | 2 +- Tiles/FurnitureExo/ExoClockTile.cs | 2 +- Tiles/FurnitureExo/ExoPlatingTile.cs | 6 +- Tiles/FurnitureExo/ExoPrismPanelTile.cs | 11 +-- Tiles/FurnitureExo/ExoPrismPlatformTile.cs | 9 +- Tiles/FurnitureExo/ExoScreenTile.cs | 2 +- Tiles/FurnitureOccult/OccultChest.cs | 2 +- Tiles/FurnitureOccult/OccultClock.cs | 2 +- .../PlaguedPlateChest.cs | 2 +- .../PlaguedPlateClock.cs | 2 +- .../PlaguedPlateDoorOpen.cs | 1 + Tiles/FurnitureProfaned/ProfanedChest.cs | 2 +- Tiles/FurnitureProfaned/ProfanedClock.cs | 2 +- Tiles/FurnitureProfaned/ProfanedSlab.cs | 4 +- Tiles/FurnitureProfaned/RunicProfanedBrick.cs | 6 +- Tiles/FurnitureSilva/SilvaChest.cs | 2 +- Tiles/FurnitureSilva/SilvaClock.cs | 2 +- Tiles/FurnitureStatigel/StatigelChest.cs | 2 +- Tiles/FurnitureStatigel/StatigelClock.cs | 2 +- Tiles/FurnitureStratus/StratusChest.cs | 2 +- Tiles/FurnitureStratus/StratusClock.cs | 2 +- Tiles/FurnitureVoid/VoidChest.cs | 2 +- Tiles/FurnitureVoid/VoidClock.cs | 2 +- Tiles/FurnitureVoid/VoidstoneSlab.cs | 4 +- Tiles/Ores/ExodiumOre.cs | 2 +- Tiles/PerennialBrick.cs | 4 +- Tiles/SunkenSea/BrainCoral.cs | 2 +- Tiles/SunkenSea/FanCoral.cs | 2 +- Tiles/SunkenSea/SeaAnemone.cs | 2 +- Tiles/SunkenSea/SmallBrainCoral.cs | 2 +- Tiles/SunkenSea/SmallTubeCoral.cs | 2 +- Tiles/SunkenSea/SunkenSeaStalactite.cs | 2 +- Tiles/SunkenSea/TableCoral.cs | 2 +- Tiles/SunkenSea/TubeCoral.cs | 2 +- Utilities/FurnitureSetupUtils.cs | 22 ++--- Utilities/ItemUtils.cs | 8 +- Utilities/TileFraming.cs | 84 ++++++++----------- Utilities/TileUtils.cs | 20 +---- 216 files changed, 501 insertions(+), 658 deletions(-) diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index 46cb2ba2a3..20d8e9881e 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -1,4 +1,4 @@ -using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.OldDuke; using CalamityMod.Projectiles.Boss; using CalamityMod.World; @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; using System.Linq; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -163,10 +164,10 @@ namespace CalamityMod.Events { Main.raining = true; Main.cloudBGActive = 1f; - Main.numCloudsTemp = Main.cloudLimit; + Main.numCloudsTemp = Main.maxClouds; Main.numClouds = Main.numCloudsTemp; - Main.windSpeedTemp = 0.72f; - Main.windSpeedSet = Main.windSpeedTemp; + Main.windSpeedCurrent = 0.72f; + Main.windSpeedTarget = Main.windSpeedTarget; Main.weatherCounter = 60 * 60 * 10; // 10 minutes of rain. Remember, once the rain goes away, so does the invasion. Main.rainTime = Main.weatherCounter; Main.maxRaining = 0.89f; @@ -242,10 +243,10 @@ namespace CalamityMod.Events { Main.raining = true; Main.cloudBGActive = 1f; - Main.numCloudsTemp = Main.cloudLimit; + Main.numCloudsTemp = Main.maxClouds; Main.numClouds = Main.numCloudsTemp; - Main.windSpeedTemp = 0.72f; - Main.windSpeedSet = Main.windSpeedTemp; + Main.windSpeedTarget = 0.72f; + Main.windSpeedCurrent = Main.windSpeedCurrent; Main.weatherCounter = 60 * 60 * 10; // 10 minutes of rain. Remember, once the rain goes away, so does the invasion. Main.rainTime = Main.weatherCounter; Main.maxRaining = 0.89f; @@ -265,10 +266,11 @@ namespace CalamityMod.Events } else { + var source = new EntitySource_WorldEvent(); int playerClosestToAbyss = Player.FindClosest(new Vector2(CalamityWorld.abyssSide ? 0 : Main.maxTilesX * 16, (int)Main.worldSurface), 0, 0); Player closestToAbyss = Main.player[playerClosestToAbyss]; if (Main.netMode != NetmodeID.MultiplayerClient && Math.Abs(closestToAbyss.Center.X - (CalamityWorld.abyssSide ? 0 : Main.maxTilesX * 16)) <= 12000f) - Projectile.NewProjectile(closestToAbyss.Center + Vector2.UnitY * 160f, Vector2.Zero, ModContent.ProjectileType(), 120, 8f, Main.myPlayer); + Projectile.NewProjectile(source, closestToAbyss.Center + Vector2.UnitY * 160f, Vector2.Zero, ModContent.ProjectileType(), 120, 8f, Main.myPlayer); } } } @@ -291,8 +293,8 @@ namespace CalamityMod.Events // Turn off the rain from the event Main.numCloudsTemp = Main.rand.Next(5, 20 + 1); Main.numClouds = Main.numCloudsTemp; - Main.windSpeedTemp = Main.rand.NextFloat(0.04f, 0.25f); - Main.windSpeedSet = Main.windSpeedTemp; + Main.windSpeedCurrent = Main.rand.NextFloat(0.04f, 0.25f); + Main.windSpeedTarget = Main.windSpeedTarget; Main.maxRaining = 0f; if (win) { diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 05342bb557..8a2268e6b1 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -15,6 +15,7 @@ using MonoMod.Cil; using System; using Terraria; using Terraria.DataStructures; +using Terraria.GameContent; using Terraria.GameContent.Liquid; using Terraria.GameInput; using Terraria.Graphics; @@ -74,10 +75,10 @@ namespace CalamityMod.ILEditing private static void AlterTownNPCSpawnRate(On.Terraria.Main.orig_UpdateTime_SpawnTownNPCs orig) { - int oldWorldRate = Main.worldRate; - Main.worldRate *= CalamityConfig.Instance.TownNPCSpawnRateMultiplier; + double oldWorldRate = Main.desiredWorldTilesUpdateRate; + Main.desiredWorldTilesUpdateRate *= CalamityConfig.Instance.TownNPCSpawnRateMultiplier; orig(); - Main.worldRate = oldWorldRate; + Main.desiredWorldTilesUpdateRate = oldWorldRate; } #endregion Town NPC Spawning Improvements @@ -226,12 +227,9 @@ namespace CalamityMod.ILEditing private static bool OpenDoor_LabDoorOverride(On.Terraria.WorldGen.orig_OpenDoor orig, int i, int j, int direction) { Tile tile = Main.tile[i, j]; - // If the tile is somehow null, that's vanilla's problem, we're outta here - if (tile is null) - return orig(i, j, direction); // If it's one of the two lab doors, use custom code to open the door and sync tiles in multiplayer. - else if (tile.TileType == labDoorClosed) + if (tile.TileType == labDoorClosed) return OpenLabDoor(tile, i, j, labDoorOpen); else if (tile.TileType == aLabDoorClosed) return OpenLabDoor(tile, i, j, aLabDoorOpen); @@ -245,12 +243,9 @@ namespace CalamityMod.ILEditing private static bool CloseDoor_LabDoorOverride(On.Terraria.WorldGen.orig_CloseDoor orig, int i, int j, bool forced) { Tile tile = Main.tile[i, j]; - // If the tile is somehow null, that's vanilla's problem, we're outta here - if (tile is null) - return orig(i, j, forced); // If it's one of the two lab doors, use custom code to open the door and sync tiles in multiplayer. - else if (tile.TileType == labDoorOpen) + if (tile.TileType == labDoorOpen) return CloseLabDoor(tile, i, j, labDoorClosed); else if (tile.TileType == aLabDoorOpen) return CloseLabDoor(tile, i, j, aLabDoorClosed); @@ -299,7 +294,7 @@ namespace CalamityMod.ILEditing { // This is unfortunately not something that can be done via SetDefaults since owner is set // after that method is called. Doing it directly when the projectile is spawned appears to be the only reasonable way. - int proj = orig(x, y, xSpeed, ySpeed, type, damage, knockback, owner, ai0, ai1); + int proj = orig(spawnSource, x, y, xSpeed, ySpeed, type, damage, knockback, owner, ai0, ai1); Projectile projectile = Main.projectile[proj]; if (projectile.minion) { @@ -408,12 +403,7 @@ namespace CalamityMod.ILEditing if (Main.LocalPlayer.dead) { - Main.SmartInteractShowingGenuine = false; - Main.SmartInteractShowingFake = false; - Main.SmartInteractNPC = -1; - Main.SmartInteractNPCsNearby.Clear(); - Main.SmartInteractTileCoords.Clear(); - Main.SmartInteractTileCoordsSelected.Clear(); + Main.ClearSmartInteract(); Main.TileInteractionLX = (Main.TileInteractionHX = (Main.TileInteractionLY = (Main.TileInteractionHY = -1))); } @@ -453,17 +443,17 @@ namespace CalamityMod.ILEditing } } - Main.spriteBatch.Draw(Main.cursorTextures[cursorIndex], drawPosition, null, desaturatedCursorColor, 0f, Vector2.Zero, Main.cursorScale, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(TextureAssets.Cursors[cursorIndex].Value, drawPosition, null, desaturatedCursorColor, 0f, Vector2.Zero, Main.cursorScale, SpriteEffects.None, 0f); Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.UIScaleMatrix); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); GameShaders.Misc["CalamityMod:FireMouse"].UseColor(Color.Red); GameShaders.Misc["CalamityMod:FireMouse"].UseSecondaryColor(Color.Lerp(Color.Red, Color.Orange, 0.75f)); GameShaders.Misc["CalamityMod:FireMouse"].Apply(); - Main.spriteBatch.Draw(Main.cursorTextures[cursorIndex], desaturatedDrawPosition, null, cursorColor, 0f, Vector2.Zero, Main.cursorScale * 1.075f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(TextureAssets.Cursors[cursorIndex].Value, desaturatedDrawPosition, null, cursorColor, 0f, Vector2.Zero, Main.cursorScale * 1.075f, SpriteEffects.None, 0f); Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.EffectMatrix); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.EffectMatrix); return; } @@ -479,7 +469,7 @@ namespace CalamityMod.ILEditing { cursorColor = Color.White * Main.GamepadCursorAlpha; int frameX = 0; - Texture2D smartCursorTexture = Main.cursorTextures[13]; + Texture2D smartCursorTexture = TextureAssets.Cursors[13].Value; Rectangle frame = smartCursorTexture.Frame(2, 1, frameX, 0); Main.spriteBatch.Draw(smartCursorTexture, baseDrawPosition, frame, cursorColor, 0f, frame.Size() * 0.5f, Main.cursorScale, SpriteEffects.None, 0f); return; @@ -487,7 +477,7 @@ namespace CalamityMod.ILEditing // Otherwise draw an ordinary crosshair at the mouse position. cursorColor = Color.White; - Texture2D crosshairTexture = Main.cursorTextures[15]; + Texture2D crosshairTexture = TextureAssets.Cursors[15].Value; Main.spriteBatch.Draw(crosshairTexture, baseDrawPosition, null, cursorColor, 0f, crosshairTexture.Size() * 0.5f, Main.cursorScale, SpriteEffects.None, 0f); } #endregion Fire Cursor Effect for the Calamity Accessory diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index bc683afc4f..669d5bec84 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -106,7 +106,12 @@ namespace CalamityMod.Items.Accessories { if (player.whoAmI != Main.myPlayer) return false; - int weaponType = item.melee ? 1 : item.ranged ? 2 : item.magic ? 3 : item.Calamity().rogue ? 4 : -1; + + var source = player.GetProjectileSource_Item(item); + int weaponType = item.CountsAsClass() ? 1 : + item.CountsAsClass() ? 2 : + item.CountsAsClass() ? 3 : + item.Calamity().rogue ? 4 : -1; if (weaponType > 0) { if (player.Calamity().profanedSoulWeaponType != weaponType || player.Calamity().profanedSoulWeaponUsage >= 300) @@ -118,7 +123,7 @@ namespace CalamityMod.Items.Accessories correctedVelocity.Normalize(); bool shouldNerf = player.Calamity().endoCooper || player.Calamity().magicHat; //No bonkers damage memes thank you very much. bool enrage = player.statLife <= (int)(player.statLifeMax2 * 0.5); - if (item.melee) + if (item.CountsAsClass()) { if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 4 : 6) == 0) { @@ -132,7 +137,7 @@ namespace CalamityMod.Items.Accessories { Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread)); - Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), (int)((shouldNerf ? 175 : 350) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f); + Projectile.NewProjectile(source, player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), (int)((shouldNerf ? 175 : 350) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f); spread -= Main.rand.Next(2, 4); SoundEngine.PlaySound(SoundID.Item20, player.Center); } @@ -140,7 +145,7 @@ namespace CalamityMod.Items.Accessories } else { - Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType(), (int)((shouldNerf ? 125 : 250) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f); + Projectile.NewProjectile(source, player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType(), (int)((shouldNerf ? 125 : 250) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f); SoundEngine.PlaySound(SoundID.Item20, player.Center); } @@ -148,7 +153,7 @@ namespace CalamityMod.Items.Accessories player.Calamity().profanedSoulWeaponUsage++; } - else if (item.ranged) + else if (item.CountsAsClass()) { if (enrage || Main.rand.NextBool(2)) //100% chance if 50% or lower, else 1 in 2 chance { @@ -162,12 +167,12 @@ namespace CalamityMod.Items.Accessories { case 1: //big boomer case 2: //boomer - int proj = Projectile.NewProjectile(player.Center, perturbedspeed, ModContent.ProjectileType(), dam, 0f, player.whoAmI, projType == 1 ? 1f : 0f); + int proj = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType(), dam, 0f, player.whoAmI, projType == 1 ? 1f : 0f); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceMinion = true; break; case 3: //bab boomer - int proj2 = Projectile.NewProjectile(player.Center, perturbedspeed, ModContent.ProjectileType(), dam, 0f, player.whoAmI, 0f); + int proj2 = Projectile.NewProjectile(source, player.Center, perturbedspeed, ModContent.ProjectileType(), dam, 0f, player.whoAmI, 0f); if (proj2.WithinBounds(Main.maxProjectiles)) Main.projectile[proj2].Calamity().forceMinion = true; break; @@ -178,7 +183,7 @@ namespace CalamityMod.Items.Accessories } } } - else if (item.magic) + else if (item.CountsAsClass()) { if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 0 && player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) { @@ -204,7 +209,7 @@ namespace CalamityMod.Items.Accessories int sickPenalty = (int)(dam * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60))); dam -= sickPenalty; } - int proj = Projectile.NewProjectile(player.position, correctedVelocity, ModContent.ProjectileType(), dam, 1f, player.whoAmI, enrage ? 1f : 0f); + int proj = Projectile.NewProjectile(source, player.position, correctedVelocity, ModContent.ProjectileType(), dam, 1f, player.whoAmI, enrage ? 1f : 0f); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceMinion = true; player.Calamity().profanedSoulWeaponUsage = enrage ? 20 : 25; @@ -224,7 +229,7 @@ namespace CalamityMod.Items.Accessories for (float i = 0; i < crystalCount; i++) { float angle = MathHelper.TwoPi / crystalCount * i; - int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), (int)((shouldNerf ? 88 : 176) * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f); + int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), (int)((shouldNerf ? 88 : 176) * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceMinion = true; SoundEngine.PlaySound(SoundID.Item20, player.Center); @@ -234,7 +239,7 @@ namespace CalamityMod.Items.Accessories else if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 5 : 10) == 0) { float angle = MathHelper.TwoPi / (enrage ? 9 : 18) * (player.Calamity().profanedSoulWeaponUsage / (enrage ? 1 : 10)); - int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), (int)((shouldNerf ? 110 : 220) * player.MinionDamage()), 1f, player.whoAmI, 1f, 0f); + int proj = Projectile.NewProjectile(source, player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType(), (int)((shouldNerf ? 110 : 220) * player.MinionDamage()), 1f, player.whoAmI, 1f, 0f); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceMinion = true; SoundEngine.PlaySound(SoundID.Item20, player.Center); @@ -247,6 +252,15 @@ namespace CalamityMod.Items.Accessories return false; } + public static void MakeRecipesCheaper(Recipe recipe, int type, ref int numRequired) + { + int shadowSpec = ModContent.ItemType(); + int geode = ModContent.ItemType(); + int essence = ModContent.ItemType(); + bool biomePower = Main.LocalPlayer.ZoneHallow || Main.LocalPlayer.ZoneUnderworldHeight; + numRequired = biomePower && (type == (shadowSpec | geode | essence)) ? numRequired / 2 : numRequired; //cuts the above mats consumed by half if in the biomes instead of arbitrary biome locking + } + public override void AddRecipes() { CreateRecipe() @@ -258,24 +272,11 @@ namespace CalamityMod.Items.Accessories .AddIngredient(100) .AddIngredient(5) .AddTile() + .AddConsumeItemCallback(MakeRecipesCheaper) .Register(); } } - public class PSCRecipe : ModRecipe - { - public PSCRecipe(Mod mod) : base(mod) { } - - public override int ConsumeItem(int type, int numRequired) - { - int shadowSpec = ModContent.ItemType(); - int geode = ModContent.ItemType(); - int essence = ModContent.ItemType(); - bool biomePower = Main.LocalPlayer.ZoneHoly || Main.LocalPlayer.ZoneUnderworldHeight; - return biomePower && (type == (shadowSpec | geode | essence)) ? numRequired / 2 : numRequired; //cuts the above mats consumed by half if in the biomes instead of arbitrary biome locking - } - } - public class ProfanedCrystalHead : EquipTexture { public override bool DrawHead() diff --git a/Items/Accessories/Wings/MOAB.cs b/Items/Accessories/Wings/MOAB.cs index a4e49d66d2..916edb7cb7 100644 --- a/Items/Accessories/Wings/MOAB.cs +++ b/Items/Accessories/Wings/MOAB.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void UpdateAccessory(Player player, bool hideVisual) { - if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) + if (player.controlJump && player.wingTime > 0f && !player.canJumpAgain_Cloud && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { player.rocketDelay2--; if (player.rocketDelay2 <= 0) @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Accessories.Wings } for (int index = 0; index < dustAmt; index++) { - int type = DustID.Fire; + int type = 6; if (player.head == 41) { int arg_58FD_0 = player.body; @@ -87,9 +87,9 @@ namespace CalamityMod.Items.Accessories.Wings } } } - player.doubleJumpCloud = true; - player.doubleJumpSandstorm = true; - player.doubleJumpBlizzard = true; + player.hasJumpOption_Cloud = true; + player.hasJumpOption_Sandstorm = true; + player.hasJumpOption_Blizzard = true; player.jumpBoost = true; player.autoJump = true; player.noFallDmg = true; diff --git a/Items/Armor/Vanity/ArtemisMask.cs b/Items/Armor/Vanity/ArtemisMask.cs index e01d1d6f9c..b911f031e0 100644 --- a/Items/Armor/Vanity/ArtemisMask.cs +++ b/Items/Armor/Vanity/ArtemisMask.cs @@ -1,7 +1,7 @@ -using Terraria.ModLoader; +using Terraria.ModLoader; using Terraria.ID; -using static CalamityMod.CalPlayer.CalamityPlayer; using Microsoft.Xna.Framework; +using Terraria.DataStructures; namespace CalamityMod.Items.Armor.Vanity { @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Vanity public override bool DrawHead() => false; public string ExtensionTexture => "CalamityMod/Items/Armor/Vanity/ArtemisMask_Extra"; - public Vector2 ExtensionSpriteOffset(PlayerDrawInfo drawInfo) => new Vector2( drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10); - public bool PreDrawExtension(PlayerDrawInfo drawInfo) => true; + public Vector2 ExtensionSpriteOffset(PlayerDrawSet drawInfo) => new Vector2( drawInfo.drawPlayer.direction == 1f ? -16f : -10f, -10); + public bool PreDrawExtension(PlayerDrawSet drawInfo) => true; } } diff --git a/Items/Tools/ClimateChange/TorrentialTear.cs b/Items/Tools/ClimateChange/TorrentialTear.cs index 9c19e3544d..2aee93ef02 100644 --- a/Items/Tools/ClimateChange/TorrentialTear.cs +++ b/Items/Tools/ClimateChange/TorrentialTear.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -51,10 +51,10 @@ namespace CalamityMod.Items.Tools.ClimateChange if (maxSeverity) { Main.cloudBGActive = 1f; - Main.numCloudsTemp = Main.cloudLimit; + Main.numCloudsTemp = Main.maxClouds; Main.numClouds = Main.numCloudsTemp; - Main.windSpeedTemp = (float)Main.rand.Next(50, 75) * 0.01f; - Main.windSpeedSet = Main.windSpeedTemp; + Main.windSpeedCurrent = Main.rand.Next(50, 75) * 0.01f; + Main.windSpeedTarget = Main.windSpeedCurrent; Main.weatherCounter = Main.rand.Next(3600, 18000); Main.maxRaining = 0.89f; } diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index bcf98883c1..3f7738b009 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -1240,7 +1240,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis return Color.Lerp(startingColor, endColor, (float)Math.Pow(completionRatio, 1.5D)) * NPC.Opacity; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Declare the trail drawers if they have yet to be defined. if (ChargeFlameTrail is null) @@ -1259,7 +1259,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis Texture2D texture = TextureAssets.Npc[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 - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; Color afterimageBaseColor = Color.White; // Draws a single instance of a regular, non-glowmask based Artemis. @@ -1274,7 +1274,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); afterimageCenter += drawOffset; @@ -1311,7 +1311,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis currentSegmentRotation += segmentRotationOffset; } - RibbonTrail.Draw(ribbonDrawPositions, -Main.screenPosition, 66); + RibbonTrail.Draw(ribbonDrawPositions, -screenPos, 66); } int instanceCount = (int)MathHelper.Lerp(1f, 15f, ChargeFlash); @@ -1341,7 +1341,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], origin, NPC.scale, SpriteEffects.None, 0f); @@ -1374,11 +1374,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis for (int i = 0; i < 4; i++) { Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 8f; - ChargeFlameTrailBig.Draw(drawPositions, drawOffset - Main.screenPosition, 70); + ChargeFlameTrailBig.Draw(drawPositions, drawOffset - screenPos, 70); } } else - ChargeFlameTrail.Draw(drawPositions, -Main.screenPosition, 70); + ChargeFlameTrail.Draw(drawPositions, -screenPos, 70); } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index 2d3fca385f..35b1052996 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -131,13 +131,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 3; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Fire, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int k = 0; k < 10; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Fire, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index b36faedb4e..1adb80e9ab 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -394,13 +394,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 3; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Fire, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int k = 0; k < 10; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Fire, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.cs b/NPCs/NormalNPCs/ArmoredDiggerTail.cs index 3a0d893663..c51ce7247a 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerTail.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerTail.cs @@ -114,13 +114,13 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int k = 0; k < 3; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Fire, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } if (NPC.life <= 0) { for (int k = 0; k < 10; k++) { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Fire, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, hitDirection, -1f, 0, default, 1f); } } } diff --git a/Projectiles/Damageable/DamageableProjectile.cs b/Projectiles/Damageable/DamageableProjectile.cs index 8e599de349..fc1e8865c3 100644 --- a/Projectiles/Damageable/DamageableProjectile.cs +++ b/Projectiles/Damageable/DamageableProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; @@ -211,7 +211,7 @@ namespace CalamityMod.Projectiles.Damageable if (Main.projectile[i].Colliding(Main.projectile[i].Hitbox, Projectile.Hitbox)) { int damage = Main.DamageVar(Main.projectile[i].damage) * 2; - damage = Main.expertMode ? (int)(damage * Main.expertDamage) : damage; + damage = Main.expertMode ? (int)(damage * Main.RegisteredGameModes[GameModeID.Expert].EnemyDamageMultiplier) : damage; CombatText.NewText(new Rectangle((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height), CombatText.DamagedFriendly, damage); Life -= damage; HitEffectProjectile(damage, Main.projectile[i]); diff --git a/Projectiles/Magic/AcidicReed.cs b/Projectiles/Magic/AcidicReed.cs index 2848a0c15c..cfdf94d916 100644 --- a/Projectiles/Magic/AcidicReed.cs +++ b/Projectiles/Magic/AcidicReed.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using Terraria; using Terraria.ModLoader; @@ -28,14 +28,14 @@ namespace CalamityMod.Projectiles.Magic { if (Projectile.ai[0] == 1f) { - Terraria.Audio.LegacySoundStyle saxSound = Utils.SelectRandom(Main.rand, new Terraria.Audio.LegacySoundStyle[] + LegacySoundStyle saxSound = Utils.SelectRandom(Main.rand, new LegacySoundStyle[] { - Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Saxophone/Sax1"), - Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Saxophone/Sax2"), - Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Saxophone/Sax3"), - Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Saxophone/Sax4"), - Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Saxophone/Sax5"), - Mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/Saxophone/Sax6") + SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Saxophone/Sax1"), + SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Saxophone/Sax2"), + SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Saxophone/Sax3"), + SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Saxophone/Sax4"), + SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Saxophone/Sax5"), + SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Item/Saxophone/Sax6") }); SoundEngine.PlaySound(saxSound, Projectile.position); Projectile.ai[0] = 0f; diff --git a/Projectiles/Magic/ApotheosisWorm.cs b/Projectiles/Magic/ApotheosisWorm.cs index f91215ab49..2447dfd924 100644 --- a/Projectiles/Magic/ApotheosisWorm.cs +++ b/Projectiles/Magic/ApotheosisWorm.cs @@ -259,22 +259,18 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - Texture2D headTexture = ModContent.Request(Texture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; Vector2 headTextureOrigin = ModContent.Request(Texture).Value.Size() * 0.5f; drawPosition -= headTexture.Size() * Projectile.scale * 0.5f; drawPosition += headTextureOrigin * Projectile.scale + new Vector2(0f, 4f + Projectile.gfxOffY); - Texture2D jawTexture = ModContent.Request("CalamityMod/Projectiles/Magic/ApotheosisJaw"); + Texture2D jawTexture = ModContent.Request("CalamityMod/Projectiles/Magic/ApotheosisJaw").Valie; Vector2 jawOrigin = jawTexture.Size() * 0.5f; // Segment drawing. - Texture2D bodyTexture = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyS"); - Texture2D tailTexture = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTailS"); + Texture2D bodyTexture = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyS").Valie; + Texture2D tailTexture = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTailS").Value; // Not white to differentiate itself slightly from regular DoG when fighting Boss Rush. Color baseColor = Color.Lerp(Color.White, Color.Fuchsia, 0.15f); @@ -311,7 +307,7 @@ namespace CalamityMod.Projectiles.Magic float currentFade = Utils.GetLerpValue(0f, 8f, Time, true) * Utils.GetLerpValue(60f, 52f, Time, true); currentFade *= (1f + 0.2f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 30f * MathHelper.Pi * 3f)) * 0.8f; - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/StarProj"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/StarProj").Value; Vector2 drawPos = PortalPosition - Main.screenPosition; baseColor = new Color(150, 100, 255, 255) * Projectile.Opacity; baseColor *= 0.5f; diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index 73d6113217..c40cb4d5b3 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -254,7 +254,7 @@ namespace CalamityMod.Projectiles.Magic Vector2 origin = texture.Size() * 0.5f; Main.spriteBatch.EnterShaderRegion(); - GameShaders.Misc["CalamityMod:ArtAttack"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/FabstaffStreak")); + GameShaders.Misc["CalamityMod:ArtAttack"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/FabstaffStreak").Value); GameShaders.Misc["CalamityMod:ArtAttack"].Apply(); TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 100); diff --git a/Projectiles/Magic/AsteroidMolten.cs b/Projectiles/Magic/AsteroidMolten.cs index d9abd0095b..a215174b93 100644 --- a/Projectiles/Magic/AsteroidMolten.cs +++ b/Projectiles/Magic/AsteroidMolten.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Buffs.StatBuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -127,19 +127,19 @@ namespace CalamityMod.Projectiles.Magic case 0: break; case 1: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten2"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten2").Value; break; case 2: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten3"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten3").Value; break; case 3: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten4"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten4").Value; break; case 4: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten5"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten5").Value; break; case 5: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten6"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMolten6").Value; break; default: break; @@ -150,24 +150,24 @@ namespace CalamityMod.Projectiles.Magic public override void PostDraw(Color lightColor) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow").Value; switch ((int)Projectile.ai[0]) { case 0: break; case 1: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow2"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow2").Value; break; case 2: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow3"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow3").Value; break; case 3: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow4"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow4").Value; break; case 4: return; case 5: - texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow6"); + texture = ModContent.Request("CalamityMod/Projectiles/Magic/AsteroidMoltenGlow6").Value; break; default: break; diff --git a/Projectiles/Magic/BeamingBolt2.cs b/Projectiles/Magic/BeamingBolt2.cs index e70e1fc5e4..0e9435b61a 100644 --- a/Projectiles/Magic/BeamingBolt2.cs +++ b/Projectiles/Magic/BeamingBolt2.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic { Texture2D tex = ModContent.Request(Texture).Value; if (Projectile.ai[0] == 1f) - tex = ModContent.Request("CalamityMod/Projectiles/Magic/BeamingThorn"); + tex = ModContent.Request("CalamityMod/Projectiles/Magic/BeamingThorn").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/CryoBlast.cs b/Projectiles/Magic/CryoBlast.cs index f895da244b..c1ac828eb2 100644 --- a/Projectiles/Magic/CryoBlast.cs +++ b/Projectiles/Magic/CryoBlast.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(texture, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Magic/DarkSparkBeam.cs b/Projectiles/Magic/DarkSparkBeam.cs index a5670e6c01..ae559627fe 100644 --- a/Projectiles/Magic/DarkSparkBeam.cs +++ b/Projectiles/Magic/DarkSparkBeam.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using System.IO; @@ -210,7 +210,7 @@ namespace CalamityMod.Projectiles.Magic if (Main.netMode != NetmodeID.Server) ((WaterShaderData)Filters.Scene["WaterDistortion"].GetShader()).QueueRipple(Projectile.position + new Vector2(size.X * 0.5f, 0f).RotatedBy(num848), color, size, RippleShape.Square, num848); - Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], Projectile.width * Projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight)); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * Projectile.localAI[1], Projectile.width * Projectile.scale, DelegateMethods.CastLight); } } @@ -283,7 +283,7 @@ namespace CalamityMod.Projectiles.Magic { DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; Vector2 unit = Projectile.velocity; - Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Projectile.localAI[1], Projectile.width * Projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles)); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + unit * Projectile.localAI[1], Projectile.width * Projectile.scale, DelegateMethods.CutTiles); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Magic/DarkSparkPrism.cs b/Projectiles/Magic/DarkSparkPrism.cs index 04a68d63e6..effa19da48 100644 --- a/Projectiles/Magic/DarkSparkPrism.cs +++ b/Projectiles/Magic/DarkSparkPrism.cs @@ -176,7 +176,7 @@ namespace CalamityMod.Projectiles.Magic int num215 = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int y7 = num215 * Projectile.frame; Vector2 vector27 = (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].ranged) + if (Main.player[Projectile.owner].shroomiteStealth && Main.player[Projectile.owner].inventory[Main.player[Projectile.owner].selectedItem].CountsAsClass()) { float num216 = Main.player[Projectile.owner].stealth; if ((double)num216 < 0.03) @@ -186,7 +186,7 @@ namespace CalamityMod.Projectiles.Magic float arg_97B3_0 = (1f + num216 * 10f) / 11f; color25 *= num216; } - if (Main.player[Projectile.owner].setVortex && Main.player[Projectile.owner].inventory[Main.player[Projectile.owner].selectedItem].ranged) + if (Main.player[Projectile.owner].setVortex && Main.player[Projectile.owner].inventory[Main.player[Projectile.owner].selectedItem].CountsAsClass()) { float num217 = Main.player[Projectile.owner].stealth; if ((double)num217 < 0.03) @@ -196,7 +196,7 @@ namespace CalamityMod.Projectiles.Magic float arg_9854_0 = (1f + num217 * 10f) / 11f; color25 = color25.MultiplyRGBA(new Color(Vector4.Lerp(Vector4.One, new Vector4(0.16f, 0.12f, 0f, 0f), 1f - num217))); } - Main.spriteBatch.Draw(texture2D14, vector27, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y7, texture2D14.Width, num215)), Projectile.GetAlpha(color25), Projectile.rotation, new Vector2((float)texture2D14.Width / 2f, (float)num215 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.spriteBatch.Draw(texture2D14, vector27, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y7, texture2D14.Width, num215)), Projectile.GetAlpha(color25), Projectile.rotation, new Vector2((float)texture2D14.Width / 2f, (float)num215 / 2f), Projectile.scale, spriteEffects, 0); float scaleFactor2 = (float)Math.Cos((double)(6.28318548f * (Projectile.ai[0] / 120f))) * 2f + 2f; if (Projectile.ai[0] > 480f) { @@ -204,7 +204,7 @@ namespace CalamityMod.Projectiles.Magic } for (float num218 = 0f; num218 < 4f; num218 += 1f) { - Main.spriteBatch.Draw(texture2D14, vector27 + Vector2.UnitY.RotatedBy((double)(num218 * 6.28318548f / 4f), default) * scaleFactor2, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y7, texture2D14.Width, num215)), Projectile.GetAlpha(color25).MultiplyRGBA(new Color(255, 255, 255, 0)) * 0.03f, Projectile.rotation, new Vector2((float)texture2D14.Width / 2f, (float)num215 / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.spriteBatch.Draw(texture2D14, vector27 + Vector2.UnitY.RotatedBy((double)(num218 * 6.28318548f / 4f), default) * scaleFactor2, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y7, texture2D14.Width, num215)), Projectile.GetAlpha(color25).MultiplyRGBA(new Color(255, 255, 255, 0)) * 0.03f, Projectile.rotation, new Vector2((float)texture2D14.Width / 2f, (float)num215 / 2f), Projectile.scale, spriteEffects, 0); } return false; } diff --git a/Projectiles/Magic/DeathhailBeam.cs b/Projectiles/Magic/DeathhailBeam.cs index d9b5fcc091..8fff503912 100644 --- a/Projectiles/Magic/DeathhailBeam.cs +++ b/Projectiles/Magic/DeathhailBeam.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Magic public override float Lifetime => 20f; public override Color LaserOverlayColor => CalamityUtils.ColorSwap(startingColor, secondColor, 0.9f); public override Color LightCastColor => LaserOverlayColor; - public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayStart"); - public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayMid"); - public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd"); + public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayStart").Value; + public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayMid").Value; + public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd").Value; public override void SetStaticDefaults() { diff --git a/Projectiles/Magic/EnormousConsumingVortex.cs b/Projectiles/Magic/EnormousConsumingVortex.cs index aa763afbff..9c871b3153 100644 --- a/Projectiles/Magic/EnormousConsumingVortex.cs +++ b/Projectiles/Magic/EnormousConsumingVortex.cs @@ -198,7 +198,7 @@ namespace CalamityMod.Projectiles.Magic Vector2 drawOffset = Vector2.UnitX.RotatedBy(rotation) * 30f * offsetFactor * drawScale; Vector2 drawPosition = Projectile.Center + drawOffset - Main.screenPosition; Color colorToDraw = Main.hslToRgb((i / (float)vortexesToDraw + Time / 40f) % 1f, 1f, 0.75f); - Main.EntitySpriteDraw(ModContent.Request(Texture), + Main.EntitySpriteDraw(ModContent.Request(Texture).Value, drawPosition, null, colorToDraw * 0.7f, diff --git a/Projectiles/Magic/EternityCrystal.cs b/Projectiles/Magic/EternityCrystal.cs index 2fa008912f..5143a30ffc 100644 --- a/Projectiles/Magic/EternityCrystal.cs +++ b/Projectiles/Magic/EternityCrystal.cs @@ -164,7 +164,7 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D myTexture = ModContent.Request(Texture); + Texture2D myTexture = ModContent.Request(Texture).Value; Rectangle frame = myTexture.Frame(1, Main.projFrames[Projectile.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 493dd0cc1a..adaaca6d5b 100644 --- a/Projectiles/Magic/EternityHex.cs +++ b/Projectiles/Magic/EternityHex.cs @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Magic if (LemniscateDrawer is null) LemniscateDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, null, GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/EternityStreak")); + GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/EternityStreak").Value); LemniscateDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 84); return false; } diff --git a/Projectiles/Magic/EventHorizonStar.cs b/Projectiles/Magic/EventHorizonStar.cs index 601218eac5..2ac34abed0 100644 --- a/Projectiles/Magic/EventHorizonStar.cs +++ b/Projectiles/Magic/EventHorizonStar.cs @@ -135,10 +135,6 @@ namespace CalamityMod.Projectiles.Magic public override void PostDraw(Color lightColor) { Texture2D texture = ModContent.Request(Texture).Value; - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; - 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/FabBolt.cs b/Projectiles/Magic/FabBolt.cs index 1f98cd84ff..dcf9e5e22c 100644 --- a/Projectiles/Magic/FabBolt.cs +++ b/Projectiles/Magic/FabBolt.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Magic if (TrailDrawer is null) TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/FabstaffStreak")); + GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/FabstaffStreak").Value); TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 80, Projectile.oldRot); return false; } diff --git a/Projectiles/Magic/FabRay.cs b/Projectiles/Magic/FabRay.cs index 1da47762d8..3ae6fca55a 100644 --- a/Projectiles/Magic/FabRay.cs +++ b/Projectiles/Magic/FabRay.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Magic if (TrailDrawer is null) TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, specialShader: GameShaders.Misc["CalamityMod:TrailStreak"]); - GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/ScarletDevilStreak")); + GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/ScarletDevilStreak").Value); TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition, 32); return false; } diff --git a/Projectiles/Magic/GhastlyBlast.cs b/Projectiles/Magic/GhastlyBlast.cs index 4bbbb12440..ae5acaf3ce 100644 --- a/Projectiles/Magic/GhastlyBlast.cs +++ b/Projectiles/Magic/GhastlyBlast.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Magic dust28.velocity = vector140.RotatedBy(MathHelper.PiOver2) * 6f; dust28.scale = 0.5f + Main.rand.NextFloat(); dust28.fadeIn = 0.5f; - dust28.customData = projectile; + dust28.customData = Projectile; } else { @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Magic dust29.velocity = vector141.RotatedBy(-MathHelper.PiOver2) * 3f; dust29.scale = 0.5f + Main.rand.NextFloat(); dust29.fadeIn = 0.5f; - dust29.customData = projectile; + dust29.customData = Projectile; } } @@ -121,14 +121,14 @@ namespace CalamityMod.Projectiles.Magic dust30.velocity = vector142.RotatedBy(MathHelper.PiOver2) * 6f; dust30.scale = 0.9f + Main.rand.NextFloat(); dust30.fadeIn = 0.5f; - dust30.customData = projectile; + dust30.customData = Projectile; vector142 = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi); dust30.noGravity = true; dust30.position = Projectile.Center - vector142 * Main.rand.Next(10, 21); dust30.velocity = vector142.RotatedBy(MathHelper.PiOver2) * 6f; dust30.scale = 0.9f + Main.rand.NextFloat(); dust30.fadeIn = 0.5f; - dust30.customData = projectile; + dust30.customData = Projectile; dust30.color = Color.Crimson; } else @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles.Magic dust31.velocity = vector143.RotatedBy(-MathHelper.PiOver2) * 5f; dust31.scale = 0.9f + Main.rand.NextFloat(); dust31.fadeIn = 0.5f; - dust31.customData = projectile; + dust31.customData = Projectile; } num3 = num1014; } diff --git a/Projectiles/Magic/GhastlyVisageProj.cs b/Projectiles/Magic/GhastlyVisageProj.cs index 0fb100df56..f26f30d2ce 100644 --- a/Projectiles/Magic/GhastlyVisageProj.cs +++ b/Projectiles/Magic/GhastlyVisageProj.cs @@ -204,7 +204,7 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Magic/GhastlyVisageProjGlow"), Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Magic/GhastlyVisageProjGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, num214)), Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); } public override bool? CanDamage() => false; diff --git a/Projectiles/Magic/GranitePulse.cs b/Projectiles/Magic/GranitePulse.cs index 89edfeb6ab..6e3346d2e4 100644 --- a/Projectiles/Magic/GranitePulse.cs +++ b/Projectiles/Magic/GranitePulse.cs @@ -154,9 +154,6 @@ namespace CalamityMod.Projectiles.Magic Texture2D texture = ModContent.Request(Texture).Value; int height = texture.Height / Main.projFrames[Projectile.type]; int frameHeight = height * Projectile.frame; - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; 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/IceBlockIcicle.cs b/Projectiles/Magic/IceBlockIcicle.cs index cebf8313d5..c6c4761f39 100644 --- a/Projectiles/Magic/IceBlockIcicle.cs +++ b/Projectiles/Magic/IceBlockIcicle.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ModLoader; using Terraria.ID; using Microsoft.Xna.Framework; @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Magic { if (Projectile.ai[0] == 1f) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Magic/IceBlockIcicle2"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Magic/IceBlockIcicle2").Value; 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); return false; } diff --git a/Projectiles/Magic/InfernalBlade.cs b/Projectiles/Magic/InfernalBlade.cs index 1e5690f964..8a7c5c4ed3 100644 --- a/Projectiles/Magic/InfernalBlade.cs +++ b/Projectiles/Magic/InfernalBlade.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { DelegateMethods.v3_1 = new Vector3(0.6f, 1f, 1f) * 0.2f; - Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, DelegateMethods.CastLightOpen); if (Projectile.alpha > 0) { SoundEngine.PlaySound(SoundID.Item9, Projectile.Center); diff --git a/Projectiles/Magic/InfernalBlade2.cs b/Projectiles/Magic/InfernalBlade2.cs index 703a2c432b..240b9cc97a 100644 --- a/Projectiles/Magic/InfernalBlade2.cs +++ b/Projectiles/Magic/InfernalBlade2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { DelegateMethods.v3_1 = new Vector3(0.6f, 1f, 1f) * 0.2f; - Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, DelegateMethods.CastLightOpen); if (Projectile.alpha > 0) { SoundEngine.PlaySound(SoundID.Item9, Projectile.Center); diff --git a/Projectiles/Magic/LiquidBlade.cs b/Projectiles/Magic/LiquidBlade.cs index 335037e13d..94e29aa6a0 100644 --- a/Projectiles/Magic/LiquidBlade.cs +++ b/Projectiles/Magic/LiquidBlade.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { DelegateMethods.v3_1 = new Vector3(0.6f, 1f, 1f) * 0.2f; - Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, DelegateMethods.CastLightOpen); if (Projectile.alpha > 0) { SoundEngine.PlaySound(SoundID.Item9, Projectile.position); diff --git a/Projectiles/Magic/LiquidBlade2.cs b/Projectiles/Magic/LiquidBlade2.cs index 6f6fe14d98..42685b4c17 100644 --- a/Projectiles/Magic/LiquidBlade2.cs +++ b/Projectiles/Magic/LiquidBlade2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { DelegateMethods.v3_1 = new Vector3(0.6f, 1f, 1f) * 0.2f; - Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + Utils.PlotTileLine(Projectile.Center, Projectile.Center + Projectile.velocity * 10f, 8f, DelegateMethods.CastLightOpen); if (Projectile.alpha > 0) { SoundEngine.PlaySound(SoundID.Item9, Projectile.position); diff --git a/Projectiles/Magic/MelterAmp.cs b/Projectiles/Magic/MelterAmp.cs index 913f90ef9c..3a93241b96 100644 --- a/Projectiles/Magic/MelterAmp.cs +++ b/Projectiles/Magic/MelterAmp.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.active = false; return; } - if (!player.ActiveItem().magic || player.ActiveItem().shoot != ModContent.ProjectileType()) + if (!player.ActiveItem().CountsAsClass() || player.ActiveItem().shoot != ModContent.ProjectileType()) { Projectile.active = false; return; diff --git a/Projectiles/Magic/NebulaElementalBeam.cs b/Projectiles/Magic/NebulaElementalBeam.cs index 707b9885e9..a2518816ed 100644 --- a/Projectiles/Magic/NebulaElementalBeam.cs +++ b/Projectiles/Magic/NebulaElementalBeam.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -12,9 +12,9 @@ namespace CalamityMod.Projectiles.Magic public override float MaxLaserLength => 1000f; public override float Lifetime => 30f; public override Color LightCastColor => Color.White; - public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayStart"); - public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayMid"); - public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd"); + public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayStart").Value; + public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayMid").Value; + public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd").Value; public const float UniversalAngularSpeed = MathHelper.Pi / 400f; @@ -56,9 +56,9 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - DrawBeamWithColor(spriteBatch, new Color(190, 29, 209), Projectile.scale); - DrawBeamWithColor(spriteBatch, Color.Lerp(new Color(254, 126, 229), Color.Transparent, 0.35f), Projectile.scale * 0.6f); - DrawBeamWithColor(spriteBatch, Color.Lerp(new Color(254, 190, 243), Color.Transparent, 0.35f), Projectile.scale * 0.6f); + DrawBeamWithColor(Main.spriteBatch, new Color(190, 29, 209), Projectile.scale); + DrawBeamWithColor(Main.spriteBatch, Color.Lerp(new Color(254, 126, 229), Color.Transparent, 0.35f), Projectile.scale * 0.6f); + DrawBeamWithColor(Main.spriteBatch, Color.Lerp(new Color(254, 190, 243), Color.Transparent, 0.35f), Projectile.scale * 0.6f); return false; } } diff --git a/Projectiles/Magic/PartySparkle.cs b/Projectiles/Magic/PartySparkle.cs index a4984fc75c..d5fdfcdbf0 100644 --- a/Projectiles/Magic/PartySparkle.cs +++ b/Projectiles/Magic/PartySparkle.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D sparkleTexture = ModContent.Request(Texture); + Texture2D sparkleTexture = ModContent.Request(Texture).Value; Color sparkleColor = CalamityUtils.MulticolorLerp(ColorSpectrumHue, RainbowPartyCannon.ColorSet) * Projectile.Opacity * 0.5f; sparkleColor.A = 0; diff --git a/Projectiles/Magic/RainbowComet.cs b/Projectiles/Magic/RainbowComet.cs index 778805692b..9980ec1f60 100644 --- a/Projectiles/Magic/RainbowComet.cs +++ b/Projectiles/Magic/RainbowComet.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic } public override bool PreDraw(ref Color lightColor) { - Texture2D cometTexture = ModContent.Request(Texture); + Texture2D cometTexture = ModContent.Request(Texture).Value; Main.EntitySpriteDraw(cometTexture, Projectile.Center + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition, cometTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), diff --git a/Projectiles/Magic/RainbowRocket.cs b/Projectiles/Magic/RainbowRocket.cs index 154c45bacf..2a30d009fa 100644 --- a/Projectiles/Magic/RainbowRocket.cs +++ b/Projectiles/Magic/RainbowRocket.cs @@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.oldPos[0] = Projectile.position + Projectile.velocity.SafeNormalize(Vector2.Zero) * 50f; TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + Projectile.velocity, 80); - Texture2D rocketTexture = ModContent.Request(Texture); + Texture2D rocketTexture = ModContent.Request(Texture).Value; Main.EntitySpriteDraw(rocketTexture, Projectile.Center - Main.screenPosition, rocketTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame), diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index 64e6f8e80e..f20e4bb552 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Magic Point endOfLaserTileCoords = idealCenter.ToTileCoordinates(); Tile endTile = CalamityUtils.ParanoidTileRetrieval(endOfLaserTileCoords.X, endOfLaserTileCoords.Y); - if (endTile.HasUnactuatedTile && (Main.tileSolid[endTile.TileType] || Main.tileSolidTop[endTile.TileType]) && !endTile.IsHalfBlock && endTile.slope() == 0) + if (endTile.HasUnactuatedTile && (Main.tileSolid[endTile.TileType] || Main.tileSolidTop[endTile.TileType]) && !endTile.IsHalfBlock && endTile.Slope == 0) { Vector2 armSpawnPosition = endOfLaserTileCoords.ToWorldCoordinates(); Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), armSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage * 2 / 3, 0f, Projectile.owner); diff --git a/Projectiles/Magic/RancorMagicCircle.cs b/Projectiles/Magic/RancorMagicCircle.cs index fb178f52eb..0dac1e190a 100644 --- a/Projectiles/Magic/RancorMagicCircle.cs +++ b/Projectiles/Magic/RancorMagicCircle.cs @@ -177,7 +177,7 @@ namespace CalamityMod.Projectiles.Magic void restartShader(Texture2D texture, float opacity, float circularRotation, BlendState blendMode) { Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, blendMode, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, blendMode, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); CalamityUtils.CalculatePerspectiveMatricies(out Matrix viewMatrix, out Matrix projectionMatrix); diff --git a/Projectiles/Melee/CometQuasherMeteor.cs b/Projectiles/Melee/CometQuasherMeteor.cs index b939939bc2..ace6e1f68a 100644 --- a/Projectiles/Melee/CometQuasherMeteor.cs +++ b/Projectiles/Melee/CometQuasherMeteor.cs @@ -47,11 +47,11 @@ namespace CalamityMod.Projectiles.Melee Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 31, 0.0f, 0.0f, 100, new Color(), 1.5f); for (int index1 = 0; index1 < 32; ++index1) { - int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Fire, 0.0f, 0.0f, 100, new Color(), 2.5f); + int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0.0f, 0.0f, 100, new Color(), 2.5f); Dust dust1 = Main.dust[index2]; dust1.noGravity = true; dust1.velocity *= 3f; - int index3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Fire, 0.0f, 0.0f, 100, new Color(), 1.5f); + int index3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0.0f, 0.0f, 100, new Color(), 1.5f); Dust dust2 = Main.dust[index3]; dust2.velocity *= 2f; dust2.noGravity = true; @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee } for (int index1 = 0; index1 < 5; ++index1) { - int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Utils.SelectRandom(Main.rand, new int[3]{ DustID.Fire, 259, 158 }), 2.5f * (float) Projectile.direction, -2.5f, 0, new Color(), 1f); + int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Utils.SelectRandom(Main.rand, new int[3]{ 6, 259, 158 }), 2.5f * (float) Projectile.direction, -2.5f, 0, new Color(), 1f); Dust dust1 = Main.dust[index2]; dust1.alpha = 200; dust1.velocity *= 2.4f; diff --git a/Projectiles/Ranged/AstralSandgun.cs b/Projectiles/Ranged/AstralSandgun.cs index ffb921522e..be439558ec 100644 --- a/Projectiles/Ranged/AstralSandgun.cs +++ b/Projectiles/Ranged/AstralSandgun.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - base.SetDefaults(); Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.basePointBlankShotDuration; } diff --git a/Projectiles/Ranged/BigNuke.cs b/Projectiles/Ranged/BigNuke.cs index 1f25e215a3..6fbc7d05ea 100644 --- a/Projectiles/Ranged/BigNuke.cs +++ b/Projectiles/Ranged/BigNuke.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; using Terraria.ID; @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Ranged bool canShoot = true; int damage = 0; float kb = 0f; - player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, true); + player.PickAmmo(FalseLauncher, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, out _, true); CalamityGlobalProjectile.ExpandHitboxBy(Projectile, 16); diff --git a/Projectiles/Ranged/BouncingShotgunPellet.cs b/Projectiles/Ranged/BouncingShotgunPellet.cs index 3b83a1e3b8..8223a28e76 100644 --- a/Projectiles/Ranged/BouncingShotgunPellet.cs +++ b/Projectiles/Ranged/BouncingShotgunPellet.cs @@ -58,10 +58,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int d = 0; d < 20; d++) { - int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 0, default, 2.5f); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 0, default, 2.5f); Main.dust[idx].noGravity = true; Main.dust[idx].velocity *= 3f; - idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1.5f); + idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1.5f); Main.dust[idx].velocity *= 2f; Main.dust[idx].noGravity = true; } diff --git a/Projectiles/Ranged/MortarRoundProj.cs b/Projectiles/Ranged/MortarRoundProj.cs index 007accc6ca..5018407034 100644 --- a/Projectiles/Ranged/MortarRoundProj.cs +++ b/Projectiles/Ranged/MortarRoundProj.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Ranged xOffset = Projectile.velocity.X * 0.5f; yOffset = Projectile.velocity.Y * 0.5f; } - int fire = Dust.NewDust(new Vector2(Projectile.position.X + 3f + xOffset, Projectile.position.Y + 3f + yOffset) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(new Vector2(Projectile.position.X + 3f + xOffset, Projectile.position.Y + 3f + yOffset) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, 1f); Main.dust[fire].scale *= 2f + (float)Main.rand.Next(10) * 0.1f; Main.dust[fire].velocity *= 0.2f; Main.dust[fire].noGravity = true; @@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int d = 0; d < 70; d++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } CalamityUtils.ExplosionGores(Projectile.Center, 3); diff --git a/Projectiles/Ranged/NapalmArrowProj.cs b/Projectiles/Ranged/NapalmArrowProj.cs index 7cf6b381f8..d47e3c2fd0 100644 --- a/Projectiles/Ranged/NapalmArrowProj.cs +++ b/Projectiles/Ranged/NapalmArrowProj.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; if (Main.rand.NextBool(5)) { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Fire, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 6, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); } } @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(SoundID.Item14, Projectile.position); for (int j = 0; j < 5; j++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 3f; if (Main.rand.NextBool(2)) { @@ -53,10 +53,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int k = 0; k < 10; k++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } CalamityUtils.ExplosionGores(Projectile.Center, 3); diff --git a/Projectiles/Ranged/RealmRavagerBullet.cs b/Projectiles/Ranged/RealmRavagerBullet.cs index ed41d268b1..f45b6817c0 100644 --- a/Projectiles/Ranged/RealmRavagerBullet.cs +++ b/Projectiles/Ranged/RealmRavagerBullet.cs @@ -49,10 +49,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int d = 0; d < 20; d++) { - int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 0, default, 2.5f); + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 0, default, 2.5f); Main.dust[idx].noGravity = true; Main.dust[idx].velocity *= 3f; - idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1.5f); + idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1.5f); Main.dust[idx].velocity *= 2f; Main.dust[idx].noGravity = true; } diff --git a/Projectiles/Ranged/RocketFire.cs b/Projectiles/Ranged/RocketFire.cs index 44b8e99d3e..8be7f74c9c 100644 --- a/Projectiles/Ranged/RocketFire.cs +++ b/Projectiles/Ranged/RocketFire.cs @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Ranged //dust if (Main.rand.NextBool(4)) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[fire]; dust.position.X -= 2f; dust.position.Y += 2f; @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Ranged } if (Main.rand.NextBool(10)) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[fire]; dust.position.X -= 2f; dust.position.Y += 2f; diff --git a/Projectiles/Ranged/RubberMortarRoundProj.cs b/Projectiles/Ranged/RubberMortarRoundProj.cs index f7c9459ba4..41fb91cfb8 100644 --- a/Projectiles/Ranged/RubberMortarRoundProj.cs +++ b/Projectiles/Ranged/RubberMortarRoundProj.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Ranged xOffset = Projectile.velocity.X * 0.5f; yOffset = Projectile.velocity.Y * 0.5f; } - int fire = Dust.NewDust(new Vector2(Projectile.position.X + 3f + xOffset, Projectile.position.Y + 3f + yOffset) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(new Vector2(Projectile.position.X + 3f + xOffset, Projectile.position.Y + 3f + yOffset) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, 1f); Main.dust[fire].scale *= 2f + (float)Main.rand.Next(10) * 0.1f; Main.dust[fire].velocity *= 0.2f; Main.dust[fire].noGravity = true; @@ -140,10 +140,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int d = 0; d < 70; d++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } } diff --git a/Projectiles/Ranged/SeaDragonRocket.cs b/Projectiles/Ranged/SeaDragonRocket.cs index 303913bfa3..e2b2d4668a 100644 --- a/Projectiles/Ranged/SeaDragonRocket.cs +++ b/Projectiles/Ranged/SeaDragonRocket.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i < 5; i++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 3f; if (Main.rand.NextBool(2)) { @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Ranged num247 = Projectile.velocity.X * 0.5f; num248 = Projectile.velocity.Y * 0.5f; } - int explosion = Dust.NewDust(new Vector2(Projectile.position.X + 3f + num247, Projectile.position.Y + 3f + num248) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, DustID.Fire, 0f, 0f, 100, default, 1f); + int explosion = Dust.NewDust(new Vector2(Projectile.position.X + 3f + num247, Projectile.position.Y + 3f + num248) - Projectile.velocity * 0.5f, Projectile.width - 8, Projectile.height - 8, 6, 0f, 0f, 100, default, 1f); Main.dust[explosion].scale *= 2f + (float)Main.rand.Next(10) * 0.1f; Main.dust[explosion].velocity *= 0.2f; Main.dust[explosion].noGravity = true; @@ -101,10 +101,10 @@ namespace CalamityMod.Projectiles.Ranged } for (int j = 0; j < 25; j++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } int projAmt = Main.rand.Next(2, 4); diff --git a/Projectiles/Ranged/SparkSpreaderFire.cs b/Projectiles/Ranged/SparkSpreaderFire.cs index d9aed39845..09dab31fc3 100644 --- a/Projectiles/Ranged/SparkSpreaderFire.cs +++ b/Projectiles/Ranged/SparkSpreaderFire.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Ranged dustScaleSize = 0.75f; } Projectile.ai[0] += 1f; - int dustType = DustID.Fire; + int dustType = 6; for (int i = 0; i < 2; i++) { int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 10, default, 0.75f); diff --git a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs index cceb09bbe7..1f3f97a654 100644 --- a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs +++ b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.Center.X, (int)Projectile.Center.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.Center.X, (int)Projectile.Center.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/AlphaVirusProjectile.cs b/Projectiles/Rogue/AlphaVirusProjectile.cs index 99f6b3f3dc..0f615cc70a 100644 --- a/Projectiles/Rogue/AlphaVirusProjectile.cs +++ b/Projectiles/Rogue/AlphaVirusProjectile.cs @@ -142,7 +142,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { // Aura effect - Texture2D aura = ModContent.Request("CalamityMod/Projectiles/Rogue/AlphaVirusAura"); + Texture2D aura = ModContent.Request("CalamityMod/Projectiles/Rogue/AlphaVirusAura").Value; float scaleStep = 0.03f; float rotationOffset = 0.03f; float drawTransparency = 0.1f; diff --git a/Projectiles/Rogue/AntumbraShardProjectile.cs b/Projectiles/Rogue/AntumbraShardProjectile.cs index b6738f066f..3339fe301b 100644 --- a/Projectiles/Rogue/AntumbraShardProjectile.cs +++ b/Projectiles/Rogue/AntumbraShardProjectile.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/ApoctolithProj.cs b/Projectiles/Rogue/ApoctolithProj.cs index 7c96fcfeaa..7ca5b63d62 100644 --- a/Projectiles/Rogue/ApoctolithProj.cs +++ b/Projectiles/Rogue/ApoctolithProj.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D tex = ModContent.Request("CalamityMod/Items/Weapons/Rogue/ApoctolithGlow"); + Texture2D tex = ModContent.Request("CalamityMod/Items/Weapons/Rogue/ApoctolithGlow").Value; Vector2 origin = new Vector2(32f, 33f); Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); } diff --git a/Projectiles/Rogue/BallisticPoisonBombProj.cs b/Projectiles/Rogue/BallisticPoisonBombProj.cs index 810ad0f7f1..a58a6d1c72 100644 --- a/Projectiles/Rogue/BallisticPoisonBombProj.cs +++ b/Projectiles/Rogue/BallisticPoisonBombProj.cs @@ -90,10 +90,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int d = 0; d < 9; d++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } CalamityUtils.ExplosionGores(Projectile.Center, 3); diff --git a/Projectiles/Rogue/BlunderBoosterLightning.cs b/Projectiles/Rogue/BlunderBoosterLightning.cs index e426409705..ff3d66fe93 100644 --- a/Projectiles/Rogue/BlunderBoosterLightning.cs +++ b/Projectiles/Rogue/BlunderBoosterLightning.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -101,9 +101,9 @@ namespace CalamityMod.Projectiles.Rogue { Texture2D sprite; if (Projectile.ai[0] == 0f) - sprite = ModContent.Request("CalamityMod/Projectiles/Rogue/BlunderBoosterLightning"); + sprite = ModContent.Request("CalamityMod/Projectiles/Rogue/BlunderBoosterLightning").Value; else - sprite = ModContent.Request("CalamityMod/Projectiles/Rogue/BlunderBoosterLightning2"); + sprite = ModContent.Request("CalamityMod/Projectiles/Rogue/BlunderBoosterLightning2").Value; Color drawColour = Color.White; Vector2 origin = new Vector2(frameWidth / 2, frameHeight / 2); diff --git a/Projectiles/Rogue/Brick.cs b/Projectiles/Rogue/Brick.cs index 3b81d9f25b..ea882a4ab8 100644 --- a/Projectiles/Rogue/Brick.cs +++ b/Projectiles/Rogue/Brick.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } SoundEngine.PlaySound(SoundID.Item, (int)Projectile.position.X, (int)Projectile.position.Y, 50); diff --git a/Projectiles/Rogue/CobaltKunaiProjectile.cs b/Projectiles/Rogue/CobaltKunaiProjectile.cs index c8f50df59f..8c00df9b19 100644 --- a/Projectiles/Rogue/CobaltKunaiProjectile.cs +++ b/Projectiles/Rogue/CobaltKunaiProjectile.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } } diff --git a/Projectiles/Rogue/CraniumSmasherStealth.cs b/Projectiles/Rogue/CraniumSmasherStealth.cs index 6180c46a24..3196d19242 100644 --- a/Projectiles/Rogue/CraniumSmasherStealth.cs +++ b/Projectiles/Rogue/CraniumSmasherStealth.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D tex = ModContent.Request("CalamityMod/Projectiles/Rogue/CraniumSmasherGlow"); + Texture2D tex = ModContent.Request("CalamityMod/Projectiles/Rogue/CraniumSmasherGlow").Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0); } } diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 53f273f9c9..e73636ae47 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/EradicatorProjectile.cs index ee672c59b0..c112d319d3 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/EradicatorProjectile.cs @@ -209,7 +209,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { Vector2 origin = new Vector2(31f, 29f); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/EradicatorGlow"), Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/EradicatorGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } } } diff --git a/Projectiles/Rogue/ExecutionersBladeProj.cs b/Projectiles/Rogue/ExecutionersBladeProj.cs index 88875e84e2..34d0748870 100644 --- a/Projectiles/Rogue/ExecutionersBladeProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeProj.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { Vector2 origin = new Vector2(32f, 32f); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/ExecutionersBladeGlow"), Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/ExecutionersBladeGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/ExecutionersBladeStealthProj.cs b/Projectiles/Rogue/ExecutionersBladeStealthProj.cs index e5b7af86ea..c449b2f8e0 100644 --- a/Projectiles/Rogue/ExecutionersBladeStealthProj.cs +++ b/Projectiles/Rogue/ExecutionersBladeStealthProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { Vector2 origin = new Vector2(32f, 32f); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/ExecutionersBladeGlow"), Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/ExecutionersBladeGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/ExplosiveSun.cs b/Projectiles/Rogue/ExplosiveSun.cs index e1db2ec25c..cbdee5d684 100644 --- a/Projectiles/Rogue/ExplosiveSun.cs +++ b/Projectiles/Rogue/ExplosiveSun.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -42,13 +42,13 @@ namespace CalamityMod.Projectiles.Rogue //Changes the texture of the projectile if (Projectile.ai[0] == 1f) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/ExplosiveSun2"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/ExplosiveSun2").Value; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } if (Projectile.ai[0] == 2f) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/ExplosiveSun3"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/ExplosiveSun3").Value; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, texture.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index 8c02dc1080..b8fc2d4854 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { if (Main.rand.NextBool(2) && !Projectile.noDropItem) - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } } diff --git a/Projectiles/Rogue/FinalDawnFireSlash.cs b/Projectiles/Rogue/FinalDawnFireSlash.cs index d6d2c18be0..8c6e745cd2 100644 --- a/Projectiles/Rogue/FinalDawnFireSlash.cs +++ b/Projectiles/Rogue/FinalDawnFireSlash.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue Rectangle frameRectangle = new Rectangle(Projectile.frame / 5 * width, Projectile.frame % 5 * height, width, height); Texture2D scytheTexture = ModContent.Request(Texture).Value; - Texture2D glowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnFireSlash_Glow"); + Texture2D glowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnFireSlash_Glow").Value; Main.spriteBatch.Draw(scytheTexture, drawCenter - Main.screenPosition, diff --git a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs index b167b814b9..1e280cf0ff 100644 --- a/Projectiles/Rogue/FinalDawnHorizontalSlash.cs +++ b/Projectiles/Rogue/FinalDawnHorizontalSlash.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D scytheTexture = ModContent.Request(Texture).Value; - Texture2D scytheGlowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnHorizontalSlash_Glow"); + Texture2D scytheGlowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnHorizontalSlash_Glow").Value; int height = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(scytheTexture, diff --git a/Projectiles/Rogue/FinalDawnProjectile.cs b/Projectiles/Rogue/FinalDawnProjectile.cs index 6168d38ddc..c4654ef155 100644 --- a/Projectiles/Rogue/FinalDawnProjectile.cs +++ b/Projectiles/Rogue/FinalDawnProjectile.cs @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D scytheTexture = ModContent.Request(Texture).Value; - Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnProjectile_Glow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnProjectile_Glow").Value; int height = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(scytheTexture, diff --git a/Projectiles/Rogue/FinalDawnReticle.cs b/Projectiles/Rogue/FinalDawnReticle.cs index 1006ec4fd0..4cfd5a9ee6 100644 --- a/Projectiles/Rogue/FinalDawnReticle.cs +++ b/Projectiles/Rogue/FinalDawnReticle.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D ring = ModContent.Request(Texture).Value; - Texture2D symbol = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnReticleSymbol"); + Texture2D symbol = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnReticleSymbol").Value; Main.EntitySpriteDraw(symbol, Projectile.Center - Main.screenPosition, null, diff --git a/Projectiles/Rogue/FinalDawnThrow.cs b/Projectiles/Rogue/FinalDawnThrow.cs index 1e49125b0a..7242f2361a 100644 --- a/Projectiles/Rogue/FinalDawnThrow.cs +++ b/Projectiles/Rogue/FinalDawnThrow.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D scytheTexture = ModContent.Request(Texture).Value; - Texture2D scytheGlowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnThrow_Glow"); + Texture2D scytheGlowTexture = ModContent.Request("CalamityMod/Projectiles/Rogue/FinalDawnThrow_Glow").Value; int height = ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type]; int yStart = height * Projectile.frame; Main.spriteBatch.Draw(scytheTexture, diff --git a/Projectiles/Rogue/GelDartProjectile.cs b/Projectiles/Rogue/GelDartProjectile.cs index 015d4e9b47..a9ee01c382 100644 --- a/Projectiles/Rogue/GelDartProjectile.cs +++ b/Projectiles/Rogue/GelDartProjectile.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/GhoulishGougerBoomerang.cs b/Projectiles/Rogue/GhoulishGougerBoomerang.cs index bace46b4de..0331b1f22f 100644 --- a/Projectiles/Rogue/GhoulishGougerBoomerang.cs +++ b/Projectiles/Rogue/GhoulishGougerBoomerang.cs @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { Vector2 origin = new Vector2(37f, 34f); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/GhoulishGougerGlow"), Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Weapons/Rogue/GhoulishGougerGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/Honeycomb.cs b/Projectiles/Rogue/Honeycomb.cs index c8f7711f08..208ca50a18 100644 --- a/Projectiles/Rogue/Honeycomb.cs +++ b/Projectiles/Rogue/Honeycomb.cs @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } } diff --git a/Projectiles/Rogue/HoneycombFragment.cs b/Projectiles/Rogue/HoneycombFragment.cs index 803eba3964..cbf113ac82 100644 --- a/Projectiles/Rogue/HoneycombFragment.cs +++ b/Projectiles/Rogue/HoneycombFragment.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ModLoader; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -25,13 +25,13 @@ namespace CalamityMod.Projectiles.Rogue //Changes the texture of the projectile if (Projectile.ai[0] == 1f) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HoneycombFragment2"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HoneycombFragment2").Value; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, 12, 14)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, 20 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } if (Projectile.ai[0] == 2f) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HoneycombFragment3"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HoneycombFragment3").Value; Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, 16, 14)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, 20 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/Rogue/HypothermiaShard.cs b/Projectiles/Rogue/HypothermiaShard.cs index dc87eff63f..647b16e819 100644 --- a/Projectiles/Rogue/HypothermiaShard.cs +++ b/Projectiles/Rogue/HypothermiaShard.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -90,15 +90,15 @@ namespace CalamityMod.Projectiles.Rogue Texture2D texture = ModContent.Request(Texture).Value; if (Projectile.ai[0] == 1f) { - texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard2"); + texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard2").Value; } if (Projectile.ai[0] == 2f) { - texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard3"); + texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard3").Value; } if (Projectile.ai[0] == 3f) { - texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard4"); + texture = ModContent.Request("CalamityMod/Projectiles/Rogue/HypothermiaShard4").Value; } 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); return false; diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index f121b8fb3c..2d508a9891 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -168,7 +168,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.Next(4) == 0) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } if (Projectile.Calamity().stealthStrike) diff --git a/Projectiles/Rogue/IronFranciscaProj.cs b/Projectiles/Rogue/IronFranciscaProj.cs index 6ebb64aa5a..d3b120d701 100644 --- a/Projectiles/Rogue/IronFranciscaProj.cs +++ b/Projectiles/Rogue/IronFranciscaProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.Next(4) == 0) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/LeadTomahawkProj.cs b/Projectiles/Rogue/LeadTomahawkProj.cs index deb8d81f21..9c8b2f57f7 100644 --- a/Projectiles/Rogue/LeadTomahawkProj.cs +++ b/Projectiles/Rogue/LeadTomahawkProj.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.Next(4) == 0) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/LeonidCometBig.cs b/Projectiles/Rogue/LeonidCometBig.cs index 332051e0f5..5a7442307a 100644 --- a/Projectiles/Rogue/LeonidCometBig.cs +++ b/Projectiles/Rogue/LeonidCometBig.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeonidCometBigGlow"); + Texture2D tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeonidCometBigGlow").Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0); } @@ -65,11 +65,11 @@ namespace CalamityMod.Projectiles.Rogue Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 31, 0.0f, 0.0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); for (int index1 = 0; index1 < 32; ++index1) { - int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 2.5f); + int index2 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 2.5f); Dust dust1 = Main.dust[index2]; dust1.noGravity = true; dust1.velocity *= 3f; - int index3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); + int index3 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 6, 0f, 0f, 100, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1.5f); Dust dust2 = Main.dust[index3]; dust2.velocity *= 2f; dust2.noGravity = true; @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue } for (int index1 = 0; index1 < 5; ++index1) { - int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Utils.SelectRandom(Main.rand, new int[3]{ DustID.Fire, 259, 158 }), 2.5f * (float) Projectile.direction, -2.5f, 0, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1f); + int index2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, Utils.SelectRandom(Main.rand, new int[3]{ 6, 259, 158 }), 2.5f * (float) Projectile.direction, -2.5f, 0, CalamityUtils.ColorSwap(LeonidProgenitor.blueColor, LeonidProgenitor.purpleColor, 1f), 1f); Dust dust1 = Main.dust[index2]; dust1.alpha = 200; dust1.velocity *= 2.4f; diff --git a/Projectiles/Rogue/LeonidCometSmall.cs b/Projectiles/Rogue/LeonidCometSmall.cs index 2e0339750b..88aed652ec 100644 --- a/Projectiles/Rogue/LeonidCometSmall.cs +++ b/Projectiles/Rogue/LeonidCometSmall.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D tex = ModContent.Request("CalamityMod/Items/Weapons/Rogue/LeonidProgenitorGlow"); + Texture2D tex = ModContent.Request("CalamityMod/Items/Weapons/Rogue/LeonidProgenitorGlow").Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0); } diff --git a/Projectiles/Rogue/LeonidProgenitorBombshell.cs b/Projectiles/Rogue/LeonidProgenitorBombshell.cs index cabee4b8d6..ea0966aab7 100644 --- a/Projectiles/Rogue/LeonidProgenitorBombshell.cs +++ b/Projectiles/Rogue/LeonidProgenitorBombshell.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D tex = ModContent.Request("CalamityMod/Items/Weapons/Rogue/LeonidProgenitorGlow"); + Texture2D tex = ModContent.Request("CalamityMod/Items/Weapons/Rogue/LeonidProgenitorGlow").Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() / 2, Projectile.scale, SpriteEffects.None, 0); } diff --git a/Projectiles/Rogue/LeviathanTooth.cs b/Projectiles/Rogue/LeviathanTooth.cs index 37014bd736..11ba9324f8 100644 --- a/Projectiles/Rogue/LeviathanTooth.cs +++ b/Projectiles/Rogue/LeviathanTooth.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -67,9 +67,9 @@ namespace CalamityMod.Projectiles.Rogue { Texture2D tex = ModContent.Request(Texture).Value; if (Projectile.Calamity().lineColor == 1) - tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeviathanTooth2"); + tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeviathanTooth2").Value; if (Projectile.Calamity().lineColor == 2) - tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeviathanTooth3"); + tex = ModContent.Request("CalamityMod/Projectiles/Rogue/LeviathanTooth3").Value; Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); if (Projectile.Calamity().stealthStrike) diff --git a/Projectiles/Rogue/LionfishProj.cs b/Projectiles/Rogue/LionfishProj.cs index 22a9042456..4df7dbe440 100644 --- a/Projectiles/Rogue/LionfishProj.cs +++ b/Projectiles/Rogue/LionfishProj.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Projectiles.Rogue SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Rogue/MetalShard.cs b/Projectiles/Rogue/MetalShard.cs index 5da9c1d920..9587a16f30 100644 --- a/Projectiles/Rogue/MetalShard.cs +++ b/Projectiles/Rogue/MetalShard.cs @@ -1,4 +1,4 @@ - + using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -62,11 +62,11 @@ namespace CalamityMod.Projectiles.Rogue switch (Projectile.localAI[1]) { - case 2f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MetalShard2"); + case 2f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MetalShard2").Value; break; - case 3f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MetalShard3"); + case 3f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MetalShard3").Value; break; - default: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MetalShard"); + default: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MetalShard").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/MonkeyDart.cs b/Projectiles/Rogue/MonkeyDart.cs index fc65a2bba5..2c9a12307c 100644 --- a/Projectiles/Rogue/MonkeyDart.cs +++ b/Projectiles/Rogue/MonkeyDart.cs @@ -73,9 +73,8 @@ namespace CalamityMod.Projectiles.Rogue //Randomly not consume item if it wasnt a stealth strike if (Main.rand.Next(4) == 0 && Projectile.ai[0] != 1) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, 27, 27, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, 27, 27, ModContent.ItemType()); } - } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/MoonSigil.cs b/Projectiles/Rogue/MoonSigil.cs index 2e6ec320d9..c47fcd63ca 100644 --- a/Projectiles/Rogue/MoonSigil.cs +++ b/Projectiles/Rogue/MoonSigil.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MoonSigil"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MoonSigil").Value; Main.spriteBatch.Draw ( texture, diff --git a/Projectiles/Rogue/MythrilKnifeProjectile.cs b/Projectiles/Rogue/MythrilKnifeProjectile.cs index 203ce3d815..781636056b 100644 --- a/Projectiles/Rogue/MythrilKnifeProjectile.cs +++ b/Projectiles/Rogue/MythrilKnifeProjectile.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/NanoblackStealthSplit.cs b/Projectiles/Rogue/NanoblackStealthSplit.cs index b34fbb5398..de87e2716b 100644 --- a/Projectiles/Rogue/NanoblackStealthSplit.cs +++ b/Projectiles/Rogue/NanoblackStealthSplit.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -9,7 +9,6 @@ namespace CalamityMod.Projectiles.Rogue { public class NanoblackStealthSplit : ModProjectile { - public override string Texture => "CalamityMod/Items/Weapons/Rogue/NanoblackReaperRogue"; private static int Lifetime = 300; diff --git a/Projectiles/Rogue/NightsGazeProjectile.cs b/Projectiles/Rogue/NightsGazeProjectile.cs index a14f938872..020de1e340 100644 --- a/Projectiles/Rogue/NightsGazeProjectile.cs +++ b/Projectiles/Rogue/NightsGazeProjectile.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Rogue/NightsGazeGlow"); + Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Rogue/NightsGazeGlow").Value; Vector2 origin = new Vector2(texture.Width / 2f, texture.Height / 2f); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); } diff --git a/Projectiles/Rogue/NychthemeronOrb.cs b/Projectiles/Rogue/NychthemeronOrb.cs index 9be94432b5..8d69ba179c 100644 --- a/Projectiles/Rogue/NychthemeronOrb.cs +++ b/Projectiles/Rogue/NychthemeronOrb.cs @@ -1,4 +1,4 @@ - + using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D texLight = ModContent.Request(Texture).Value; - Texture2D texDark = ModContent.Request("CalamityMod/Projectiles/Rogue/NychthemeronOrb2"); + Texture2D texDark = ModContent.Request("CalamityMod/Projectiles/Rogue/NychthemeronOrb2").Value; if (Projectile.ai[0] == 0f) { Main.EntitySpriteDraw(texLight, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, texLight.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs index a3abec0443..5b6615de80 100644 --- a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs +++ b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } } diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index 2d3042969b..d57304f19d 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2) && !Projectile.Calamity().stealthStrike) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } } diff --git a/Projectiles/Rogue/PanSpark.cs b/Projectiles/Rogue/PanSpark.cs index 5bb30e1078..e026f80390 100644 --- a/Projectiles/Rogue/PanSpark.cs +++ b/Projectiles/Rogue/PanSpark.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue //dust if (Main.rand.NextBool(4)) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[fire]; dust.position.X -= 2f; dust.position.Y += 2f; @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Main.rand.NextBool(10)) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[fire]; dust.position.X -= 2f; dust.position.Y += 2f; diff --git a/Projectiles/Rogue/PlaguenadeBee.cs b/Projectiles/Rogue/PlaguenadeBee.cs index 1b07b3379e..e2a6dba3c6 100644 --- a/Projectiles/Rogue/PlaguenadeBee.cs +++ b/Projectiles/Rogue/PlaguenadeBee.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Rogue SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture.Width / 2f, (float)frameHeight / 2f), Projectile.scale, spriteEffects, 0); return false; } diff --git a/Projectiles/Rogue/PlaguenadeProj.cs b/Projectiles/Rogue/PlaguenadeProj.cs index d9ba9902a1..69172eb7df 100644 --- a/Projectiles/Rogue/PlaguenadeProj.cs +++ b/Projectiles/Rogue/PlaguenadeProj.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Rogue int plague = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 89, 0f, 0f, 100, default, 3f); Main.dust[plague].noGravity = true; Main.dust[plague].velocity *= 5f; - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } CalamityUtils.ExplosionGores(Projectile.Center, 3); diff --git a/Projectiles/Rogue/RefractionRotorProjectile.cs b/Projectiles/Rogue/RefractionRotorProjectile.cs index 5116b5d09c..4c795b0e25 100644 --- a/Projectiles/Rogue/RefractionRotorProjectile.cs +++ b/Projectiles/Rogue/RefractionRotorProjectile.cs @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Rogue public override void PostDraw(Color lightColor) { - Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Rogue/RefractionRotorGlowmask"); + Texture2D glowmask = ModContent.Request("CalamityMod/Projectiles/Rogue/RefractionRotorGlowmask").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY; Vector2 origin = glowmask.Size() * 0.5f; Main.EntitySpriteDraw(glowmask, drawPosition, null, Projectile.GetAlpha(Color.White), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Rogue/RotBallProjectile.cs b/Projectiles/Rogue/RotBallProjectile.cs index c646c865fd..e8c43a2073 100644 --- a/Projectiles/Rogue/RotBallProjectile.cs +++ b/Projectiles/Rogue/RotBallProjectile.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(2)) { - Item.NewItem((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); + Item.NewItem(Projectile.GetItemSource_DropAsItem(), (int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height, ModContent.ItemType()); } } diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index 30b720b43f..f1719005fb 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -178,10 +178,10 @@ namespace CalamityMod.Projectiles.Rogue if (TrailDrawer is null) TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction, PrimitiveTrail.RigidPointRetreivalFunction, GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"]); - GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/ScarletDevilStreak")); + GameShaders.Misc["CalamityMod:OverpoweredTouhouSpearShader"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/ScarletDevilStreak").Value); TrailDrawer.Draw(Projectile.oldPos, Projectile.Size * 0.5f - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.Zero) * 86f, 60); - Texture2D spearTexture = ModContent.Request(Texture); + Texture2D spearTexture = ModContent.Request(Texture).Value; for (int i = 0; i < 7; i++) { diff --git a/Projectiles/Rogue/SealedSingularityGore.cs b/Projectiles/Rogue/SealedSingularityGore.cs index 8231858f39..c661b09b84 100644 --- a/Projectiles/Rogue/SealedSingularityGore.cs +++ b/Projectiles/Rogue/SealedSingularityGore.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -50,9 +50,9 @@ namespace CalamityMod.Projectiles.Rogue Texture2D texture; switch (Projectile.ai[0]) { - case 1f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityGore2"); + case 1f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityGore2").Value; break; - case 2f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityGore3"); + case 2f: texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityGore3").Value; break; default: texture = ModContent.Request(Texture).Value; break; diff --git a/Projectiles/Rogue/SearedPanProjectile.cs b/Projectiles/Rogue/SearedPanProjectile.cs index 668dcda658..57cddbd2d7 100644 --- a/Projectiles/Rogue/SearedPanProjectile.cs +++ b/Projectiles/Rogue/SearedPanProjectile.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Rogue { if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner) continue; - if (Main.projectile[i].modProjectile is NiceCock) + if (Main.projectile[i].ModProjectile is NiceCock) { if (!activate) Main.projectile[i].Kill(); @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Rogue // Keep the loop as short as possible if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1]) continue; - if (Main.projectile[i].modProjectile is NiceCock) + if (Main.projectile[i].ModProjectile is NiceCock) { if (Main.projectile[i].ModProjectile().homing) continue; @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.Rogue { if (!Main.projectile[i].active || Main.projectile[i].owner != Projectile.owner || !Main.projectile[i].Calamity().rogue || targetIndex != (int)Main.projectile[i].ai[1]) continue; - if (Main.projectile[i].modProjectile is NiceCock) + if (Main.projectile[i].ModProjectile is NiceCock) { if (Main.projectile[i].ModProjectile().homing) continue; diff --git a/Projectiles/Rogue/SeraphimBeamLarge.cs b/Projectiles/Rogue/SeraphimBeamLarge.cs index a0cd45914f..0c6814288c 100644 --- a/Projectiles/Rogue/SeraphimBeamLarge.cs +++ b/Projectiles/Rogue/SeraphimBeamLarge.cs @@ -33,9 +33,9 @@ namespace CalamityMod.Projectiles.Rogue } } public override Color LightCastColor => Color.Transparent; - public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/Projectiles/Rogue/SeraphimBeamLarge"); - public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeMiddle"); - public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeEnd"); + public override Texture2D LaserBeginTexture => ModContent.Request("CalamityMod/Projectiles/Rogue/SeraphimBeamLarge").Value; + public override Texture2D LaserMiddleTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeMiddle").Value; + public override Texture2D LaserEndTexture => ModContent.Request("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeEnd").Value; public override void SetStaticDefaults() { diff --git a/Projectiles/Rogue/SupernovaBomb.cs b/Projectiles/Rogue/SupernovaBomb.cs index dc38b92ef4..23d0e1ab73 100644 --- a/Projectiles/Rogue/SupernovaBomb.cs +++ b/Projectiles/Rogue/SupernovaBomb.cs @@ -117,10 +117,10 @@ namespace CalamityMod.Projectiles.Rogue } for (int d = 0; d < 9; d++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } diff --git a/Projectiles/Rogue/TotalityFire.cs b/Projectiles/Rogue/TotalityFire.cs index 2cc92f7599..f7634cc63f 100644 --- a/Projectiles/Rogue/TotalityFire.cs +++ b/Projectiles/Rogue/TotalityFire.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Rogue //dust if (Main.rand.NextBool(4)) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[fire]; dust.position.X -= 2f; dust.position.Y += 2f; @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Rogue } if (Main.rand.NextBool(10)) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[fire]; dust.position.X -= 2f; dust.position.Y += 2f; diff --git a/Projectiles/Rogue/TotalityFlask.cs b/Projectiles/Rogue/TotalityFlask.cs index d4c718a18e..7ae6998edd 100644 --- a/Projectiles/Rogue/TotalityFlask.cs +++ b/Projectiles/Rogue/TotalityFlask.cs @@ -75,11 +75,11 @@ namespace CalamityMod.Projectiles.Rogue } for (int d = 0; d < 20; ++d) { - int index2 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, DustID.Fire, 0.0f, 0.0f, 100, new Color(), 2.5f); + int index2 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 2.5f); Dust dust1 = Main.dust[index2]; dust1.noGravity = true; dust1.velocity *= 5f; - int index3 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, DustID.Fire, 0.0f, 0.0f, 100, new Color(), 1.5f); + int index3 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 1.5f); Dust dust2 = Main.dust[index3]; dust2.velocity *= 3f; } diff --git a/Projectiles/Rogue/TotalityTar.cs b/Projectiles/Rogue/TotalityTar.cs index 273f789176..06c61ac13c 100644 --- a/Projectiles/Rogue/TotalityTar.cs +++ b/Projectiles/Rogue/TotalityTar.cs @@ -96,11 +96,11 @@ namespace CalamityMod.Projectiles.Rogue } for (int index1 = 0; index1 < 10; ++index1) { - int index2 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, DustID.Fire, 0.0f, 0.0f, 100, new Color(), 2.5f); + int index2 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 2.5f); Dust dust1 = Main.dust[index2]; dust1.noGravity = true; dust1.velocity *= 5f; - int index3 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, DustID.Fire, 0.0f, 0.0f, 100, new Color(), 1.5f); + int index3 = Dust.NewDust(Projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 1.5f); Dust dust2 = Main.dust[index3]; dust2.velocity *= 3f; } diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index 5ca9eb597a..b71519d823 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -259,7 +259,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 velocity = targetVec - Projectile.Center; velocity.Normalize(); velocity *= projSpeed; - Projectile.NewProjectile(Projectile.Center, velocity, projType, Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, velocity, projType, Projectile.damage, Projectile.knockBack, Projectile.owner); Projectile.netUpdate = true; } } @@ -276,21 +276,21 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); return false; } //Pretty glowmask public override void PostDraw(Color lightColor) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/BlackHawkGlow"); + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Summon/BlackHawkGlow").Value; int frameHeight = texture.Height / Main.projFrames[Projectile.type]; int y6 = frameHeight * Projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Color.White, Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Color.White, Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); } } } diff --git a/Projectiles/Summon/BloodClotMinion.cs b/Projectiles/Summon/BloodClotMinion.cs index 11e42f58d1..1ef5e24bdb 100644 --- a/Projectiles/Summon/BloodClotMinion.cs +++ b/Projectiles/Summon/BloodClotMinion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Summon; +using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using System; @@ -228,48 +228,10 @@ namespace CalamityMod.Projectiles.Summon } } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - Rectangle myRect = new Rectangle((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height); - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && - ((Projectile.friendly && (!Main.npc[i].friendly || Projectile.type == 318 || (Main.npc[i].type == NPCID.Guide && Projectile.owner < 255 && Main.player[Projectile.owner].killGuide) || (Main.npc[i].type == NPCID.Clothier && Projectile.owner < 255 && Main.player[Projectile.owner].killClothier))) || - (Projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (Projectile.owner < 0 || Main.npc[i].immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1)) - { - if (Main.npc[i].noTileCollide || !Projectile.ownerHitCheck || Projectile.CanHit(Main.npc[i])) - { - bool flag3; - if (Main.npc[i].type == NPCID.SolarCrawltipedeTail) - { - Rectangle rect = Main.npc[i].getRect(); - int num5 = 8; - rect.X -= num5; - rect.Y -= num5; - rect.Width += num5 * 2; - rect.Height += num5 * 2; - flag3 = Projectile.Colliding(myRect, rect); - } - else - { - flag3 = Projectile.Colliding(myRect, Main.npc[i].getRect()); - } - if (flag3) - { - if (Main.npc[i].reflectingProjectiles && Projectile.CanReflect()) - { - Main.npc[i].ReflectProjectile(Projectile.whoAmI); - return; - } - Projectile.ai[1] = -1f; - Projectile.netUpdate = true; - } - } - } - } - } + Projectile.ai[1] = -1f; + Projectile.netUpdate = true; } } } diff --git a/Projectiles/Summon/ColdDivinityPointyThing.cs b/Projectiles/Summon/ColdDivinityPointyThing.cs index 6e8b4117db..2c7cf47ec4 100644 --- a/Projectiles/Summon/ColdDivinityPointyThing.cs +++ b/Projectiles/Summon/ColdDivinityPointyThing.cs @@ -220,7 +220,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 velocity = Projectile.ai[0].ToRotationVector2().RotatedBy(Math.Atan(0)); velocity.Normalize(); velocity *= 20f; - Projectile.NewProjectile(Projectile.position, velocity, Projectile.type, (int)(Projectile.damage * 1.05f), Projectile.knockBack, Projectile.owner, Projectile.ai[0], 1f); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.position, velocity, Projectile.type, (int)(Projectile.damage * 1.05f), Projectile.knockBack, Projectile.owner, Projectile.ai[0], 1f); } Projectile.netUpdate = Projectile.owner == Main.myPlayer; @@ -256,9 +256,9 @@ namespace CalamityMod.Projectiles.Summon { if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && Main.projectile[i].type == Projectile.type) { - ColdDivinityPointyThing pointy = (ColdDivinityPointyThing)Main.projectile[i].modProjectile; + ColdDivinityPointyThing pointy = (ColdDivinityPointyThing)Main.projectile[i].ModProjectile; if (Main.projectile[i].ai[1] > 2f) - circlers = circlers + Main.rand.Next(1, 4); + circlers += Main.rand.Next(1, 4); } } circlers = (int)MathHelper.Min(Main.rand.Next(15, 21), circlers); diff --git a/Projectiles/Summon/CorroslimeMinion.cs b/Projectiles/Summon/CorroslimeMinion.cs index a004d99c43..fe87873ad8 100644 --- a/Projectiles/Summon/CorroslimeMinion.cs +++ b/Projectiles/Summon/CorroslimeMinion.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.penetrate = -1; Projectile.timeLeft *= 5; Projectile.minion = true; - aiType = ProjectileID.BabySlime; + AIType = ProjectileID.BabySlime; Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 23; diff --git a/Projectiles/Summon/CorruptionSlimeGodMinion.cs b/Projectiles/Summon/CorruptionSlimeGodMinion.cs index 76aab6ebbc..fc19823543 100644 --- a/Projectiles/Summon/CorruptionSlimeGodMinion.cs +++ b/Projectiles/Summon/CorruptionSlimeGodMinion.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.penetrate = -1; Projectile.timeLeft *= 5; Projectile.minion = true; - aiType = ProjectileID.BabySlime; + AIType = ProjectileID.BabySlime; Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 23; diff --git a/Projectiles/Summon/CosmilampMinion.cs b/Projectiles/Summon/CosmilampMinion.cs index 196205d1fd..a050dfd897 100644 --- a/Projectiles/Summon/CosmilampMinion.cs +++ b/Projectiles/Summon/CosmilampMinion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Summon; +using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; using System; @@ -237,47 +237,12 @@ namespace CalamityMod.Projectiles.Summon } } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - Rectangle myRect = new Rectangle((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height); - if (Projectile.owner == Main.myPlayer) + if (Main.myPlayer == Projectile.owner) { - for (int i = 0; i < 200; i++) - { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && - ((Projectile.friendly && (!Main.npc[i].friendly || Projectile.type == 318 || (Main.npc[i].type == NPCID.Guide && Projectile.owner < 255 && Main.player[Projectile.owner].killGuide) || (Main.npc[i].type == NPCID.Clothier && Projectile.owner < 255 && Main.player[Projectile.owner].killClothier))) || - (Projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (Projectile.owner < 0 || Main.npc[i].immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1)) - { - if (Main.npc[i].noTileCollide || !Projectile.ownerHitCheck || Projectile.CanHit(Main.npc[i])) - { - bool flag3; - if (Main.npc[i].type == NPCID.SolarCrawltipedeTail) - { - Rectangle rect = Main.npc[i].getRect(); - int num5 = 8; - rect.X -= num5; - rect.Y -= num5; - rect.Width += num5 * 2; - rect.Height += num5 * 2; - flag3 = Projectile.Colliding(myRect, rect); - } - else - { - flag3 = Projectile.Colliding(myRect, Main.npc[i].getRect()); - } - if (flag3) - { - if (Main.npc[i].reflectingProjectiles && Projectile.CanReflect()) - { - Main.npc[i].ReflectProjectile(Projectile.whoAmI); - return; - } - Projectile.ai[1] = -1f; - Projectile.netUpdate = true; - } - } - } - } + Projectile.ai[1] = -1f; + Projectile.netUpdate = true; } } } diff --git a/Projectiles/Summon/DankCreeperMinion.cs b/Projectiles/Summon/DankCreeperMinion.cs index bb29fd03f8..2e11ed0103 100644 --- a/Projectiles/Summon/DankCreeperMinion.cs +++ b/Projectiles/Summon/DankCreeperMinion.cs @@ -214,47 +214,12 @@ namespace CalamityMod.Projectiles.Summon } } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - Rectangle myRect = new Rectangle((int)Projectile.position.X, (int)Projectile.position.Y, Projectile.width, Projectile.height); if (Projectile.owner == Main.myPlayer) { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && - ((Projectile.friendly && (!Main.npc[i].friendly || Projectile.type == 318 || (Main.npc[i].type == NPCID.Guide && Projectile.owner < 255 && Main.player[Projectile.owner].killGuide) || (Main.npc[i].type == NPCID.Clothier && Projectile.owner < 255 && Main.player[Projectile.owner].killClothier))) || - (Projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (Projectile.owner < 0 || Main.npc[i].immune[Projectile.owner] == 0 || Projectile.maxPenetrate == 1)) - { - if (Main.npc[i].noTileCollide || !Projectile.ownerHitCheck || Projectile.CanHit(Main.npc[i])) - { - bool flag3; - if (Main.npc[i].type == NPCID.SolarCrawltipedeTail) - { - Rectangle rect = Main.npc[i].getRect(); - int num5 = 8; - rect.X -= num5; - rect.Y -= num5; - rect.Width += num5 * 2; - rect.Height += num5 * 2; - flag3 = Projectile.Colliding(myRect, rect); - } - else - { - flag3 = Projectile.Colliding(myRect, Main.npc[i].getRect()); - } - if (flag3) - { - if (Main.npc[i].reflectingProjectiles && Projectile.CanReflect()) - { - Main.npc[i].ReflectProjectile(Projectile.whoAmI); - return; - } - Projectile.ai[1] = -1f; - Projectile.netUpdate = true; - } - } - } - } + Projectile.ai[1] = -1f; + Projectile.netUpdate = true; } } diff --git a/Projectiles/Summon/DormantBrimseekerSummoner.cs b/Projectiles/Summon/DormantBrimseekerSummoner.cs index 5ccf1674ef..dbe353981f 100644 --- a/Projectiles/Summon/DormantBrimseekerSummoner.cs +++ b/Projectiles/Summon/DormantBrimseekerSummoner.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Summon public override void Kill(int timeLeft) { - Projectile.NewProjectile(Projectile.Center, Vector2.UnitY * 7f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetProjectileSource_FromThis(), Projectile.Center, Vector2.UnitY * 7f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } } diff --git a/Projectiles/Summon/GastricBelcher.cs b/Projectiles/Summon/GastricBelcher.cs index 46be6b876d..6f18bc4b55 100644 --- a/Projectiles/Summon/GastricBelcher.cs +++ b/Projectiles/Summon/GastricBelcher.cs @@ -320,7 +320,7 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, spriteEffects, 0); return false; } } diff --git a/Projectiles/Summon/GastricBelcherVomit.cs b/Projectiles/Summon/GastricBelcherVomit.cs index 99e62e0ffa..d885422f24 100644 --- a/Projectiles/Summon/GastricBelcherVomit.cs +++ b/Projectiles/Summon/GastricBelcherVomit.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -53,14 +53,14 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture; switch (Projectile.ai[0]) { - case 1f: texture = ModContent.Request("CalamityMod/Projectiles/Summon/GastricBelcherVomit2"); - break; - case 2f: texture = ModContent.Request("CalamityMod/Projectiles/Summon/GastricBelcherVomit3"); - break; + case 1f: texture = ModContent.Request("CalamityMod/Projectiles/Summon/GastricBelcherVomit2").Value; + break; + case 2f: texture = ModContent.Request("CalamityMod/Projectiles/Summon/GastricBelcherVomit3").Value; + break; default: texture = ModContent.Request(Texture).Value; - break; + 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); + 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); return false; } } diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index c29aa56fc7..98724057bb 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -144,10 +144,6 @@ namespace CalamityMod.Projectiles.Summon Rectangle rectangle = new Rectangle(0, 0, texture.Width, texture.Height); - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; - if (Lighting.NotRetro) { for (int i = 0; i < Projectile.oldPos.Length; i++) diff --git a/Projectiles/Summon/SeekerSummonProj.cs b/Projectiles/Summon/SeekerSummonProj.cs index eee1cee905..0200a24072 100644 --- a/Projectiles/Summon/SeekerSummonProj.cs +++ b/Projectiles/Summon/SeekerSummonProj.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < 40; i++) { - Dust brimstoneFire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(50f, 50f), DustID.Fireworks); + Dust brimstoneFire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(50f, 50f), works); brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 5f); brimstoneFire.scale = 1f + brimstoneFire.velocity.Length() * 0.1f; brimstoneFire.color = Color.Lerp(Color.White, Color.OrangeRed, Main.rand.NextFloat()); diff --git a/Projectiles/Typeless/AeroExplosive.cs b/Projectiles/Typeless/AeroExplosive.cs index 2183c077ca..86f121f1da 100644 --- a/Projectiles/Typeless/AeroExplosive.cs +++ b/Projectiles/Typeless/AeroExplosive.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Typeless; +using CalamityMod.Items.Weapons.Typeless; using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Typeless Main.dust[smoke].fadeIn = 1.5f + Main.rand.NextFloat(0f, 0.5f); Main.dust[smoke].noGravity = true; Main.dust[smoke].position = Projectile.Center + new Vector2(0f, -Projectile.height / 2f).RotatedBy(Projectile.rotation, default) * 1.1f; - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 1f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 1f); Main.dust[fire].scale = 1f + Main.rand.NextFloat(0f, 0.5f); Main.dust[fire].noGravity = true; Main.dust[fire].position = Projectile.Center + new Vector2(0f, -Projectile.height / 2f).RotatedBy(Projectile.rotation, default) * 1.1f; @@ -102,10 +102,10 @@ namespace CalamityMod.Projectiles.Typeless } for (int d = 0; d < 70; d++) { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 3f); + int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 3f); Main.dust[fire].noGravity = true; Main.dust[fire].velocity *= 5f; - fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Fire, 0f, 0f, 100, default, 2f); + fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 6, 0f, 0f, 100, default, 2f); Main.dust[fire].velocity *= 2f; } CalamityUtils.ExplosionGores(Projectile.Center, 3); diff --git a/Projectiles/Typeless/AstralFallingSand.cs b/Projectiles/Typeless/AstralFallingSand.cs index 264a3bc094..4b1de2ed1f 100644 --- a/Projectiles/Typeless/AstralFallingSand.cs +++ b/Projectiles/Typeless/AstralFallingSand.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Projectiles.Typeless Projectile.friendly = true; Projectile.hostile = true; Projectile.penetrate = -1; - base.SetDefaults(); } public override void Kill(int timeLeft) diff --git a/Tiles/Abyss/AcidwoodTile.cs b/Tiles/Abyss/AcidwoodTile.cs index 86b9079d8c..bfc9350c77 100644 --- a/Tiles/Abyss/AcidwoodTile.cs +++ b/Tiles/Abyss/AcidwoodTile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.Abyss int xPos = i % 6; int yPos = j % 3; frameXOffset = xPos * 288; - frameYOffset = yPos * animationFrameHeight; + frameYOffset = yPos * AnimationFrameHeight; } } } diff --git a/Tiles/Abyss/RustyChestTile.cs b/Tiles/Abyss/RustyChestTile.cs index 17a7490101..43264f60d3 100644 --- a/Tiles/Abyss/RustyChestTile.cs +++ b/Tiles/Abyss/RustyChestTile.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Rusty Chest"; + ContainerName.SetDefault("Rusty Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs index abacd67a3a..23572bfe12 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite2.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite2.cs index 015d2bed26..1c6957153c 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalacmite2.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite2.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite3.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite3.cs index 92d4046e5b..bd4a3df513 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalacmite3.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite3.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite4.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite4.cs index d114bdea12..f87f9db5b1 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalacmite4.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite4.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs index a90d42e7df..0f72eb0f8c 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs index 4501d2c82d..afe04060ea 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite1.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite1.cs index b9262bf0a1..9d0edcc178 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalactite1.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite1.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite2.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite2.cs index 5727e1704d..6edf8f9add 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalactite2.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite2.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite3.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite3.cs index 38b2fe51a2..56e2ad29eb 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalactite3.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite3.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite4.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite4.cs index d1e73e9f69..be2de66bbc 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalactite4.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite4.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs index eb09ebbd3a..44fcda7007 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite6.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite6.cs index 1c227dac76..0639322afc 100644 --- a/Tiles/Abyss/Stalactite/SulphurousStalactite6.cs +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite6.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Abyss.Stalactite AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) { diff --git a/Tiles/Abyss/SteamGeyser.cs b/Tiles/Abyss/SteamGeyser.cs index b3bb477e9f..cef0e85553 100644 --- a/Tiles/Abyss/SteamGeyser.cs +++ b/Tiles/Abyss/SteamGeyser.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(150, 100, 50), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override bool IsTileDangerous(int i, int j, Player player) => true; diff --git a/Tiles/Abyss/SulphurousColumn.cs b/Tiles/Abyss/SulphurousColumn.cs index 3a1f9c4530..b1fa565ab3 100644 --- a/Tiles/Abyss/SulphurousColumn.cs +++ b/Tiles/Abyss/SulphurousColumn.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.Abyss name.SetDefault("Column"); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void KillMultiTile(int i, int j, int frameX, int frameY) { diff --git a/Tiles/Abyss/SulphurousRib1.cs b/Tiles/Abyss/SulphurousRib1.cs index 3daaaedc06..f1b306652b 100644 --- a/Tiles/Abyss/SulphurousRib1.cs +++ b/Tiles/Abyss/SulphurousRib1.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/SulphurousRib2.cs b/Tiles/Abyss/SulphurousRib2.cs index 7ae10c21ce..79c2533e64 100644 --- a/Tiles/Abyss/SulphurousRib2.cs +++ b/Tiles/Abyss/SulphurousRib2.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/SulphurousRib3.cs b/Tiles/Abyss/SulphurousRib3.cs index 28df4e8093..b4f64eb8eb 100644 --- a/Tiles/Abyss/SulphurousRib3.cs +++ b/Tiles/Abyss/SulphurousRib3.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/SulphurousRib4.cs b/Tiles/Abyss/SulphurousRib4.cs index 38b089fae7..3c4924dbca 100644 --- a/Tiles/Abyss/SulphurousRib4.cs +++ b/Tiles/Abyss/SulphurousRib4.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Abyss/SulphurousRib5.cs b/Tiles/Abyss/SulphurousRib5.cs index c933182da5..eef5e78823 100644 --- a/Tiles/Abyss/SulphurousRib5.cs +++ b/Tiles/Abyss/SulphurousRib5.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.Abyss AddMapEntry(new Color(57, 48, 83), name); DustType = (int)CalamityDusts.SulfurousSeaAcid; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/Astral/AstralChestLocked.cs b/Tiles/Astral/AstralChestLocked.cs index 9f42f17de6..6e302374d4 100644 --- a/Tiles/Astral/AstralChestLocked.cs +++ b/Tiles/Astral/AstralChestLocked.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.Astral DustType = ModContent.DustType(); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Astral Chest"; + ContainerName.SetDefault("Astral Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/Astral/AstralMonolith.cs b/Tiles/Astral/AstralMonolith.cs index 4d4b15f321..a7a60a7de0 100644 --- a/Tiles/Astral/AstralMonolith.cs +++ b/Tiles/Astral/AstralMonolith.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -41,11 +41,11 @@ namespace CalamityMod.Tiles.Astral int yPos = j % 4; if ((xPos == 0 && yPos == 2) || (xPos == 1 && yPos == 3) || (xPos == 3 && yPos == 1)) - Main.tile[i, j].frameNumber(Main.tile[i, j - 1].frameNumber()); + Main.tile[i, j].Get().TileFrameNumber = Main.tile[i, j - 1].TileFrameNumber; else if (xPos == 2 && yPos == 2) - Main.tile[i, j].frameNumber(Main.tile[i - 1, j].frameNumber()); + Main.tile[i, j].Get().TileFrameNumber = Main.tile[i - 1, j].TileFrameNumber; else if (xPos == 2 && yPos == 3) - Main.tile[i, j].frameNumber(Main.tile[i - 1, j - 1].frameNumber()); + Main.tile[i, j].Get().TileFrameNumber = Main.tile[i - 1, j - 1].TileFrameNumber; GetDrawSpecifics(i, j, ref xPos, ref yPos); @@ -69,11 +69,11 @@ namespace CalamityMod.Tiles.Astral int yPos = tile.TileFrameY; xPos += xOffset; yPos += yOffset; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/Astral/AstralMonolithGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/Astral/AstralMonolithGlow").Value; Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); - if (!tile.IsHalfBlock && tile.slope() == 0) + if (!tile.IsHalfBlock && tile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } @@ -93,7 +93,7 @@ namespace CalamityMod.Tiles.Astral { Tile tile = Main.tile[i, j]; // Make sure the features work as intended - if (tile.frameNumber() == 1) + if (tile.TileFrameNumber == 1) { if (xPos == 0 && (yPos == 1 || yPos == 2)) yPos += 3; @@ -102,7 +102,7 @@ namespace CalamityMod.Tiles.Astral else if (xPos == 3 && (yPos == 0 || yPos == 1)) yPos += 4; } - else if (tile.frameNumber() == 2) + else if (tile.TileFrameNumber == 2) { if (xPos == 1 && yPos == 0) { diff --git a/Tiles/Astral/AstralNormalMediumPiles.cs b/Tiles/Astral/AstralNormalMediumPiles.cs index 6947140373..eb30e39630 100644 --- a/Tiles/Astral/AstralNormalMediumPiles.cs +++ b/Tiles/Astral/AstralNormalMediumPiles.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) diff --git a/Tiles/Astral/AstralNormalSmallPiles.cs b/Tiles/Astral/AstralNormalSmallPiles.cs index fc320f31c8..f360529dff 100644 --- a/Tiles/Astral/AstralNormalSmallPiles.cs +++ b/Tiles/Astral/AstralNormalSmallPiles.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.Astral DustType = ModContent.DustType(); AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) diff --git a/Tiles/Astral/AstralNormalStalactite.cs b/Tiles/Astral/AstralNormalStalactite.cs index c3aefb5ae7..d5195dc6bc 100644 --- a/Tiles/Astral/AstralNormalStalactite.cs +++ b/Tiles/Astral/AstralNormalStalactite.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(79, 61, 97)); - base.SetDefaults(); + base.SetStaticDefaults(); } public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) diff --git a/Tiles/Astral/AstralShortPlants.cs b/Tiles/Astral/AstralShortPlants.cs index 0ac69bc4c5..02f768f6d9 100644 --- a/Tiles/Astral/AstralShortPlants.cs +++ b/Tiles/Astral/AstralShortPlants.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(127, 111, 144)); - base.SetDefaults(); + base.SetStaticDefaults(); } public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) diff --git a/Tiles/Astral/AstralTallPlants.cs b/Tiles/Astral/AstralTallPlants.cs index e48e905d9c..5b72a91cb4 100644 --- a/Tiles/Astral/AstralTallPlants.cs +++ b/Tiles/Astral/AstralTallPlants.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(127, 111, 144)); - base.SetDefaults(); + base.SetStaticDefaults(); } } } diff --git a/Tiles/DraedonStructures/AgedSecurityChestTile.cs b/Tiles/DraedonStructures/AgedSecurityChestTile.cs index 06f86655dd..6fe549bce1 100644 --- a/Tiles/DraedonStructures/AgedSecurityChestTile.cs +++ b/Tiles/DraedonStructures/AgedSecurityChestTile.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.DraedonStructures AddMapEntry(new Color(130, 119, 115), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Aged Security Chest"; + ContainerName.SetDefault("Aged Security Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/DraedonStructures/SecurityChestTile.cs b/Tiles/DraedonStructures/SecurityChestTile.cs index 92c00d6b16..4da2fb63a4 100644 --- a/Tiles/DraedonStructures/SecurityChestTile.cs +++ b/Tiles/DraedonStructures/SecurityChestTile.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.DraedonStructures AddMapEntry(new Color(130, 119, 115), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Security Chest"; + ContainerName.SetDefault("Security Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/Furniture/BabyGhostBellJarTile.cs b/Tiles/Furniture/BabyGhostBellJarTile.cs index 8a3856b33c..6d46b719ae 100644 --- a/Tiles/Furniture/BabyGhostBellJarTile.cs +++ b/Tiles/Furniture/BabyGhostBellJarTile.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.Furniture public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { - frameYOffset = this.GetAnimationOffset(i, j, 8, 18, 18, 2, 2, animationFrameHeight); + frameYOffset = this.GetAnimationOffset(i, j, 8, 18, 18, 2, 2, AnimationFrameHeight); } public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) diff --git a/Tiles/Furniture/CraftingStations/AncientAltar.cs b/Tiles/Furniture/CraftingStations/AncientAltar.cs index e2c29417e1..d1df76e6c9 100644 --- a/Tiles/Furniture/CraftingStations/AncientAltar.cs +++ b/Tiles/Furniture/CraftingStations/AncientAltar.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/Furniture/CraftingStations/AncientAltarFlame").Value, i, j, offsetY: animationFrame * animationFrameHeight); + CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/Furniture/CraftingStations/AncientAltarFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight); } public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) diff --git a/Tiles/Furniture/CraftingStations/AshenAltar.cs b/Tiles/Furniture/CraftingStations/AshenAltar.cs index 1631a2eea2..a2fdd8685d 100644 --- a/Tiles/Furniture/CraftingStations/AshenAltar.cs +++ b/Tiles/Furniture/CraftingStations/AshenAltar.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/Furniture/CraftingStations/AshenAltarFlame").Value, i, j, offsetY: animationFrame * animationFrameHeight); + CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/Furniture/CraftingStations/AshenAltarFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight); } public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) diff --git a/Tiles/Furniture/Fountains/AbyssFountainTile.cs b/Tiles/Furniture/Fountains/AbyssFountainTile.cs index 68fad39057..b32c3a644c 100644 --- a/Tiles/Furniture/Fountains/AbyssFountainTile.cs +++ b/Tiles/Furniture/Fountains/AbyssFountainTile.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Placeables.Furniture.Fountains; using Microsoft.Xna.Framework; using System.Linq; +using System.Reflection; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; @@ -11,6 +12,7 @@ namespace CalamityMod.Tiles.Furniture.Fountains { public class AbyssFountainTile : ModTile { + internal static readonly MethodInfo ActiveFountainColorMethod = typeof(SceneMetrics).GetMethod("set_ActiveFountainColor", BindingFlags.NonPublic | BindingFlags.Instance); public override void SetStaticDefaults() { this.SetUpFountain(); @@ -24,7 +26,10 @@ namespace CalamityMod.Tiles.Furniture.Fountains { if (CalamityGlobalTile.WaterStyles.Any((style) => style.Name == "AbyssWater")) { - Main.fountainColor = CalamityGlobalTile.WaterStyles.FirstOrDefault((style) => style.Name == "AbyssWater").Type; + ActiveFountainColorMethod.Invoke(Main.SceneMetrics, new object[] + { + CalamityGlobalTile.WaterStyles.FirstOrDefault((style) => style.Name == "AbyssWater").Slot + }); } } } diff --git a/Tiles/Furniture/SeaMinnowJarTile.cs b/Tiles/Furniture/SeaMinnowJarTile.cs index 29e51537d1..2e3c652d4c 100644 --- a/Tiles/Furniture/SeaMinnowJarTile.cs +++ b/Tiles/Furniture/SeaMinnowJarTile.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Tiles.Furniture public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { - frameYOffset = this.GetAnimationOffset(i, j, 12, 18, 18, 2, 2, animationFrameHeight); + frameYOffset = this.GetAnimationOffset(i, j, 12, 18, 18, 2, 2, AnimationFrameHeight); } public override void KillMultiTile(int i, int j, int frameX, int frameY) diff --git a/Tiles/Furniture/TwinklerInABottleTile.cs b/Tiles/Furniture/TwinklerInABottleTile.cs index 610e413293..e80bdff334 100644 --- a/Tiles/Furniture/TwinklerInABottleTile.cs +++ b/Tiles/Furniture/TwinklerInABottleTile.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.Furniture public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { - frameYOffset = this.GetAnimationOffset(i, j, 15, 16, 18, 1, 2, animationFrameHeight); + frameYOffset = this.GetAnimationOffset(i, j, 15, 16, 18, 1, 2, AnimationFrameHeight); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAbyss/AbyssChest.cs b/Tiles/FurnitureAbyss/AbyssChest.cs index c4346598b7..8a1092f653 100644 --- a/Tiles/FurnitureAbyss/AbyssChest.cs +++ b/Tiles/FurnitureAbyss/AbyssChest.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Abyss Chest"; + ContainerName.SetDefault("Abyss Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureAbyss/AbyssClock.cs b/Tiles/FurnitureAbyss/AbyssClock.cs index 2d4840e5d6..ad477f2be9 100644 --- a/Tiles/FurnitureAbyss/AbyssClock.cs +++ b/Tiles/FurnitureAbyss/AbyssClock.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; @@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureAcidwood/AcidwoodChestTile.cs b/Tiles/FurnitureAcidwood/AcidwoodChestTile.cs index c2ce20dc0b..108aa28b08 100644 --- a/Tiles/FurnitureAcidwood/AcidwoodChestTile.cs +++ b/Tiles/FurnitureAcidwood/AcidwoodChestTile.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Acidwood Chest"; + ContainerName.SetDefault("Acidwood Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureAcidwood/AcidwoodClockTile.cs b/Tiles/FurnitureAcidwood/AcidwoodClockTile.cs index ce105271b6..4c1949a85e 100644 --- a/Tiles/FurnitureAcidwood/AcidwoodClockTile.cs +++ b/Tiles/FurnitureAcidwood/AcidwoodClockTile.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureAncient/AncientBasin.cs b/Tiles/FurnitureAncient/AncientBasin.cs index 9b5a3320d3..af78d9341b 100644 --- a/Tiles/FurnitureAncient/AncientBasin.cs +++ b/Tiles/FurnitureAncient/AncientBasin.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; @@ -73,7 +73,7 @@ namespace CalamityMod.Tiles.FurnitureAncient public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAncient/AncientBasinFlame"), i, j, offsetY: animationFrame * animationFrameHeight); + CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAncient/AncientBasinFlame"), i, j, offsetY: animationFrame * AnimationFrameHeight); } public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) diff --git a/Tiles/FurnitureAncient/AncientMonolith.cs b/Tiles/FurnitureAncient/AncientMonolith.cs index 93a983af81..e93e2d2535 100644 --- a/Tiles/FurnitureAncient/AncientMonolith.cs +++ b/Tiles/FurnitureAncient/AncientMonolith.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; @@ -66,7 +66,7 @@ namespace CalamityMod.Tiles.FurnitureAncient { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureAshen/AshenCandelabra.cs b/Tiles/FurnitureAshen/AshenCandelabra.cs index 83b45926f7..ced5ac1d39 100644 --- a/Tiles/FurnitureAshen/AshenCandelabra.cs +++ b/Tiles/FurnitureAshen/AshenCandelabra.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; @@ -73,10 +73,10 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenCandelabraFlame"), i, j, offsetY: animationFrame * animationFrameHeight); + CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenCandelabraFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight); } - public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) { if (Main.tile[i, j].TileFrameX < 35) CalamityUtils.DrawFlameSparks(60, 5, i, j); diff --git a/Tiles/FurnitureAshen/AshenCandle.cs b/Tiles/FurnitureAshen/AshenCandle.cs index 4784c32c51..024ce73b5d 100644 --- a/Tiles/FurnitureAshen/AshenCandle.cs +++ b/Tiles/FurnitureAshen/AshenCandle.cs @@ -1,6 +1,7 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -68,10 +69,10 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenCandleFlame"), i, j); + CalamityUtils.DrawFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenCandleFlame").Value, i, j); } - public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) { if (Main.tile[i, j].TileFrameX < 18) CalamityUtils.DrawFlameSparks(60, 5, i, j); diff --git a/Tiles/FurnitureAshen/AshenChandelier.cs b/Tiles/FurnitureAshen/AshenChandelier.cs index 7fb77e24b2..dac60773c4 100644 --- a/Tiles/FurnitureAshen/AshenChandelier.cs +++ b/Tiles/FurnitureAshen/AshenChandelier.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; @@ -71,10 +71,10 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenChandelierFlame"), i, j, offsetY: animationFrame * animationFrameHeight); + CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenChandelierFlame").Value, i, j, offsetY: animationFrame * AnimationFrameHeight); } - public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) { Tile tile = Main.tile[i, j]; if (tile.TileFrameY == 18 && tile.TileFrameX < 54) diff --git a/Tiles/FurnitureAshen/AshenChest.cs b/Tiles/FurnitureAshen/AshenChest.cs index 76af3512be..8cb06348a1 100644 --- a/Tiles/FurnitureAshen/AshenChest.cs +++ b/Tiles/FurnitureAshen/AshenChest.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Tiles.FurnitureAshen AddMapEntry(new Color(174, 129, 92), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Ashen Chest"; + ContainerName.SetDefault("Ashen Chest"); ChestDrop = ModContent.ItemType(); } @@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureAshen public override bool UnlockChest(int i, int j, ref short frameXAdjustment, ref int dustType, ref bool manual) { - DustType = this.dustType; + dustType = DustType; return true; } diff --git a/Tiles/FurnitureAshen/AshenMonolith.cs b/Tiles/FurnitureAshen/AshenMonolith.cs index e709355963..401c073577 100644 --- a/Tiles/FurnitureAshen/AshenMonolith.cs +++ b/Tiles/FurnitureAshen/AshenMonolith.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureAshen/AshenSlab.cs b/Tiles/FurnitureAshen/AshenSlab.cs index f7c7eabdeb..279193d0d3 100644 --- a/Tiles/FurnitureAshen/AshenSlab.cs +++ b/Tiles/FurnitureAshen/AshenSlab.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -220,7 +220,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { if (j % 3 < 2) { - uniqueAnimationFrameX = Main.tile[i - (i % 2), j - (j % 3)].frameNumber(); + uniqueAnimationFrameX = Main.tile[i - (i % 2), j - (j % 3)].TileFrameNumber; } if (uniqueAnimationFrameX != 0) { @@ -265,7 +265,7 @@ namespace CalamityMod.Tiles.FurnitureAshen break; } frameXOffset = uniqueAnimationFrameX * animationFrameWidth; - frameYOffset = uniqueAnimationFrameY * animationFrameHeight; + frameYOffset = uniqueAnimationFrameY * AnimationFrameHeight; } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) @@ -459,7 +459,7 @@ namespace CalamityMod.Tiles.FurnitureAshen { if (j % 3 < 2) { - uniqueAnimationFrameX = Main.tile[i - (i % 2), j - (j % 3)].frameNumber(); + uniqueAnimationFrameX = Main.tile[i - (i % 2), j - (j % 3)].TileFrameNumber; } if (uniqueAnimationFrameX != 0) { @@ -506,14 +506,14 @@ namespace CalamityMod.Tiles.FurnitureAshen int AnimationFrameHeight = 90; int animationFrameWidth = 234; int xDrawPos = Main.tile[i, j].TileFrameX + (uniqueAnimationFrameX * animationFrameWidth); - int yDrawPos = Main.tile[i, j].TileFrameY + (uniqueAnimationFrameY * animationFrameHeight); + int yDrawPos = Main.tile[i, j].TileFrameY + (uniqueAnimationFrameY * AnimationFrameHeight); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(64, 64, 64, 64)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureAstral/MonolithChest.cs b/Tiles/FurnitureAstral/MonolithChest.cs index f33c438514..0f9f2a5c06 100644 --- a/Tiles/FurnitureAstral/MonolithChest.cs +++ b/Tiles/FurnitureAstral/MonolithChest.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Tiles.FurnitureAstral AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Monolith Chest"; + ContainerName.SetDefault("Monolith Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureAstral/MonolithClock.cs b/Tiles/FurnitureAstral/MonolithClock.cs index 8316a39b5d..e61aeb7a35 100644 --- a/Tiles/FurnitureAstral/MonolithClock.cs +++ b/Tiles/FurnitureAstral/MonolithClock.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureBotanic/BotanicChest.cs b/Tiles/FurnitureBotanic/BotanicChest.cs index cae2088f9c..a149ec16a6 100644 --- a/Tiles/FurnitureBotanic/BotanicChest.cs +++ b/Tiles/FurnitureBotanic/BotanicChest.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Botanic Chest"; + ContainerName.SetDefault("Botanic Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureBotanic/BotanicClock.cs b/Tiles/FurnitureBotanic/BotanicClock.cs index 1494d3b0ef..e9fae82c19 100644 --- a/Tiles/FurnitureBotanic/BotanicClock.cs +++ b/Tiles/FurnitureBotanic/BotanicClock.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs index ce143481aa..065ab35a0e 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { - CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureCosmilite/CosmiliteBasinFlame"), i, j, offsetY: animationFrame * animationFrameHeight); + CalamityUtils.DrawStaticFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureCosmilite/CosmiliteBasinFlame"), i, j, offsetY: animationFrame * AnimationFrameHeight); } public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) diff --git a/Tiles/FurnitureCosmilite/CosmiliteChest.cs b/Tiles/FurnitureCosmilite/CosmiliteChest.cs index 028f4ee39e..6931822c23 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteChest.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteChest.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Cosmilite Chest"; + ContainerName.SetDefault("Cosmilite Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureCosmilite/CosmiliteClock.cs b/Tiles/FurnitureCosmilite/CosmiliteClock.cs index 0534b6d4a5..e129f4909c 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteClock.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteClock.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureEutrophic/EutrophicChest.cs b/Tiles/FurnitureEutrophic/EutrophicChest.cs index c81f9f1b3e..77a20e8e52 100644 --- a/Tiles/FurnitureEutrophic/EutrophicChest.cs +++ b/Tiles/FurnitureEutrophic/EutrophicChest.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Eutrophic Chest"; + ContainerName.SetDefault("Eutrophic Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureEutrophic/EutrophicClock.cs b/Tiles/FurnitureEutrophic/EutrophicClock.cs index 9a33ef5aad..7504e24c39 100644 --- a/Tiles/FurnitureEutrophic/EutrophicClock.cs +++ b/Tiles/FurnitureEutrophic/EutrophicClock.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureExo/ExoChestTile.cs b/Tiles/FurnitureExo/ExoChestTile.cs index b06ae04823..f839d29a73 100644 --- a/Tiles/FurnitureExo/ExoChestTile.cs +++ b/Tiles/FurnitureExo/ExoChestTile.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Tiles.FurnitureExo AddMapEntry(new Color(71, 95, 114), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Exo Chest"; + ContainerName.SetDefault("Exo Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureExo/ExoClockTile.cs b/Tiles/FurnitureExo/ExoClockTile.cs index 91b5dd3ebf..9d61aa7c2b 100644 --- a/Tiles/FurnitureExo/ExoClockTile.cs +++ b/Tiles/FurnitureExo/ExoClockTile.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureExo { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureExo/ExoPlatingTile.cs b/Tiles/FurnitureExo/ExoPlatingTile.cs index 702f133303..89504f781a 100644 --- a/Tiles/FurnitureExo/ExoPlatingTile.cs +++ b/Tiles/FurnitureExo/ExoPlatingTile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.FurnitureExo; +using CalamityMod.Items.Placeables.FurnitureExo; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureExo public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { int yPos = j % 2; - frameYOffset = yPos * animationFrameHeight; + frameYOffset = yPos * AnimationFrameHeight; } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) @@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.FurnitureExo Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j); int xPos = tile.TileFrameX; - int frameOffset = j % 2 * animationFrameHeight; + int frameOffset = j % 2 * AnimationFrameHeight; int yPos = tile.TileFrameY + frameOffset; Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; diff --git a/Tiles/FurnitureExo/ExoPrismPanelTile.cs b/Tiles/FurnitureExo/ExoPrismPanelTile.cs index 006246419c..ac64b0b935 100644 --- a/Tiles/FurnitureExo/ExoPrismPanelTile.cs +++ b/Tiles/FurnitureExo/ExoPrismPanelTile.cs @@ -1,6 +1,7 @@ -using CalamityMod.Items.Placeables.FurnitureExo; +using CalamityMod.Items.Placeables.FurnitureExo; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureExo { if (!Main.dedServ) { - GlowTexture = ModContent.Request("CalamityMod/Tiles/FurnitureExo/ExoPrismPanelTileGlow"); + GlowTexture = ModContent.Request("CalamityMod/Tiles/FurnitureExo/ExoPrismPanelTileGlow", AssetRequestMode.ImmediateLoad).Value; } Main.tileSolid[Type] = true; @@ -42,7 +43,7 @@ namespace CalamityMod.Tiles.FurnitureExo public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { int frameOffset = (i + j) % 6; - frameYOffset = frameOffset * animationFrameHeight; + frameYOffset = frameOffset * AnimationFrameHeight; } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) @@ -53,12 +54,12 @@ namespace CalamityMod.Tiles.FurnitureExo Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j); int xPos = tile.TileFrameX; - int frameOffset = (i + j) % 6 * animationFrameHeight; + int frameOffset = (i + j) % 6 * AnimationFrameHeight; int yPos = tile.TileFrameY + frameOffset; Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; - if (!tile.IsHalfBlock && tile.slope() == 0) + if (!tile.IsHalfBlock && tile.Slope == 0) { spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); } diff --git a/Tiles/FurnitureExo/ExoPrismPlatformTile.cs b/Tiles/FurnitureExo/ExoPrismPlatformTile.cs index 2ce1fe2625..ddae681006 100644 --- a/Tiles/FurnitureExo/ExoPrismPlatformTile.cs +++ b/Tiles/FurnitureExo/ExoPrismPlatformTile.cs @@ -1,6 +1,7 @@ -using CalamityMod.Items.Placeables.FurnitureExo; +using CalamityMod.Items.Placeables.FurnitureExo; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureExo { if (!Main.dedServ) { - GlowTexture = ModContent.Request("CalamityMod/Tiles/FurnitureExo/ExoPrismPlatformTileGlow"); + GlowTexture = ModContent.Request("CalamityMod/Tiles/FurnitureExo/ExoPrismPlatformTileGlow", AssetRequestMode.ImmediateLoad).Value; } this.SetUpPlatform(true); @@ -47,7 +48,7 @@ namespace CalamityMod.Tiles.FurnitureExo public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { int frameOffset = (i + j) % 6; - frameYOffset = frameOffset * animationFrameHeight; + frameYOffset = frameOffset * AnimationFrameHeight; } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) @@ -58,7 +59,7 @@ namespace CalamityMod.Tiles.FurnitureExo Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j); int xPos = tile.TileFrameX; - int frameOffset = (i + j) % 6 * animationFrameHeight; + int frameOffset = (i + j) % 6 * AnimationFrameHeight; int yPos = tile.TileFrameY + frameOffset; Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; diff --git a/Tiles/FurnitureExo/ExoScreenTile.cs b/Tiles/FurnitureExo/ExoScreenTile.cs index d7bf6fef34..a1d8afd185 100644 --- a/Tiles/FurnitureExo/ExoScreenTile.cs +++ b/Tiles/FurnitureExo/ExoScreenTile.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureExo public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { - frameYOffset = this.GetAnimationOffset(i, j, 4, 18, 18, 3, 2, animationFrameHeight); + frameYOffset = this.GetAnimationOffset(i, j, 4, 18, 18, 3, 2, AnimationFrameHeight); } public override bool CanExplode(int i, int j) => false; diff --git a/Tiles/FurnitureOccult/OccultChest.cs b/Tiles/FurnitureOccult/OccultChest.cs index 8e285a43e6..bc47f23123 100644 --- a/Tiles/FurnitureOccult/OccultChest.cs +++ b/Tiles/FurnitureOccult/OccultChest.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureOccult AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Otherworldly Chest"; + ContainerName.SetDefault("Otherworldly Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureOccult/OccultClock.cs b/Tiles/FurnitureOccult/OccultClock.cs index 3031a8179e..1a0acc8f61 100644 --- a/Tiles/FurnitureOccult/OccultClock.cs +++ b/Tiles/FurnitureOccult/OccultClock.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureOccult { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs index 7524dae651..fc87def4b1 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateChest.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Plagued Chest"; + ContainerName.SetDefault("Plagued Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs index b34a42b2b0..ffb138fc73 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateClock.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs index 83da385e3b..1d5285db1e 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; +using Terraria.GameContent.ObjectInteractions; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; diff --git a/Tiles/FurnitureProfaned/ProfanedChest.cs b/Tiles/FurnitureProfaned/ProfanedChest.cs index 5c0ee34731..d5136189da 100644 --- a/Tiles/FurnitureProfaned/ProfanedChest.cs +++ b/Tiles/FurnitureProfaned/ProfanedChest.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Profaned Chest"; + ContainerName.SetDefault("Profaned Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureProfaned/ProfanedClock.cs b/Tiles/FurnitureProfaned/ProfanedClock.cs index db118382fd..f4982c16fd 100644 --- a/Tiles/FurnitureProfaned/ProfanedClock.cs +++ b/Tiles/FurnitureProfaned/ProfanedClock.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureProfaned/ProfanedSlab.cs b/Tiles/FurnitureProfaned/ProfanedSlab.cs index 88f9606e97..e6b021a86b 100644 --- a/Tiles/FurnitureProfaned/ProfanedSlab.cs +++ b/Tiles/FurnitureProfaned/ProfanedSlab.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts.Furniture; using Microsoft.Xna.Framework; using Terraria; @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { frameXOffset = i % 4 * animationFrameWidth; - frameYOffset = j % 4 * animationFrameHeight; + frameYOffset = j % 4 * AnimationFrameHeight; } } } diff --git a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs index 90dee0bc78..f28bdecc56 100644 --- a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs +++ b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs @@ -1,4 +1,4 @@ - + using CalamityMod.Dusts.Furniture; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -37,7 +37,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) { frameXOffset = i % 2 * animationFrameWidth; - frameYOffset = j % 2 * animationFrameHeight; + frameYOffset = j % 2 * AnimationFrameHeight; } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) @@ -47,7 +47,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned int xOffset = i % 2; int yOffset = j % 2; xOffset *= animationFrameWidth; - yOffset *= animationFrameHeight; + yOffset *= AnimationFrameHeight; xPos += xOffset; yPos += yOffset; Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureProfaned/RunicProfanedBrickGlow"); diff --git a/Tiles/FurnitureSilva/SilvaChest.cs b/Tiles/FurnitureSilva/SilvaChest.cs index 6a20dd45d4..6025645c31 100644 --- a/Tiles/FurnitureSilva/SilvaChest.cs +++ b/Tiles/FurnitureSilva/SilvaChest.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureSilva AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Silva Chest"; + ContainerName.SetDefault("Silva Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureSilva/SilvaClock.cs b/Tiles/FurnitureSilva/SilvaClock.cs index ec34cc2786..107891e975 100644 --- a/Tiles/FurnitureSilva/SilvaClock.cs +++ b/Tiles/FurnitureSilva/SilvaClock.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureSilva { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureStatigel/StatigelChest.cs b/Tiles/FurnitureStatigel/StatigelChest.cs index a2344cbc92..a8451493d4 100644 --- a/Tiles/FurnitureStatigel/StatigelChest.cs +++ b/Tiles/FurnitureStatigel/StatigelChest.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Statigel Chest"; + ContainerName.SetDefault("Statigel Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureStatigel/StatigelClock.cs b/Tiles/FurnitureStatigel/StatigelClock.cs index d297633923..a9dfc73347 100644 --- a/Tiles/FurnitureStatigel/StatigelClock.cs +++ b/Tiles/FurnitureStatigel/StatigelClock.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureStratus/StratusChest.cs b/Tiles/FurnitureStratus/StratusChest.cs index 0ba2217821..3a8b51cdf3 100644 --- a/Tiles/FurnitureStratus/StratusChest.cs +++ b/Tiles/FurnitureStratus/StratusChest.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureStratus AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Stratus Chest"; + ContainerName.SetDefault("Stratus Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureStratus/StratusClock.cs b/Tiles/FurnitureStratus/StratusClock.cs index 82c3e4a3c2..808455dd45 100644 --- a/Tiles/FurnitureStratus/StratusClock.cs +++ b/Tiles/FurnitureStratus/StratusClock.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureStratus { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureVoid/VoidChest.cs b/Tiles/FurnitureVoid/VoidChest.cs index d4d2f4c589..a7b03af6cc 100644 --- a/Tiles/FurnitureVoid/VoidChest.cs +++ b/Tiles/FurnitureVoid/VoidChest.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureVoid AddMapEntry(new Color(191, 142, 111), name, MapChestName); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Containers }; - chest = "Void Chest"; + ContainerName.SetDefault("Void Chest"); ChestDrop = ModContent.ItemType(); } diff --git a/Tiles/FurnitureVoid/VoidClock.cs b/Tiles/FurnitureVoid/VoidClock.cs index c97d48ca21..c3fdd5d959 100644 --- a/Tiles/FurnitureVoid/VoidClock.cs +++ b/Tiles/FurnitureVoid/VoidClock.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Tiles.FurnitureVoid { if (closer) { - Main.clock = true; + Main.SceneMetrics.HasClock = true; } } diff --git a/Tiles/FurnitureVoid/VoidstoneSlab.cs b/Tiles/FurnitureVoid/VoidstoneSlab.cs index c349fac848..cab670812f 100644 --- a/Tiles/FurnitureVoid/VoidstoneSlab.cs +++ b/Tiles/FurnitureVoid/VoidstoneSlab.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -87,7 +87,7 @@ namespace CalamityMod.Tiles.FurnitureVoid break; } - frameYOffset = uniqueAnimationFrame * animationFrameHeight; + frameYOffset = uniqueAnimationFrame * AnimationFrameHeight; } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/Ores/ExodiumOre.cs b/Tiles/Ores/ExodiumOre.cs index 63afbc8152..66f183d925 100644 --- a/Tiles/Ores/ExodiumOre.cs +++ b/Tiles/Ores/ExodiumOre.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Tiles.Ores Main.tileOreFinderPriority[Type] = 760; Main.tileSpelunker[Type] = true; ItemDrop = ModContent.ItemType(); - base.SetDefaults(); + base.SetStaticDefaults(); TileID.Sets.ChecksForMerge[Type] = true; } diff --git a/Tiles/PerennialBrick.cs b/Tiles/PerennialBrick.cs index 34598f3d29..a4393f6c0c 100644 --- a/Tiles/PerennialBrick.cs +++ b/Tiles/PerennialBrick.cs @@ -1,4 +1,4 @@ - + using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles int xPos = i % 4; int yPos = j % 4; frameXOffset = xPos * 234; - frameYOffset = yPos * animationFrameHeight; + frameYOffset = yPos * AnimationFrameHeight; } } } diff --git a/Tiles/SunkenSea/BrainCoral.cs b/Tiles/SunkenSea/BrainCoral.cs index c70f047f3a..6cea0d23c9 100644 --- a/Tiles/SunkenSea/BrainCoral.cs +++ b/Tiles/SunkenSea/BrainCoral.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 3f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/FanCoral.cs b/Tiles/SunkenSea/FanCoral.cs index db2b0767b8..c15e036ea6 100644 --- a/Tiles/SunkenSea/FanCoral.cs +++ b/Tiles/SunkenSea/FanCoral.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 3f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/SeaAnemone.cs b/Tiles/SunkenSea/SeaAnemone.cs index ba56e0731a..a54d426ec0 100644 --- a/Tiles/SunkenSea/SeaAnemone.cs +++ b/Tiles/SunkenSea/SeaAnemone.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 2f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/SmallBrainCoral.cs b/Tiles/SunkenSea/SmallBrainCoral.cs index 33a33b3d3f..453d1253be 100644 --- a/Tiles/SunkenSea/SmallBrainCoral.cs +++ b/Tiles/SunkenSea/SmallBrainCoral.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 3f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/SmallTubeCoral.cs b/Tiles/SunkenSea/SmallTubeCoral.cs index 09a0aee906..f471602d1f 100644 --- a/Tiles/SunkenSea/SmallTubeCoral.cs +++ b/Tiles/SunkenSea/SmallTubeCoral.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 3f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/SunkenSeaStalactite.cs b/Tiles/SunkenSea/SunkenSeaStalactite.cs index b5c158bec5..839238b001 100644 --- a/Tiles/SunkenSea/SunkenSeaStalactite.cs +++ b/Tiles/SunkenSea/SunkenSeaStalactite.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 96; AddMapEntry(new Color(0, 50, 50)); - base.SetDefaults(); + base.SetStaticDefaults(); } public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height) diff --git a/Tiles/SunkenSea/TableCoral.cs b/Tiles/SunkenSea/TableCoral.cs index 4b9de3e0e2..af7ba253db 100644 --- a/Tiles/SunkenSea/TableCoral.cs +++ b/Tiles/SunkenSea/TableCoral.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 3f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/TubeCoral.cs b/Tiles/SunkenSea/TubeCoral.cs index 4fc56d6ae9..397461e1aa 100644 --- a/Tiles/SunkenSea/TubeCoral.cs +++ b/Tiles/SunkenSea/TubeCoral.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(0, 0, 80)); MineResist = 3f; - base.SetDefaults(); + base.SetStaticDefaults(); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs index 47f86c8da2..44b0b83077 100644 --- a/Utilities/FurnitureSetupUtils.cs +++ b/Utilities/FurnitureSetupUtils.cs @@ -21,7 +21,7 @@ namespace CalamityMod WorldGen.KillTile(i, j, false, false, false); if (!Main.tile[i, j].HasTile && Main.netMode != NetmodeID.SinglePlayer) { - NetMessage.SendData(MessageID.TileChange, -1, -1, null, 0, (float)i, (float)j, 0f, 0, 0, 0); + NetMessage.SendData(MessageID.TileManipulation, -1, -1, null, 0, (float)i, (float)j, 0f, 0, 0, 0); } } } @@ -41,12 +41,12 @@ namespace CalamityMod if (player.SpawnX == spawnX && player.SpawnY == spawnY) { player.RemoveSpawn(); - Main.NewText("Spawn point removed!", 255, 240, 20, false); + Main.NewText("Spawn point removed!", 255, 240, 20); } else if (Player.CheckSpawn(spawnX, spawnY)) { player.ChangeSpawn(spawnX, spawnY); - Main.NewText("Spawn point set!", 255, 240, 20, false); + Main.NewText("Spawn point set!", 255, 240, 20); } return true; } @@ -264,7 +264,7 @@ namespace CalamityMod } else { - player.flyingPigChest = -1; + player.piggyBankProjTracker.Clear(); int num213 = Chest.FindChest(left, top); if (num213 != -1) { @@ -303,8 +303,8 @@ namespace CalamityMod Main.playerInventory = false; player.chest = -1; Recipe.FindRecipes(); - Main.dresserX = Player.tileTargetX; - Main.dresserY = Player.tileTargetY; + Main.interactedDresserTopLeftX = Player.tileTargetX; + Main.interactedDresserTopLeftY = Player.tileTargetY; Main.OpenClothesWindow(); return true; } @@ -730,15 +730,15 @@ namespace CalamityMod Main.tileShine[mt.Type] = 1200; Main.tileFrameImportant[mt.Type] = true; Main.tileNoAttach[mt.Type] = true; - Main.tileValue[mt.Type] = 500; + Main.tileOreFinderPriority[mt.Type] = 500; TileID.Sets.HasOutlines[mt.Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); if (offset) TileObjectData.newTile.DrawYOffset = 4; TileObjectData.newTile.Origin = new Point16(0, 1); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 }; - TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); - TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); TileObjectData.newTile.AnchorInvalidTiles = new int[] { 127 }; TileObjectData.newTile.StyleHorizontal = true; TileObjectData.newTile.LavaDeath = false; @@ -888,8 +888,8 @@ namespace CalamityMod TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); TileObjectData.newTile.Origin = new Point16(1, 1); TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 }; - TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); - TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); + TileObjectData.newTile.HookCheckIfCanPlace = new PlacementHook(new Func(Chest.FindEmptyChest), -1, 0, true); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(new Func(Chest.AfterPlacement_Hook), -1, 0, false); TileObjectData.newTile.AnchorInvalidTiles = new int[] { 127 }; TileObjectData.newTile.StyleHorizontal = true; TileObjectData.newTile.LavaDeath = false; diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index 47f857e1ae..28d2beb7bd 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -1,4 +1,4 @@ -using CalamityMod.UI.CalamitasEnchants; +using CalamityMod.UI.CalamitasEnchants; using CalamityMod.World; using Microsoft.Xna.Framework; using System.Collections.Generic; @@ -140,12 +140,12 @@ namespace CalamityMod #endregion /// - /// Converts the given ModHotKey into a string for insertion into item tooltips.

+ /// Converts the given ModKeybind into a string for insertion into item tooltips.

/// This allows the user's actual keybind choices to be shown to them in tooltips. ///
- /// The ModHotKey to convert to a string. + /// The ModKeybind to convert to a string. /// - public static string TooltipHotkeyString(this ModHotKey mhk) + public static string TooltipHotkeyString(this ModKeybind mhk) { if (Main.dedServ || mhk is null) return ""; diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 3ea00ce2b7..401d499b7b 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -31,7 +31,7 @@ namespace CalamityMod private static Similarity GetSimilarity(Tile check, int myType, int mergeType) { - if (check is null || !check.HasTile) + if (!check.HasTile) return Similarity.None; if (check.TileType == myType || Main.tileMerge[myType][check.TileType]) @@ -55,14 +55,14 @@ namespace CalamityMod PlantCheckAgainst[TileID.JunglePlants2] = new int[1] { TileID.JungleGrass }; PlantCheckAgainst[TileID.HallowedPlants] = new int[1] { TileID.HallowedGrass }; PlantCheckAgainst[TileID.HallowedPlants2] = new int[1] { TileID.HallowedGrass }; - PlantCheckAgainst[TileID.FleshWeeds] = new int[1] { TileID.FleshWeeds }; + PlantCheckAgainst[TileID.CrimsonPlants] = new int[1] { TileID.CrimsonPlants }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; VineToGrass = new Dictionary { [TileID.Vines] = TileID.Grass, - [TileID.CrimsonVines] = TileID.FleshGrass, + [TileID.CrimsonVines] = TileID.CrimsonGrass, [TileID.HallowedVines] = TileID.HallowedGrass, [(ushort)ModContent.TileType()] = (ushort)ModContent.TileType() }; @@ -107,8 +107,6 @@ namespace CalamityMod #region Framing Helpers private static bool GetMerge(Tile myTile, Tile mergeTile) { - if (myTile is null || mergeTile is null) - return false; return mergeTile.HasTile && (mergeTile.TileType == myTile.TileType || Main.tileMerge[myTile.TileType][mergeTile.TileType]); } @@ -134,21 +132,21 @@ namespace CalamityMod downLeft = false; downRight = false; - if (GetMerge(tile, north) && (north.slope() == 0 || north.slope() == 1 || north.slope() == 2)) + if (GetMerge(tile, north) && (north.Slope == 0 || north.Slope == SlopeType.SlopeDownLeft || north.Slope == SlopeType.SlopeDownRight)) up = true; - if (GetMerge(tile, south) && (south.slope() == 0 || south.slope() == 3 || south.slope() == 4)) + if (GetMerge(tile, south) && (south.Slope == 0 || south.Slope == SlopeType.SlopeUpLeft || south.Slope == SlopeType.SlopeUpRight)) down = true; - if (GetMerge(tile, west) && (west.slope() == 0 || west.slope() == 2 || west.slope() == 4)) + if (GetMerge(tile, west) && (west.Slope == 0 || west.Slope == SlopeType.SlopeDownRight || west.Slope == SlopeType.SlopeUpRight)) left = true; - if (GetMerge(tile, east) && (east.slope() == 0 || east.slope() == 1 || east.slope() == 3)) + if (GetMerge(tile, east) && (east.Slope == 0 || east.Slope == SlopeType.SlopeDownLeft || east.Slope == SlopeType.SlopeUpLeft)) right = true; - if (GetMerge(tile, north) && GetMerge(tile, west) && GetMerge(tile, northwest) && (northwest.slope() == 0 || northwest.slope() == 2) && (north.slope() == 0 || north.slope() == 1 || north.slope() == 3) && (west.slope() == 0 || west.slope() == 3 || west.slope() == 4)) + if (GetMerge(tile, north) && GetMerge(tile, west) && GetMerge(tile, northwest) && (northwest.Slope == 0 || northwest.Slope == SlopeType.SlopeDownRight) && (north.Slope == 0 || north.Slope == SlopeType.SlopeDownLeft || north.Slope == SlopeType.SlopeUpLeft) && (west.Slope == 0 || west.Slope == SlopeType.SlopeUpLeft || west.Slope == SlopeType.SlopeUpRight)) upLeft = true; - if (GetMerge(tile, north) && GetMerge(tile, east) && GetMerge(tile, northeast) && (northeast.slope() == 0 || northeast.slope() == 1) && (north.slope() == 0 || north.slope() == 2 || north.slope() == 4) && (east.slope() == 0 || east.slope() == 3 || east.slope() == 4)) + if (GetMerge(tile, north) && GetMerge(tile, east) && GetMerge(tile, northeast) && (northeast.Slope == 0 || northeast.Slope == SlopeType.SlopeDownLeft) && (north.Slope == 0 || north.Slope == SlopeType.SlopeDownRight || north.Slope == SlopeType.SlopeUpRight) && (east.Slope == 0 || east.Slope == SlopeType.SlopeUpLeft || east.Slope == SlopeType.SlopeUpRight)) upRight = true; - if (GetMerge(tile, south) && GetMerge(tile, west) && GetMerge(tile, southwest) && !southwest.IsHalfBlock && (southwest.slope() == 0 || southwest.slope() == 4) && (south.slope() == 0 || south.slope() == 1 || south.slope() == 3) && (west.slope() == 0 || west.slope() == 1 || west.slope() == 2)) + if (GetMerge(tile, south) && GetMerge(tile, west) && GetMerge(tile, southwest) && !southwest.IsHalfBlock && (southwest.Slope == 0 || southwest.Slope == SlopeType.SlopeUpRight) && (south.Slope == 0 || south.Slope == SlopeType.SlopeDownLeft || south.Slope == SlopeType.SlopeUpLeft) && (west.Slope == 0 || west.Slope == SlopeType.SlopeDownLeft || west.Slope == SlopeType.SlopeDownRight)) downLeft = true; - if (GetMerge(tile, south) && GetMerge(tile, east) && GetMerge(tile, southeast) && !southeast.IsHalfBlock && (southeast.slope() == 0 || southeast.slope() == 3) && (south.slope() == 0 || south.slope() == 2 || south.slope() == 4) && (east.slope() == 0 || east.slope() == 1 || east.slope() == 2)) + if (GetMerge(tile, south) && GetMerge(tile, east) && GetMerge(tile, southeast) && !southeast.IsHalfBlock && (southeast.Slope == 0 || southeast.Slope == SlopeType.SlopeUpLeft) && (south.Slope == 0 || south.Slope == SlopeType.SlopeDownRight || south.Slope == SlopeType.SlopeUpRight) && (east.Slope == 0 || east.Slope == SlopeType.SlopeDownLeft || east.Slope == SlopeType.SlopeDownRight)) downRight = true; } @@ -171,9 +169,6 @@ namespace CalamityMod if (y < 0 || y >= Main.maxTilesY) return; Tile tile = Main.tile[x, y]; - if (tile is null) - return; - int checkType = -1; int plantType = tile.TileType; @@ -183,12 +178,12 @@ namespace CalamityMod else { Tile below = Main.tile[x, y + 1]; - if (below != null && below.HasUnactuatedTile && !below.IsHalfBlock && below.slope() == 0) + if (below != null && below.HasUnactuatedTile && !below.IsHalfBlock && below.Slope == 0) checkType = below.TileType; } // Sub function to determine whether the plant needs an update - bool PlantNeedsUpdate(int plant, int check) + static bool PlantNeedsUpdate(int plant, int check) { if (PlantCheckAgainst[plant] is null) return false; @@ -230,9 +225,9 @@ namespace CalamityMod { plantType = plantType == TileID.Plants2 ? TileID.HallowedPlants2 : TileID.HallowedPlants; } - else if (checkType == TileID.FleshGrass) + else if (checkType == TileID.CrimsonGrass) { - plantType = TileID.FleshWeeds; + plantType = TileID.CrimsonPlants; } else if (checkType == TileID.MushroomGrass) { @@ -248,7 +243,7 @@ namespace CalamityMod { bool isShortPlant = plantType == TileID.Plants || plantType == TileID.CorruptPlants || - plantType == TileID.FleshWeeds || + plantType == TileID.CrimsonPlants || plantType == TileID.HallowedPlants || plantType == TileID.MushroomPlants || plantType == TileID.JunglePlants; @@ -269,14 +264,11 @@ namespace CalamityMod if (y < 0 || y >= Main.maxTilesY) return; Tile tile = Main.tile[x, y]; - if (tile is null) - return; - int myType = tile.TileType; // Get the type of the tile above this vine. If that tile doesn't exist, just assume it's another vine. - Tile north = y <= 0 ? null : Main.tile[x, y - 1]; - int northType = north is null ? myType : (!north.HasTile || north.bottomSlope()) ? -1 : north.TileType; + Tile north = y <= 0 ? default : Main.tile[x, y - 1]; + int northType = north == default(Tile) ? myType : (!north.HasTile || north.BottomSlope) ? -1 : north.TileType; // Make this vine match the tile above it if that's another vine or a grass tile. ushort[] vines = VineToGrass.Keys.ToArray(); @@ -323,11 +315,9 @@ namespace CalamityMod return false; if (y < 0 || y >= Main.maxTilesY) return false; - Tile tile = Main.tile[x, y]; - if (tile is null) - return false; - if (tile.slope() > 0 && TileID.Sets.HasSlopeFrames[tile.TileType]) + Tile tile = Main.tile[x, y]; + if (tile.Slope > 0 && TileID.Sets.HasSlopeFrames[tile.TileType]) { return true; } @@ -339,11 +329,11 @@ namespace CalamityMod if (resetFrame) { randomFrame = WorldGen.genRand.Next(3); - Main.tile[x, y].frameNumber((byte)randomFrame); + Main.tile[x, y].Get().TileFrameNumber = randomFrame; } else { - randomFrame = Main.tile[x, y].frameNumber(); + randomFrame = Main.tile[x, y].TileFrameNumber; } /* @@ -571,11 +561,9 @@ namespace CalamityMod return false; if (y < 0 || y >= Main.maxTilesY) return false; - Tile tile = Main.tile[x, y]; - if (tile is null) - return false; - if (tile.slope() > 0 && TileID.Sets.HasSlopeFrames[tile.TileType]) + Tile tile = Main.tile[x, y]; + if (tile.Slope > 0 && TileID.Sets.HasSlopeFrames[tile.TileType]) { return true; } @@ -587,11 +575,11 @@ namespace CalamityMod if (resetFrame) { randomFrame = WorldGen.genRand.Next(3); - Main.tile[x, y].frameNumber((byte)randomFrame); + Main.tile[x, y].TileFrameNumber = randomFrame; } else { - randomFrame = Main.tile[x, y].frameNumber(); + randomFrame = Main.tile[x, y].TileFrameNumber; } /* @@ -819,11 +807,9 @@ namespace CalamityMod return; if (y < 0 || y >= Main.maxTilesY) return; - Tile tile = Main.tile[x, y]; - if (tile is null) - return; - if (tile.slope() > 0 && TileID.Sets.HasSlopeFrames[tile.TileType]) + Tile tile = Main.tile[x, y]; + if (tile.Slope > 0 && TileID.Sets.HasSlopeFrames[tile.TileType]) { return; } @@ -833,11 +819,11 @@ namespace CalamityMod if (resetFrame) { randomFrame = WorldGen.genRand.Next(3); - Main.tile[x, y].frameNumber((byte)randomFrame); + Main.tile[x, y].Get().TileFrameNumber = (byte)randomFrame; } else { - randomFrame = Main.tile[x, y].frameNumber(); + randomFrame = Main.tile[x, y].TileFrameNumber; } GetAdjacentTiles(x, y, out bool up, out bool down, out bool left, out bool right, out bool upLeft, out bool upRight, out bool downLeft, out bool downRight); @@ -1173,7 +1159,7 @@ namespace CalamityMod out bool mergedLeft, out bool mergedRight, out bool mergedDown, bool forceSameDown = false, bool forceSameUp = false, bool forceSameLeft = false, bool forceSameRight = false, bool resetFrame = true) { - if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY || Main.tile[x, y] is null) + if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY) { mergedUp = mergedLeft = mergedRight = mergedDown = false; return; @@ -1209,11 +1195,11 @@ namespace CalamityMod if (resetFrame) { randomFrame = WorldGen.genRand.Next(3); - Main.tile[x, y].frameNumber((byte)randomFrame); + Main.tile[x, y].Get().TileFrameNumber = (byte)randomFrame; } else { - randomFrame = Main.tile[x, y].frameNumber(); + randomFrame = Main.tile[x, y].TileFrameNumber; } // Initialize all merged variables to false. @@ -1727,10 +1713,8 @@ namespace CalamityMod return; if (y < 0 || y >= Main.maxTilesY) return; - Tile tile = Main.tile[x, y]; - if (tile is null) - return; + Tile tile = Main.tile[x, y]; bool forceSameUp = false; bool forceSameDown = false; bool forceSameLeft = false; diff --git a/Utilities/TileUtils.cs b/Utilities/TileUtils.cs index 09b8ab8f6f..702589b2db 100644 --- a/Utilities/TileUtils.cs +++ b/Utilities/TileUtils.cs @@ -31,11 +31,7 @@ namespace CalamityMod if (!WorldGen.InWorld(x, y, 2)) return baseName; - // Tile null check. Tile tile = Main.tile[x, y]; - if (tile is null) - return baseName; - int left = x; int top = y; if (tile.TileFrameX % 36 != 0) @@ -60,9 +56,6 @@ namespace CalamityMod public static void SafeSquareTileFrame(int x, int y, bool resetFrame = true) { - if (Main.tile[x, y] is null) - return; - for (int xIter = x - 1; xIter <= x + 1; ++xIter) { if (xIter < 0 || xIter >= Main.maxTilesX) @@ -91,10 +84,6 @@ namespace CalamityMod { for (int m = y; m < y + tileY; m++) { - if (Main.tile[l, m] == null) - { - Main.tile[l, m] = new Tile(); - } if (Main.tile[l, m].HasTile && Main.tile[l, m].TileType == type) { if (Main.tile[l, m].TileFrameX < (18 * tileX)) @@ -234,13 +223,8 @@ namespace CalamityMod { if (!WorldGen.InWorld(x, y)) return new Tile(); - Tile tile = Main.tile[x, y]; - if (tile is null) - { - tile = new Tile(); - Main.tile[x, y] = tile; - } - return tile; + + return Main.tile[x, y]; } public static bool TileSelectionSolid(int x, int y, int width, int height) From cd3505739ec5655b715917a54f5ad58ebdeb1b63 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 16:36:55 -0500 Subject: [PATCH 06/14] Dust ID fix --- Projectiles/Summon/SeekerSummonProj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/SeekerSummonProj.cs b/Projectiles/Summon/SeekerSummonProj.cs index 0200a24072..537f744331 100644 --- a/Projectiles/Summon/SeekerSummonProj.cs +++ b/Projectiles/Summon/SeekerSummonProj.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < 40; i++) { - Dust brimstoneFire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(50f, 50f), works); + Dust brimstoneFire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(50f, 50f), 219); brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 5f); brimstoneFire.scale = 1f + brimstoneFire.velocity.Length() * 0.1f; brimstoneFire.color = Color.Lerp(Color.White, Color.OrangeRed, Main.rand.NextFloat()); From 418f913e38ea3254ecbf8a82b97beb14c014f9bd Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 17:04:40 -0500 Subject: [PATCH 07/14] Bunch of tile fixes --- Items/CalamityGlobalItemLoot.cs | 1 - Tiles/AstralDesert/AstralPalmSapling.cs | 3 +-- Tiles/AstralDesert/AstralPalmTree.cs | 6 +++--- Tiles/AstralDesert/AstralSand.cs | 12 +++++------- Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs | 2 +- Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs | 2 +- Tiles/DraedonStructures/DraedonLabTurret.cs | 2 +- Tiles/DraedonStructures/LaboratoryDoorClosed.cs | 2 +- Tiles/DraedonStructures/LaboratoryDoorOpen.cs | 2 +- Tiles/FurnitureAbyss/AbyssBed.cs | 1 - Tiles/FurnitureAbyss/AbyssDoorClosed.cs | 2 +- Tiles/FurnitureAbyss/AbyssDoorOpen.cs | 2 +- Tiles/FurnitureAcidwood/AcidwoodBedTile.cs | 1 - Tiles/FurnitureAcidwood/AcidwoodDoorClosed.cs | 2 +- Tiles/FurnitureAcidwood/AcidwoodDoorOpen.cs | 2 +- Tiles/FurnitureAncient/AncientBed.cs | 3 +-- Tiles/FurnitureAncient/AncientDoorClosed.cs | 2 +- Tiles/FurnitureAncient/AncientDoorOpen.cs | 2 +- Tiles/FurnitureAshen/AshenBed.cs | 3 +-- Tiles/FurnitureAshen/AshenDoorClosed.cs | 2 +- Tiles/FurnitureAshen/AshenDoorOpen.cs | 2 +- Tiles/FurnitureAstral/MonolithBathtub.cs | 2 +- Tiles/FurnitureAstral/MonolithBed.cs | 3 +-- Tiles/FurnitureAstral/MonolithBench.cs | 2 +- Tiles/FurnitureAstral/MonolithBookcase.cs | 2 +- Tiles/FurnitureAstral/MonolithCandelabra.cs | 4 ++-- Tiles/FurnitureAstral/MonolithCandle.cs | 6 +++--- Tiles/FurnitureAstral/MonolithChair.cs | 2 +- Tiles/FurnitureAstral/MonolithChandelier.cs | 4 ++-- Tiles/FurnitureAstral/MonolithChest.cs | 2 +- Tiles/FurnitureAstral/MonolithClock.cs | 2 +- Tiles/FurnitureAstral/MonolithDoorClosed.cs | 4 ++-- Tiles/FurnitureAstral/MonolithDoorOpen.cs | 4 ++-- Tiles/FurnitureAstral/MonolithDresser.cs | 8 ++++---- Tiles/FurnitureAstral/MonolithLamp.cs | 4 ++-- Tiles/FurnitureAstral/MonolithLantern.cs | 4 ++-- Tiles/FurnitureAstral/MonolithPiano.cs | 2 +- Tiles/FurnitureAstral/MonolithSink.cs | 2 +- Tiles/FurnitureAstral/MonolithTable.cs | 2 +- Tiles/FurnitureAstral/MonolithWorkbench.cs | 2 +- Tiles/FurnitureBotanic/BotanicBed.cs | 1 - Tiles/FurnitureBotanic/BotanicDoorClosed.cs | 2 +- Tiles/FurnitureBotanic/BotanicDoorOpen.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBed.cs | 1 - Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicBed.cs | 1 - Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs | 2 +- Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs | 2 +- Tiles/FurnitureExo/ExoBedTile.cs | 1 - Tiles/FurnitureExo/ExoDoorClosed.cs | 2 +- Tiles/FurnitureExo/ExoDoorOpen.cs | 2 +- Tiles/FurnitureOccult/OccultBed.cs | 1 - Tiles/FurnitureOccult/OccultDoorClosed.cs | 2 +- Tiles/FurnitureOccult/OccultDoorOpen.cs | 2 +- Tiles/FurniturePlaguedPlate/PlaguedPlateBed.cs | 1 - .../FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs | 2 +- Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs | 2 +- Tiles/FurnitureProfaned/ProfanedBed.cs | 1 - Tiles/FurnitureProfaned/ProfanedDoorClosed.cs | 2 +- Tiles/FurnitureProfaned/ProfanedDoorOpen.cs | 2 +- Tiles/FurnitureSilva/SilvaBed.cs | 1 - Tiles/FurnitureSilva/SilvaDoorClosed.cs | 2 +- Tiles/FurnitureSilva/SilvaDoorOpen.cs | 2 +- Tiles/FurnitureStatigel/StatigelBed.cs | 1 - Tiles/FurnitureStatigel/StatigelDoorClosed.cs | 2 +- Tiles/FurnitureStatigel/StatigelDoorOpen.cs | 2 +- Tiles/FurnitureStratus/StratusBed.cs | 1 - Tiles/FurnitureStratus/StratusDoorClosed.cs | 2 +- Tiles/FurnitureStratus/StratusDoorOpen.cs | 2 +- Tiles/FurnitureVoid/VoidBed.cs | 1 - Tiles/FurnitureVoid/VoidDoorClosed.cs | 2 +- Tiles/FurnitureVoid/VoidDoorOpen.cs | 2 +- 73 files changed, 76 insertions(+), 96 deletions(-) diff --git a/Items/CalamityGlobalItemLoot.cs b/Items/CalamityGlobalItemLoot.cs index 8891833124..53fbe45c7f 100644 --- a/Items/CalamityGlobalItemLoot.cs +++ b/Items/CalamityGlobalItemLoot.cs @@ -16,7 +16,6 @@ namespace CalamityMod.Items public class CalamityGlobalItemLoot : GlobalItem { public override bool InstancePerEntity => false; - public override bool CloneNewInstances => false; // NOTE: this function applies to all right-click-to-open items, even modded ones (despite the name). // This means it applies to boss bags, crates, lockboxes, herb bags, goodie bags, and presents. diff --git a/Tiles/AstralDesert/AstralPalmSapling.cs b/Tiles/AstralDesert/AstralPalmSapling.cs index 491f3a7f94..5415fe8841 100644 --- a/Tiles/AstralDesert/AstralPalmSapling.cs +++ b/Tiles/AstralDesert/AstralPalmSapling.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -35,7 +35,6 @@ namespace CalamityMod.Tiles.AstralDesert TileObjectData.newTile.LavaDeath = true; TileObjectData.newTile.RandomStyleRange = 3; TileObjectData.addTile(Type); - sapling = true; ModTranslation name = CreateMapEntryName(); name.SetDefault("Sapling"); AddMapEntry(new Color(200, 200, 200), name); diff --git a/Tiles/AstralDesert/AstralPalmTree.cs b/Tiles/AstralDesert/AstralPalmTree.cs index 2ca33e750c..12681ef988 100644 --- a/Tiles/AstralDesert/AstralPalmTree.cs +++ b/Tiles/AstralDesert/AstralPalmTree.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework.Graphics; using Terraria.ModLoader; namespace CalamityMod.Tiles.AstralDesert @@ -7,12 +7,12 @@ namespace CalamityMod.Tiles.AstralDesert { public override Texture2D GetTexture() { - return ModContent.Request("CalamityMod/Tiles/AstralDesert/AstralPalmTree"); + return ModContent.Request("CalamityMod/Tiles/AstralDesert/AstralPalmTree").Value; } public override Texture2D GetTopTextures() { - return ModContent.Request("CalamityMod/Tiles/AstralDesert/AstralPalmTree_Tops"); + return ModContent.Request("CalamityMod/Tiles/AstralDesert/AstralPalmTree_Tops").Value; } public override int DropWood() diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index d6453524c5..24b0bb63b3 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -1,9 +1,10 @@ - + using CalamityMod.Projectiles.Typeless; using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -44,16 +45,13 @@ namespace CalamityMod.Tiles.AstralDesert public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - if (Main.tile[i, j] is null) - return true; - if (j < Main.maxTilesY) { // tile[i, j+1] can still be null if it's on the edge of a chunk - if (Main.tile[i, j + 1] != null && !Main.tile[i, j + 1].HasTile) + if (!Main.tile[i, j + 1].HasTile) { - Main.tile[i, j].active(false); - Projectile.NewProjectile(new Vector2(i * 16f + 8f, j * 16f + 8f), Vector2.Zero, ModContent.ProjectileType(), 15, 0f); + Main.tile[i, j].Get().HasTile = false; + Projectile.NewProjectile(new EntitySource_TileBreak(i, j), new Vector2(i * 16f + 8f, j * 16f + 8f), Vector2.Zero, ModContent.ProjectileType(), 15, 0f); WorldGen.SquareTileFrame(i, j); return false; } diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs index be840aad64..390cbc296c 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryDoorClosed.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.DraedonStructures TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; DustType = 8; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool Slope(int i, int j) => false; diff --git a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs index 22dc623166..b9d528a7cc 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryDoorOpen.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.DraedonStructures TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; DustType = 8; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool Slope(int i, int j) => false; diff --git a/Tiles/DraedonStructures/DraedonLabTurret.cs b/Tiles/DraedonStructures/DraedonLabTurret.cs index 963d94e0d4..88693e5aae 100644 --- a/Tiles/DraedonStructures/DraedonLabTurret.cs +++ b/Tiles/DraedonStructures/DraedonLabTurret.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Tiles.DraedonStructures int drawDirection = te.Direction; Color drawColor = Lighting.GetColor(i, j); - Texture2D tex = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseTurret"); + Texture2D tex = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseTurret").Value; Vector2 screenOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset; drawOffset.Y -= 2f; diff --git a/Tiles/DraedonStructures/LaboratoryDoorClosed.cs b/Tiles/DraedonStructures/LaboratoryDoorClosed.cs index 038fb1b5b7..17678f564e 100644 --- a/Tiles/DraedonStructures/LaboratoryDoorClosed.cs +++ b/Tiles/DraedonStructures/LaboratoryDoorClosed.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.DraedonStructures TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; DustType = 8; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool Slope(int i, int j) => false; diff --git a/Tiles/DraedonStructures/LaboratoryDoorOpen.cs b/Tiles/DraedonStructures/LaboratoryDoorOpen.cs index ac3ec7507f..ac98f45f20 100644 --- a/Tiles/DraedonStructures/LaboratoryDoorOpen.cs +++ b/Tiles/DraedonStructures/LaboratoryDoorOpen.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.DraedonStructures TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; DustType = 8; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool Slope(int i, int j) => false; diff --git a/Tiles/FurnitureAbyss/AbyssBed.cs b/Tiles/FurnitureAbyss/AbyssBed.cs index a7c2cb12d0..5c85937788 100644 --- a/Tiles/FurnitureAbyss/AbyssBed.cs +++ b/Tiles/FurnitureAbyss/AbyssBed.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureAbyss AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAbyss/AbyssDoorClosed.cs b/Tiles/FurnitureAbyss/AbyssDoorClosed.cs index e22b2482ce..4a104181b2 100644 --- a/Tiles/FurnitureAbyss/AbyssDoorClosed.cs +++ b/Tiles/FurnitureAbyss/AbyssDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAbyss/AbyssDoorOpen.cs b/Tiles/FurnitureAbyss/AbyssDoorOpen.cs index 183e7454f1..e186908843 100644 --- a/Tiles/FurnitureAbyss/AbyssDoorOpen.cs +++ b/Tiles/FurnitureAbyss/AbyssDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAcidwood/AcidwoodBedTile.cs b/Tiles/FurnitureAcidwood/AcidwoodBedTile.cs index 338595bdbc..ca69e359b3 100644 --- a/Tiles/FurnitureAcidwood/AcidwoodBedTile.cs +++ b/Tiles/FurnitureAcidwood/AcidwoodBedTile.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Tiles.FurnitureAcidwood AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAcidwood/AcidwoodDoorClosed.cs b/Tiles/FurnitureAcidwood/AcidwoodDoorClosed.cs index 72e346e957..2939d2a5ed 100644 --- a/Tiles/FurnitureAcidwood/AcidwoodDoorClosed.cs +++ b/Tiles/FurnitureAcidwood/AcidwoodDoorClosed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAcidwood/AcidwoodDoorOpen.cs b/Tiles/FurnitureAcidwood/AcidwoodDoorOpen.cs index 1c2470323d..4b93d0edb6 100644 --- a/Tiles/FurnitureAcidwood/AcidwoodDoorOpen.cs +++ b/Tiles/FurnitureAcidwood/AcidwoodDoorOpen.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAncient/AncientBed.cs b/Tiles/FurnitureAncient/AncientBed.cs index 53e148c366..88db57fe6b 100644 --- a/Tiles/FurnitureAncient/AncientBed.cs +++ b/Tiles/FurnitureAncient/AncientBed.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureAncient AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAncient/AncientDoorClosed.cs b/Tiles/FurnitureAncient/AncientDoorClosed.cs index 92f68def85..cc4c99abf7 100644 --- a/Tiles/FurnitureAncient/AncientDoorClosed.cs +++ b/Tiles/FurnitureAncient/AncientDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureAncient AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAncient/AncientDoorOpen.cs b/Tiles/FurnitureAncient/AncientDoorOpen.cs index 7bcb715b80..b77791dcb0 100644 --- a/Tiles/FurnitureAncient/AncientDoorOpen.cs +++ b/Tiles/FurnitureAncient/AncientDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureAncient AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAshen/AshenBed.cs b/Tiles/FurnitureAshen/AshenBed.cs index 39b0d578d7..d688424f0e 100644 --- a/Tiles/FurnitureAshen/AshenBed.cs +++ b/Tiles/FurnitureAshen/AshenBed.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.GameContent.ObjectInteractions; @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureAshen AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAshen/AshenDoorClosed.cs b/Tiles/FurnitureAshen/AshenDoorClosed.cs index c11a3e0bdf..193fce147c 100644 --- a/Tiles/FurnitureAshen/AshenDoorClosed.cs +++ b/Tiles/FurnitureAshen/AshenDoorClosed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureAshen AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAshen/AshenDoorOpen.cs b/Tiles/FurnitureAshen/AshenDoorOpen.cs index 960e0ddec7..df035ef21a 100644 --- a/Tiles/FurnitureAshen/AshenDoorOpen.cs +++ b/Tiles/FurnitureAshen/AshenDoorOpen.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureAshen AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureAstral/MonolithBathtub.cs b/Tiles/FurnitureAstral/MonolithBathtub.cs index f382a9ffae..713bc4bb9e 100644 --- a/Tiles/FurnitureAstral/MonolithBathtub.cs +++ b/Tiles/FurnitureAstral/MonolithBathtub.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBathtubGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBathtubGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithBed.cs b/Tiles/FurnitureAstral/MonolithBed.cs index 6750e60b1c..bfaa48fe13 100644 --- a/Tiles/FurnitureAstral/MonolithBed.cs +++ b/Tiles/FurnitureAstral/MonolithBed.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Tiles.FurnitureAstral AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) @@ -37,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBedGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBedGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithBench.cs b/Tiles/FurnitureAstral/MonolithBench.cs index 01b21b51df..e22e84ec06 100644 --- a/Tiles/FurnitureAstral/MonolithBench.cs +++ b/Tiles/FurnitureAstral/MonolithBench.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBenchGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBenchGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithBookcase.cs b/Tiles/FurnitureAstral/MonolithBookcase.cs index a7463e918d..c8e479783e 100644 --- a/Tiles/FurnitureAstral/MonolithBookcase.cs +++ b/Tiles/FurnitureAstral/MonolithBookcase.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBookcaseGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithBookcaseGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithCandelabra.cs b/Tiles/FurnitureAstral/MonolithCandelabra.cs index 0d5c6aefa6..10bc4fcce7 100644 --- a/Tiles/FurnitureAstral/MonolithCandelabra.cs +++ b/Tiles/FurnitureAstral/MonolithCandelabra.cs @@ -35,13 +35,13 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandelabraGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandelabraGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); - Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandelabraFlame"); + Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandelabraFlame").Value; Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureAstral/MonolithCandle.cs b/Tiles/FurnitureAstral/MonolithCandle.cs index 594ac35656..85db298af3 100644 --- a/Tiles/FurnitureAstral/MonolithCandle.cs +++ b/Tiles/FurnitureAstral/MonolithCandle.cs @@ -1,4 +1,4 @@ -using CalamityMod.Dusts; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -35,13 +35,13 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandleGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandleGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y - 4) + zero; Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 20)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); - Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandleFlame"); + Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithCandleFlame").Value; Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 20)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureAstral/MonolithChair.cs b/Tiles/FurnitureAstral/MonolithChair.cs index fa289150f1..a56db98c49 100644 --- a/Tiles/FurnitureAstral/MonolithChair.cs +++ b/Tiles/FurnitureAstral/MonolithChair.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChairGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChairGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithChandelier.cs b/Tiles/FurnitureAstral/MonolithChandelier.cs index 4e5fdcb6d7..3d6115c951 100644 --- a/Tiles/FurnitureAstral/MonolithChandelier.cs +++ b/Tiles/FurnitureAstral/MonolithChandelier.cs @@ -33,13 +33,13 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChandelierGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChandelierGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); - Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChandelierFlame"); + Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChandelierFlame").Value; Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureAstral/MonolithChest.cs b/Tiles/FurnitureAstral/MonolithChest.cs index 0f9f2a5c06..2c5a3c4ac3 100644 --- a/Tiles/FurnitureAstral/MonolithChest.cs +++ b/Tiles/FurnitureAstral/MonolithChest.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChestGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithChestGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithClock.cs b/Tiles/FurnitureAstral/MonolithClock.cs index e61aeb7a35..13d095cb02 100644 --- a/Tiles/FurnitureAstral/MonolithClock.cs +++ b/Tiles/FurnitureAstral/MonolithClock.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithClockGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithClockGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithDoorClosed.cs b/Tiles/FurnitureAstral/MonolithDoorClosed.cs index 5dd93d28c8..65a46155b0 100644 --- a/Tiles/FurnitureAstral/MonolithDoorClosed.cs +++ b/Tiles/FurnitureAstral/MonolithDoorClosed.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureAstral AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithDoorClosedGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithDoorClosedGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithDoorOpen.cs b/Tiles/FurnitureAstral/MonolithDoorOpen.cs index 063f68baa2..f0f64f980c 100644 --- a/Tiles/FurnitureAstral/MonolithDoorOpen.cs +++ b/Tiles/FurnitureAstral/MonolithDoorOpen.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Tiles.FurnitureAstral AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithDoorOpenGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithDoorOpenGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithDresser.cs b/Tiles/FurnitureAstral/MonolithDresser.cs index 101454280d..c328e83bfa 100644 --- a/Tiles/FurnitureAstral/MonolithDresser.cs +++ b/Tiles/FurnitureAstral/MonolithDresser.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.FurnitureAstral AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Dressers }; - dresser = "Monolith Dresser"; + ContainerName.SetDefault("Monolith Dresser"); DresserDrop = ModContent.ItemType(); } @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithDresserGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithDresserGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; @@ -62,12 +62,12 @@ namespace CalamityMod.Tiles.FurnitureAstral public override void MouseOverFar(int i, int j) { - CalamityUtils.DresserMouseFar(chest); + CalamityUtils.DresserMouseFar(ContainerName.GetDefault()); } public override void MouseOver(int i, int j) { - CalamityUtils.DresserMouseOver(chest); + CalamityUtils.DresserMouseOver(ContainerName.GetDefault()); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/FurnitureAstral/MonolithLamp.cs b/Tiles/FurnitureAstral/MonolithLamp.cs index b311cd0127..719e640aeb 100644 --- a/Tiles/FurnitureAstral/MonolithLamp.cs +++ b/Tiles/FurnitureAstral/MonolithLamp.cs @@ -40,13 +40,13 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLampGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLampGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); - Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLampFlame"); + Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLampFlame").Value; Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureAstral/MonolithLantern.cs b/Tiles/FurnitureAstral/MonolithLantern.cs index 7e9be7a254..5fcb65a2f6 100644 --- a/Tiles/FurnitureAstral/MonolithLantern.cs +++ b/Tiles/FurnitureAstral/MonolithLantern.cs @@ -35,13 +35,13 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLanternGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLanternGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); - Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLanternFlame"); + Texture2D glowmaskBright = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithLanternFlame").Value; Main.spriteBatch.Draw(glowmaskBright, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureAstral/MonolithPiano.cs b/Tiles/FurnitureAstral/MonolithPiano.cs index c7727f3f89..9d6618afd4 100644 --- a/Tiles/FurnitureAstral/MonolithPiano.cs +++ b/Tiles/FurnitureAstral/MonolithPiano.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithPianoGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithPianoGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithSink.cs b/Tiles/FurnitureAstral/MonolithSink.cs index 97321fa6dc..6ba93bdc5e 100644 --- a/Tiles/FurnitureAstral/MonolithSink.cs +++ b/Tiles/FurnitureAstral/MonolithSink.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithSinkGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithSinkGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithTable.cs b/Tiles/FurnitureAstral/MonolithTable.cs index a7014805ff..c504e6f34a 100644 --- a/Tiles/FurnitureAstral/MonolithTable.cs +++ b/Tiles/FurnitureAstral/MonolithTable.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithTableGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithTableGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureAstral/MonolithWorkbench.cs b/Tiles/FurnitureAstral/MonolithWorkbench.cs index f53a2e5785..9f5913c76d 100644 --- a/Tiles/FurnitureAstral/MonolithWorkbench.cs +++ b/Tiles/FurnitureAstral/MonolithWorkbench.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.FurnitureAstral { int xPos = Main.tile[i, j].TileFrameX; int yPos = Main.tile[i, j].TileFrameY; - Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithWorkBenchGlow"); + Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAstral/MonolithWorkBenchGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(100, 100, 100, 100)); Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; diff --git a/Tiles/FurnitureBotanic/BotanicBed.cs b/Tiles/FurnitureBotanic/BotanicBed.cs index 76d192f5ab..d42ef68a74 100644 --- a/Tiles/FurnitureBotanic/BotanicBed.cs +++ b/Tiles/FurnitureBotanic/BotanicBed.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Tiles.FurnitureBotanic AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureBotanic/BotanicDoorClosed.cs b/Tiles/FurnitureBotanic/BotanicDoorClosed.cs index ee6b23bef9..d7de878ef7 100644 --- a/Tiles/FurnitureBotanic/BotanicDoorClosed.cs +++ b/Tiles/FurnitureBotanic/BotanicDoorClosed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureBotanic/BotanicDoorOpen.cs b/Tiles/FurnitureBotanic/BotanicDoorOpen.cs index 365ca27100..40a6a970e1 100644 --- a/Tiles/FurnitureBotanic/BotanicDoorOpen.cs +++ b/Tiles/FurnitureBotanic/BotanicDoorOpen.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureCosmilite/CosmiliteBed.cs b/Tiles/FurnitureCosmilite/CosmiliteBed.cs index 27098e7e50..b6f554c31e 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBed.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBed.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureCosmilite AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs b/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs index 9a512540f2..506767b8d4 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs b/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs index 5924901078..e4b7959e8b 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureEutrophic/EutrophicBed.cs b/Tiles/FurnitureEutrophic/EutrophicBed.cs index f6d02c3deb..25a03c95b0 100644 --- a/Tiles/FurnitureEutrophic/EutrophicBed.cs +++ b/Tiles/FurnitureEutrophic/EutrophicBed.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureEutrophic AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs b/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs index 9dc7fb0e58..321efc7341 100644 --- a/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs +++ b/Tiles/FurnitureEutrophic/EutrophicDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs b/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs index a00e13f4f0..b884355146 100644 --- a/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs +++ b/Tiles/FurnitureEutrophic/EutrophicDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureExo/ExoBedTile.cs b/Tiles/FurnitureExo/ExoBedTile.cs index 1f22acee5a..f157dc98b3 100644 --- a/Tiles/FurnitureExo/ExoBedTile.cs +++ b/Tiles/FurnitureExo/ExoBedTile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Tiles.FurnitureExo AddMapEntry(new Color(71, 95, 114), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CanExplode(int i, int j) => false; diff --git a/Tiles/FurnitureExo/ExoDoorClosed.cs b/Tiles/FurnitureExo/ExoDoorClosed.cs index c3edb12194..2c9c8770de 100644 --- a/Tiles/FurnitureExo/ExoDoorClosed.cs +++ b/Tiles/FurnitureExo/ExoDoorClosed.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureExo TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; DustType = 8; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool Slope(int i, int j) => false; diff --git a/Tiles/FurnitureExo/ExoDoorOpen.cs b/Tiles/FurnitureExo/ExoDoorOpen.cs index 52d92f0e9f..1555da915c 100644 --- a/Tiles/FurnitureExo/ExoDoorOpen.cs +++ b/Tiles/FurnitureExo/ExoDoorOpen.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureExo TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; DustType = 8; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool Slope(int i, int j) => false; diff --git a/Tiles/FurnitureOccult/OccultBed.cs b/Tiles/FurnitureOccult/OccultBed.cs index 6a0931fb9b..33abab1785 100644 --- a/Tiles/FurnitureOccult/OccultBed.cs +++ b/Tiles/FurnitureOccult/OccultBed.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Tiles.FurnitureOccult AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureOccult/OccultDoorClosed.cs b/Tiles/FurnitureOccult/OccultDoorClosed.cs index 3fe20e8634..e039d3ba25 100644 --- a/Tiles/FurnitureOccult/OccultDoorClosed.cs +++ b/Tiles/FurnitureOccult/OccultDoorClosed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureOccult AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureOccult/OccultDoorOpen.cs b/Tiles/FurnitureOccult/OccultDoorOpen.cs index 7c41525036..619d30302e 100644 --- a/Tiles/FurnitureOccult/OccultDoorOpen.cs +++ b/Tiles/FurnitureOccult/OccultDoorOpen.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureOccult AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateBed.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateBed.cs index d4474332af..b19d032239 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateBed.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateBed.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); } diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs index 1423dd1e38..810f665b2a 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs index 1d5285db1e..3d4cd1f8e2 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlateDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureProfaned/ProfanedBed.cs b/Tiles/FurnitureProfaned/ProfanedBed.cs index b6812841d2..23fc79151a 100644 --- a/Tiles/FurnitureProfaned/ProfanedBed.cs +++ b/Tiles/FurnitureProfaned/ProfanedBed.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Tiles.FurnitureProfaned AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs b/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs index 45df7dbc92..9e6be50c7b 100644 --- a/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs +++ b/Tiles/FurnitureProfaned/ProfanedDoorClosed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs b/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs index 26c193c706..b82e3ab781 100644 --- a/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs +++ b/Tiles/FurnitureProfaned/ProfanedDoorOpen.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureSilva/SilvaBed.cs b/Tiles/FurnitureSilva/SilvaBed.cs index 5f67c9131e..e692966e87 100644 --- a/Tiles/FurnitureSilva/SilvaBed.cs +++ b/Tiles/FurnitureSilva/SilvaBed.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Tiles.FurnitureSilva AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureSilva/SilvaDoorClosed.cs b/Tiles/FurnitureSilva/SilvaDoorClosed.cs index 721f5ec0eb..3942b9e18b 100644 --- a/Tiles/FurnitureSilva/SilvaDoorClosed.cs +++ b/Tiles/FurnitureSilva/SilvaDoorClosed.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureSilva AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureSilva/SilvaDoorOpen.cs b/Tiles/FurnitureSilva/SilvaDoorOpen.cs index 8d8f6fee71..d95c065c4c 100644 --- a/Tiles/FurnitureSilva/SilvaDoorOpen.cs +++ b/Tiles/FurnitureSilva/SilvaDoorOpen.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Tiles.FurnitureSilva AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureStatigel/StatigelBed.cs b/Tiles/FurnitureStatigel/StatigelBed.cs index 7e3570a220..dee6198311 100644 --- a/Tiles/FurnitureStatigel/StatigelBed.cs +++ b/Tiles/FurnitureStatigel/StatigelBed.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureStatigel AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureStatigel/StatigelDoorClosed.cs b/Tiles/FurnitureStatigel/StatigelDoorClosed.cs index 2216ee42d6..f5fd9b5d75 100644 --- a/Tiles/FurnitureStatigel/StatigelDoorClosed.cs +++ b/Tiles/FurnitureStatigel/StatigelDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureStatigel/StatigelDoorOpen.cs b/Tiles/FurnitureStatigel/StatigelDoorOpen.cs index 36bbfffe72..febbf25310 100644 --- a/Tiles/FurnitureStatigel/StatigelDoorOpen.cs +++ b/Tiles/FurnitureStatigel/StatigelDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureStratus/StratusBed.cs b/Tiles/FurnitureStratus/StratusBed.cs index 4a7435ee62..ee062a690d 100644 --- a/Tiles/FurnitureStratus/StratusBed.cs +++ b/Tiles/FurnitureStratus/StratusBed.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureStratus AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureStratus/StratusDoorClosed.cs b/Tiles/FurnitureStratus/StratusDoorClosed.cs index 51fef24788..b722ed19c3 100644 --- a/Tiles/FurnitureStratus/StratusDoorClosed.cs +++ b/Tiles/FurnitureStratus/StratusDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureStratus AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureStratus/StratusDoorOpen.cs b/Tiles/FurnitureStratus/StratusDoorOpen.cs index 72df9f0c51..aa85753f15 100644 --- a/Tiles/FurnitureStratus/StratusDoorOpen.cs +++ b/Tiles/FurnitureStratus/StratusDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureStratus AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureVoid/VoidBed.cs b/Tiles/FurnitureVoid/VoidBed.cs index b9c1f7c9c1..18522fe05a 100644 --- a/Tiles/FurnitureVoid/VoidBed.cs +++ b/Tiles/FurnitureVoid/VoidBed.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Tiles.FurnitureVoid AddMapEntry(new Color(191, 142, 111), name); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.Beds }; - bed = true; } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureVoid/VoidDoorClosed.cs b/Tiles/FurnitureVoid/VoidDoorClosed.cs index 3b6f16c518..c51520c493 100644 --- a/Tiles/FurnitureVoid/VoidDoorClosed.cs +++ b/Tiles/FurnitureVoid/VoidDoorClosed.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureVoid AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.ClosedDoor }; - openDoorID = ModContent.TileType(); + OpenDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureVoid/VoidDoorOpen.cs b/Tiles/FurnitureVoid/VoidDoorOpen.cs index eed0cbac48..8b3c26fccc 100644 --- a/Tiles/FurnitureVoid/VoidDoorOpen.cs +++ b/Tiles/FurnitureVoid/VoidDoorOpen.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Tiles.FurnitureVoid AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Door")); TileID.Sets.DisableSmartCursor[Type] = true; AdjTiles = new int[] { TileID.OpenDoor }; - closeDoorID = ModContent.TileType(); + CloseDoorID = ModContent.TileType(); } public override bool CreateDust(int i, int j, ref int type) From 47fd2e27d617783d96a3ce3c642b3eab2326acec Mon Sep 17 00:00:00 2001 From: Phupperbat Date: Wed, 6 Apr 2022 18:35:57 -0400 Subject: [PATCH 08/14] Cleaned up recipes for Difficulty Items, Draedon Misc, Dyes, Fishing Rods, Lab Seekers, Materials, Mounts, Pets, Potions & stuff I missed before --- Items/Accessories/AbyssalDivingGear.cs | 14 +-- Items/Accessories/AbyssalDivingSuit.cs | 22 ++-- Items/Accessories/AbyssalMirror.cs | 18 +-- Items/Accessories/AlchemicalFlask.cs | 12 +- Items/Accessories/AmalgamatedBrain.cs | 12 +- Items/Accessories/AmbrosialAmpoule.cs | 28 ++--- Items/Accessories/AncientFossil.cs | 8 +- Items/Accessories/AngelTreads.cs | 20 ++-- Items/Accessories/AngelicAlliance.cs | 20 ++-- Items/Accessories/ArchaicPowder.cs | 14 +-- Items/Accessories/AsgardianAegis.cs | 14 +-- Items/Accessories/AsgardsValor.cs | 18 +-- Items/Accessories/AstralArcanum.cs | 12 +- Items/Accessories/BadgeofBravery.cs | 10 +- Items/Accessories/BloodstainedGlove.cs | 12 +- Items/Accessories/BloodyWormScarf.cs | 12 +- Items/Accessories/BlunderBooster.cs | 10 +- Items/Accessories/CelestialJewel.cs | 14 +-- Items/Accessories/ChaosAmulet.cs | 10 +- Items/Accessories/CoinofDeceit.cs | 12 +- Items/Accessories/CoreOfTheBloodGod.cs | 16 +-- Items/Accessories/CorruptFlask.cs | 10 +- Items/Accessories/CrimsonFlask.cs | 10 +- Items/Accessories/DaawnlightSpiritOrigin.cs | 16 +-- Items/Accessories/DaedalusEmblem.cs | 12 +- Items/Accessories/DarkGodsSheath.cs | 12 +- Items/Accessories/DarkSunRing.cs | 10 +- Items/Accessories/DeificAmulet.cs | 16 +-- Items/Accessories/DimensionalSoulArtifact.cs | 12 +- Items/Accessories/EclipseMirror.cs | 12 +- Items/Accessories/EldritchSoulArtifact.cs | 12 +- Items/Accessories/ElectriciansGlove.cs | 24 ++-- Items/Accessories/ElementalGauntlet.cs | 16 +-- Items/Accessories/ElementalQuiver.cs | 16 +-- Items/Accessories/EnchantedPearl.cs | 16 +-- Items/Accessories/EtherealTalisman.cs | 16 +-- Items/Accessories/EvasionScarf.cs | 14 +-- Items/Accessories/FeatherCrown.cs | 24 ++-- Items/Accessories/FilthyGlove.cs | 12 +- Items/Accessories/FrigidBulwark.cs | 14 +-- Items/Accessories/GodlySoulArtifact.cs | 12 +- Items/Accessories/GrandGelatin.cs | 16 +-- Items/Accessories/HallowedRune.cs | 16 +-- Items/Accessories/HarpyRing.cs | 12 +- Items/Accessories/HeartoftheElements.cs | 16 +-- Items/Accessories/HoneyDew.cs | 16 +-- Items/Accessories/JellyChargedBattery.cs | 14 +-- Items/Accessories/LivingDew.cs | 12 +- Items/Accessories/LumenousAmulet.cs | 14 +-- Items/Accessories/MirageMirror.cs | 24 ++-- Items/Accessories/MoonstoneCrown.cs | 12 +- Items/Accessories/Nanotech.cs | 20 ++-- Items/Accessories/NecklaceofVexation.cs | 10 +- Items/Accessories/Nucleogenesis.cs | 16 +-- Items/Accessories/OccultSkullCrown.cs | 14 +-- Items/Accessories/OrnateShield.cs | 10 +- Items/Accessories/PhantomicArtifact.cs | 14 +-- Items/Accessories/PlagueHive.cs | 10 +- Items/Accessories/ProfanedSoulArtifact.cs | 12 +- Items/Accessories/ProfanedSoulCrystal.cs | 22 ++-- Items/Accessories/RadiantOoze.cs | 10 +- Items/Accessories/RaidersTalisman.cs | 10 +- Items/Accessories/RampartofDeities.cs | 18 +-- Items/Accessories/ReaperToothNecklace.cs | 16 +-- Items/Accessories/RuinMedallion.cs | 12 +- Items/Accessories/RustyMedallion.cs | 10 +- Items/Accessories/SandSharkToothNecklace.cs | 12 +- Items/Accessories/ShieldoftheOcean.cs | 10 +- Items/Accessories/SigilofCalamitas.cs | 16 +-- Items/Accessories/SilencingSheath.cs | 12 +- Items/Accessories/SpiritGenerator.cs | 10 +- Items/Accessories/Sponge.cs | 16 +-- Items/Accessories/StarTaintedGenerator.cs | 14 +-- Items/Accessories/StatisBeltOfCurses.cs | 12 +- Items/Accessories/StatisBlessing.cs | 16 +-- Items/Accessories/StatisCurse.cs | 12 +- Items/Accessories/StatisNinjaBelt.cs | 14 +-- .../SupremeBaitTackleBoxFishingStation.cs | 28 ++--- Items/Accessories/TheAbsorber.cs | 52 ++++----- Items/Accessories/TheAmalgam.cs | 20 ++-- Items/Accessories/TheCamper.cs | 22 ++-- Items/Accessories/VampiricTalisman.cs | 10 +- Items/Accessories/VoidofExtinction.cs | 16 +-- Items/Accessories/Wings/AureateWings.cs | 12 +- Items/Accessories/Wings/CelestialTracers.cs | 12 +- Items/Accessories/Wings/DiscordianWings.cs | 12 +- Items/Accessories/Wings/ElysianTracers.cs | 14 +-- Items/Accessories/Wings/HadarianWings.cs | 12 +- Items/Accessories/Wings/InfinityBoots.cs | 16 +-- Items/Accessories/Wings/MOAB.cs | 20 ++-- Items/Accessories/Wings/SilvaWings.cs | 14 +-- Items/Accessories/Wings/SkylineWings.cs | 14 +-- Items/Accessories/Wings/StarlightWings.cs | 12 +- Items/Accessories/Wings/TarragonWings.cs | 10 +- Items/Accessories/Wings/XerocWings.cs | 10 +- Items/Accessories/YharimsInsignia.cs | 14 +-- Items/Ammo/AccelerationBullet.cs | 10 +- Items/Ammo/AcidBullet.cs | 10 +- Items/Ammo/ArcticArrow.cs | 8 +- Items/Ammo/BloodfireArrow.cs | 8 +- Items/Ammo/BloodfireBullet.cs | 8 +- Items/Ammo/ElysianArrow.cs | 10 +- Items/Ammo/EnhancedNanoRound.cs | 10 +- Items/Ammo/FlashBullet.cs | 10 +- Items/Ammo/GodSlayerSlug.cs | 10 +- Items/Ammo/HolyFireBullet.cs | 10 +- Items/Ammo/HyperiusBullet.cs | 10 +- Items/Ammo/MortarRound.cs | 10 +- Items/Ammo/NapalmArrow.cs | 12 +- Items/Ammo/RubberMortarRound.cs | 10 +- Items/Ammo/SuperballBullet.cs | 10 +- Items/Ammo/TerraArrow.cs | 10 +- Items/Ammo/TerraBullet.cs | 10 +- Items/Ammo/VanquisherArrow.cs | 8 +- Items/Ammo/VeriumBullet.cs | 10 +- Items/AntiCystOintment.cs | 10 +- Items/AntiTumorOintment.cs | 10 +- Items/Armor/AerospecBreastplate.cs | 14 +-- Items/Armor/AerospecHat.cs | 14 +-- Items/Armor/AerospecHeadgear.cs | 14 +-- Items/Armor/AerospecHelm.cs | 14 +-- Items/Armor/AerospecHelmet.cs | 14 +-- Items/Armor/AerospecHood.cs | 14 +-- Items/Armor/AerospecLeggings.cs | 14 +-- Items/Armor/AstralBreastplate.cs | 10 +- Items/Armor/AstralHelm.cs | 10 +- Items/Armor/AstralLeggings.cs | 10 +- Items/Armor/AtaxiaArmor.cs | 12 +- Items/Armor/AtaxiaHeadgear.cs | 12 +- Items/Armor/AtaxiaHelm.cs | 12 +- Items/Armor/AtaxiaHelmet.cs | 12 +- Items/Armor/AtaxiaHood.cs | 12 +- Items/Armor/AtaxiaMask.cs | 12 +- Items/Armor/AtaxiaSubligar.cs | 12 +- Items/Armor/AuricTeslaBodyArmor.cs | 32 ++--- Items/Armor/AuricTeslaCuisses.cs | 30 ++--- Items/Armor/AuricTeslaHelm.cs | 16 +-- Items/Armor/AuricTeslaHoodedFacemask.cs | 16 +-- Items/Armor/AuricTeslaPlumedHelm.cs | 16 +-- Items/Armor/AuricTeslaSpaceHelmet.cs | 16 +-- Items/Armor/AuricTeslaWireHemmedVisage.cs | 16 +-- Items/Armor/BloodflareBodyArmor.cs | 10 +- Items/Armor/BloodflareCuisses.cs | 10 +- Items/Armor/BloodflareHelm.cs | 10 +- Items/Armor/BloodflareHelmet.cs | 10 +- Items/Armor/BloodflareHornedHelm.cs | 10 +- Items/Armor/BloodflareHornedMask.cs | 10 +- Items/Armor/BloodflareMask.cs | 10 +- Items/Armor/BrimflameBoots.cs | 10 +- Items/Armor/BrimflameRobes.cs | 12 +- Items/Armor/BrimflameScowl.cs | 10 +- Items/Armor/DaedalusBreastplate.cs | 12 +- Items/Armor/DaedalusHat.cs | 12 +- Items/Armor/DaedalusHeadgear.cs | 12 +- Items/Armor/DaedalusHelm.cs | 12 +- Items/Armor/DaedalusHelmet.cs | 12 +- Items/Armor/DaedalusLeggings.cs | 12 +- Items/Armor/DaedalusVisor.cs | 12 +- Items/Armor/DemonshadeBreastplate.cs | 8 +- Items/Armor/DemonshadeGreaves.cs | 6 +- Items/Armor/DemonshadeHelm.cs | 8 +- Items/Armor/DesertProwlerHat.cs | 10 +- Items/Armor/DesertProwlerPants.cs | 10 +- Items/Armor/DesertProwlerShirt.cs | 10 +- Items/Armor/FathomSwarmerBoots.cs | 16 +-- Items/Armor/FathomSwarmerBreastplate.cs | 16 +-- Items/Armor/FathomSwarmerVisage.cs | 16 +-- Items/Armor/FearmongerGreathelm.cs | 14 +-- Items/Armor/FearmongerGreaves.cs | 14 +-- Items/Armor/FearmongerPlateMail.cs | 14 +-- Items/Armor/GemTechHeadgear.cs | 12 +- Items/Armor/GemTechSchynbaulds.cs | 12 +- Items/Armor/GodSlayerChestplate.cs | 10 +- Items/Armor/GodSlayerHelm.cs | 10 +- Items/Armor/GodSlayerHelmet.cs | 10 +- Items/Armor/GodSlayerLeggings.cs | 10 +- Items/Armor/GodSlayerMask.cs | 10 +- Items/Armor/MolluskShelleggings.cs | 10 +- Items/Armor/MolluskShellmet.cs | 10 +- Items/Armor/MolluskShellplate.cs | 10 +- Items/Armor/OmegaBlueChestplate.cs | 14 +-- Items/Armor/OmegaBlueHelmet.cs | 14 +-- Items/Armor/OmegaBlueLeggings.cs | 14 +-- Items/Armor/PlagueReaperMask.cs | 24 ++-- Items/Armor/PlagueReaperStriders.cs | 12 +- Items/Armor/PlagueReaperVest.cs | 12 +- Items/Armor/PlaguebringerCarapace.cs | 14 +-- Items/Armor/PlaguebringerPistons.cs | 14 +-- Items/Armor/PlaguebringerVisor.cs | 12 +- Items/Armor/PrismaticGreaves.cs | 14 +-- Items/Armor/PrismaticHelmet.cs | 14 +-- Items/Armor/PrismaticRegalia.cs | 14 +-- Items/Armor/ReaverCuisses.cs | 12 +- Items/Armor/ReaverHeadgear.cs | 12 +- Items/Armor/ReaverHelm.cs | 12 +- Items/Armor/ReaverScaleMail.cs | 12 +- Items/Armor/ReaverVisage.cs | 12 +- Items/Armor/ShroomiteVisage.cs | 8 +- Items/Armor/SilvaArmor.cs | 14 +-- Items/Armor/SilvaHelmet.cs | 14 +-- Items/Armor/SilvaLeggings.cs | 14 +-- Items/Armor/SilvaMaskedCap.cs | 14 +-- Items/Armor/SnowRuffianChestplate.cs | 12 +- Items/Armor/SnowRuffianGreaves.cs | 12 +- Items/Armor/SnowRuffianMask.cs | 12 +- Items/Armor/StatigelArmor.cs | 10 +- Items/Armor/StatigelCap.cs | 10 +- Items/Armor/StatigelGreaves.cs | 10 +- Items/Armor/StatigelHeadgear.cs | 10 +- Items/Armor/StatigelHelm.cs | 10 +- Items/Armor/StatigelHood.cs | 10 +- Items/Armor/StatigelMask.cs | 10 +- Items/Armor/SulfurBreastplate.cs | 14 +-- Items/Armor/SulfurHelmet.cs | 14 +-- Items/Armor/SulfurLeggings.cs | 14 +-- Items/Armor/TarragonBreastplate.cs | 10 +- Items/Armor/TarragonHelm.cs | 10 +- Items/Armor/TarragonHelmet.cs | 10 +- Items/Armor/TarragonHornedHelm.cs | 10 +- Items/Armor/TarragonLeggings.cs | 10 +- Items/Armor/TarragonMask.cs | 10 +- Items/Armor/TarragonVisage.cs | 10 +- Items/Armor/TitanHeartBoots.cs | 10 +- Items/Armor/TitanHeartMantle.cs | 10 +- Items/Armor/TitanHeartMask.cs | 10 +- Items/Armor/UmbraphileBoots.cs | 10 +- Items/Armor/UmbraphileHood.cs | 10 +- Items/Armor/UmbraphileRegalia.cs | 10 +- Items/Armor/Vanity/ApronOfAffection.cs | 12 +- Items/Armor/VictideBreastplate.cs | 8 +- Items/Armor/VictideHeadgear.cs | 8 +- Items/Armor/VictideHelm.cs | 8 +- Items/Armor/VictideHelmet.cs | 8 +- Items/Armor/VictideLeggings.cs | 8 +- Items/Armor/VictideMask.cs | 8 +- Items/Armor/VictideVisage.cs | 8 +- Items/Armor/WulfrumArmor.cs | 10 +- Items/Armor/WulfrumHeadgear.cs | 10 +- Items/Armor/WulfrumHelm.cs | 10 +- Items/Armor/WulfrumHelmet.cs | 10 +- Items/Armor/WulfrumHood.cs | 10 +- Items/Armor/WulfrumLeggings.cs | 10 +- Items/Armor/WulfrumMask.cs | 10 +- Items/Armor/XerocCuisses.cs | 10 +- Items/Armor/XerocMask.cs | 10 +- Items/Armor/XerocPlateMail.cs | 10 +- Items/BleachBall.cs | 10 +- Items/BrimstoneLocus.cs | 8 +- Items/BrokenWaterFilter.cs | 10 +- Items/DifficultyItems/BallAndChain.cs | 8 +- Items/DifficultyItems/Death.cs | 6 +- Items/DifficultyItems/Malice.cs | 6 +- Items/DifficultyItems/Revenge.cs | 4 +- Items/DraedonMisc/AdvancedDisplay.cs | 8 +- Items/DraedonMisc/AuricQuantumCoolingCell.cs | 14 +-- Items/DraedonMisc/CodebreakerBase.cs | 8 +- Items/DraedonMisc/DecryptionComputer.cs | 6 +- Items/DraedonMisc/EncryptedSchematicHell.cs | 6 +- Items/DraedonMisc/EncryptedSchematicIce.cs | 6 +- Items/DraedonMisc/EncryptedSchematicJungle.cs | 6 +- .../EncryptedSchematicPlanetoid.cs | 2 +- .../EncryptedSchematicSunkenSea.cs | 6 +- Items/DraedonMisc/LongRangedSensorArray.cs | 6 +- Items/DraedonMisc/VoltageRegulationSystem.cs | 8 +- Items/Dyes/AerialiteDye.cs | 8 +- Items/Dyes/AstralBlueDye.cs | 8 +- Items/Dyes/AstralDye.cs | 8 +- Items/Dyes/AstralOrangeDye.cs | 8 +- Items/Dyes/AstralSwirlDye.cs | 9 +- Items/Dyes/AuricDye.cs | 8 +- Items/Dyes/BloodflareDye.cs | 8 +- Items/Dyes/BlueCosmicFlameDye.cs | 8 +- Items/Dyes/BlueStatigelDye.cs | 8 +- Items/Dyes/BrimflameDye.cs | 8 +- Items/Dyes/CalamitousDye.cs | 8 +- Items/Dyes/CeaselessDye.cs | 9 +- Items/Dyes/CosmiliteDye.cs | 8 +- Items/Dyes/CryonicDye.cs | 8 +- Items/Dyes/DragonSoulDye.cs | 8 +- Items/Dyes/ElementalDye.cs | 11 +- Items/Dyes/EndothermicDye.cs | 8 +- Items/Dyes/ExoDye.cs | 8 +- Items/Dyes/NightmareDye.cs | 8 +- Items/Dyes/PhantoplasmDye.cs | 8 +- Items/Dyes/PinkCosmicFlameDye.cs | 8 +- Items/Dyes/PinkStatigelDye.cs | 8 +- Items/Dyes/ProfanedFlameDye.cs | 8 +- Items/Dyes/ReaverDye.cs | 8 +- Items/Dyes/ShadowspecDye.cs | 8 +- Items/Dyes/SlimeGodDye.cs | 9 +- Items/Dyes/StratusDye.cs | 10 +- Items/Dyes/SwirlingCosmicFlameDye.cs | 8 +- Items/Fishing/FishingRods/ChaoticSpreadRod.cs | 6 +- Items/Fishing/FishingRods/EarlyBloomRod.cs | 6 +- Items/Fishing/FishingRods/FeralDoubleRod.cs | 5 +- Items/Fishing/FishingRods/HeronRod.cs | 8 +- Items/Fishing/FishingRods/NavyFishingRod.cs | 8 +- .../Fishing/FishingRods/TheDevourerofCods.cs | 5 +- .../FishingRods/VerstaltiteFishingRod.cs | 7 +- Items/Fishing/FishingRods/WulfrumRod.cs | 7 +- Items/LabFinders/CyanSeekingMechanism.cs | 8 +- Items/LabFinders/GreenSeekingMechanism.cs | 8 +- Items/LabFinders/MysteriousMechanism.cs | 9 +- Items/LabFinders/PurpleSeekingMechanism.cs | 8 +- Items/LabFinders/RedSeekingMechanism.cs | 8 +- Items/LabFinders/YellowSeekingMechanism.cs | 8 +- Items/Materials/AerialiteBar.cs | 7 +- Items/Materials/AscendantSpiritEssence.cs | 8 +- Items/Materials/AuricBar.cs | 6 +- Items/Materials/BarofLife.cs | 9 +- Items/Materials/BloodstoneCore.cs | 9 +- Items/Materials/CoreofCalamity.cs | 8 +- Items/Materials/CoreofChaos.cs | 6 +- Items/Materials/CoreofCinder.cs | 6 +- Items/Materials/CoreofEleum.cs | 6 +- Items/Materials/CruptixBar.cs | 5 +- Items/Materials/DraedonBar.cs | 7 +- Items/Materials/GalacticaSingularity.cs | 10 +- Items/Materials/MeldiateBar.cs | 8 +- Items/Materials/MiracleMatter.cs | 10 +- Items/Materials/UeliaceBar.cs | 7 +- Items/Materials/UnholyCore.cs | 8 +- Items/Materials/VerstaltiteBar.cs | 7 +- Items/Materials/VictideBar.cs | 10 +- Items/Mounts/GazeOfCrysthamyr.cs | 10 +- Items/Mounts/Minecarts/DoGCart.cs | 7 +- Items/NormalityRelocator.cs | 14 +-- Items/PermanentBoosters/BloodOrange.cs | 18 +-- Items/PermanentBoosters/CometShard.cs | 12 +- Items/PermanentBoosters/Dragonfruit.cs | 16 +-- Items/PermanentBoosters/Elderberry.cs | 16 +-- Items/PermanentBoosters/EtherealCore.cs | 14 +-- Items/PermanentBoosters/MiracleFruit.cs | 16 +-- Items/PermanentBoosters/PhantomHeart.cs | 10 +- Items/Pets/PrimroseKeepsake.cs | 7 +- Items/Pets/RotomRemote.cs | 7 +- Items/Pets/SparksSummon.cs | 13 ++- Items/Potions/Alcohol/FabsolsVodka.cs | 18 ++- Items/Potions/AnechoicCoating.cs | 8 +- Items/Potions/AstralInjection.cs | 17 ++- Items/Potions/Baguette.cs | 7 +- Items/Potions/BoundingPotion.cs | 16 ++- Items/Potions/CadencePotion.cs | 17 ++- Items/Potions/CalamitasBrew.cs | 17 ++- Items/Potions/CalciumPotion.cs | 15 ++- Items/Potions/CeaselessHungerPotion.cs | 17 ++- Items/Potions/CrumblingPotion.cs | 17 ++- Items/Potions/DraconicElixir.cs | 17 ++- Items/Potions/GravityNormalizerPotion.cs | 17 ++- Items/Potions/HolyWrathPotion.cs | 17 ++- Items/Potions/OmegaHealingPotion.cs | 8 +- Items/Potions/PenumbraPotion.cs | 17 ++- Items/Potions/PhotosynthesisPotion.cs | 18 ++- Items/Potions/PotionofOmniscience.cs | 16 ++- Items/Potions/ProfanedRagePotion.cs | 17 ++- Items/Potions/RevivifyPotion.cs | 18 ++- Items/Potions/ShadowPotion.cs | 15 ++- Items/Potions/ShatteringPotion.cs | 16 ++- Items/Potions/SoaringPotion.cs | 17 ++- Items/Potions/SulphurskinPotion.cs | 16 ++- Items/Potions/SunkenStew.cs | 17 ++- Items/Potions/SupremeHealingPotion.cs | 8 +- Items/Potions/SupremeManaPotion.cs | 8 +- Items/Potions/TeslaPotion.cs | 17 ++- Items/Potions/TitanScalePotion.cs | 17 ++- Items/Potions/TriumphPotion.cs | 15 ++- Items/Potions/YharimsStimulants.cs | 18 ++- Items/Potions/ZenPotion.cs | 19 ++- Items/Potions/ZergPotion.cs | 18 ++- Items/SirenproofEarMuffs.cs | 10 +- Items/SuperDummy.cs | 6 +- Items/Tools/AbyssalWarhammer.cs | 8 +- Items/Tools/AerialHamaxe.cs | 10 +- Items/Tools/AstralHamaxe.cs | 8 +- Items/Tools/AstralPickaxe.cs | 8 +- Items/Tools/BeastialPickaxe.cs | 8 +- Items/Tools/BerserkerWaraxe.cs | 8 +- Items/Tools/BlossomPickaxe.cs | 8 +- Items/Tools/ChaoswarpedSlashaxe.cs | 8 +- Items/Tools/ClimateChange/AridArtifact.cs | 12 +- Items/Tools/ClimateChange/BloodIdol.cs | 14 +-- Items/Tools/ClimateChange/Cosmolight.cs | 12 +- Items/Tools/CrystylCrusher.cs | 12 +- Items/Tools/FellerofEvergreens.cs | 24 ++-- Items/Tools/FlamebeakHampick.cs | 8 +- Items/Tools/Gelpick.cs | 12 +- Items/Tools/Grax.cs | 16 +-- Items/Tools/GreatbayPickaxe.cs | 8 +- Items/Tools/InfernaCutter.cs | 12 +- Items/Tools/MarniteObliterator.cs | 12 +- Items/Tools/PurityAxe.cs | 14 +-- Items/Tools/ReefclawHamaxe.cs | 8 +- Items/Tools/ShardlightPickaxe.cs | 8 +- Items/Tools/SkyfringePickaxe.cs | 10 +- Items/Tools/WulfrumAxe.cs | 8 +- Items/Tools/WulfrumHammer.cs | 8 +- Items/Tools/WulfrumPickaxe.cs | 8 +- Items/VoodooDemonVoodooDoll.cs | 10 +- Utilities/CalamityRecipes.cs | 110 +++++++++--------- 399 files changed, 2710 insertions(+), 2097 deletions(-) diff --git a/Items/Accessories/AbyssalDivingGear.cs b/Items/Accessories/AbyssalDivingGear.cs index 72ad695b28..3fc90d0241 100644 --- a/Items/Accessories/AbyssalDivingGear.cs +++ b/Items/Accessories/AbyssalDivingGear.cs @@ -53,13 +53,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.ArcticDivingGear) - .AddIngredient() - .AddIngredient(10) - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.ArcticDivingGear). + AddIngredient(). + AddIngredient(10). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } diff --git a/Items/Accessories/AbyssalDivingSuit.cs b/Items/Accessories/AbyssalDivingSuit.cs index a2946e481e..fa21089363 100644 --- a/Items/Accessories/AbyssalDivingSuit.cs +++ b/Items/Accessories/AbyssalDivingSuit.cs @@ -49,17 +49,17 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(15) - .AddIngredient(40) - .AddIngredient(40) - .AddIngredient(15) - .AddIngredient(ItemID.LunarBar, 5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(15). + AddIngredient(40). + AddIngredient(40). + AddIngredient(15). + AddIngredient(ItemID.LunarBar, 5). + AddTile(TileID.LunarCraftingStation). + Register(); } } diff --git a/Items/Accessories/AbyssalMirror.cs b/Items/Accessories/AbyssalMirror.cs index e507c7130c..924b9960f1 100644 --- a/Items/Accessories/AbyssalMirror.cs +++ b/Items/Accessories/AbyssalMirror.cs @@ -40,15 +40,15 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.SpectreBar, 8) - .AddIngredient(10) - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.SpectreBar, 8). + AddIngredient(10). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs index 66482c2eeb..196db37147 100644 --- a/Items/Accessories/AlchemicalFlask.cs +++ b/Items/Accessories/AlchemicalFlask.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.BottledWater) - .AddIngredient(ItemID.BeeWax, 5) - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(ItemID.BeeWax, 5). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs index 36438a8795..8b40741c98 100644 --- a/Items/Accessories/AmalgamatedBrain.cs +++ b/Items/Accessories/AmalgamatedBrain.cs @@ -50,12 +50,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.BrainOfConfusion) - .AddIngredient(ItemID.SoulofNight, 3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.BrainOfConfusion). + AddIngredient(ItemID.SoulofNight, 3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 74bef5acfd..3ffc46aade 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -36,21 +36,21 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/AncientFossil.cs b/Items/Accessories/AncientFossil.cs index 7094ebdf02..3c6060ca3e 100644 --- a/Items/Accessories/AncientFossil.cs +++ b/Items/Accessories/AncientFossil.cs @@ -31,10 +31,10 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("SiltGroup", 100) - .AddTile(TileID.Furnaces) - .Register(); + CreateRecipe(). + AddRecipeGroup("SiltGroup", 100). + AddTile(TileID.Furnaces). + Register(); } } } diff --git a/Items/Accessories/AngelTreads.cs b/Items/Accessories/AngelTreads.cs index 3d5ba2bc6d..f9dd41b4f0 100644 --- a/Items/Accessories/AngelTreads.cs +++ b/Items/Accessories/AngelTreads.cs @@ -46,16 +46,16 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.FrostsparkBoots) - .AddIngredient(ItemID.LavaWaders) - .AddIngredient() - .AddIngredient(5) - .AddIngredient(ItemID.SoulofMight) - .AddIngredient(ItemID.SoulofSight) - .AddIngredient(ItemID.SoulofFright) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.FrostsparkBoots). + AddIngredient(ItemID.LavaWaders). + AddIngredient(). + AddIngredient(5). + AddIngredient(ItemID.SoulofMight). + AddIngredient(ItemID.SoulofSight). + AddIngredient(ItemID.SoulofFright). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/AngelicAlliance.cs b/Items/Accessories/AngelicAlliance.cs index b5f2fccfb8..3631597514 100644 --- a/Items/Accessories/AngelicAlliance.cs +++ b/Items/Accessories/AngelicAlliance.cs @@ -60,16 +60,16 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnyHallowedHelmet") - .AddIngredient(ItemID.HallowedPlateMail) - .AddIngredient(ItemID.HallowedGreaves) - .AddIngredient(ItemID.PaladinsShield) - .AddIngredient(ItemID.TrueExcalibur) - .AddIngredient(ItemID.CrossNecklace) - .AddIngredient(5) - .AddTile() - .Register(); + CreateRecipe(). + AddRecipeGroup("AnyHallowedHelmet"). + AddIngredient(ItemID.HallowedPlateMail). + AddIngredient(ItemID.HallowedGreaves). + AddIngredient(ItemID.PaladinsShield). + AddIngredient(ItemID.TrueExcalibur). + AddIngredient(ItemID.CrossNecklace). + AddIngredient(5). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/ArchaicPowder.cs b/Items/Accessories/ArchaicPowder.cs index 523b5c4adf..c43c701a0b 100644 --- a/Items/Accessories/ArchaicPowder.cs +++ b/Items/Accessories/ArchaicPowder.cs @@ -34,13 +34,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(3) - .AddIngredient(ItemID.Bone, 15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(3). + AddIngredient(ItemID.Bone, 15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index dbb7be92af..662ef9b24b 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -82,13 +82,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(10) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(10). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index 05df6ec011..b622161c4c 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -59,15 +59,15 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.AnkhShield) - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.LifeFruit, 5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.AnkhShield). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.LifeFruit, 5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index f0b221239a..466419226c 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -49,12 +49,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(3) - .AddIngredient(ItemID.LunarBar, 5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(3). + AddIngredient(ItemID.LunarBar, 5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index 0365dae017..8da94f5830 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.FeralClaws) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.FeralClaws). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/BloodstainedGlove.cs b/Items/Accessories/BloodstainedGlove.cs index 04efaa34dc..7607b472be 100644 --- a/Items/Accessories/BloodstainedGlove.cs +++ b/Items/Accessories/BloodstainedGlove.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Vertebrae, 4) - .AddIngredient(ItemID.CrimtaneBar, 4) - .AddTile(TileID.DemonAltar) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Vertebrae, 4). + AddIngredient(ItemID.CrimtaneBar, 4). + AddTile(TileID.DemonAltar). + Register(); } } } diff --git a/Items/Accessories/BloodyWormScarf.cs b/Items/Accessories/BloodyWormScarf.cs index d72460521e..d14571d061 100644 --- a/Items/Accessories/BloodyWormScarf.cs +++ b/Items/Accessories/BloodyWormScarf.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.WormScarf) - .AddIngredient(ItemID.SoulofNight, 3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.WormScarf). + AddIngredient(ItemID.SoulofNight, 3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/BlunderBooster.cs b/Items/Accessories/BlunderBooster.cs index 079f0e9756..ae1cee9703 100644 --- a/Items/Accessories/BlunderBooster.cs +++ b/Items/Accessories/BlunderBooster.cs @@ -52,11 +52,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(8) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(8). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index 93ed0fde8a..2bded561a7 100644 --- a/Items/Accessories/CelestialJewel.cs +++ b/Items/Accessories/CelestialJewel.cs @@ -46,13 +46,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.TeleportationPotion, 3) - .AddIngredient(15) - .AddIngredient(15) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.TeleportationPotion, 3). + AddIngredient(15). + AddIngredient(15). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/ChaosAmulet.cs b/Items/Accessories/ChaosAmulet.cs index 2a7f52409e..2290f7f3a9 100644 --- a/Items/Accessories/ChaosAmulet.cs +++ b/Items/Accessories/ChaosAmulet.cs @@ -29,11 +29,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.GoldDust, 7) - .AddIngredient(ItemID.SpelunkerPotion, 7) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.GoldDust, 7). + AddIngredient(ItemID.SpelunkerPotion, 7). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/CoinofDeceit.cs b/Items/Accessories/CoinofDeceit.cs index cc751cf9ca..bea2fcc359 100644 --- a/Items/Accessories/CoinofDeceit.cs +++ b/Items/Accessories/CoinofDeceit.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnyGoldBar", 4) - .AddRecipeGroup("AnyCopperBar", 8) - .AddIngredient(5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddRecipeGroup("AnyGoldBar", 4). + AddRecipeGroup("AnyCopperBar", 8). + AddIngredient(5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/CoreOfTheBloodGod.cs b/Items/Accessories/CoreOfTheBloodGod.cs index aa06598abb..edb8393989 100644 --- a/Items/Accessories/CoreOfTheBloodGod.cs +++ b/Items/Accessories/CoreOfTheBloodGod.cs @@ -39,14 +39,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/CorruptFlask.cs b/Items/Accessories/CorruptFlask.cs index 160794130c..87b8a65255 100644 --- a/Items/Accessories/CorruptFlask.cs +++ b/Items/Accessories/CorruptFlask.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.VilePowder, 15) - .AddIngredient(ItemID.RottenChunk, 10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.VilePowder, 15). + AddIngredient(ItemID.RottenChunk, 10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/CrimsonFlask.cs b/Items/Accessories/CrimsonFlask.cs index fee34a9d40..4122e059fe 100644 --- a/Items/Accessories/CrimsonFlask.cs +++ b/Items/Accessories/CrimsonFlask.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.ViciousPowder, 15) - .AddIngredient(ItemID.Vertebrae, 10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.ViciousPowder, 15). + AddIngredient(ItemID.Vertebrae, 10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/DaawnlightSpiritOrigin.cs b/Items/Accessories/DaawnlightSpiritOrigin.cs index 9f36ac4838..463101162d 100644 --- a/Items/Accessories/DaawnlightSpiritOrigin.cs +++ b/Items/Accessories/DaawnlightSpiritOrigin.cs @@ -85,14 +85,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(3) - .AddIngredient(15) - .AddIngredient(15) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(3). + AddIngredient(15). + AddIngredient(15). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/DaedalusEmblem.cs b/Items/Accessories/DaedalusEmblem.cs index 1e1dc803b3..7d43d346ce 100644 --- a/Items/Accessories/DaedalusEmblem.cs +++ b/Items/Accessories/DaedalusEmblem.cs @@ -35,12 +35,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.CelestialStone) - .AddIngredient(ItemID.RangerEmblem) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.CelestialStone). + AddIngredient(ItemID.RangerEmblem). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/DarkGodsSheath.cs b/Items/Accessories/DarkGodsSheath.cs index f4bc0fb771..d86ae8805a 100644 --- a/Items/Accessories/DarkGodsSheath.cs +++ b/Items/Accessories/DarkGodsSheath.cs @@ -40,12 +40,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index d6c6682b0a..e5dfdc621a 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -43,11 +43,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(20) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(20). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index e607509823..607a658a7f 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -34,14 +34,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.CharmofMyths) - .AddIngredient(ItemID.StarVeil) - .AddIngredient(10) - .AddIngredient(ItemID.MeteoriteBar, 10) - .AddIngredient(15) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.CharmofMyths). + AddIngredient(ItemID.StarVeil). + AddIngredient(10). + AddIngredient(ItemID.MeteoriteBar, 10). + AddIngredient(15). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/DimensionalSoulArtifact.cs index ff8fe1253e..2281aabaf9 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/DimensionalSoulArtifact.cs @@ -36,12 +36,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(25) - .AddIngredient(25) - .AddIngredient(5) - .AddTile(TileID.DemonAltar) - .Register(); + CreateRecipe(). + AddIngredient(25). + AddIngredient(25). + AddIngredient(5). + AddTile(TileID.DemonAltar). + Register(); } } } diff --git a/Items/Accessories/EclipseMirror.cs b/Items/Accessories/EclipseMirror.cs index e42149dda9..74eeba0966 100644 --- a/Items/Accessories/EclipseMirror.cs +++ b/Items/Accessories/EclipseMirror.cs @@ -50,12 +50,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(20) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(20). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index d6f96a7edb..8c55ee671e 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -34,12 +34,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(25) - .AddIngredient(25) - .AddIngredient(5) - .AddTile(TileID.DemonAltar) - .Register(); + CreateRecipe(). + AddIngredient(25). + AddIngredient(25). + AddIngredient(5). + AddTile(TileID.DemonAltar). + Register(); } } } diff --git a/Items/Accessories/ElectriciansGlove.cs b/Items/Accessories/ElectriciansGlove.cs index 7c94c77002..09227c6147 100644 --- a/Items/Accessories/ElectriciansGlove.cs +++ b/Items/Accessories/ElectriciansGlove.cs @@ -34,19 +34,19 @@ Stealth strikes also have +10 armor penetration, deal 10% more damage, and heal public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.Wire, 100) - .AddRecipeGroup("AnyMythrilBar", 5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Wire, 100). + AddRecipeGroup("AnyMythrilBar", 5). + AddTile(TileID.MythrilAnvil). + Register(); - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.Wire, 100) - .AddRecipeGroup("AnyMythrilBar", 5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Wire, 100). + AddRecipeGroup("AnyMythrilBar", 5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index 7ce18dce37..8eeafcc5f9 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -37,14 +37,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.FireGauntlet) - .AddIngredient() - .AddIngredient(ItemID.LunarBar, 8) - .AddIngredient(4) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(ItemID.FireGauntlet). + AddIngredient(). + AddIngredient(ItemID.LunarBar, 8). + AddIngredient(4). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index f7847424d9..12c47fd777 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -41,14 +41,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.MagicQuiver) - .AddIngredient() - .AddIngredient(ItemID.LunarBar, 8) - .AddIngredient(4) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(ItemID.MagicQuiver). + AddIngredient(). + AddIngredient(ItemID.LunarBar, 8). + AddIngredient(4). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/EnchantedPearl.cs b/Items/Accessories/EnchantedPearl.cs index f7ddad83a0..83ee7fb31b 100644 --- a/Items/Accessories/EnchantedPearl.cs +++ b/Items/Accessories/EnchantedPearl.cs @@ -32,14 +32,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.FishingPotion) - .AddIngredient(ItemID.CratePotion, 8) - .AddRecipeGroup("Boss2Material", 5) - .AddIngredient(10) - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.FishingPotion). + AddIngredient(ItemID.CratePotion, 8). + AddRecipeGroup("Boss2Material", 5). + AddIngredient(10). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index 858738c33e..e7cda5ab65 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -44,14 +44,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.ManaFlower) - .AddIngredient(ItemID.LunarBar, 8) - .AddIngredient(4) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.ManaFlower). + AddIngredient(ItemID.LunarBar, 8). + AddIngredient(4). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/EvasionScarf.cs b/Items/Accessories/EvasionScarf.cs index 32e644e9be..cafb5f7e5c 100644 --- a/Items/Accessories/EvasionScarf.cs +++ b/Items/Accessories/EvasionScarf.cs @@ -41,13 +41,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.SoulofNight, 5) - .AddIngredient(ItemID.SoulofLight, 5) - .AddIngredient(ItemID.Silk, 15) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.SoulofNight, 5). + AddIngredient(ItemID.SoulofLight, 5). + AddIngredient(ItemID.Silk, 15). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index 3e2a8c533d..1bb3ad65b0 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -40,19 +40,19 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.GoldCrown) - .AddIngredient(6) - .AddIngredient(ItemID.Feather, 8) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.GoldCrown). + AddIngredient(6). + AddIngredient(ItemID.Feather, 8). + AddTile(TileID.SkyMill). + Register(); - CreateRecipe() - .AddIngredient(ItemID.PlatinumCrown) - .AddIngredient(6) - .AddIngredient(ItemID.Feather, 8) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.PlatinumCrown). + AddIngredient(6). + AddIngredient(ItemID.Feather, 8). + AddTile(TileID.SkyMill). + Register(); } } diff --git a/Items/Accessories/FilthyGlove.cs b/Items/Accessories/FilthyGlove.cs index 1c831d17f5..2beebb8266 100644 --- a/Items/Accessories/FilthyGlove.cs +++ b/Items/Accessories/FilthyGlove.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.RottenChunk, 4) - .AddIngredient(ItemID.DemoniteBar, 4) - .AddIngredient(5) - .AddTile(TileID.DemonAltar) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.RottenChunk, 4). + AddIngredient(ItemID.DemoniteBar, 4). + AddIngredient(5). + AddTile(TileID.DemonAltar). + Register(); } } } diff --git a/Items/Accessories/FrigidBulwark.cs b/Items/Accessories/FrigidBulwark.cs index 75b0ae5ace..e6ea7cdbc2 100644 --- a/Items/Accessories/FrigidBulwark.cs +++ b/Items/Accessories/FrigidBulwark.cs @@ -36,13 +36,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.PaladinsShield) - .AddIngredient(ItemID.FrozenTurtleShell) - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.PaladinsShield). + AddIngredient(ItemID.FrozenTurtleShell). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/GodlySoulArtifact.cs index b773222c38..c1e8e751de 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/GodlySoulArtifact.cs @@ -35,12 +35,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(25) - .AddIngredient(25) - .AddIngredient(5) - .AddTile(TileID.DemonAltar) - .Register(); + CreateRecipe(). + AddIngredient(25). + AddIngredient(25). + AddIngredient(5). + AddTile(TileID.DemonAltar). + Register(); } } } diff --git a/Items/Accessories/GrandGelatin.cs b/Items/Accessories/GrandGelatin.cs index 6f69e19d46..d3c6e6ccf7 100644 --- a/Items/Accessories/GrandGelatin.cs +++ b/Items/Accessories/GrandGelatin.cs @@ -39,14 +39,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.SoulofLight, 2) - .AddIngredient(ItemID.SoulofNight, 2) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.SoulofLight, 2). + AddIngredient(ItemID.SoulofNight, 2). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/HallowedRune.cs b/Items/Accessories/HallowedRune.cs index 424660ee64..31b1310982 100644 --- a/Items/Accessories/HallowedRune.cs +++ b/Items/Accessories/HallowedRune.cs @@ -30,14 +30,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.HallowedBar, 18) - .AddIngredient(ItemID.SoulofFright, 5) - .AddIngredient(ItemID.SoulofMight, 5) - .AddIngredient(ItemID.SoulofSight, 5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.HallowedBar, 18). + AddIngredient(ItemID.SoulofFright, 5). + AddIngredient(ItemID.SoulofMight, 5). + AddIngredient(ItemID.SoulofSight, 5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/HarpyRing.cs b/Items/Accessories/HarpyRing.cs index f30eda8127..52c3224391 100644 --- a/Items/Accessories/HarpyRing.cs +++ b/Items/Accessories/HarpyRing.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(2) - .AddIngredient(ItemID.Feather, 5) - .AddIngredient(ItemID.FallenStar) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(2). + AddIngredient(ItemID.Feather, 5). + AddIngredient(ItemID.FallenStar). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 036380fbe9..161a421bed 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -96,14 +96,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index bb84c1b4ea..4f0cf4f2dd 100644 --- a/Items/Accessories/HoneyDew.cs +++ b/Items/Accessories/HoneyDew.cs @@ -54,14 +54,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.BottledHoney, 10) - .AddIngredient(2) - .AddIngredient(ItemID.ButterflyDust) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.BottledHoney, 10). + AddIngredient(2). + AddIngredient(ItemID.ButterflyDust). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/JellyChargedBattery.cs b/Items/Accessories/JellyChargedBattery.cs index 50c3242aaf..e1870b08bb 100644 --- a/Items/Accessories/JellyChargedBattery.cs +++ b/Items/Accessories/JellyChargedBattery.cs @@ -32,13 +32,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(10) - .AddIngredient(2) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(10). + AddIngredient(2). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/LivingDew.cs b/Items/Accessories/LivingDew.cs index f62402e92c..2b365525bf 100644 --- a/Items/Accessories/LivingDew.cs +++ b/Items/Accessories/LivingDew.cs @@ -36,12 +36,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.Bezoar) - .AddIngredient(ItemID.Vine, 2) - .AddIngredient(5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.Bezoar). + AddIngredient(ItemID.Vine, 2). + AddIngredient(5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/LumenousAmulet.cs b/Items/Accessories/LumenousAmulet.cs index 90a653282f..f13c07ef0f 100644 --- a/Items/Accessories/LumenousAmulet.cs +++ b/Items/Accessories/LumenousAmulet.cs @@ -39,13 +39,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(15) - .AddIngredient(5) - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(15). + AddIngredient(5). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/MirageMirror.cs b/Items/Accessories/MirageMirror.cs index 028ee24c8c..0dfeb57abf 100644 --- a/Items/Accessories/MirageMirror.cs +++ b/Items/Accessories/MirageMirror.cs @@ -34,19 +34,19 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.MagicMirror) - .AddIngredient(ItemID.BlackLens) - .AddIngredient(ItemID.Bone, 50) - .AddTile(TileID.TinkerersWorkbench) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.MagicMirror). + AddIngredient(ItemID.BlackLens). + AddIngredient(ItemID.Bone, 50). + AddTile(TileID.TinkerersWorkbench). + Register(); - CreateRecipe() - .AddIngredient(ItemID.IceMirror) - .AddIngredient(ItemID.BlackLens) - .AddIngredient(ItemID.Bone, 50) - .AddTile(TileID.TinkerersWorkbench) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.IceMirror). + AddIngredient(ItemID.BlackLens). + AddIngredient(ItemID.Bone, 50). + AddTile(TileID.TinkerersWorkbench). + Register(); } } } diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 2a0d294a78..d72f8fde3d 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -44,12 +44,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.LunarBar, 5) - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.LunarBar, 5). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); } } diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index a0c590f37b..ce3c7b9ff9 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -56,16 +56,16 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.LunarBar, 8) - .AddIngredient(4) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.LunarBar, 8). + AddIngredient(4). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index 1d82db74f4..d0c1a0eed5 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.AvengerEmblem) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.AvengerEmblem). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/Nucleogenesis.cs b/Items/Accessories/Nucleogenesis.cs index 62ce7b7d2a..7fba7be3f1 100644 --- a/Items/Accessories/Nucleogenesis.cs +++ b/Items/Accessories/Nucleogenesis.cs @@ -42,14 +42,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.LunarBar, 8) - .AddIngredient(4) - .AddIngredient(4) - .AddTile(ModContent.TileType()) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.LunarBar, 8). + AddIngredient(4). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/OccultSkullCrown.cs b/Items/Accessories/OccultSkullCrown.cs index 39786e9bff..ca8bbdd6b1 100644 --- a/Items/Accessories/OccultSkullCrown.cs +++ b/Items/Accessories/OccultSkullCrown.cs @@ -44,13 +44,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(20) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(20). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index 3ba1a8fd70..1e62b67a02 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -44,11 +44,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.CrystalShard, 10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.CrystalShard, 10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/PhantomicArtifact.cs b/Items/Accessories/PhantomicArtifact.cs index 20a386cf9a..0b32fd25b4 100644 --- a/Items/Accessories/PhantomicArtifact.cs +++ b/Items/Accessories/PhantomicArtifact.cs @@ -37,13 +37,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(10) - .AddIngredient(20) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(5). + AddIngredient(10). + AddIngredient(20). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index 81845fc620..1e86b89727 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -26,11 +26,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.HoneyComb) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.HoneyComb). + AddTile(TileID.LunarCraftingStation). + Register(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index efd22fdce9..12708b71c2 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -45,12 +45,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(25) - .AddIngredient(25) - .AddIngredient(5) - .AddTile(TileID.DemonAltar) - .Register(); + CreateRecipe(). + AddIngredient(25). + AddIngredient(25). + AddIngredient(5). + AddTile(TileID.DemonAltar). + Register(); } } } diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 669d5bec84..e8a8437f18 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -263,17 +263,17 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.ObsidianRose) - .AddIngredient(5) - .AddIngredient(25) - .AddIngredient(50) - .AddIngredient(100) - .AddIngredient(5) - .AddTile() - .AddConsumeItemCallback(MakeRecipesCheaper) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.ObsidianRose). + AddIngredient(5). + AddIngredient(25). + AddIngredient(50). + AddIngredient(100). + AddIngredient(5). + AddTile(). + AddConsumeItemCallback(MakeRecipesCheaper). + Register(); } } diff --git a/Items/Accessories/RadiantOoze.cs b/Items/Accessories/RadiantOoze.cs index 82500693fd..b98729ed9e 100644 --- a/Items/Accessories/RadiantOoze.cs +++ b/Items/Accessories/RadiantOoze.cs @@ -29,11 +29,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(45) - .AddIngredient(15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(45). + AddIngredient(15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/RaidersTalisman.cs b/Items/Accessories/RaidersTalisman.cs index 4f53596031..6ba17d79f6 100644 --- a/Items/Accessories/RaidersTalisman.cs +++ b/Items/Accessories/RaidersTalisman.cs @@ -44,11 +44,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.Leather, 5) - .AddIngredient(ItemID.Obsidian, 20) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.Leather, 5). + AddIngredient(ItemID.Obsidian, 20). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 6658cb5d2f..b56e127a66 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -43,15 +43,15 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(10) - .AddIngredient(10) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddIngredient(10). + AddIngredient(10). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index ef723b8c6d..54adb600a7 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -32,14 +32,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(6) - .AddIngredient(15) - .AddIngredient(15) - .AddIngredient(5) - .AddTile(TileID.TinkerersWorkbench) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(6). + AddIngredient(15). + AddIngredient(15). + AddIngredient(5). + AddTile(TileID.TinkerersWorkbench). + Register(); } } } diff --git a/Items/Accessories/RuinMedallion.cs b/Items/Accessories/RuinMedallion.cs index 605edcec49..7f94115091 100644 --- a/Items/Accessories/RuinMedallion.cs +++ b/Items/Accessories/RuinMedallion.cs @@ -34,12 +34,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(4) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(4). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/RustyMedallion.cs b/Items/Accessories/RustyMedallion.cs index 63ebfcdfb5..b770a78e86 100644 --- a/Items/Accessories/RustyMedallion.cs +++ b/Items/Accessories/RustyMedallion.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Accessories } public override void AddRecipes() { - CreateRecipe() - .AddIngredient(20) - .AddRecipeGroup("IronBar", 10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(20). + AddRecipeGroup("IronBar", 10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/SandSharkToothNecklace.cs b/Items/Accessories/SandSharkToothNecklace.cs index 3dc92ec989..cbc60ef39a 100644 --- a/Items/Accessories/SandSharkToothNecklace.cs +++ b/Items/Accessories/SandSharkToothNecklace.cs @@ -30,12 +30,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SharkToothNecklace) - .AddIngredient(ItemID.AvengerEmblem) - .AddIngredient() - .AddTile(TileID.TinkerersWorkbench) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SharkToothNecklace). + AddIngredient(ItemID.AvengerEmblem). + AddIngredient(). + AddTile(TileID.TinkerersWorkbench). + Register(); } } } diff --git a/Items/Accessories/ShieldoftheOcean.cs b/Items/Accessories/ShieldoftheOcean.cs index 06db57001e..3c87d5ab7b 100644 --- a/Items/Accessories/ShieldoftheOcean.cs +++ b/Items/Accessories/ShieldoftheOcean.cs @@ -43,11 +43,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Coral, 5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Coral, 5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/SigilofCalamitas.cs b/Items/Accessories/SigilofCalamitas.cs index 32bfa7df55..e55c0550b7 100644 --- a/Items/Accessories/SigilofCalamitas.cs +++ b/Items/Accessories/SigilofCalamitas.cs @@ -36,14 +36,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.CelestialEmblem) - .AddRecipeGroup("AnyEvilWater", 10) - .AddIngredient(5) - .AddIngredient(5) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.CelestialEmblem). + AddRecipeGroup("AnyEvilWater", 10). + AddIngredient(5). + AddIngredient(5). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/SilencingSheath.cs b/Items/Accessories/SilencingSheath.cs index 2ca85d152a..7c11e71b53 100644 --- a/Items/Accessories/SilencingSheath.cs +++ b/Items/Accessories/SilencingSheath.cs @@ -33,12 +33,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnyEvilBar", 8) - .AddIngredient(ItemID.Silk, 10) - .AddRecipeGroup("Boss2Material", 3) - .AddTile(TileID.TinkerersWorkbench) - .Register(); + CreateRecipe(). + AddRecipeGroup("AnyEvilBar", 8). + AddIngredient(ItemID.Silk, 10). + AddRecipeGroup("Boss2Material", 3). + AddTile(TileID.TinkerersWorkbench). + Register(); } } } diff --git a/Items/Accessories/SpiritGenerator.cs b/Items/Accessories/SpiritGenerator.cs index 51a1ef3d32..109fd9eea5 100644 --- a/Items/Accessories/SpiritGenerator.cs +++ b/Items/Accessories/SpiritGenerator.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.Diamond, 5) - .AddIngredient(ItemID.IronBar, 15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.Diamond, 5). + AddIngredient(ItemID.IronBar, 15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index a83898c20c..bea3b00489 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -70,14 +70,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(10) - .AddIngredient(20) - .AddIngredient(5) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(10). + AddIngredient(20). + AddIngredient(5). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/StarTaintedGenerator.cs b/Items/Accessories/StarTaintedGenerator.cs index 336989d277..df87a0f989 100644 --- a/Items/Accessories/StarTaintedGenerator.cs +++ b/Items/Accessories/StarTaintedGenerator.cs @@ -34,13 +34,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index 9f5b308533..2ae56fc186 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -44,12 +44,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(10) - .AddIngredient(20) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(10). + AddIngredient(20). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/StatisBlessing.cs b/Items/Accessories/StatisBlessing.cs index 1d890128de..5d6d31b149 100644 --- a/Items/Accessories/StatisBlessing.cs +++ b/Items/Accessories/StatisBlessing.cs @@ -36,14 +36,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.PapyrusScarab) - .AddIngredient(ItemID.PygmyNecklace) - .AddIngredient(ItemID.SummonerEmblem) - .AddIngredient(ItemID.HolyWater, 30) - .AddIngredient(5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.PapyrusScarab). + AddIngredient(ItemID.PygmyNecklace). + AddIngredient(ItemID.SummonerEmblem). + AddIngredient(ItemID.HolyWater, 30). + AddIngredient(5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/StatisCurse.cs b/Items/Accessories/StatisCurse.cs index c1da4b3a2b..46a4036eb2 100644 --- a/Items/Accessories/StatisCurse.cs +++ b/Items/Accessories/StatisCurse.cs @@ -39,12 +39,12 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.FragmentStardust, 10) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.FragmentStardust, 10). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index 5fac4727d6..aeac037f2f 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -40,13 +40,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.MasterNinjaGear) - .AddIngredient(ItemID.FrogLeg) - .AddIngredient(50) - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.MasterNinjaGear). + AddIngredient(ItemID.FrogLeg). + AddIngredient(50). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs b/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs index 3469fceb4a..5b2f3f4aab 100644 --- a/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs +++ b/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs @@ -37,20 +37,20 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.AnglerHat) - .AddIngredient(ItemID.AnglerVest) - .AddIngredient(ItemID.AnglerPants) - .AddIngredient(ItemID.AnglerTackleBag) - .AddIngredient(ItemID.FishingPotion, 5) - .AddIngredient(ItemID.CratePotion, 5) - .AddIngredient(ItemID.SonarPotion, 5) - .AddIngredient(ItemID.MasterBait, 5) - .AddIngredient(ItemID.SoulofLight, 5) - .AddIngredient(ItemID.SoulofNight, 5) - .AddIngredient(10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.AnglerHat). + AddIngredient(ItemID.AnglerVest). + AddIngredient(ItemID.AnglerPants). + AddIngredient(ItemID.AnglerTackleBag). + AddIngredient(ItemID.FishingPotion, 5). + AddIngredient(ItemID.CratePotion, 5). + AddIngredient(ItemID.SonarPotion, 5). + AddIngredient(ItemID.MasterBait, 5). + AddIngredient(ItemID.SoulofLight, 5). + AddIngredient(ItemID.SoulofNight, 5). + AddIngredient(10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index cc92704e86..54f71eee28 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -45,33 +45,33 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(15) - .AddIngredient(15) - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(15). + AddIngredient(15). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(15) - .AddIngredient(15) - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(15). + AddIngredient(15). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index 4809f8b989..b513b28b95 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -58,16 +58,16 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(10) - .AddIngredient(15) - .AddIngredient(15) - .AddIngredient(5) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(5). + AddIngredient(10). + AddIngredient(15). + AddIngredient(15). + AddIngredient(5). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/TheCamper.cs b/Items/Accessories/TheCamper.cs index 9cd6e90459..5f0c402026 100644 --- a/Items/Accessories/TheCamper.cs +++ b/Items/Accessories/TheCamper.cs @@ -105,17 +105,17 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.ShinyStone) - .AddIngredient(ItemID.Campfire, 10) - .AddIngredient(ItemID.HeartLantern, 5) - .AddIngredient(ItemID.SharpeningStation) - .AddIngredient(ItemID.CrystalBall) - .AddIngredient(ItemID.AmmoBox) - .AddIngredient(ItemID.BewitchingTable) - .AddRecipeGroup("AnyFood", 50) - .AddTile(TileID.TinkerersWorkbench) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.ShinyStone). + AddIngredient(ItemID.Campfire, 10). + AddIngredient(ItemID.HeartLantern, 5). + AddIngredient(ItemID.SharpeningStation). + AddIngredient(ItemID.CrystalBall). + AddIngredient(ItemID.AmmoBox). + AddIngredient(ItemID.BewitchingTable). + AddRecipeGroup("AnyFood", 50). + AddTile(TileID.TinkerersWorkbench). + Register(); } } diff --git a/Items/Accessories/VampiricTalisman.cs b/Items/Accessories/VampiricTalisman.cs index 2006907daf..aaa630d718 100644 --- a/Items/Accessories/VampiricTalisman.cs +++ b/Items/Accessories/VampiricTalisman.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index b637f9f5e3..ac5ffa45ba 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -37,14 +37,14 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.ObsidianRose) - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.ObsidianRose). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/Wings/AureateWings.cs b/Items/Accessories/Wings/AureateWings.cs index d1fab1b792..26ed471cc4 100644 --- a/Items/Accessories/Wings/AureateWings.cs +++ b/Items/Accessories/Wings/AureateWings.cs @@ -115,12 +115,12 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddIngredient(ItemID.SoulofFlight, 20) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddIngredient(ItemID.SoulofFlight, 20). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index bdc0580e2e..445b0565f0 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -88,12 +88,12 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/Wings/DiscordianWings.cs b/Items/Accessories/Wings/DiscordianWings.cs index 5c533bb9f7..5483920ed2 100644 --- a/Items/Accessories/Wings/DiscordianWings.cs +++ b/Items/Accessories/Wings/DiscordianWings.cs @@ -78,12 +78,12 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddIngredient(ItemID.SoulofFlight, 20) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddIngredient(ItemID.SoulofFlight, 20). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 950fb0ddba..03428f6d1c 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -87,13 +87,13 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient(5) - .AddIngredient(4) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddIngredient(4). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/Wings/HadarianWings.cs b/Items/Accessories/Wings/HadarianWings.cs index 9686d35a1f..81dadcc582 100644 --- a/Items/Accessories/Wings/HadarianWings.cs +++ b/Items/Accessories/Wings/HadarianWings.cs @@ -91,12 +91,12 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(8) - .AddIngredient(ItemID.SoulofFlight, 20) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(8). + AddIngredient(ItemID.SoulofFlight, 20). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 520a05a8cd..9905030380 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -85,14 +85,14 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddRecipeGroup("WingsGroup") - .AddIngredient(3) - .AddIngredient(5) - .AddIngredient(ItemID.LunarBar, 5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddRecipeGroup("WingsGroup"). + AddIngredient(3). + AddIngredient(5). + AddIngredient(ItemID.LunarBar, 5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/Wings/MOAB.cs b/Items/Accessories/Wings/MOAB.cs index 916edb7cb7..84c66c0238 100644 --- a/Items/Accessories/Wings/MOAB.cs +++ b/Items/Accessories/Wings/MOAB.cs @@ -113,16 +113,16 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.FrogLeg) - .AddIngredient(ItemID.BundleofBalloons) - .AddIngredient(ItemID.LuckyHorseshoe) - .AddIngredient(ItemID.Jetpack) - .AddIngredient(ItemID.SoulofMight) - .AddIngredient(ItemID.SoulofSight) - .AddIngredient(ItemID.SoulofFright) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.FrogLeg). + AddIngredient(ItemID.BundleofBalloons). + AddIngredient(ItemID.LuckyHorseshoe). + AddIngredient(ItemID.Jetpack). + AddIngredient(ItemID.SoulofMight). + AddIngredient(ItemID.SoulofSight). + AddIngredient(ItemID.SoulofFright). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/Wings/SilvaWings.cs b/Items/Accessories/Wings/SilvaWings.cs index de157d83d6..09bab323a7 100644 --- a/Items/Accessories/Wings/SilvaWings.cs +++ b/Items/Accessories/Wings/SilvaWings.cs @@ -79,13 +79,13 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddRecipeGroup("AnyGoldBar", 3) - .AddIngredient(3) - .AddIngredient(5) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(15). + AddRecipeGroup("AnyGoldBar", 3). + AddIngredient(3). + AddIngredient(5). + AddTile(). + Register(); } } } diff --git a/Items/Accessories/Wings/SkylineWings.cs b/Items/Accessories/Wings/SkylineWings.cs index c918ab76fd..ae8e839251 100644 --- a/Items/Accessories/Wings/SkylineWings.cs +++ b/Items/Accessories/Wings/SkylineWings.cs @@ -57,13 +57,13 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Feather, 5) - .AddIngredient(ItemID.FallenStar, 5) - .AddIngredient(ItemID.Bone, 15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Feather, 5). + AddIngredient(ItemID.FallenStar, 5). + AddIngredient(ItemID.Bone, 15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index dfd8676c79..7c2645acec 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -78,12 +78,12 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddIngredient(ItemID.SoulofFlight, 20) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddIngredient(ItemID.SoulofFlight, 20). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Accessories/Wings/TarragonWings.cs b/Items/Accessories/Wings/TarragonWings.cs index 50eb675ffa..5b38a4e086 100644 --- a/Items/Accessories/Wings/TarragonWings.cs +++ b/Items/Accessories/Wings/TarragonWings.cs @@ -81,11 +81,11 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.SoulofFlight, 30) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.SoulofFlight, 30). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/Wings/XerocWings.cs b/Items/Accessories/Wings/XerocWings.cs index 2cec8d3e17..d3212d8cc7 100644 --- a/Items/Accessories/Wings/XerocWings.cs +++ b/Items/Accessories/Wings/XerocWings.cs @@ -76,11 +76,11 @@ namespace CalamityMod.Items.Accessories.Wings public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.LunarBar, 10) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.LunarBar, 10). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 893102ffe6..fe640ec111 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -37,13 +37,13 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.WarriorEmblem) - .AddIngredient() - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.WarriorEmblem). + AddIngredient(). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/AccelerationBullet.cs b/Items/Ammo/AccelerationBullet.cs index 3815d31b99..f6b539f6c1 100644 --- a/Items/Ammo/AccelerationBullet.cs +++ b/Items/Ammo/AccelerationBullet.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(150) - .AddIngredient(ItemID.MusketBall, 150) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(150). + AddIngredient(ItemID.MusketBall, 150). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Ammo/AcidBullet.cs b/Items/Ammo/AcidBullet.cs index 7efa5cee8a..6608666df2 100644 --- a/Items/Ammo/AcidBullet.cs +++ b/Items/Ammo/AcidBullet.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(150) - .AddIngredient(ItemID.MusketBall, 150) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(150). + AddIngredient(ItemID.MusketBall, 150). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Ammo/ArcticArrow.cs b/Items/Ammo/ArcticArrow.cs index aa71377f75..1cb84d3e88 100644 --- a/Items/Ammo/ArcticArrow.cs +++ b/Items/Ammo/ArcticArrow.cs @@ -32,10 +32,10 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(250) - .AddIngredient() - .AddTile(TileID.IceMachine) - .Register(); + CreateRecipe(250). + AddIngredient(). + AddTile(TileID.IceMachine). + Register(); } } } diff --git a/Items/Ammo/BloodfireArrow.cs b/Items/Ammo/BloodfireArrow.cs index 810b8733ba..89e806f6c5 100644 --- a/Items/Ammo/BloodfireArrow.cs +++ b/Items/Ammo/BloodfireArrow.cs @@ -33,10 +33,10 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(333) - .AddIngredient() - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(333). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/BloodfireBullet.cs b/Items/Ammo/BloodfireBullet.cs index 7fceba7a65..80e0e09bfa 100644 --- a/Items/Ammo/BloodfireBullet.cs +++ b/Items/Ammo/BloodfireBullet.cs @@ -33,10 +33,10 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(333) - .AddIngredient() - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(333). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/ElysianArrow.cs b/Items/Ammo/ElysianArrow.cs index 36f762d9c2..4ac8e75783 100644 --- a/Items/Ammo/ElysianArrow.cs +++ b/Items/Ammo/ElysianArrow.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(150) - .AddIngredient(ItemID.HolyArrow, 150) - .AddIngredient() - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(150). + AddIngredient(ItemID.HolyArrow, 150). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/EnhancedNanoRound.cs b/Items/Ammo/EnhancedNanoRound.cs index 1bd197ebe2..31b3a0dcd7 100644 --- a/Items/Ammo/EnhancedNanoRound.cs +++ b/Items/Ammo/EnhancedNanoRound.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(250) - .AddIngredient(ItemID.NanoBullet, 250) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(250). + AddIngredient(ItemID.NanoBullet, 250). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Ammo/FlashBullet.cs b/Items/Ammo/FlashBullet.cs index 0b85d92541..bb2cf9d8f5 100644 --- a/Items/Ammo/FlashBullet.cs +++ b/Items/Ammo/FlashBullet.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(10) - .AddIngredient(ItemID.Grenade) - .AddIngredient(ItemID.Glass, 3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(10). + AddIngredient(ItemID.Grenade). + AddIngredient(ItemID.Glass, 3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Ammo/GodSlayerSlug.cs b/Items/Ammo/GodSlayerSlug.cs index 6ca60c620e..a40dc1ce24 100644 --- a/Items/Ammo/GodSlayerSlug.cs +++ b/Items/Ammo/GodSlayerSlug.cs @@ -36,11 +36,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(999) - .AddIngredient(ItemID.EmptyBullet, 999) - .AddIngredient() - .AddTile() - .Register(); + CreateRecipe(999). + AddIngredient(ItemID.EmptyBullet, 999). + AddIngredient(). + AddTile(). + Register(); } } } diff --git a/Items/Ammo/HolyFireBullet.cs b/Items/Ammo/HolyFireBullet.cs index f2a78e0ffb..4658b98fe6 100644 --- a/Items/Ammo/HolyFireBullet.cs +++ b/Items/Ammo/HolyFireBullet.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(100) - .AddIngredient(ItemID.ExplodingBullet, 100) - .AddIngredient() - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(100). + AddIngredient(ItemID.ExplodingBullet, 100). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/HyperiusBullet.cs b/Items/Ammo/HyperiusBullet.cs index 43030a8153..57864f8634 100644 --- a/Items/Ammo/HyperiusBullet.cs +++ b/Items/Ammo/HyperiusBullet.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(150) - .AddIngredient(ItemID.MusketBall, 150) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(150). + AddIngredient(ItemID.MusketBall, 150). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Ammo/MortarRound.cs b/Items/Ammo/MortarRound.cs index 5d7f3bf29f..ed7d1a1093 100644 --- a/Items/Ammo/MortarRound.cs +++ b/Items/Ammo/MortarRound.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(100) - .AddIngredient(ItemID.RocketIV, 100) - .AddIngredient() - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(100). + AddIngredient(ItemID.RocketIV, 100). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/NapalmArrow.cs b/Items/Ammo/NapalmArrow.cs index 7eaaa5ea98..fbbc018025 100644 --- a/Items/Ammo/NapalmArrow.cs +++ b/Items/Ammo/NapalmArrow.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(250) - .AddIngredient(ItemID.WoodenArrow, 250) - .AddIngredient() - .AddIngredient(ItemID.Torch) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(250). + AddIngredient(ItemID.WoodenArrow, 250). + AddIngredient(). + AddIngredient(ItemID.Torch). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Ammo/RubberMortarRound.cs b/Items/Ammo/RubberMortarRound.cs index 9a8a622155..7e05e972dd 100644 --- a/Items/Ammo/RubberMortarRound.cs +++ b/Items/Ammo/RubberMortarRound.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(100) - .AddIngredient(100) - .AddIngredient(ItemID.PinkGel, 5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(100). + AddIngredient(100). + AddIngredient(ItemID.PinkGel, 5). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Ammo/SuperballBullet.cs b/Items/Ammo/SuperballBullet.cs index abb576b51e..4f0799bd60 100644 --- a/Items/Ammo/SuperballBullet.cs +++ b/Items/Ammo/SuperballBullet.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(150) - .AddIngredient(ItemID.MeteorShot, 150) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(150). + AddIngredient(ItemID.MeteorShot, 150). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Ammo/TerraArrow.cs b/Items/Ammo/TerraArrow.cs index aae512207e..58ae3cba1f 100644 --- a/Items/Ammo/TerraArrow.cs +++ b/Items/Ammo/TerraArrow.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(250) - .AddIngredient(ItemID.WoodenArrow, 250) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(250). + AddIngredient(ItemID.WoodenArrow, 250). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Ammo/TerraBullet.cs b/Items/Ammo/TerraBullet.cs index 9f977b7dba..90fa185f20 100644 --- a/Items/Ammo/TerraBullet.cs +++ b/Items/Ammo/TerraBullet.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(100) - .AddIngredient(ItemID.CrystalBullet, 100) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(100). + AddIngredient(ItemID.CrystalBullet, 100). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Ammo/VanquisherArrow.cs b/Items/Ammo/VanquisherArrow.cs index 34718b1a95..4aa3c3d5e3 100644 --- a/Items/Ammo/VanquisherArrow.cs +++ b/Items/Ammo/VanquisherArrow.cs @@ -41,10 +41,10 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(999) - .AddIngredient() - .AddTile() - .Register(); + CreateRecipe(999). + AddIngredient(). + AddTile(). + Register(); } } } diff --git a/Items/Ammo/VeriumBullet.cs b/Items/Ammo/VeriumBullet.cs index 2b89adb6d3..af9b6e8b89 100644 --- a/Items/Ammo/VeriumBullet.cs +++ b/Items/Ammo/VeriumBullet.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Ammo public override void AddRecipes() { - CreateRecipe(100) - .AddIngredient(ItemID.MusketBall, 100) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(100). + AddIngredient(ItemID.MusketBall, 100). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/AntiCystOintment.cs b/Items/AntiCystOintment.cs index 7d1cdde87e..732ce97982 100644 --- a/Items/AntiCystOintment.cs +++ b/Items/AntiCystOintment.cs @@ -27,11 +27,11 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.CrimtaneBar, 5) - .AddIngredient(ItemID.BottledWater) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.CrimtaneBar, 5). + AddIngredient(ItemID.BottledWater). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/AntiTumorOintment.cs b/Items/AntiTumorOintment.cs index d1fdd272aa..dcf86670c0 100644 --- a/Items/AntiTumorOintment.cs +++ b/Items/AntiTumorOintment.cs @@ -27,11 +27,11 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.DemoniteBar, 5) - .AddIngredient(ItemID.BottledWater) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.DemoniteBar, 5). + AddIngredient(ItemID.BottledWater). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/AerospecBreastplate.cs b/Items/Armor/AerospecBreastplate.cs index 594add766e..a89a65950d 100644 --- a/Items/Armor/AerospecBreastplate.cs +++ b/Items/Armor/AerospecBreastplate.cs @@ -33,13 +33,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(ItemID.Cloud, 10) - .AddIngredient(ItemID.RainCloud, 5) - .AddIngredient(ItemID.Feather, 2) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(ItemID.Cloud, 10). + AddIngredient(ItemID.RainCloud, 5). + AddIngredient(ItemID.Feather, 2). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AerospecHat.cs b/Items/Armor/AerospecHat.cs index 3afba7ec82..987da0e3f4 100644 --- a/Items/Armor/AerospecHat.cs +++ b/Items/Armor/AerospecHat.cs @@ -54,13 +54,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Cloud, 3) - .AddIngredient(ItemID.RainCloud) - .AddIngredient(ItemID.Feather) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Cloud, 3). + AddIngredient(ItemID.RainCloud). + AddIngredient(ItemID.Feather). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AerospecHeadgear.cs b/Items/Armor/AerospecHeadgear.cs index 5646079308..5a8a99a46d 100644 --- a/Items/Armor/AerospecHeadgear.cs +++ b/Items/Armor/AerospecHeadgear.cs @@ -66,13 +66,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Cloud, 3) - .AddIngredient(ItemID.RainCloud) - .AddIngredient(ItemID.Feather) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Cloud, 3). + AddIngredient(ItemID.RainCloud). + AddIngredient(ItemID.Feather). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AerospecHelm.cs b/Items/Armor/AerospecHelm.cs index ed30a9bcd2..9899293dd3 100644 --- a/Items/Armor/AerospecHelm.cs +++ b/Items/Armor/AerospecHelm.cs @@ -55,13 +55,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Cloud, 3) - .AddIngredient(ItemID.RainCloud) - .AddIngredient(ItemID.Feather) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Cloud, 3). + AddIngredient(ItemID.RainCloud). + AddIngredient(ItemID.Feather). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AerospecHelmet.cs b/Items/Armor/AerospecHelmet.cs index bd51238bfc..b93bc1b361 100644 --- a/Items/Armor/AerospecHelmet.cs +++ b/Items/Armor/AerospecHelmet.cs @@ -69,13 +69,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Cloud, 3) - .AddIngredient(ItemID.RainCloud) - .AddIngredient(ItemID.Feather) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Cloud, 3). + AddIngredient(ItemID.RainCloud). + AddIngredient(ItemID.Feather). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AerospecHood.cs b/Items/Armor/AerospecHood.cs index 21df1dbfc8..a81febb5a8 100644 --- a/Items/Armor/AerospecHood.cs +++ b/Items/Armor/AerospecHood.cs @@ -53,13 +53,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.Cloud, 3) - .AddIngredient(ItemID.RainCloud) - .AddIngredient(ItemID.Feather) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.Cloud, 3). + AddIngredient(ItemID.RainCloud). + AddIngredient(ItemID.Feather). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AerospecLeggings.cs b/Items/Armor/AerospecLeggings.cs index 17d75e66d6..943adaac30 100644 --- a/Items/Armor/AerospecLeggings.cs +++ b/Items/Armor/AerospecLeggings.cs @@ -30,13 +30,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.Cloud, 6) - .AddIngredient(ItemID.RainCloud, 3) - .AddIngredient(ItemID.Feather, 2) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.Cloud, 6). + AddIngredient(ItemID.RainCloud, 3). + AddIngredient(ItemID.Feather, 2). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Armor/AstralBreastplate.cs b/Items/Armor/AstralBreastplate.cs index 3442de16d4..50b576ec67 100644 --- a/Items/Armor/AstralBreastplate.cs +++ b/Items/Armor/AstralBreastplate.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddIngredient(ItemID.MeteoriteBar, 9) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(12). + AddIngredient(ItemID.MeteoriteBar, 9). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/AstralHelm.cs b/Items/Armor/AstralHelm.cs index c4509f5c4a..1452b1bc86 100644 --- a/Items/Armor/AstralHelm.cs +++ b/Items/Armor/AstralHelm.cs @@ -56,11 +56,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.MeteoriteBar, 6) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.MeteoriteBar, 6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/AstralLeggings.cs b/Items/Armor/AstralLeggings.cs index cfdc3e5a5e..7a0fde4c83 100644 --- a/Items/Armor/AstralLeggings.cs +++ b/Items/Armor/AstralLeggings.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(ItemID.MeteoriteBar, 8) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(ItemID.MeteoriteBar, 8). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/AtaxiaArmor.cs b/Items/Armor/AtaxiaArmor.cs index ecf42fbb11..44fdf144e9 100644 --- a/Items/Armor/AtaxiaArmor.cs +++ b/Items/Armor/AtaxiaArmor.cs @@ -33,12 +33,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(ItemID.HellstoneBar, 8) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(ItemID.HellstoneBar, 8). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/AtaxiaHeadgear.cs index 156ca10ed9..c7888d6b7c 100644 --- a/Items/Armor/AtaxiaHeadgear.cs +++ b/Items/Armor/AtaxiaHeadgear.cs @@ -59,12 +59,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.HellstoneBar, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.HellstoneBar, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 70aead2da0..297be37082 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/AtaxiaHelm.cs @@ -65,12 +65,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.HellstoneBar, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.HellstoneBar, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/AtaxiaHelmet.cs index f4aae7f2de..ca7f2b2e50 100644 --- a/Items/Armor/AtaxiaHelmet.cs +++ b/Items/Armor/AtaxiaHelmet.cs @@ -72,12 +72,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.HellstoneBar, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.HellstoneBar, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index 283fe17b91..b8c7f4d95b 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -67,12 +67,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.HellstoneBar, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.HellstoneBar, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/AtaxiaMask.cs index 606bf3a113..dfa2fd2d20 100644 --- a/Items/Armor/AtaxiaMask.cs +++ b/Items/Armor/AtaxiaMask.cs @@ -60,12 +60,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.HellstoneBar, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.HellstoneBar, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AtaxiaSubligar.cs b/Items/Armor/AtaxiaSubligar.cs index afc1adeb7f..00d016eaa1 100644 --- a/Items/Armor/AtaxiaSubligar.cs +++ b/Items/Armor/AtaxiaSubligar.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(ItemID.HellstoneBar, 5) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(ItemID.HellstoneBar, 5). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index ac0409c491..027398ba3a 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -40,23 +40,23 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(18) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(18). + AddTile(). + Register(); - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(18) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(18). + AddTile(). + Register(); } } } diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 3a5bbbccab..480562a891 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -37,22 +37,22 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.FlyingCarpet) - .AddIngredient(15) - .AddTile() - .Register(); + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.FlyingCarpet). + AddIngredient(15). + AddTile(). + Register(); - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(ItemID.FlyingCarpet) - .AddIngredient(15) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.FlyingCarpet). + AddIngredient(15). + AddTile(). + Register(); } } } diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index b9ac25a24d..60627b7fbf 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -74,14 +74,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(12) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(12). + AddTile(). + Register(); } } } diff --git a/Items/Armor/AuricTeslaHoodedFacemask.cs b/Items/Armor/AuricTeslaHoodedFacemask.cs index 7e01c08d1f..62e34c5dcc 100644 --- a/Items/Armor/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/AuricTeslaHoodedFacemask.cs @@ -72,14 +72,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(12) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(12). + AddTile(). + Register(); } } } diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index 7b60291689..44839a4ca6 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -79,14 +79,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(12) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(12). + AddTile(). + Register(); } } } diff --git a/Items/Armor/AuricTeslaSpaceHelmet.cs b/Items/Armor/AuricTeslaSpaceHelmet.cs index 3ec9220be6..4376f9092b 100644 --- a/Items/Armor/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/AuricTeslaSpaceHelmet.cs @@ -86,14 +86,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(12) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(12). + AddTile(). + Register(); } } } diff --git a/Items/Armor/AuricTeslaWireHemmedVisage.cs b/Items/Armor/AuricTeslaWireHemmedVisage.cs index d6d9482016..4b8a0186a3 100644 --- a/Items/Armor/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/AuricTeslaWireHemmedVisage.cs @@ -72,14 +72,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient() - .AddIngredient(12) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(12). + AddTile(). + Register(); } } } diff --git a/Items/Armor/BloodflareBodyArmor.cs b/Items/Armor/BloodflareBodyArmor.cs index cab5276b7c..46fea312fa 100644 --- a/Items/Armor/BloodflareBodyArmor.cs +++ b/Items/Armor/BloodflareBodyArmor.cs @@ -39,11 +39,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(16) - .AddIngredient(4) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(16). + AddIngredient(4). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BloodflareCuisses.cs b/Items/Armor/BloodflareCuisses.cs index 73bbf1640d..1b8418bf3b 100644 --- a/Items/Armor/BloodflareCuisses.cs +++ b/Items/Armor/BloodflareCuisses.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(13) - .AddIngredient(3) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(13). + AddIngredient(3). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index c8831f5d46..0c09959606 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -67,11 +67,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BloodflareHelmet.cs b/Items/Armor/BloodflareHelmet.cs index 48962205f6..b73cc2da02 100644 --- a/Items/Armor/BloodflareHelmet.cs +++ b/Items/Armor/BloodflareHelmet.cs @@ -63,11 +63,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BloodflareHornedHelm.cs b/Items/Armor/BloodflareHornedHelm.cs index 67652201bb..6893d71dc5 100644 --- a/Items/Armor/BloodflareHornedHelm.cs +++ b/Items/Armor/BloodflareHornedHelm.cs @@ -62,11 +62,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BloodflareHornedMask.cs b/Items/Armor/BloodflareHornedMask.cs index 9a1c5f7a3e..fe6a85938f 100644 --- a/Items/Armor/BloodflareHornedMask.cs +++ b/Items/Armor/BloodflareHornedMask.cs @@ -61,11 +61,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BloodflareMask.cs b/Items/Armor/BloodflareMask.cs index b7765d9c70..e0ad9697a8 100644 --- a/Items/Armor/BloodflareMask.cs +++ b/Items/Armor/BloodflareMask.cs @@ -63,11 +63,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/BrimflameBoots.cs b/Items/Armor/BrimflameBoots.cs index b91b2d7f6d..accf7a2792 100644 --- a/Items/Armor/BrimflameBoots.cs +++ b/Items/Armor/BrimflameBoots.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/BrimflameRobes.cs b/Items/Armor/BrimflameRobes.cs index 1dab27f430..87269c48f7 100644 --- a/Items/Armor/BrimflameRobes.cs +++ b/Items/Armor/BrimflameRobes.cs @@ -33,12 +33,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.ObsidianRose) - .AddIngredient(8) - .AddIngredient(4) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.ObsidianRose). + AddIngredient(8). + AddIngredient(4). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/BrimflameScowl.cs b/Items/Armor/BrimflameScowl.cs index 3d6c0bcab8..98c9cf634f 100644 --- a/Items/Armor/BrimflameScowl.cs +++ b/Items/Armor/BrimflameScowl.cs @@ -89,11 +89,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(4) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(4). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusBreastplate.cs b/Items/Armor/DaedalusBreastplate.cs index df3a0c9883..cd18e00ef2 100644 --- a/Items/Armor/DaedalusBreastplate.cs +++ b/Items/Armor/DaedalusBreastplate.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(ItemID.CrystalShard, 6) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(ItemID.CrystalShard, 6). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusHat.cs b/Items/Armor/DaedalusHat.cs index e7e9f52c11..7cbc0c100d 100644 --- a/Items/Armor/DaedalusHat.cs +++ b/Items/Armor/DaedalusHat.cs @@ -56,12 +56,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.CrystalShard, 3) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.CrystalShard, 3). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusHeadgear.cs b/Items/Armor/DaedalusHeadgear.cs index bc56766fd3..488e82baf4 100644 --- a/Items/Armor/DaedalusHeadgear.cs +++ b/Items/Armor/DaedalusHeadgear.cs @@ -65,12 +65,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.CrystalShard, 3) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.CrystalShard, 3). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHelm.cs index a6c3eb0857..56d10c68f3 100644 --- a/Items/Armor/DaedalusHelm.cs +++ b/Items/Armor/DaedalusHelm.cs @@ -58,12 +58,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.CrystalShard, 3) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.CrystalShard, 3). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusHelmet.cs b/Items/Armor/DaedalusHelmet.cs index 3ac0d3c103..ce9e8c7134 100644 --- a/Items/Armor/DaedalusHelmet.cs +++ b/Items/Armor/DaedalusHelmet.cs @@ -54,12 +54,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.CrystalShard, 3) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.CrystalShard, 3). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusLeggings.cs b/Items/Armor/DaedalusLeggings.cs index 477c51383f..ccf90b0c7d 100644 --- a/Items/Armor/DaedalusLeggings.cs +++ b/Items/Armor/DaedalusLeggings.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(ItemID.CrystalShard, 4) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(ItemID.CrystalShard, 4). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index 98aa297295..2eb9e2a741 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -61,12 +61,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.CrystalShard, 3) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.CrystalShard, 3). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index 7fd9cda9e3..a6ef0fe7fa 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -42,10 +42,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(18) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(18). + AddTile(). + Register(); } } } diff --git a/Items/Armor/DemonshadeGreaves.cs b/Items/Armor/DemonshadeGreaves.cs index 1b73222a3e..3fb35f4bb7 100644 --- a/Items/Armor/DemonshadeGreaves.cs +++ b/Items/Armor/DemonshadeGreaves.cs @@ -36,9 +36,9 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { CreateRecipe(). - AddIngredient(15) - .AddTile() - .Register(); + AddIngredient(15). + AddTile(). + Register(); } } } diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 28777152ec..07c8a2d1ee 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -79,10 +79,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(12). + AddTile(). + Register(); } public string ExtensionTexture => "CalamityMod/Items/Armor/DemonshadeHelm_Extension"; diff --git a/Items/Armor/DesertProwlerHat.cs b/Items/Armor/DesertProwlerHat.cs index 724201532b..51143a52bf 100644 --- a/Items/Armor/DesertProwlerHat.cs +++ b/Items/Armor/DesertProwlerHat.cs @@ -45,11 +45,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(2) - .AddIngredient(ItemID.Silk, 8) - .AddTile(TileID.Loom) - .Register(); + CreateRecipe(). + AddIngredient(2). + AddIngredient(ItemID.Silk, 8). + AddTile(TileID.Loom). + Register(); } } } diff --git a/Items/Armor/DesertProwlerPants.cs b/Items/Armor/DesertProwlerPants.cs index b2d49e1787..eca4d9a4eb 100644 --- a/Items/Armor/DesertProwlerPants.cs +++ b/Items/Armor/DesertProwlerPants.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.Silk, 5) - .AddTile(TileID.Loom) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Silk, 5). + AddTile(TileID.Loom). + Register(); } } } diff --git a/Items/Armor/DesertProwlerShirt.cs b/Items/Armor/DesertProwlerShirt.cs index dae7d226a7..ba8dab2798 100644 --- a/Items/Armor/DesertProwlerShirt.cs +++ b/Items/Armor/DesertProwlerShirt.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddIngredient(ItemID.Silk, 10) - .AddTile(TileID.Loom) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddIngredient(ItemID.Silk, 10). + AddTile(TileID.Loom). + Register(); } } } diff --git a/Items/Armor/FathomSwarmerBoots.cs b/Items/Armor/FathomSwarmerBoots.cs index 22b5154971..1b6705dae7 100644 --- a/Items/Armor/FathomSwarmerBoots.cs +++ b/Items/Armor/FathomSwarmerBoots.cs @@ -45,14 +45,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SpiderGreaves) - .AddIngredient(9) - .AddIngredient(8) - .AddIngredient(15) - .AddIngredient(4) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SpiderGreaves). + AddIngredient(9). + AddIngredient(8). + AddIngredient(15). + AddIngredient(4). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/FathomSwarmerBreastplate.cs b/Items/Armor/FathomSwarmerBreastplate.cs index ef1e6f8f5f..57a2914ba5 100644 --- a/Items/Armor/FathomSwarmerBreastplate.cs +++ b/Items/Armor/FathomSwarmerBreastplate.cs @@ -41,14 +41,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SpiderBreastplate) - .AddIngredient(12) - .AddIngredient(10) - .AddIngredient(18) - .AddIngredient(5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SpiderBreastplate). + AddIngredient(12). + AddIngredient(10). + AddIngredient(18). + AddIngredient(5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/FathomSwarmerVisage.cs b/Items/Armor/FathomSwarmerVisage.cs index 564705354f..d463443414 100644 --- a/Items/Armor/FathomSwarmerVisage.cs +++ b/Items/Armor/FathomSwarmerVisage.cs @@ -66,14 +66,14 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SpiderMask) - .AddIngredient(5) - .AddIngredient(6) - .AddIngredient(11) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SpiderMask). + AddIngredient(5). + AddIngredient(6). + AddIngredient(11). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/FearmongerGreathelm.cs b/Items/Armor/FearmongerGreathelm.cs index 676e2b0819..d3ae45ed17 100644 --- a/Items/Armor/FearmongerGreathelm.cs +++ b/Items/Armor/FearmongerGreathelm.cs @@ -88,13 +88,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SpookyHelmet) - .AddIngredient(8) - .AddIngredient(ItemID.SoulofFright, 8) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SpookyHelmet). + AddIngredient(8). + AddIngredient(ItemID.SoulofFright, 8). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/FearmongerGreaves.cs b/Items/Armor/FearmongerGreaves.cs index e4d315c993..33b3399fff 100644 --- a/Items/Armor/FearmongerGreaves.cs +++ b/Items/Armor/FearmongerGreaves.cs @@ -37,13 +37,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SpookyLeggings) - .AddIngredient(10) - .AddIngredient(ItemID.SoulofFright, 10) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SpookyLeggings). + AddIngredient(10). + AddIngredient(ItemID.SoulofFright, 10). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/FearmongerPlateMail.cs b/Items/Armor/FearmongerPlateMail.cs index 8a84629348..e7b516e94d 100644 --- a/Items/Armor/FearmongerPlateMail.cs +++ b/Items/Armor/FearmongerPlateMail.cs @@ -35,13 +35,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SpookyBreastplate) - .AddIngredient(12) - .AddIngredient(ItemID.SoulofFright, 12) - .AddIngredient(3) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SpookyBreastplate). + AddIngredient(12). + AddIngredient(ItemID.SoulofFright, 12). + AddIngredient(3). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GemTechHeadgear.cs b/Items/Armor/GemTechHeadgear.cs index 6eb1a10e64..1e931f6c2c 100644 --- a/Items/Armor/GemTechHeadgear.cs +++ b/Items/Armor/GemTechHeadgear.cs @@ -102,12 +102,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(3) - .AddIngredient(3) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(3). + AddIngredient(3). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GemTechSchynbaulds.cs b/Items/Armor/GemTechSchynbaulds.cs index 204249ec8e..c2fd776dfe 100644 --- a/Items/Armor/GemTechSchynbaulds.cs +++ b/Items/Armor/GemTechSchynbaulds.cs @@ -30,12 +30,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddIngredient(4) - .AddIngredient(3) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(12). + AddIngredient(4). + AddIngredient(3). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index a9aefc2c85..5bec4e7cc4 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -39,11 +39,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(23) - .AddIngredient(3) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(23). + AddIngredient(3). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index 7fac0ec63a..7bcbac3611 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -67,11 +67,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(14) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(14). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GodSlayerHelmet.cs b/Items/Armor/GodSlayerHelmet.cs index 02f24df3a3..942a50718f 100644 --- a/Items/Armor/GodSlayerHelmet.cs +++ b/Items/Armor/GodSlayerHelmet.cs @@ -62,11 +62,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(14) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(14). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GodSlayerLeggings.cs b/Items/Armor/GodSlayerLeggings.cs index 352ce3a335..b93d11873f 100644 --- a/Items/Armor/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayerLeggings.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(18) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(18). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index b4836e1152..2103b2bc10 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -70,11 +70,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(14) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(14). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/MolluskShelleggings.cs b/Items/Armor/MolluskShelleggings.cs index bff038468d..680a5e4282 100644 --- a/Items/Armor/MolluskShelleggings.cs +++ b/Items/Armor/MolluskShelleggings.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(20) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(20). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/MolluskShellmet.cs b/Items/Armor/MolluskShellmet.cs index c6da5fbf2f..fd1c77bb00 100644 --- a/Items/Armor/MolluskShellmet.cs +++ b/Items/Armor/MolluskShellmet.cs @@ -65,11 +65,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(6) - .AddIngredient(15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(6). + AddIngredient(15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/MolluskShellplate.cs b/Items/Armor/MolluskShellplate.cs index 74dd8cfa02..2a58878fd5 100644 --- a/Items/Armor/MolluskShellplate.cs +++ b/Items/Armor/MolluskShellplate.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(25) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(25). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlueChestplate.cs index a513356d67..576b58c3d8 100644 --- a/Items/Armor/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlueChestplate.cs @@ -39,13 +39,13 @@ No positive life regen"); public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddIngredient(8) - .AddIngredient(8) - .AddIngredient(4) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(12). + AddIngredient(8). + AddIngredient(8). + AddIngredient(4). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlueHelmet.cs index ae3b127496..4e35f1bde0 100644 --- a/Items/Armor/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlueHelmet.cs @@ -80,13 +80,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(5) - .AddIngredient(5) - .AddIngredient(2) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(5). + AddIngredient(5). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } diff --git a/Items/Armor/OmegaBlueLeggings.cs b/Items/Armor/OmegaBlueLeggings.cs index e86470a1ba..7e868022a2 100644 --- a/Items/Armor/OmegaBlueLeggings.cs +++ b/Items/Armor/OmegaBlueLeggings.cs @@ -35,13 +35,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(6) - .AddIngredient(6) - .AddIngredient(3) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(6). + AddIngredient(6). + AddIngredient(3). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/PlagueReaperMask.cs b/Items/Armor/PlagueReaperMask.cs index 426a82d048..7a6ad5b01b 100644 --- a/Items/Armor/PlagueReaperMask.cs +++ b/Items/Armor/PlagueReaperMask.cs @@ -82,19 +82,19 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.NecroHelmet) - .AddIngredient(15) - .AddIngredient(ItemID.Nanites, 11) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.NecroHelmet). + AddIngredient(15). + AddIngredient(ItemID.Nanites, 11). + AddTile(TileID.MythrilAnvil). + Register(); - CreateRecipe() - .AddIngredient(ItemID.AncientNecroHelmet) - .AddIngredient(15) - .AddIngredient(ItemID.Nanites, 11) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.AncientNecroHelmet). + AddIngredient(15). + AddIngredient(ItemID.Nanites, 11). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/PlagueReaperStriders.cs b/Items/Armor/PlagueReaperStriders.cs index a635249a4c..13f5a54a17 100644 --- a/Items/Armor/PlagueReaperStriders.cs +++ b/Items/Armor/PlagueReaperStriders.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.NecroGreaves) - .AddIngredient(21) - .AddIngredient(ItemID.Nanites, 17) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.NecroGreaves). + AddIngredient(21). + AddIngredient(ItemID.Nanites, 17). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/PlagueReaperVest.cs b/Items/Armor/PlagueReaperVest.cs index a88959e54f..c0c3d53215 100644 --- a/Items/Armor/PlagueReaperVest.cs +++ b/Items/Armor/PlagueReaperVest.cs @@ -33,12 +33,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.NecroBreastplate) - .AddIngredient(29) - .AddIngredient(ItemID.Nanites, 19) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.NecroBreastplate). + AddIngredient(29). + AddIngredient(ItemID.Nanites, 19). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/PlaguebringerCarapace.cs b/Items/Armor/PlaguebringerCarapace.cs index b0058ac635..3bfff28793 100644 --- a/Items/Armor/PlaguebringerCarapace.cs +++ b/Items/Armor/PlaguebringerCarapace.cs @@ -36,13 +36,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.BeeBreastplate) - .AddIngredient(2) - .AddIngredient(7) - .AddIngredient(7) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.BeeBreastplate). + AddIngredient(2). + AddIngredient(7). + AddIngredient(7). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/PlaguebringerPistons.cs b/Items/Armor/PlaguebringerPistons.cs index ca7b59d48f..aacc34017d 100644 --- a/Items/Armor/PlaguebringerPistons.cs +++ b/Items/Armor/PlaguebringerPistons.cs @@ -139,13 +139,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.BeeGreaves) - .AddIngredient(ItemID.FlowerBoots) - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.BeeGreaves). + AddIngredient(ItemID.FlowerBoots). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/PlaguebringerVisor.cs b/Items/Armor/PlaguebringerVisor.cs index 51b3994126..0e79a076c9 100644 --- a/Items/Armor/PlaguebringerVisor.cs +++ b/Items/Armor/PlaguebringerVisor.cs @@ -73,12 +73,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.BeeHeadgear) - .AddIngredient(4) - .AddIngredient(4) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.BeeHeadgear). + AddIngredient(4). + AddIngredient(4). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/PrismaticGreaves.cs b/Items/Armor/PrismaticGreaves.cs index 5350ac2b6c..88eca979c7 100644 --- a/Items/Armor/PrismaticGreaves.cs +++ b/Items/Armor/PrismaticGreaves.cs @@ -40,13 +40,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddIngredient(5) - .AddIngredient(6) - .AddIngredient(ItemID.Nanites, 300) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddIngredient(5). + AddIngredient(6). + AddIngredient(ItemID.Nanites, 300). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/PrismaticHelmet.cs b/Items/Armor/PrismaticHelmet.cs index 9a7eb11a93..80ce52dd57 100644 --- a/Items/Armor/PrismaticHelmet.cs +++ b/Items/Armor/PrismaticHelmet.cs @@ -65,13 +65,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddIngredient(5) - .AddIngredient(4) - .AddIngredient(ItemID.Nanites, 300) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddIngredient(5). + AddIngredient(4). + AddIngredient(ItemID.Nanites, 300). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/PrismaticRegalia.cs b/Items/Armor/PrismaticRegalia.cs index 97e195de36..e5b68431c6 100644 --- a/Items/Armor/PrismaticRegalia.cs +++ b/Items/Armor/PrismaticRegalia.cs @@ -42,13 +42,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddIngredient(5) - .AddIngredient(8) - .AddIngredient(ItemID.Nanites, 300) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddIngredient(5). + AddIngredient(8). + AddIngredient(ItemID.Nanites, 300). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/ReaverCuisses.cs b/Items/Armor/ReaverCuisses.cs index a61e11f194..12c3fab3f7 100644 --- a/Items/Armor/ReaverCuisses.cs +++ b/Items/Armor/ReaverCuisses.cs @@ -32,12 +32,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(ItemID.JungleSpores, 8) - .AddIngredient(2) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(ItemID.JungleSpores, 8). + AddIngredient(2). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/ReaverHeadgear.cs b/Items/Armor/ReaverHeadgear.cs index b7f5fb3fe8..b30b95eb2b 100644 --- a/Items/Armor/ReaverHeadgear.cs +++ b/Items/Armor/ReaverHeadgear.cs @@ -111,12 +111,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(6) - .AddIngredient(ItemID.JungleSpores, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.JungleSpores, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index dbb6aa076c..7d1e4edf09 100644 --- a/Items/Armor/ReaverHelm.cs +++ b/Items/Armor/ReaverHelm.cs @@ -68,12 +68,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(6) - .AddIngredient(ItemID.JungleSpores, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.JungleSpores, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/ReaverScaleMail.cs b/Items/Armor/ReaverScaleMail.cs index 4e026ce12f..4852d9ddfd 100644 --- a/Items/Armor/ReaverScaleMail.cs +++ b/Items/Armor/ReaverScaleMail.cs @@ -33,12 +33,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(ItemID.JungleSpores, 12) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(ItemID.JungleSpores, 12). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/ReaverVisage.cs b/Items/Armor/ReaverVisage.cs index 98615d7cbb..2a7c46f625 100644 --- a/Items/Armor/ReaverVisage.cs +++ b/Items/Armor/ReaverVisage.cs @@ -59,12 +59,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(6) - .AddIngredient(ItemID.JungleSpores, 4) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.JungleSpores, 4). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/ShroomiteVisage.cs b/Items/Armor/ShroomiteVisage.cs index 01f4fa0039..769828d774 100644 --- a/Items/Armor/ShroomiteVisage.cs +++ b/Items/Armor/ShroomiteVisage.cs @@ -43,10 +43,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.ShroomiteBar, 12) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.ShroomiteBar, 12). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index 37b45c0180..f8cbec9f5b 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -36,13 +36,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddRecipeGroup("AnyGoldBar", 10) - .AddIngredient(12) - .AddIngredient(3) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(10). + AddRecipeGroup("AnyGoldBar", 10). + AddIngredient(12). + AddIngredient(3). + AddTile(). + Register(); } } } diff --git a/Items/Armor/SilvaHelmet.cs b/Items/Armor/SilvaHelmet.cs index 4305815d9c..f276dc3a31 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -70,13 +70,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddRecipeGroup("AnyGoldBar", 5) - .AddIngredient(6) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddRecipeGroup("AnyGoldBar", 5). + AddIngredient(6). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/SilvaLeggings.cs b/Items/Armor/SilvaLeggings.cs index 4f9165fb7d..229c94e840 100644 --- a/Items/Armor/SilvaLeggings.cs +++ b/Items/Armor/SilvaLeggings.cs @@ -36,13 +36,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddRecipeGroup("AnyGoldBar", 7) - .AddIngredient(9) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(7). + AddRecipeGroup("AnyGoldBar", 7). + AddIngredient(9). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index 20dc521b08..6be51f1800 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -60,13 +60,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddRecipeGroup("AnyGoldBar", 5) - .AddIngredient(6) - .AddIngredient(2) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddRecipeGroup("AnyGoldBar", 5). + AddIngredient(6). + AddIngredient(2). + AddTile(). + Register(); } } } diff --git a/Items/Armor/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffianChestplate.cs index 0f8f14f220..21f82d07af 100644 --- a/Items/Armor/SnowRuffianChestplate.cs +++ b/Items/Armor/SnowRuffianChestplate.cs @@ -29,12 +29,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnySnowBlock", 30) - .AddRecipeGroup("AnyIceBlock", 15) - .AddIngredient(ItemID.BorealWood, 45) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddRecipeGroup("AnySnowBlock", 30). + AddRecipeGroup("AnyIceBlock", 15). + AddIngredient(ItemID.BorealWood, 45). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/SnowRuffianGreaves.cs b/Items/Armor/SnowRuffianGreaves.cs index 9352f16f21..26d9b6492b 100644 --- a/Items/Armor/SnowRuffianGreaves.cs +++ b/Items/Armor/SnowRuffianGreaves.cs @@ -29,12 +29,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnySnowBlock", 20) - .AddRecipeGroup("AnyIceBlock", 10) - .AddIngredient(ItemID.BorealWood, 30) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddRecipeGroup("AnySnowBlock", 20). + AddRecipeGroup("AnyIceBlock", 10). + AddIngredient(ItemID.BorealWood, 30). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/SnowRuffianMask.cs b/Items/Armor/SnowRuffianMask.cs index caa20a6247..8507ffbeb0 100644 --- a/Items/Armor/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffianMask.cs @@ -67,12 +67,12 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnySnowBlock", 10) - .AddRecipeGroup("AnyIceBlock", 5) - .AddIngredient(ItemID.BorealWood, 15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddRecipeGroup("AnySnowBlock", 10). + AddRecipeGroup("AnyIceBlock", 5). + AddIngredient(ItemID.BorealWood, 15). + AddTile(TileID.Anvils). + Register(); } } public class SnowRuffianWings : EquipTexture diff --git a/Items/Armor/StatigelArmor.cs b/Items/Armor/StatigelArmor.cs index 7c5584f72d..10cbd177fb 100644 --- a/Items/Armor/StatigelArmor.cs +++ b/Items/Armor/StatigelArmor.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient(ItemID.HellstoneBar, 13) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(ItemID.HellstoneBar, 13). + AddTile(). + Register(); } } } diff --git a/Items/Armor/StatigelCap.cs b/Items/Armor/StatigelCap.cs index 9683b01760..b9c4431423 100644 --- a/Items/Armor/StatigelCap.cs +++ b/Items/Armor/StatigelCap.cs @@ -53,11 +53,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.HellstoneBar, 9) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.HellstoneBar, 9). + AddTile(). + Register(); } } } diff --git a/Items/Armor/StatigelGreaves.cs b/Items/Armor/StatigelGreaves.cs index b80ff4375d..b7f5744475 100644 --- a/Items/Armor/StatigelGreaves.cs +++ b/Items/Armor/StatigelGreaves.cs @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(6) - .AddIngredient(ItemID.HellstoneBar, 11) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.HellstoneBar, 11). + AddTile(). + Register(); } } } diff --git a/Items/Armor/StatigelHeadgear.cs b/Items/Armor/StatigelHeadgear.cs index 2785b8db53..145aa900fe 100644 --- a/Items/Armor/StatigelHeadgear.cs +++ b/Items/Armor/StatigelHeadgear.cs @@ -51,11 +51,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.HellstoneBar, 9) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.HellstoneBar, 9). + AddTile(). + Register(); } } } diff --git a/Items/Armor/StatigelHelm.cs b/Items/Armor/StatigelHelm.cs index bac1e0e694..2dcf0ac632 100644 --- a/Items/Armor/StatigelHelm.cs +++ b/Items/Armor/StatigelHelm.cs @@ -54,11 +54,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.HellstoneBar, 9) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.HellstoneBar, 9). + AddTile(). + Register(); } } } diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index 42dd3e9bd6..9653fd6f98 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -71,11 +71,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.HellstoneBar, 9) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.HellstoneBar, 9). + AddTile(). + Register(); } } } diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index bc5e33d7a5..e167c5d298 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -59,11 +59,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.HellstoneBar, 9) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.HellstoneBar, 9). + AddTile(). + Register(); } } } diff --git a/Items/Armor/SulfurBreastplate.cs b/Items/Armor/SulfurBreastplate.cs index 8c85582081..2501e14529 100644 --- a/Items/Armor/SulfurBreastplate.cs +++ b/Items/Armor/SulfurBreastplate.cs @@ -33,13 +33,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(50) - .AddIngredient(20) - .AddIngredient(20) - .AddIngredient(20) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(50). + AddIngredient(20). + AddIngredient(20). + AddIngredient(20). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/SulfurHelmet.cs b/Items/Armor/SulfurHelmet.cs index d45d650ea0..9dbe3aa125 100644 --- a/Items/Armor/SulfurHelmet.cs +++ b/Items/Armor/SulfurHelmet.cs @@ -59,13 +59,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(10) - .AddIngredient(10) - .AddIngredient(10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(10). + AddIngredient(10). + AddIngredient(10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/SulfurLeggings.cs b/Items/Armor/SulfurLeggings.cs index 4e9583f6bb..88121e9ffc 100644 --- a/Items/Armor/SulfurLeggings.cs +++ b/Items/Armor/SulfurLeggings.cs @@ -33,13 +33,13 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(30) - .AddIngredient(15) - .AddIngredient(15) - .AddIngredient(15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(30). + AddIngredient(15). + AddIngredient(15). + AddIngredient(15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/TarragonBreastplate.cs b/Items/Armor/TarragonBreastplate.cs index b231a88f00..58763ca662 100644 --- a/Items/Armor/TarragonBreastplate.cs +++ b/Items/Armor/TarragonBreastplate.cs @@ -35,11 +35,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(18) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(18). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TarragonHelm.cs b/Items/Armor/TarragonHelm.cs index f28538fb6b..df885bc2f2 100644 --- a/Items/Armor/TarragonHelm.cs +++ b/Items/Armor/TarragonHelm.cs @@ -66,11 +66,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(6) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TarragonHelmet.cs b/Items/Armor/TarragonHelmet.cs index 010edfc63a..cfa9fb5820 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -69,11 +69,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(6) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TarragonHornedHelm.cs b/Items/Armor/TarragonHornedHelm.cs index 4793708cda..309cb92a23 100644 --- a/Items/Armor/TarragonHornedHelm.cs +++ b/Items/Armor/TarragonHornedHelm.cs @@ -62,11 +62,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(6) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TarragonLeggings.cs b/Items/Armor/TarragonLeggings.cs index 50a97bbebb..e45e7bf0b8 100644 --- a/Items/Armor/TarragonLeggings.cs +++ b/Items/Armor/TarragonLeggings.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(11) - .AddIngredient(12) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(11). + AddIngredient(12). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TarragonMask.cs b/Items/Armor/TarragonMask.cs index 9a87c53b72..53631a4bfc 100644 --- a/Items/Armor/TarragonMask.cs +++ b/Items/Armor/TarragonMask.cs @@ -64,11 +64,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(6) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TarragonVisage.cs b/Items/Armor/TarragonVisage.cs index 8dc4839b71..62b3c23500 100644 --- a/Items/Armor/TarragonVisage.cs +++ b/Items/Armor/TarragonVisage.cs @@ -60,11 +60,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(6) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(6). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/TitanHeartBoots.cs b/Items/Armor/TitanHeartBoots.cs index c808b58558..b34143eeb3 100644 --- a/Items/Armor/TitanHeartBoots.cs +++ b/Items/Armor/TitanHeartBoots.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(14) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(14). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/TitanHeartMantle.cs b/Items/Armor/TitanHeartMantle.cs index b827da47c9..4b4378da84 100644 --- a/Items/Armor/TitanHeartMantle.cs +++ b/Items/Armor/TitanHeartMantle.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(20) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(20). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/TitanHeartMask.cs b/Items/Armor/TitanHeartMask.cs index 61decb24e0..376a950d44 100644 --- a/Items/Armor/TitanHeartMask.cs +++ b/Items/Armor/TitanHeartMask.cs @@ -57,11 +57,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/UmbraphileBoots.cs b/Items/Armor/UmbraphileBoots.cs index 377b711684..2b0a919528 100644 --- a/Items/Armor/UmbraphileBoots.cs +++ b/Items/Armor/UmbraphileBoots.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(14) - .AddIngredient(ItemID.HallowedBar, 11) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(14). + AddIngredient(ItemID.HallowedBar, 11). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/UmbraphileHood.cs b/Items/Armor/UmbraphileHood.cs index 739a7a5019..4042d1af07 100644 --- a/Items/Armor/UmbraphileHood.cs +++ b/Items/Armor/UmbraphileHood.cs @@ -57,11 +57,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddIngredient(ItemID.HallowedBar, 8) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(12). + AddIngredient(ItemID.HallowedBar, 8). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/UmbraphileRegalia.cs b/Items/Armor/UmbraphileRegalia.cs index 345742266b..e35990fa0c 100644 --- a/Items/Armor/UmbraphileRegalia.cs +++ b/Items/Armor/UmbraphileRegalia.cs @@ -31,11 +31,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(18) - .AddIngredient(ItemID.HallowedBar, 15) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(18). + AddIngredient(ItemID.HallowedBar, 15). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Armor/Vanity/ApronOfAffection.cs b/Items/Armor/Vanity/ApronOfAffection.cs index 11ae7ef9c5..dd721946c0 100644 --- a/Items/Armor/Vanity/ApronOfAffection.cs +++ b/Items/Armor/Vanity/ApronOfAffection.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Armor.Vanity public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.Robe) - .AddIngredient(ItemID.LovePotion, 10) - .AddIngredient(ItemID.LifeCrystal) - .AddTile(TileID.Loom) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.Robe). + AddIngredient(ItemID.LovePotion, 10). + AddIngredient(ItemID.LifeCrystal). + AddTile(TileID.Loom). + Register(); } } } diff --git a/Items/Armor/VictideBreastplate.cs b/Items/Armor/VictideBreastplate.cs index 81d178eef9..702ef0c7cc 100644 --- a/Items/Armor/VictideBreastplate.cs +++ b/Items/Armor/VictideBreastplate.cs @@ -37,10 +37,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/VictideHeadgear.cs b/Items/Armor/VictideHeadgear.cs index 5b9eb1955a..59ef2118b2 100644 --- a/Items/Armor/VictideHeadgear.cs +++ b/Items/Armor/VictideHeadgear.cs @@ -58,10 +58,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/VictideHelm.cs b/Items/Armor/VictideHelm.cs index 7d8c41573a..7bd9a56b72 100644 --- a/Items/Armor/VictideHelm.cs +++ b/Items/Armor/VictideHelm.cs @@ -54,10 +54,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/VictideHelmet.cs b/Items/Armor/VictideHelmet.cs index ed439ebed7..60765999f3 100644 --- a/Items/Armor/VictideHelmet.cs +++ b/Items/Armor/VictideHelmet.cs @@ -69,10 +69,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/VictideLeggings.cs b/Items/Armor/VictideLeggings.cs index 64b371ba1e..2923639bf6 100644 --- a/Items/Armor/VictideLeggings.cs +++ b/Items/Armor/VictideLeggings.cs @@ -31,10 +31,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(4) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/VictideMask.cs b/Items/Armor/VictideMask.cs index 3461fdf568..511c76faf8 100644 --- a/Items/Armor/VictideMask.cs +++ b/Items/Armor/VictideMask.cs @@ -52,10 +52,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/VictideVisage.cs b/Items/Armor/VictideVisage.cs index 47689b1508..29021714ac 100644 --- a/Items/Armor/VictideVisage.cs +++ b/Items/Armor/VictideVisage.cs @@ -52,10 +52,10 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumArmor.cs b/Items/Armor/WulfrumArmor.cs index 4d0e71ca27..d1530828a0 100644 --- a/Items/Armor/WulfrumArmor.cs +++ b/Items/Armor/WulfrumArmor.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(12). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumHeadgear.cs b/Items/Armor/WulfrumHeadgear.cs index 07555933eb..0f0e335ab1 100644 --- a/Items/Armor/WulfrumHeadgear.cs +++ b/Items/Armor/WulfrumHeadgear.cs @@ -46,11 +46,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumHelm.cs b/Items/Armor/WulfrumHelm.cs index 505682d86b..9866d0147a 100644 --- a/Items/Armor/WulfrumHelm.cs +++ b/Items/Armor/WulfrumHelm.cs @@ -48,11 +48,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumHelmet.cs b/Items/Armor/WulfrumHelmet.cs index ad9223ba6f..752b954353 100644 --- a/Items/Armor/WulfrumHelmet.cs +++ b/Items/Armor/WulfrumHelmet.cs @@ -46,11 +46,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumHood.cs b/Items/Armor/WulfrumHood.cs index ee09c0dfb7..dc0c1f7877 100644 --- a/Items/Armor/WulfrumHood.cs +++ b/Items/Armor/WulfrumHood.cs @@ -46,11 +46,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumLeggings.cs b/Items/Armor/WulfrumLeggings.cs index 60c842bbeb..616c00f6e4 100644 --- a/Items/Armor/WulfrumLeggings.cs +++ b/Items/Armor/WulfrumLeggings.cs @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/WulfrumMask.cs b/Items/Armor/WulfrumMask.cs index e1000abe7c..fc4b56cbfc 100644 --- a/Items/Armor/WulfrumMask.cs +++ b/Items/Armor/WulfrumMask.cs @@ -54,11 +54,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient() - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Armor/XerocCuisses.cs b/Items/Armor/XerocCuisses.cs index 219f2d1844..73d1a34ca2 100644 --- a/Items/Armor/XerocCuisses.cs +++ b/Items/Armor/XerocCuisses.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(18) - .AddIngredient(ItemID.LunarBar, 12) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(18). + AddIngredient(ItemID.LunarBar, 12). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index 59441d49a8..2650c810c6 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -71,11 +71,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddIngredient(ItemID.LunarBar, 8) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(12). + AddIngredient(ItemID.LunarBar, 8). + AddTile(TileID.LunarCraftingStation). + Register(); } } diff --git a/Items/Armor/XerocPlateMail.cs b/Items/Armor/XerocPlateMail.cs index d91d94d438..380906974a 100644 --- a/Items/Armor/XerocPlateMail.cs +++ b/Items/Armor/XerocPlateMail.cs @@ -34,11 +34,11 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() - .AddIngredient(22) - .AddIngredient(ItemID.LunarBar, 16) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(22). + AddIngredient(ItemID.LunarBar, 16). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/BleachBall.cs b/Items/BleachBall.cs index d4c19eef15..a9fae529ba 100644 --- a/Items/BleachBall.cs +++ b/Items/BleachBall.cs @@ -28,11 +28,11 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(5) - .AddIngredient(ItemID.CalmingPotion) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(ItemID.CalmingPotion). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/BrimstoneLocus.cs b/Items/BrimstoneLocus.cs index 0165ad4313..9efea1a059 100644 --- a/Items/BrimstoneLocus.cs +++ b/Items/BrimstoneLocus.cs @@ -25,10 +25,10 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(3) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(3). + Register(); } } } diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index fe60fefe98..2a01625752 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -25,11 +25,11 @@ namespace CalamityMod.Items } public override void AddRecipes() { - CreateRecipe() - .AddIngredient(20) - .AddIngredient(ItemID.IronBar, 10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(20). + AddIngredient(ItemID.IronBar, 10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/DifficultyItems/BallAndChain.cs b/Items/DifficultyItems/BallAndChain.cs index 4144208cad..f24e5ff03d 100644 --- a/Items/DifficultyItems/BallAndChain.cs +++ b/Items/DifficultyItems/BallAndChain.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -30,7 +30,11 @@ namespace CalamityMod.Items.DifficultyItems public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.IronBar, 10).AddIngredient(ItemID.Chain).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(ItemID.IronBar, 10). + AddIngredient(ItemID.Chain). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/DifficultyItems/Death.cs b/Items/DifficultyItems/Death.cs index bbbb017f75..a9f74283f2 100644 --- a/Items/DifficultyItems/Death.cs +++ b/Items/DifficultyItems/Death.cs @@ -1,4 +1,4 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Events; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -95,7 +95,9 @@ namespace CalamityMod.Items.DifficultyItems public override void AddRecipes() { - CreateRecipe(1).AddTile(TileID.DemonAltar).Register(); + CreateRecipe() + .AddTile(TileID.DemonAltar) + .Register(); } } } diff --git a/Items/DifficultyItems/Malice.cs b/Items/DifficultyItems/Malice.cs index 178c19a318..64e47560a8 100644 --- a/Items/DifficultyItems/Malice.cs +++ b/Items/DifficultyItems/Malice.cs @@ -1,4 +1,4 @@ -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Events; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -104,7 +104,9 @@ namespace CalamityMod.Items.DifficultyItems public override void AddRecipes() { - CreateRecipe(1).AddTile(TileID.DemonAltar).Register(); + CreateRecipe() + .AddTile(TileID.DemonAltar) + .Register(); } } } diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index aa9f017fc3..54a3586567 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -119,7 +119,9 @@ namespace CalamityMod.Items.DifficultyItems public override void AddRecipes() { - CreateRecipe(1).AddTile(TileID.DemonAltar).Register(); + CreateRecipe() + .AddTile(TileID.DemonAltar) + .Register(); } } } diff --git a/Items/DraedonMisc/AdvancedDisplay.cs b/Items/DraedonMisc/AdvancedDisplay.cs index 53b076709a..8e7c7229d2 100644 --- a/Items/DraedonMisc/AdvancedDisplay.cs +++ b/Items/DraedonMisc/AdvancedDisplay.cs @@ -56,10 +56,10 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 3). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). + AddIngredient(3). AddIngredient(ItemID.Glass, 20). AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Predicate condition), condition). AddTile(TileID.MythrilAnvil). diff --git a/Items/DraedonMisc/AuricQuantumCoolingCell.cs b/Items/DraedonMisc/AuricQuantumCoolingCell.cs index 7c5a62c141..a541d99dd8 100644 --- a/Items/DraedonMisc/AuricQuantumCoolingCell.cs +++ b/Items/DraedonMisc/AuricQuantumCoolingCell.cs @@ -71,14 +71,14 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 2). - AddIngredient(ModContent.ItemType(), 8). - AddIngredient(ModContent.ItemType(), 8). - AddIngredient(ModContent.ItemType(), 40). - AddIngredient(ModContent.ItemType(), 6). + CreateRecipe(). + AddIngredient(2). + AddIngredient(8). + AddIngredient(8). + AddIngredient(40). + AddIngredient(6). AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(5, out Predicate condition), condition). - AddTile(ModContent.TileType()). + AddTile(). Register(); } } diff --git a/Items/DraedonMisc/CodebreakerBase.cs b/Items/DraedonMisc/CodebreakerBase.cs index ba8ac85f5d..0fbf45e953 100644 --- a/Items/DraedonMisc/CodebreakerBase.cs +++ b/Items/DraedonMisc/CodebreakerBase.cs @@ -27,10 +27,10 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType()). - AddIngredient(ModContent.ItemType(), 20). - AddIngredient(ModContent.ItemType(), 35). + CreateRecipe(). + AddIngredient(). + AddIngredient(20). + AddIngredient(35). AddTile(TileID.Anvils). Register(); } diff --git a/Items/DraedonMisc/DecryptionComputer.cs b/Items/DraedonMisc/DecryptionComputer.cs index 63be1a2708..0f3bedb22e 100644 --- a/Items/DraedonMisc/DecryptionComputer.cs +++ b/Items/DraedonMisc/DecryptionComputer.cs @@ -58,9 +58,9 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 18). - AddIngredient(ModContent.ItemType(), 10). + CreateRecipe(). + AddIngredient(18). + AddIngredient(10). AddIngredient(ItemID.Wire, 100). AddRecipeGroup("AnyCopperBar", 10). AddIngredient(ItemID.Glass, 15). diff --git a/Items/DraedonMisc/EncryptedSchematicHell.cs b/Items/DraedonMisc/EncryptedSchematicHell.cs index 1fef20810e..d4b5be5b15 100644 --- a/Items/DraedonMisc/EncryptedSchematicHell.cs +++ b/Items/DraedonMisc/EncryptedSchematicHell.cs @@ -35,9 +35,9 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). AddIngredient(ItemID.Glass, 50). AddCondition(SchematicRecipe.ConstructRecipeCondition("Hell", out Predicate condition), condition). AddTile(TileID.Anvils). diff --git a/Items/DraedonMisc/EncryptedSchematicIce.cs b/Items/DraedonMisc/EncryptedSchematicIce.cs index 8576d2fc05..a9bc6d8d4e 100644 --- a/Items/DraedonMisc/EncryptedSchematicIce.cs +++ b/Items/DraedonMisc/EncryptedSchematicIce.cs @@ -35,9 +35,9 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). AddIngredient(ItemID.Glass, 50). AddCondition(SchematicRecipe.ConstructRecipeCondition("Ice", out Predicate condition), condition). AddTile(TileID.Anvils). diff --git a/Items/DraedonMisc/EncryptedSchematicJungle.cs b/Items/DraedonMisc/EncryptedSchematicJungle.cs index f8a47276b2..5db7d6639c 100644 --- a/Items/DraedonMisc/EncryptedSchematicJungle.cs +++ b/Items/DraedonMisc/EncryptedSchematicJungle.cs @@ -35,9 +35,9 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). AddIngredient(ItemID.Glass, 50). AddCondition(SchematicRecipe.ConstructRecipeCondition("Jungle", out Predicate condition), condition). AddTile(TileID.Anvils). diff --git a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs index 05afb79ee2..36d9bbbf12 100644 --- a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs +++ b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). + CreateRecipe(). AddIngredient(ModContent.ItemType(), 10). AddIngredient(ModContent.ItemType(), 10). AddIngredient(ItemID.Glass, 50). diff --git a/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs b/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs index 04d78e15cb..14e16481fa 100644 --- a/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs +++ b/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs @@ -43,9 +43,9 @@ namespace CalamityMod.Items.DraedonMisc // Recipe exists for posierity. public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). AddIngredient(ItemID.Glass, 50). AddCondition(SchematicRecipe.ConstructRecipeCondition("Sunken Sea", out Predicate condition), condition). AddTile(TileID.Anvils). diff --git a/Items/DraedonMisc/LongRangedSensorArray.cs b/Items/DraedonMisc/LongRangedSensorArray.cs index 53c7405d24..53b362a5d8 100644 --- a/Items/DraedonMisc/LongRangedSensorArray.cs +++ b/Items/DraedonMisc/LongRangedSensorArray.cs @@ -56,9 +56,9 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). AddRecipeGroup("AnyMythrilBar", 10). AddIngredient(ItemID.Wire, 50). AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(2, out Predicate condition), condition). diff --git a/Items/DraedonMisc/VoltageRegulationSystem.cs b/Items/DraedonMisc/VoltageRegulationSystem.cs index d2b20e8f05..fda65721f7 100644 --- a/Items/DraedonMisc/VoltageRegulationSystem.cs +++ b/Items/DraedonMisc/VoltageRegulationSystem.cs @@ -57,10 +57,10 @@ namespace CalamityMod.Items.DraedonMisc public override void AddRecipes() { - CreateRecipe(1). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 10). - AddIngredient(ModContent.ItemType(), 5). + CreateRecipe(). + AddIngredient(10). + AddIngredient(10). + AddIngredient(5). AddIngredient(ItemID.LunarBar, 5). AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(4, out Predicate condition), condition). AddTile(TileID.LunarCraftingStation). diff --git a/Items/Dyes/AerialiteDye.cs b/Items/Dyes/AerialiteDye.cs index 3553be7a6f..e3506f01ed 100644 --- a/Items/Dyes/AerialiteDye.cs +++ b/Items/Dyes/AerialiteDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/AstralBlueDye.cs b/Items/Dyes/AstralBlueDye.cs index 6c95bbfe45..02f1a54a5f 100644 --- a/Items/Dyes/AstralBlueDye.cs +++ b/Items/Dyes/AstralBlueDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/AstralDye.cs b/Items/Dyes/AstralDye.cs index b32bc343d0..c50547055b 100644 --- a/Items/Dyes/AstralDye.cs +++ b/Items/Dyes/AstralDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 15).AddTile(TileID.DyeVat).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(15). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/AstralOrangeDye.cs b/Items/Dyes/AstralOrangeDye.cs index a6becfa914..65115748be 100644 --- a/Items/Dyes/AstralOrangeDye.cs +++ b/Items/Dyes/AstralOrangeDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/AstralSwirlDye.cs b/Items/Dyes/AstralSwirlDye.cs index fc88818eae..c610fdca4e 100644 --- a/Items/Dyes/AstralSwirlDye.cs +++ b/Items/Dyes/AstralSwirlDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,12 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(). + AddIngredient(). + AddIngredient(5). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/AuricDye.cs b/Items/Dyes/AuricDye.cs index 4f1a8476b1..9b1da78f33 100644 --- a/Items/Dyes/AuricDye.cs +++ b/Items/Dyes/AuricDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.DyeVat).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(5). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/BloodflareDye.cs b/Items/Dyes/BloodflareDye.cs index 01395d118b..b60ba0d26c 100644 --- a/Items/Dyes/BloodflareDye.cs +++ b/Items/Dyes/BloodflareDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(3). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/BlueCosmicFlameDye.cs b/Items/Dyes/BlueCosmicFlameDye.cs index d4806eb04a..256c403a83 100644 --- a/Items/Dyes/BlueCosmicFlameDye.cs +++ b/Items/Dyes/BlueCosmicFlameDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/BlueStatigelDye.cs b/Items/Dyes/BlueStatigelDye.cs index cc3e6a9dcd..e89994e490 100644 --- a/Items/Dyes/BlueStatigelDye.cs +++ b/Items/Dyes/BlueStatigelDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/BrimflameDye.cs b/Items/Dyes/BrimflameDye.cs index a6233686e0..e904bf2284 100644 --- a/Items/Dyes/BrimflameDye.cs +++ b/Items/Dyes/BrimflameDye.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.DyeVat).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(3). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/CalamitousDye.cs b/Items/Dyes/CalamitousDye.cs index 8fe633bbd2..9738bbac21 100644 --- a/Items/Dyes/CalamitousDye.cs +++ b/Items/Dyes/CalamitousDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ItemID.BottledWater, 3).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(3). + AddIngredient(ItemID.BottledWater, 3). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/CeaselessDye.cs b/Items/Dyes/CeaselessDye.cs index 9de678cfa9..5f78fcf7cb 100644 --- a/Items/Dyes/CeaselessDye.cs +++ b/Items/Dyes/CeaselessDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -24,7 +24,12 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.VoidDye).AddIngredient(ItemID.ShadowDye).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.VoidDye). + AddIngredient(ItemID.ShadowDye). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/CosmiliteDye.cs b/Items/Dyes/CosmiliteDye.cs index e782c2d0df..de9f95ef2d 100644 --- a/Items/Dyes/CosmiliteDye.cs +++ b/Items/Dyes/CosmiliteDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/CryonicDye.cs b/Items/Dyes/CryonicDye.cs index e0f966411d..c97c106512 100644 --- a/Items/Dyes/CryonicDye.cs +++ b/Items/Dyes/CryonicDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(4). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/DragonSoulDye.cs b/Items/Dyes/DragonSoulDye.cs index 93cd0d9736..a2e99ed485 100644 --- a/Items/Dyes/DragonSoulDye.cs +++ b/Items/Dyes/DragonSoulDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -24,7 +24,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/ElementalDye.cs b/Items/Dyes/ElementalDye.cs index 24be861809..cf4bb236a9 100644 --- a/Items/Dyes/ElementalDye.cs +++ b/Items/Dyes/ElementalDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Graphics.Shaders; @@ -23,7 +23,14 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(5).AddIngredient(ItemID.SolarDye).AddIngredient(ItemID.VortexDye).AddIngredient(ItemID.StardustDye).AddIngredient(ItemID.NebulaDye).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(5). + AddIngredient(ItemID.SolarDye). + AddIngredient(ItemID.VortexDye). + AddIngredient(ItemID.StardustDye). + AddIngredient(ItemID.NebulaDye). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/EndothermicDye.cs b/Items/Dyes/EndothermicDye.cs index 63ec351465..23043ef39d 100644 --- a/Items/Dyes/EndothermicDye.cs +++ b/Items/Dyes/EndothermicDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(5). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/ExoDye.cs b/Items/Dyes/ExoDye.cs index e89b7f6ff8..d049b9e115 100644 --- a/Items/Dyes/ExoDye.cs +++ b/Items/Dyes/ExoDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Graphics.Shaders; @@ -28,7 +28,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ItemID.BottledWater, 3).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(3). + AddIngredient(ItemID.BottledWater, 3). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/NightmareDye.cs b/Items/Dyes/NightmareDye.cs index d6f3083cc3..f6f348af6e 100644 --- a/Items/Dyes/NightmareDye.cs +++ b/Items/Dyes/NightmareDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(5). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/PhantoplasmDye.cs b/Items/Dyes/PhantoplasmDye.cs index f1de816ae7..4dee4add01 100644 --- a/Items/Dyes/PhantoplasmDye.cs +++ b/Items/Dyes/PhantoplasmDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(3). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/PinkCosmicFlameDye.cs b/Items/Dyes/PinkCosmicFlameDye.cs index 88740bbea0..589c44b84a 100644 --- a/Items/Dyes/PinkCosmicFlameDye.cs +++ b/Items/Dyes/PinkCosmicFlameDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/PinkStatigelDye.cs b/Items/Dyes/PinkStatigelDye.cs index 28f93f30b3..3a1fe650c6 100644 --- a/Items/Dyes/PinkStatigelDye.cs +++ b/Items/Dyes/PinkStatigelDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/ProfanedFlameDye.cs b/Items/Dyes/ProfanedFlameDye.cs index 4c65d63c2d..b61901e40f 100644 --- a/Items/Dyes/ProfanedFlameDye.cs +++ b/Items/Dyes/ProfanedFlameDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(3). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/ReaverDye.cs b/Items/Dyes/ReaverDye.cs index 944f0a117b..6865347549 100644 --- a/Items/Dyes/ReaverDye.cs +++ b/Items/Dyes/ReaverDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(4). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/ShadowspecDye.cs b/Items/Dyes/ShadowspecDye.cs index af5476444b..0641886acf 100644 --- a/Items/Dyes/ShadowspecDye.cs +++ b/Items/Dyes/ShadowspecDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -26,7 +26,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/SlimeGodDye.cs b/Items/Dyes/SlimeGodDye.cs index fbd3d87d8a..22eb2c715d 100644 --- a/Items/Dyes/SlimeGodDye.cs +++ b/Items/Dyes/SlimeGodDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -25,7 +25,12 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/StratusDye.cs b/Items/Dyes/StratusDye.cs index ac692613cc..47fe553c51 100644 --- a/Items/Dyes/StratusDye.cs +++ b/Items/Dyes/StratusDye.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -27,7 +27,13 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.BottledWater, 2).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(ItemID.BottledWater, 2). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Dyes/SwirlingCosmicFlameDye.cs b/Items/Dyes/SwirlingCosmicFlameDye.cs index 5f12a5d8fd..ec583b8b59 100644 --- a/Items/Dyes/SwirlingCosmicFlameDye.cs +++ b/Items/Dyes/SwirlingCosmicFlameDye.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +25,11 @@ namespace CalamityMod.Items.Dyes public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.DyeVat).Register(); + CreateRecipe(2). + AddIngredient(). + AddIngredient(). + AddTile(TileID.DyeVat). + Register(); } } } diff --git a/Items/Fishing/FishingRods/ChaoticSpreadRod.cs b/Items/Fishing/FishingRods/ChaoticSpreadRod.cs index a2e29f3d3b..89ccae58f9 100644 --- a/Items/Fishing/FishingRods/ChaoticSpreadRod.cs +++ b/Items/Fishing/FishingRods/ChaoticSpreadRod.cs @@ -46,7 +46,11 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.HotlineFishingHook).AddIngredient(ModContent.ItemType(), 8).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(). + AddIngredient(ItemID.HotlineFishingHook). + AddIngredient(8). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Fishing/FishingRods/EarlyBloomRod.cs b/Items/Fishing/FishingRods/EarlyBloomRod.cs index b14017a11e..755eff7735 100644 --- a/Items/Fishing/FishingRods/EarlyBloomRod.cs +++ b/Items/Fishing/FishingRods/EarlyBloomRod.cs @@ -46,7 +46,11 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.WoodFishingPole).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(). + AddIngredient(ItemID.WoodFishingPole). + AddIngredient(10). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Fishing/FishingRods/FeralDoubleRod.cs b/Items/Fishing/FishingRods/FeralDoubleRod.cs index 4c89356d64..d03943a829 100644 --- a/Items/Fishing/FishingRods/FeralDoubleRod.cs +++ b/Items/Fishing/FishingRods/FeralDoubleRod.cs @@ -45,7 +45,10 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Fishing/FishingRods/HeronRod.cs b/Items/Fishing/FishingRods/HeronRod.cs index 3fd6b08931..68731079a8 100644 --- a/Items/Fishing/FishingRods/HeronRod.cs +++ b/Items/Fishing/FishingRods/HeronRod.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +32,11 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 7).AddIngredient(ItemID.SunplateBlock, 5).AddTile(TileID.SkyMill).Register(); + CreateRecipe(). + AddIngredient(ModContent.ItemType(), 7). + AddIngredient(ItemID.SunplateBlock, 5). + AddTile(TileID.SkyMill). + Register(); } } } diff --git a/Items/Fishing/FishingRods/NavyFishingRod.cs b/Items/Fishing/FishingRods/NavyFishingRod.cs index 4661738364..c49b94f4ab 100644 --- a/Items/Fishing/FishingRods/NavyFishingRod.cs +++ b/Items/Fishing/FishingRods/NavyFishingRod.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; @@ -32,7 +32,11 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType(), 8).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(8). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Fishing/FishingRods/TheDevourerofCods.cs b/Items/Fishing/FishingRods/TheDevourerofCods.cs index ff0dc2a7a0..e0377de6fc 100644 --- a/Items/Fishing/FishingRods/TheDevourerofCods.cs +++ b/Items/Fishing/FishingRods/TheDevourerofCods.cs @@ -47,7 +47,10 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(). + AddIngredient(10). + AddTile(). + Register(); } } } diff --git a/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs b/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs index cce8b0355c..2e5c43fb66 100644 --- a/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs +++ b/Items/Fishing/FishingRods/VerstaltiteFishingRod.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +31,10 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 8).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(). + AddIngredient(8). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Fishing/FishingRods/WulfrumRod.cs b/Items/Fishing/FishingRods/WulfrumRod.cs index bef17aaa8c..8e306a88b5 100644 --- a/Items/Fishing/FishingRods/WulfrumRod.cs +++ b/Items/Fishing/FishingRods/WulfrumRod.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -30,7 +30,10 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 9).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(9). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/LabFinders/CyanSeekingMechanism.cs b/Items/LabFinders/CyanSeekingMechanism.cs index ab91e0092e..bb09b4a41f 100644 --- a/Items/LabFinders/CyanSeekingMechanism.cs +++ b/Items/LabFinders/CyanSeekingMechanism.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.LabFinders public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.WaterBucket).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.WaterBucket). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/LabFinders/GreenSeekingMechanism.cs b/Items/LabFinders/GreenSeekingMechanism.cs index a47f059848..62da97805e 100644 --- a/Items/LabFinders/GreenSeekingMechanism.cs +++ b/Items/LabFinders/GreenSeekingMechanism.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.LabFinders public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Vine, 3).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Vine, 3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/LabFinders/MysteriousMechanism.cs b/Items/LabFinders/MysteriousMechanism.cs index 770e69c185..295dcc207b 100644 --- a/Items/LabFinders/MysteriousMechanism.cs +++ b/Items/LabFinders/MysteriousMechanism.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Terraria.ID; using Terraria.ModLoader; @@ -21,7 +21,12 @@ namespace CalamityMod.Items.LabFinders public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ItemID.IronBar, 10).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(4). + AddIngredient(4). + AddIngredient(ItemID.IronBar, 10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/LabFinders/PurpleSeekingMechanism.cs b/Items/LabFinders/PurpleSeekingMechanism.cs index 09b6828c36..2c00416ef1 100644 --- a/Items/LabFinders/PurpleSeekingMechanism.cs +++ b/Items/LabFinders/PurpleSeekingMechanism.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.LabFinders public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Cloud, 20).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Cloud, 20). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/LabFinders/RedSeekingMechanism.cs b/Items/LabFinders/RedSeekingMechanism.cs index 220b41fa95..950a3a0509 100644 --- a/Items/LabFinders/RedSeekingMechanism.cs +++ b/Items/LabFinders/RedSeekingMechanism.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.LabFinders public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.HellstoneBar, 4).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.HellstoneBar, 4). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/LabFinders/YellowSeekingMechanism.cs b/Items/LabFinders/YellowSeekingMechanism.cs index 903ccc24c6..f6ffb8198c 100644 --- a/Items/LabFinders/YellowSeekingMechanism.cs +++ b/Items/LabFinders/YellowSeekingMechanism.cs @@ -1,4 +1,4 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.LabFinders public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.IceBlock, 50).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.IceBlock, 50). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Materials/AerialiteBar.cs b/Items/Materials/AerialiteBar.cs index b63b829649..3295982687 100644 --- a/Items/Materials/AerialiteBar.cs +++ b/Items/Materials/AerialiteBar.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using CalamityMod.Tiles; using Terraria; using Terraria.ID; @@ -31,7 +31,10 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddTile(TileID.Furnaces).Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.Furnaces). + Register(); } } } diff --git a/Items/Materials/AscendantSpiritEssence.cs b/Items/Materials/AscendantSpiritEssence.cs index b7fe8dccea..95bc932f77 100644 --- a/Items/Materials/AscendantSpiritEssence.cs +++ b/Items/Materials/AscendantSpiritEssence.cs @@ -49,7 +49,13 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType(), 2).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(). + AddIngredient(2). + AddIngredient(5). + AddIngredient(5). + AddIngredient(2). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Materials/AuricBar.cs b/Items/Materials/AuricBar.cs index b5df0dff39..df20978eda 100644 --- a/Items/Materials/AuricBar.cs +++ b/Items/Materials/AuricBar.cs @@ -68,7 +68,11 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(5).AddIngredient(ModContent.ItemType(), 60).AddIngredient(ModContent.ItemType()).AddTile(ModContent.TileType()).Register(); + CreateRecipe(5). + AddIngredient(60). + AddIngredient(). + AddTile(). + Register(); } } } diff --git a/Items/Materials/BarofLife.cs b/Items/Materials/BarofLife.cs index 58f49c09cf..496a5d0978 100644 --- a/Items/Materials/BarofLife.cs +++ b/Items/Materials/BarofLife.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,7 +22,12 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Materials/BloodstoneCore.cs b/Items/Materials/BloodstoneCore.cs index d6631d230e..e17fd1fc1e 100644 --- a/Items/Materials/BloodstoneCore.cs +++ b/Items/Materials/BloodstoneCore.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -23,7 +23,12 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AdamantiteForge).Register(); + CreateRecipe(2). + AddIngredient(5). + AddIngredient(). + AddIngredient(). + AddTile(TileID.AdamantiteForge). + Register(); } } } diff --git a/Items/Materials/CoreofCalamity.cs b/Items/Materials/CoreofCalamity.cs index 942b165b25..015ee76dcc 100644 --- a/Items/Materials/CoreofCalamity.cs +++ b/Items/Materials/CoreofCalamity.cs @@ -29,7 +29,13 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 3).AddIngredient(ModContent.ItemType(), 3).AddIngredient(ModContent.ItemType(), 3).AddIngredient(ModContent.ItemType()).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(). + AddIngredient(3). + AddIngredient(3). + AddIngredient(3). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Materials/CoreofChaos.cs b/Items/Materials/CoreofChaos.cs index d0b6dd57b9..6c8452e945 100644 --- a/Items/Materials/CoreofChaos.cs +++ b/Items/Materials/CoreofChaos.cs @@ -35,7 +35,11 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Ectoplasm).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(3). + AddIngredient(). + AddIngredient(ItemID.Ectoplasm). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Materials/CoreofCinder.cs b/Items/Materials/CoreofCinder.cs index 0643819f2c..f9b19ca70f 100644 --- a/Items/Materials/CoreofCinder.cs +++ b/Items/Materials/CoreofCinder.cs @@ -35,7 +35,11 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Ectoplasm).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(3). + AddIngredient(). + AddIngredient(ItemID.Ectoplasm). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Materials/CoreofEleum.cs b/Items/Materials/CoreofEleum.cs index f9f9618ce4..f5e23f49f8 100644 --- a/Items/Materials/CoreofEleum.cs +++ b/Items/Materials/CoreofEleum.cs @@ -35,7 +35,11 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Ectoplasm).AddTile(TileID.MythrilAnvil).Register(); + CreateRecipe(3). + AddIngredient(). + AddIngredient(ItemID.Ectoplasm). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Materials/CruptixBar.cs b/Items/Materials/CruptixBar.cs index e1d6edef5c..e42eec194b 100644 --- a/Items/Materials/CruptixBar.cs +++ b/Items/Materials/CruptixBar.cs @@ -50,7 +50,10 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.AdamantiteForge).Register(); + CreateRecipe(). + AddIngredient(5). + AddTile(TileID.AdamantiteForge). + Register(); } } } diff --git a/Items/Materials/DraedonBar.cs b/Items/Materials/DraedonBar.cs index 4f511161cf..4a4bf3a9dd 100644 --- a/Items/Materials/DraedonBar.cs +++ b/Items/Materials/DraedonBar.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using CalamityMod.Tiles; using Terraria; using Terraria.ID; @@ -31,7 +31,10 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.AdamantiteForge).Register(); + CreateRecipe(). + AddIngredient(5). + AddTile(TileID.AdamantiteForge). + Register(); } } } diff --git a/Items/Materials/GalacticaSingularity.cs b/Items/Materials/GalacticaSingularity.cs index 626946466b..ca8d58c3c2 100644 --- a/Items/Materials/GalacticaSingularity.cs +++ b/Items/Materials/GalacticaSingularity.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +25,13 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.FragmentSolar).AddIngredient(ItemID.FragmentVortex).AddIngredient(ItemID.FragmentStardust).AddIngredient(ItemID.FragmentNebula).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(). + AddIngredient(ItemID.FragmentSolar). + AddIngredient(ItemID.FragmentVortex). + AddIngredient(ItemID.FragmentStardust). + AddIngredient(ItemID.FragmentNebula). + AddTile(TileID.LunarCraftingStation). + Register(); } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/MeldiateBar.cs b/Items/Materials/MeldiateBar.cs index 18b288a4b9..3ba1a2f2d8 100644 --- a/Items/Materials/MeldiateBar.cs +++ b/Items/Materials/MeldiateBar.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,7 +22,11 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ModContent.ItemType(), 6).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(3). + AddIngredient(6). + AddIngredient(3). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Materials/MiracleMatter.cs b/Items/Materials/MiracleMatter.cs index f203e26f23..d526e4f673 100644 --- a/Items/Materials/MiracleMatter.cs +++ b/Items/Materials/MiracleMatter.cs @@ -80,7 +80,15 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType(), 1).AddIngredient(ModContent.ItemType(), 1).AddIngredient(ModContent.ItemType(), 1).AddIngredient(ModContent.ItemType(), 3).AddTile(ModContent.TileType()).Register(); + CreateRecipe(). + AddIngredient(5). + AddIngredient(5). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddIngredient(3). + AddTile(). + Register(); } } } diff --git a/Items/Materials/UeliaceBar.cs b/Items/Materials/UeliaceBar.cs index 3c95c52402..d377b74d83 100644 --- a/Items/Materials/UeliaceBar.cs +++ b/Items/Materials/UeliaceBar.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using CalamityMod.Tiles; using Terraria; using Terraria.ID; @@ -32,7 +32,10 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.AdamantiteForge).Register(); + CreateRecipe(). + AddIngredient(5). + AddTile(TileID.AdamantiteForge). + Register(); } } } diff --git a/Items/Materials/UnholyCore.cs b/Items/Materials/UnholyCore.cs index c3e5c281aa..5e541c7a8b 100644 --- a/Items/Materials/UnholyCore.cs +++ b/Items/Materials/UnholyCore.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -23,7 +23,11 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ItemID.Hellstone, 4).AddTile(TileID.Hellforge).Register(); + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Hellstone, 4). + AddTile(TileID.Hellforge). + Register(); } } } diff --git a/Items/Materials/VerstaltiteBar.cs b/Items/Materials/VerstaltiteBar.cs index beaa450a51..16f59d5fd0 100644 --- a/Items/Materials/VerstaltiteBar.cs +++ b/Items/Materials/VerstaltiteBar.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Placeables.Ores; using CalamityMod.Tiles; using Terraria; using Terraria.ID; @@ -31,7 +31,10 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddTile(TileID.AdamantiteForge).Register(); + CreateRecipe(). + AddIngredient(5). + AddTile(TileID.AdamantiteForge). + Register(); } } } diff --git a/Items/Materials/VictideBar.cs b/Items/Materials/VictideBar.cs index 21eec8f848..4ffa62cec7 100644 --- a/Items/Materials/VictideBar.cs +++ b/Items/Materials/VictideBar.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,7 +22,13 @@ namespace CalamityMod.Items.Materials public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Coral).AddIngredient(ItemID.Starfish).AddIngredient(ItemID.Seashell).AddTile(TileID.Furnaces).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Coral). + AddIngredient(ItemID.Starfish). + AddIngredient(ItemID.Seashell). + AddTile(TileID.Furnaces). + Register(); } } } diff --git a/Items/Mounts/GazeOfCrysthamyr.cs b/Items/Mounts/GazeOfCrysthamyr.cs index ff997dd9ee..7c9447607f 100644 --- a/Items/Mounts/GazeOfCrysthamyr.cs +++ b/Items/Mounts/GazeOfCrysthamyr.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; @@ -33,7 +33,13 @@ namespace CalamityMod.Items.Mounts public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.DD2PetDragon).AddIngredient(ItemID.SoulofNight, 100).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ModContent.ItemType(), 25).AddTile(ModContent.TileType()).Register(); + CreateRecipe(). + AddIngredient(ItemID.DD2PetDragon). + AddIngredient(ItemID.SoulofNight, 100). + AddIngredient(10). + AddIngredient(25). + AddTile(). + Register(); } } } diff --git a/Items/Mounts/Minecarts/DoGCart.cs b/Items/Mounts/Minecarts/DoGCart.cs index 2af9839d62..a41739e3ca 100644 --- a/Items/Mounts/Minecarts/DoGCart.cs +++ b/Items/Mounts/Minecarts/DoGCart.cs @@ -30,7 +30,12 @@ namespace CalamityMod.Items.Mounts.Minecarts public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Wire, 60).AddTile(ModContent.TileType()).Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(). + AddIngredient(ItemID.Wire, 60). + AddTile(). + Register(); } } } diff --git a/Items/NormalityRelocator.cs b/Items/NormalityRelocator.cs index a45708782d..dc26f2f217 100644 --- a/Items/NormalityRelocator.cs +++ b/Items/NormalityRelocator.cs @@ -49,13 +49,13 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.RodofDiscord) - .AddIngredient(5) - .AddIngredient(10) - .AddIngredient(ItemID.FragmentStardust, 30) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.RodofDiscord). + AddIngredient(5). + AddIngredient(10). + AddIngredient(ItemID.FragmentStardust, 30). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/PermanentBoosters/BloodOrange.cs b/Items/PermanentBoosters/BloodOrange.cs index 68ede70a2c..b13d1fa44c 100644 --- a/Items/PermanentBoosters/BloodOrange.cs +++ b/Items/PermanentBoosters/BloodOrange.cs @@ -55,15 +55,15 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.LifeFruit, 5) - .AddIngredient(ItemID.OrangeBloodroot) - .AddIngredient(10) - .AddIngredient(ItemID.SoulofMight, 5) - .AddIngredient(ItemID.SoulofSight, 5) - .AddIngredient(ItemID.SoulofFright, 5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.LifeFruit, 5). + AddIngredient(ItemID.OrangeBloodroot). + AddIngredient(10). + AddIngredient(ItemID.SoulofMight, 5). + AddIngredient(ItemID.SoulofSight, 5). + AddIngredient(ItemID.SoulofFright, 5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/PermanentBoosters/CometShard.cs b/Items/PermanentBoosters/CometShard.cs index a0e6d9b4a5..38f2ff475a 100644 --- a/Items/PermanentBoosters/CometShard.cs +++ b/Items/PermanentBoosters/CometShard.cs @@ -53,12 +53,12 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.MeteoriteBar, 10) - .AddIngredient(ItemID.FallenStar, 20) - .AddIngredient(150) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.MeteoriteBar, 10). + AddIngredient(ItemID.FallenStar, 20). + AddIngredient(150). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index cb52f823ef..f68316cc9c 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -57,14 +57,14 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.LifeFruit, 5) - .AddIngredient(ItemID.SkyBlueFlower) - .AddIngredient(ItemID.FragmentSolar, 15) - .AddIngredient(2) - .AddIngredient() - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(ItemID.LifeFruit, 5). + AddIngredient(ItemID.SkyBlueFlower). + AddIngredient(ItemID.FragmentSolar, 15). + AddIngredient(2). + AddIngredient(). + AddTile(). + Register(); } } } diff --git a/Items/PermanentBoosters/Elderberry.cs b/Items/PermanentBoosters/Elderberry.cs index b9ff5b3454..a161a239d6 100644 --- a/Items/PermanentBoosters/Elderberry.cs +++ b/Items/PermanentBoosters/Elderberry.cs @@ -56,14 +56,14 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.LifeFruit, 5) - .AddIngredient(ItemID.BlueBerries) - .AddIngredient(10) - .AddIngredient(10) - .AddIngredient(20) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.LifeFruit, 5). + AddIngredient(ItemID.BlueBerries). + AddIngredient(10). + AddIngredient(10). + AddIngredient(20). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/PermanentBoosters/EtherealCore.cs b/Items/PermanentBoosters/EtherealCore.cs index 060b6b35f9..1a8a8b6362 100644 --- a/Items/PermanentBoosters/EtherealCore.cs +++ b/Items/PermanentBoosters/EtherealCore.cs @@ -53,13 +53,13 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.MeteoriteBar, 25) - .AddIngredient(25) - .AddIngredient(ItemID.FragmentNebula, 20) - .AddIngredient(ItemID.FallenStar, 50) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.MeteoriteBar, 25). + AddIngredient(25). + AddIngredient(ItemID.FragmentNebula, 20). + AddIngredient(ItemID.FallenStar, 50). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/PermanentBoosters/MiracleFruit.cs b/Items/PermanentBoosters/MiracleFruit.cs index 4688b842bf..54b62980d7 100644 --- a/Items/PermanentBoosters/MiracleFruit.cs +++ b/Items/PermanentBoosters/MiracleFruit.cs @@ -55,14 +55,14 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.LifeFruit, 5) - .AddIngredient(ItemID.TealMushroom) - .AddIngredient(5) - .AddIngredient(5) - .AddIngredient(10) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.LifeFruit, 5). + AddIngredient(ItemID.TealMushroom). + AddIngredient(5). + AddIngredient(5). + AddIngredient(10). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index 4bf4315be0..7b5f404035 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -54,11 +54,11 @@ namespace CalamityMod.Items.PermanentBoosters public override void AddRecipes() { - CreateRecipe() - .AddIngredient(10) - .AddIngredient(100) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(10). + AddIngredient(100). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Pets/PrimroseKeepsake.cs b/Items/Pets/PrimroseKeepsake.cs index cf6172679e..e61106736d 100644 --- a/Items/Pets/PrimroseKeepsake.cs +++ b/Items/Pets/PrimroseKeepsake.cs @@ -53,7 +53,12 @@ namespace CalamityMod.Items.Pets public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.LovePotion).AddTile(TileID.TinkerersWorkbench).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(). + AddIngredient(ItemID.LovePotion). + AddTile(TileID.TinkerersWorkbench). + Register(); } } } diff --git a/Items/Pets/RotomRemote.cs b/Items/Pets/RotomRemote.cs index 0d2526311e..322325b1b6 100644 --- a/Items/Pets/RotomRemote.cs +++ b/Items/Pets/RotomRemote.cs @@ -53,7 +53,12 @@ namespace CalamityMod.Items.Pets public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 5).AddRecipeGroup("AnyGoldBar", 8).AddIngredient(ModContent.ItemType()).AddTile(TileID.Anvils).Register(); + CreateRecipe(). + AddIngredient(5). + AddRecipeGroup("AnyGoldBar", 8). + AddIngredient(). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Pets/SparksSummon.cs b/Items/Pets/SparksSummon.cs index b89cb17c3a..79bf0d0841 100644 --- a/Items/Pets/SparksSummon.cs +++ b/Items/Pets/SparksSummon.cs @@ -38,7 +38,18 @@ namespace CalamityMod.Items.Pets public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.GoldButterfly).AddIngredient(ItemID.MonarchButterfly).AddIngredient(ItemID.PurpleEmperorButterfly).AddIngredient(ItemID.RedAdmiralButterfly).AddIngredient(ItemID.UlyssesButterfly).AddIngredient(ItemID.SulphurButterfly).AddIngredient(ItemID.TreeNymphButterfly).AddIngredient(ItemID.ZebraSwallowtailButterfly).AddIngredient(ItemID.JuliaButterfly).AddTile(TileID.CrystalBall).Register(); + CreateRecipe(). //Oh my god this recipe is terrible no wonder no one knows this item exists + AddIngredient(ItemID.GoldButterfly). + AddIngredient(ItemID.MonarchButterfly). + AddIngredient(ItemID.PurpleEmperorButterfly). + AddIngredient(ItemID.RedAdmiralButterfly). + AddIngredient(ItemID.UlyssesButterfly). + AddIngredient(ItemID.SulphurButterfly). + AddIngredient(ItemID.TreeNymphButterfly). + AddIngredient(ItemID.ZebraSwallowtailButterfly). + AddIngredient(ItemID.JuliaButterfly). + AddTile(TileID.CrystalBall). + Register(); } } } diff --git a/Items/Potions/Alcohol/FabsolsVodka.cs b/Items/Potions/Alcohol/FabsolsVodka.cs index 5f45661a75..9a858f9fb4 100644 --- a/Items/Potions/Alcohol/FabsolsVodka.cs +++ b/Items/Potions/Alcohol/FabsolsVodka.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Alcohol; +using CalamityMod.Buffs.Alcohol; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -35,8 +35,20 @@ namespace CalamityMod.Items.Potions.Alcohol public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.Ale).AddIngredient(ItemID.PixieDust, 10).AddIngredient(ItemID.CrystalShard, 5).AddIngredient(ItemID.UnicornHorn).AddTile(TileID.Kegs).Register(); - CreateRecipe(1).AddIngredient(ItemID.Ale).AddIngredient(ModContent.ItemType(), 40).AddIngredient(ItemID.CrystalShard).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.Ale). + AddIngredient(ItemID.PixieDust, 10). + AddIngredient(ItemID.CrystalShard, 5). + AddIngredient(ItemID.UnicornHorn). + AddTile(TileID.Kegs). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.Ale). + AddIngredient(40). + AddIngredient(ItemID.CrystalShard). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/AnechoicCoating.cs b/Items/Potions/AnechoicCoating.cs index bd01fd5be9..361d3318ac 100644 --- a/Items/Potions/AnechoicCoating.cs +++ b/Items/Potions/AnechoicCoating.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(10). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index fe2eb36618..814c8d88ea 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.DataStructures; @@ -48,8 +48,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(4).AddIngredient(ItemID.BottledWater, 4).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(8).AddIngredient(ItemID.BottledWater, 4).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(4). + AddIngredient(ItemID.BottledWater, 4). + AddIngredient(4). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(8). + AddIngredient(ItemID.BottledWater, 4). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/Baguette.cs b/Items/Potions/Baguette.cs index 67b71ec2f3..1bb5c8cb2f 100644 --- a/Items/Potions/Baguette.cs +++ b/Items/Potions/Baguette.cs @@ -1,4 +1,4 @@ -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Buffs.Potions; @@ -44,7 +44,10 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.Hay, 10).AddTile(TileID.Furnaces).Register(); + CreateRecipe(). + AddIngredient(ItemID.Hay, 10). + AddTile(TileID.Furnaces). + Register(); } } } diff --git a/Items/Potions/BoundingPotion.cs b/Items/Potions/BoundingPotion.cs index 913952438e..26ce889cd9 100644 --- a/Items/Potions/BoundingPotion.cs +++ b/Items/Potions/BoundingPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,18 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ItemID.BottledWater).AddIngredient(ItemID.Frog).AddIngredient(ItemID.Vine).AddTile(TileID.Bottles).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(3). + AddIngredient(ItemID.BottledWater). + AddIngredient(ItemID.Frog). + AddIngredient(ItemID.Vine). + AddTile(TileID.Bottles). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/CadencePotion.cs b/Items/Potions/CadencePotion.cs index 55cb34e7ca..5398b3cb24 100644 --- a/Items/Potions/CadencePotion.cs +++ b/Items/Potions/CadencePotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -35,8 +35,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.LovePotion).AddIngredient(ItemID.HeartreachPotion).AddIngredient(ItemID.LifeforcePotion).AddIngredient(ItemID.RegenerationPotion).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 40).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.LovePotion). + AddIngredient(ItemID.HeartreachPotion). + AddIngredient(ItemID.LifeforcePotion). + AddIngredient(ItemID.RegenerationPotion). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(40). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/CalamitasBrew.cs b/Items/Potions/CalamitasBrew.cs index b39a055c45..b8493640d5 100644 --- a/Items/Potions/CalamitasBrew.cs +++ b/Items/Potions/CalamitasBrew.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Materials; using Terraria; @@ -35,8 +35,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(3).AddIngredient(ItemID.BottledWater, 3).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.ImbuingStation).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddIngredient(ModContent.ItemType()).AddTile(TileID.ImbuingStation).Register(); + CreateRecipe(3). + AddIngredient(ItemID.BottledWater, 3). + AddIngredient(). + AddIngredient(3). + AddTile(TileID.ImbuingStation). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddIngredient(). + AddTile(TileID.ImbuingStation). + Register(); } } } diff --git a/Items/Potions/CalciumPotion.cs b/Items/Potions/CalciumPotion.cs index 515f9c8390..787c7b831a 100644 --- a/Items/Potions/CalciumPotion.cs +++ b/Items/Potions/CalciumPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,17 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType()).AddTile(TileID.Bottles).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(). + AddTile(TileID.Bottles). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(10). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/CeaselessHungerPotion.cs b/Items/Potions/CeaselessHungerPotion.cs index 84230b3b36..ec648ee5a4 100644 --- a/Items/Potions/CeaselessHungerPotion.cs +++ b/Items/Potions/CeaselessHungerPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -34,8 +34,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(4).AddIngredient(ItemID.BottledWater, 4).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(4).AddIngredient(ItemID.BottledWater, 4).AddIngredient(ModContent.ItemType(), 20).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(4). + AddIngredient(ItemID.BottledWater, 4). + AddIngredient(). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(4). + AddIngredient(ItemID.BottledWater, 4). + AddIngredient(20). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/CrumblingPotion.cs b/Items/Potions/CrumblingPotion.cs index 5e03db10fc..75e757d4bd 100644 --- a/Items/Potions/CrumblingPotion.cs +++ b/Items/Potions/CrumblingPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(5).AddIngredient(ItemID.BottledWater, 5).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(5). + AddIngredient(ItemID.BottledWater, 5). + AddIngredient(). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index a004e85c82..ee90e2afdf 100644 --- a/Items/Potions/DraconicElixir.cs +++ b/Items/Potions/DraconicElixir.cs @@ -56,8 +56,21 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Daybloom).AddIngredient(ItemID.Moonglow).AddIngredient(ItemID.Fireblossom).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 50).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(). + AddIngredient(ItemID.Daybloom). + AddIngredient(ItemID.Moonglow). + AddIngredient(ItemID.Fireblossom). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(50). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/GravityNormalizerPotion.cs b/Items/Potions/GravityNormalizerPotion.cs index cb043470e3..d18f521318 100644 --- a/Items/Potions/GravityNormalizerPotion.cs +++ b/Items/Potions/GravityNormalizerPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Items.Fishing.AstralCatches; using Terraria; @@ -34,8 +34,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.GravitationPotion).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.GravitationPotion). + AddIngredient(). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(10). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/HolyWrathPotion.cs b/Items/Potions/HolyWrathPotion.cs index e1258ac960..2592fa4623 100644 --- a/Items/Potions/HolyWrathPotion.cs +++ b/Items/Potions/HolyWrathPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -34,8 +34,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.WrathPotion).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 40).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.WrathPotion). + AddIngredient(). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(40). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/OmegaHealingPotion.cs b/Items/Potions/OmegaHealingPotion.cs index db967a439b..781191b28c 100644 --- a/Items/Potions/OmegaHealingPotion.cs +++ b/Items/Potions/OmegaHealingPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -33,7 +33,11 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType(), 10).AddTile(ModContent.TileType()).Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(10). + AddTile(). + Register(); } } } diff --git a/Items/Potions/PenumbraPotion.cs b/Items/Potions/PenumbraPotion.cs index 12b6dbe613..bd069316fe 100644 --- a/Items/Potions/PenumbraPotion.cs +++ b/Items/Potions/PenumbraPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -35,8 +35,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 3).AddIngredient(ItemID.LunarTabletFragment).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 30).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(3). + AddIngredient(ItemID.LunarTabletFragment). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(30). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/PhotosynthesisPotion.cs b/Items/Potions/PhotosynthesisPotion.cs index ad8cf1487f..0f781e3aa5 100644 --- a/Items/Potions/PhotosynthesisPotion.cs +++ b/Items/Potions/PhotosynthesisPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,20 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 40).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(40). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/PotionofOmniscience.cs b/Items/Potions/PotionofOmniscience.cs index 0238b87ba1..76b6ef4535 100644 --- a/Items/Potions/PotionofOmniscience.cs +++ b/Items/Potions/PotionofOmniscience.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -34,8 +34,18 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.HunterPotion).AddIngredient(ItemID.SpelunkerPotion).AddIngredient(ItemID.TrapsightPotion).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.HunterPotion). + AddIngredient(ItemID.SpelunkerPotion). + AddIngredient(ItemID.TrapsightPotion). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/ProfanedRagePotion.cs b/Items/Potions/ProfanedRagePotion.cs index 86c07b9f75..32d979dc5f 100644 --- a/Items/Potions/ProfanedRagePotion.cs +++ b/Items/Potions/ProfanedRagePotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -34,8 +34,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.RagePotion).AddIngredient(ModContent.ItemType()).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 40).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.RagePotion). + AddIngredient(). + AddIngrediente(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(40). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/RevivifyPotion.cs b/Items/Potions/RevivifyPotion.cs index 9e353d301a..9782f0f98b 100644 --- a/Items/Potions/RevivifyPotion.cs +++ b/Items/Potions/RevivifyPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Items.Fishing.SunkenSeaCatches; using Terraria; @@ -34,8 +34,20 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(5).AddIngredient(ItemID.HolyWater, 5).AddIngredient(ModContent.ItemType(), 20).AddIngredient(ItemID.CrystalShard, 5).AddIngredient(ModContent.ItemType(), 3).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(5).AddIngredient(ItemID.HolyWater, 5).AddIngredient(ModContent.ItemType(), 100).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(5). + AddIngredient(ItemID.HolyWater, 5). + AddIngredient(20). + AddIngredient(ItemID.CrystalShard, 5). + AddIngredient(3). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(5). + AddIngredient(ItemID.HolyWater, 5). + AddIngredient(100). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/ShadowPotion.cs b/Items/Potions/ShadowPotion.cs index a53924e59d..7af33a7f96 100644 --- a/Items/Potions/ShadowPotion.cs +++ b/Items/Potions/ShadowPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Materials; using Terraria; @@ -37,8 +37,17 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ItemID.InvisibilityPotion).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(2). + AddIngredient(ItemID.InvisibilityPotion). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/ShatteringPotion.cs b/Items/Potions/ShatteringPotion.cs index 857728435b..c936c849ff 100644 --- a/Items/Potions/ShatteringPotion.cs +++ b/Items/Potions/ShatteringPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -35,8 +35,18 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ItemID.BeetleHusk).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 30).AddIngredient(ItemID.BeetleHusk).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(2). + AddIngredient(ItemID.BeetleHusk). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(30). + AddIngredient(ItemID.BeetleHusk). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/SoaringPotion.cs b/Items/Potions/SoaringPotion.cs index 17149fd0f6..d2088b7b78 100644 --- a/Items/Potions/SoaringPotion.cs +++ b/Items/Potions/SoaringPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Fishing.SunkenSeaCatches; using CalamityMod.Items.Materials; using Terraria; @@ -36,8 +36,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ItemID.SoulofFlight).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 30).AddIngredient(ItemID.SoulofFlight).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(ItemID.SoulofFlight). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(30). + AddIngredient(ItemID.SoulofFlight). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/SulphurskinPotion.cs b/Items/Potions/SulphurskinPotion.cs index 71ee91af0f..2b34880346 100644 --- a/Items/Potions/SulphurskinPotion.cs +++ b/Items/Potions/SulphurskinPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Weapons.Rogue; @@ -35,8 +35,18 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 15).AddIngredient(ModContent.ItemType(), 15).AddTile(TileID.Bottles).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(15). + AddIngredient(15). + AddTile(TileID.Bottles). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(10). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/SunkenStew.cs b/Items/Potions/SunkenStew.cs index 09658f7986..0bf0188fcc 100644 --- a/Items/Potions/SunkenStew.cs +++ b/Items/Potions/SunkenStew.cs @@ -65,8 +65,21 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(2).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Honeyfin).AddIngredient(ItemID.Bowl, 2).AddTile(TileID.CookingPots).Register(); - CreateRecipe(2).AddIngredient(ModContent.ItemType(), 10).AddIngredient(ModContent.ItemType()).AddIngredient(ItemID.Honeyfin).AddIngredient(ItemID.Bowl, 2).AddTile(TileID.CookingPots).Register(); + CreateRecipe(2). + AddIngredient(10). + AddIngredient(). + AddIngredient(ItemID.Honeyfin). + AddIngredient(ItemID.Bowl, 2). + AddTile(TileID.CookingPots). + Register(); + + CreateRecipe(2). + AddIngredient(10). + AddIngredient(). + AddIngredient(ItemID.Honeyfin). + AddIngredient(ItemID.Bowl, 2). + AddTile(TileID.CookingPots). + Register(); } } } diff --git a/Items/Potions/SupremeHealingPotion.cs b/Items/Potions/SupremeHealingPotion.cs index aca391854b..fec746c770 100644 --- a/Items/Potions/SupremeHealingPotion.cs +++ b/Items/Potions/SupremeHealingPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +31,11 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.SuperHealingPotion).AddIngredient(ModContent.ItemType()).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(). + AddIngredient(ItemID.SuperHealingPotion). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Potions/SupremeManaPotion.cs b/Items/Potions/SupremeManaPotion.cs index f483244cdf..fc79b562f0 100644 --- a/Items/Potions/SupremeManaPotion.cs +++ b/Items/Potions/SupremeManaPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -30,7 +30,11 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.SuperManaPotion).AddIngredient(ModContent.ItemType()).AddTile(TileID.LunarCraftingStation).Register(); + CreateRecipe(). + AddIngredient(ItemID.SuperManaPotion). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Potions/TeslaPotion.cs b/Items/Potions/TeslaPotion.cs index dc602514f8..2946f50d78 100644 --- a/Items/Potions/TeslaPotion.cs +++ b/Items/Potions/TeslaPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Ores; @@ -37,8 +37,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(5).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ModContent.ItemType(), 5).AddIngredient(ModContent.ItemType()).AddTile(TileID.Bottles).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 10).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(5). + AddIngredient(ItemID.BottledWater). + AddIngredient(2). + AddIngredient(5). + AddIngredient(). + AddTile(TileID.Bottles). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(10). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/TitanScalePotion.cs b/Items/Potions/TitanScalePotion.cs index 61d4c44c5c..84af27a73c 100644 --- a/Items/Potions/TitanScalePotion.cs +++ b/Items/Potions/TitanScalePotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Items.Fishing.SunkenSeaCatches; using Terraria; @@ -35,8 +35,19 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(4).AddIngredient(ItemID.TitanPotion, 4).AddIngredient(ItemID.BeetleHusk).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(4).AddIngredient(ItemID.BottledWater, 4).AddIngredient(ModContent.ItemType(), 40).AddIngredient(ItemID.BeetleHusk).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(4). + AddIngredient(ItemID.TitanPotion, 4). + AddIngredient(ItemID.BeetleHusk). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(4). + AddIngredient(ItemID.BottledWater, 4). + AddIngredient(40). + AddIngredient(ItemID.BeetleHusk). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/TriumphPotion.cs b/Items/Potions/TriumphPotion.cs index c79dae2844..808c7eb599 100644 --- a/Items/Potions/TriumphPotion.cs +++ b/Items/Potions/TriumphPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,17 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 3).AddTile(TileID.Bottles).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 30).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(3). + AddTile(TileID.Bottles). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(30). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/YharimsStimulants.cs b/Items/Potions/YharimsStimulants.cs index bb9987285c..a91f2c060f 100644 --- a/Items/Potions/YharimsStimulants.cs +++ b/Items/Potions/YharimsStimulants.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,20 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddRecipeGroup("AnyFood").AddIngredient(ItemID.EndurancePotion).AddIngredient(ItemID.IronskinPotion).AddIngredient(ItemID.SwiftnessPotion).AddIngredient(ItemID.TitanPotion).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 50).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddRecipeGroup("AnyFood"). + AddIngredient(ItemID.EndurancePotion). + AddIngredient(ItemID.IronskinPotion). + AddIngredient(ItemID.SwiftnessPotion). + AddIngredient(ItemID.TitanPotion). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(50). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/ZenPotion.cs b/Items/Potions/ZenPotion.cs index fba1f3f064..1da325754c 100644 --- a/Items/Potions/ZenPotion.cs +++ b/Items/Potions/ZenPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,21 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ItemID.PinkGel).AddIngredient(ItemID.Daybloom).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddIngredient(ModContent.ItemType(), 2).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(2). + AddIngredient(2). + AddIngredient(ItemID.PinkGel). + AddIngredient(ItemID.Daybloom). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddIngredient(2). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/Potions/ZergPotion.cs b/Items/Potions/ZergPotion.cs index dd30717c8e..8be197c17d 100644 --- a/Items/Potions/ZergPotion.cs +++ b/Items/Potions/ZergPotion.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -33,8 +33,20 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 2).AddIngredient(ModContent.ItemType(), 4).AddIngredient(ModContent.ItemType()).AddTile(TileID.AlchemyTable).Register(); - CreateRecipe(1).AddIngredient(ItemID.BottledWater).AddIngredient(ModContent.ItemType(), 20).AddIngredient(ModContent.ItemType(), 2).AddTile(TileID.AlchemyTable).Register(); + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(2). + AddIngredient(4). + AddIngredient(). + AddTile(TileID.AlchemyTable). + Register(); + + CreateRecipe(). + AddIngredient(ItemID.BottledWater). + AddIngredient(20). + AddIngredient(2). + AddTile(TileID.AlchemyTable). + Register(); } } } diff --git a/Items/SirenproofEarMuffs.cs b/Items/SirenproofEarMuffs.cs index 28c6e2a2da..e65520643f 100644 --- a/Items/SirenproofEarMuffs.cs +++ b/Items/SirenproofEarMuffs.cs @@ -28,11 +28,11 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(2) - .AddIngredient(ItemID.Silk, 5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(2). + AddIngredient(ItemID.Silk, 5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/SuperDummy.cs b/Items/SuperDummy.cs index a4346c42a3..285e8379c4 100644 --- a/Items/SuperDummy.cs +++ b/Items/SuperDummy.cs @@ -97,9 +97,9 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.TargetDummy) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.TargetDummy). + Register(); } } } diff --git a/Items/Tools/AbyssalWarhammer.cs b/Items/Tools/AbyssalWarhammer.cs index bb5f74ccef..36f2b09759 100644 --- a/Items/Tools/AbyssalWarhammer.cs +++ b/Items/Tools/AbyssalWarhammer.cs @@ -35,10 +35,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/AerialHamaxe.cs b/Items/Tools/AerialHamaxe.cs index f5a35aab1a..f2e1f4cf81 100644 --- a/Items/Tools/AerialHamaxe.cs +++ b/Items/Tools/AerialHamaxe.cs @@ -36,11 +36,11 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(6) - .AddIngredient(ItemID.SunplateBlock, 5) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(6). + AddIngredient(ItemID.SunplateBlock, 5). + AddTile(TileID.SkyMill). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/AstralHamaxe.cs b/Items/Tools/AstralHamaxe.cs index da4dff9636..0623557cdf 100644 --- a/Items/Tools/AstralHamaxe.cs +++ b/Items/Tools/AstralHamaxe.cs @@ -54,10 +54,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(8) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(8). + AddTile(TileID.LunarCraftingStation). + Register(); } } } diff --git a/Items/Tools/AstralPickaxe.cs b/Items/Tools/AstralPickaxe.cs index d5b6898a2d..c69ec10d1e 100644 --- a/Items/Tools/AstralPickaxe.cs +++ b/Items/Tools/AstralPickaxe.cs @@ -39,10 +39,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddTile(TileID.LunarCraftingStation). + Register(); } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Tools/BeastialPickaxe.cs b/Items/Tools/BeastialPickaxe.cs index c0a3be9e0e..1d8590ff36 100644 --- a/Items/Tools/BeastialPickaxe.cs +++ b/Items/Tools/BeastialPickaxe.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/BerserkerWaraxe.cs b/Items/Tools/BerserkerWaraxe.cs index 1bf9f8471c..647087feeb 100644 --- a/Items/Tools/BerserkerWaraxe.cs +++ b/Items/Tools/BerserkerWaraxe.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(9) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(9). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 1115cd6241..3f4701ce25 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -37,10 +37,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddTile(TileID.LunarCraftingStation). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/ChaoswarpedSlashaxe.cs b/Items/Tools/ChaoswarpedSlashaxe.cs index 739b464067..7915ca952b 100644 --- a/Items/Tools/ChaoswarpedSlashaxe.cs +++ b/Items/Tools/ChaoswarpedSlashaxe.cs @@ -35,10 +35,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(9) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(9). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/ClimateChange/AridArtifact.cs b/Items/Tools/ClimateChange/AridArtifact.cs index c5cea17f5e..cffaa27b68 100644 --- a/Items/Tools/ClimateChange/AridArtifact.cs +++ b/Items/Tools/ClimateChange/AridArtifact.cs @@ -43,12 +43,12 @@ namespace CalamityMod.Items.Tools.ClimateChange public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.SandBlock, 50) - .AddRecipeGroup("AnyAdamantiteBar", 10) - .AddIngredient(ItemID.AncientCloth, 5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SandBlock, 50). + AddRecipeGroup("AnyAdamantiteBar", 10). + AddIngredient(ItemID.AncientCloth, 5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Tools/ClimateChange/BloodIdol.cs b/Items/Tools/ClimateChange/BloodIdol.cs index 311dfbc83e..1f57d175f9 100644 --- a/Items/Tools/ClimateChange/BloodIdol.cs +++ b/Items/Tools/ClimateChange/BloodIdol.cs @@ -39,13 +39,13 @@ namespace CalamityMod.Items.Tools.ClimateChange public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("EvilPowder", 20) - .AddIngredient(ItemID.SoulofNight, 20) - .AddIngredient(10) - .AddIngredient(5) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddRecipeGroup("EvilPowder", 20). + AddIngredient(ItemID.SoulofNight, 20). + AddIngredient(10). + AddIngredient(5). + AddTile(TileID.MythrilAnvil). + Register(); } } } diff --git a/Items/Tools/ClimateChange/Cosmolight.cs b/Items/Tools/ClimateChange/Cosmolight.cs index 7710b96a4c..5442b965e1 100644 --- a/Items/Tools/ClimateChange/Cosmolight.cs +++ b/Items/Tools/ClimateChange/Cosmolight.cs @@ -53,12 +53,12 @@ namespace CalamityMod.Items.Tools.ClimateChange public override void AddRecipes() { CreateRecipe() - .AddIngredient(ItemID.FallenStar, 10) - .AddIngredient(ItemID.SoulofLight, 7) - .AddIngredient(ItemID.SoulofNight, 7) - .AddIngredient(5) - .AddTile(TileID.Anvils) - .Register(); + AddIngredient(ItemID.FallenStar, 10). + AddIngredient(ItemID.SoulofLight, 7). + AddIngredient(ItemID.SoulofNight, 7). + AddIngredient(5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index 2c54490990..ad65be4a37 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -118,12 +118,12 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("LunarPickaxe") - .AddIngredient() - .AddIngredient(5) - .AddTile() - .Register(); + CreateRecipe(). + AddRecipeGroup("LunarPickaxe"). + AddIngredient(). + AddIngredient(5). + AddTile(). + Register(); } } } diff --git a/Items/Tools/FellerofEvergreens.cs b/Items/Tools/FellerofEvergreens.cs index 484d5137ee..13e6424737 100644 --- a/Items/Tools/FellerofEvergreens.cs +++ b/Items/Tools/FellerofEvergreens.cs @@ -33,19 +33,19 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.TungstenAxe) - .AddIngredient(ItemID.TungstenBar, 10) - .AddIngredient(ItemID.Wood, 15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.TungstenAxe). + AddIngredient(ItemID.TungstenBar, 10). + AddIngredient(ItemID.Wood, 15). + AddTile(TileID.Anvils). + Register(); - CreateRecipe() - .AddIngredient(ItemID.SilverAxe) - .AddIngredient(ItemID.SilverBar, 10) - .AddIngredient(ItemID.Wood, 15) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.SilverAxe). + AddIngredient(ItemID.SilverBar, 10). + AddIngredient(ItemID.Wood, 15). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/FlamebeakHampick.cs b/Items/Tools/FlamebeakHampick.cs index 053e2faab2..c6b24ba336 100644 --- a/Items/Tools/FlamebeakHampick.cs +++ b/Items/Tools/FlamebeakHampick.cs @@ -62,10 +62,10 @@ Right click to use as a hammer"); public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/Gelpick.cs b/Items/Tools/Gelpick.cs index 60d1e77850..12540f1a05 100644 --- a/Items/Tools/Gelpick.cs +++ b/Items/Tools/Gelpick.cs @@ -36,12 +36,12 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(15) - .AddIngredient(ItemID.Gel, 30) - .AddIngredient(ItemID.HellstoneBar, 5) - .AddTile() - .Register(); + CreateRecipe(). + AddIngredient(15). + AddIngredient(ItemID.Gel, 30). + AddIngredient(ItemID.HellstoneBar, 5). + AddTile(). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index b3315b6664..0a6f626587 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -60,14 +60,14 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddRecipeGroup("LunarHamaxe") - .AddIngredient(10) - .AddIngredient(5) - .AddIngredient(5) - .AddTile(TileID.LunarCraftingStation) - .Register(); + CreateRecipe(). + AddIngredient(). + AddRecipeGroup("LunarHamaxe"). + AddIngredient(10). + AddIngredient(5). + AddIngredient(5). + AddTile(TileID.LunarCraftingStation). + Register(); } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Tools/GreatbayPickaxe.cs b/Items/Tools/GreatbayPickaxe.cs index 8059681cfb..a986a8a7ed 100644 --- a/Items/Tools/GreatbayPickaxe.cs +++ b/Items/Tools/GreatbayPickaxe.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(3) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(3). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/InfernaCutter.cs b/Items/Tools/InfernaCutter.cs index ae669ae3e8..e9f01d4758 100644 --- a/Items/Tools/InfernaCutter.cs +++ b/Items/Tools/InfernaCutter.cs @@ -47,12 +47,12 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.SoulofFright, 8) - .AddIngredient(3) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.SoulofFright, 8). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/MarniteObliterator.cs b/Items/Tools/MarniteObliterator.cs index d5195360dc..b7f4a54557 100644 --- a/Items/Tools/MarniteObliterator.cs +++ b/Items/Tools/MarniteObliterator.cs @@ -37,12 +37,12 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddRecipeGroup("AnyGoldBar", 3) - .AddIngredient(ItemID.Granite, 5) - .AddIngredient(ItemID.Marble, 5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddRecipeGroup("AnyGoldBar", 3). + AddIngredient(ItemID.Granite, 5). + AddIngredient(ItemID.Marble, 5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/PurityAxe.cs b/Items/Tools/PurityAxe.cs index 783a81cb00..04a1893526 100644 --- a/Items/Tools/PurityAxe.cs +++ b/Items/Tools/PurityAxe.cs @@ -74,13 +74,13 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient() - .AddIngredient(ItemID.PurificationPowder, 20) - .AddIngredient(ItemID.PixieDust, 20) - .AddIngredient(ItemID.CrystalShard, 10) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.PurificationPowder, 20). + AddIngredient(ItemID.PixieDust, 20). + AddIngredient(ItemID.CrystalShard, 10). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/ReefclawHamaxe.cs b/Items/Tools/ReefclawHamaxe.cs index 478f92cdf6..13f93fba74 100644 --- a/Items/Tools/ReefclawHamaxe.cs +++ b/Items/Tools/ReefclawHamaxe.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(2) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(2). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/ShardlightPickaxe.cs b/Items/Tools/ShardlightPickaxe.cs index 784dbe3b66..7d2ceecd8a 100644 --- a/Items/Tools/ShardlightPickaxe.cs +++ b/Items/Tools/ShardlightPickaxe.cs @@ -35,10 +35,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddTile(TileID.MythrilAnvil) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddTile(TileID.MythrilAnvil). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/SkyfringePickaxe.cs b/Items/Tools/SkyfringePickaxe.cs index 7214ff8eeb..85cfc79e8c 100644 --- a/Items/Tools/SkyfringePickaxe.cs +++ b/Items/Tools/SkyfringePickaxe.cs @@ -36,11 +36,11 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(7) - .AddIngredient(ItemID.SunplateBlock, 3) - .AddTile(TileID.SkyMill) - .Register(); + CreateRecipe(). + AddIngredient(7). + AddIngredient(ItemID.SunplateBlock, 3). + AddTile(TileID.SkyMill). + Register(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Tools/WulfrumAxe.cs b/Items/Tools/WulfrumAxe.cs index 059c18e759..ead7793b45 100644 --- a/Items/Tools/WulfrumAxe.cs +++ b/Items/Tools/WulfrumAxe.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(14) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(14). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/WulfrumHammer.cs b/Items/Tools/WulfrumHammer.cs index 2c0a08fdbe..923b384d92 100644 --- a/Items/Tools/WulfrumHammer.cs +++ b/Items/Tools/WulfrumHammer.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(16) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(16). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/Tools/WulfrumPickaxe.cs b/Items/Tools/WulfrumPickaxe.cs index 41f2a9420f..2cf3ddf466 100644 --- a/Items/Tools/WulfrumPickaxe.cs +++ b/Items/Tools/WulfrumPickaxe.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Tools public override void AddRecipes() { - CreateRecipe() - .AddIngredient(12) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(12). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Items/VoodooDemonVoodooDoll.cs b/Items/VoodooDemonVoodooDoll.cs index f6883da861..b1a8494df6 100644 --- a/Items/VoodooDemonVoodooDoll.cs +++ b/Items/VoodooDemonVoodooDoll.cs @@ -27,11 +27,11 @@ namespace CalamityMod.Items public override void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.HellstoneBar, 5) - .AddIngredient(ItemID.Silk, 5) - .AddTile(TileID.Anvils) - .Register(); + CreateRecipe(). + AddIngredient(ItemID.HellstoneBar, 5). + AddIngredient(ItemID.Silk, 5). + AddTile(TileID.Anvils). + Register(); } } } diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index dd52d45462..40b26c23f7 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -28,64 +28,64 @@ namespace CalamityMod public static void AddRecipes() { - CreateRecipe() - .AddIngredient(ItemID.Vertebrae, 2) - .AddTile(TileID.WorkBenches) - .ReplaceResult(ItemID.Leather); + CreateRecipe(). + AddIngredient(ItemID.Vertebrae, 2). + AddTile(TileID.WorkBenches). + ReplaceResult(ItemID.Leather); + + CreateRecipe(). + AddIngredient(ItemID.Lens). + AddIngredient(ItemID.BlackDye). + AddTile(TileID.DyeVat). + ReplaceResult(ItemID.BlackLens); + + CreateRecipe(). + AddIngredient(5). + AddTile(TileID.Anvils). + ReplaceResult(ItemID.FallenStar); + + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.AdamantiteForge). + ReplaceResult(ItemID.HallowedBar); + + CreateRecipe(20). + AddIngredient(ItemID.EmptyBullet, 20). + AddIngredient(ItemID.ExplosivePowder, 1). + AddTile(TileID.MythrilAnvil).ReplaceResult(ItemID.RocketI); + + CreateRecipe(). + AddIngredient(ItemID.StoneBlock, 5). + AddIngredient(ItemID.Ruby, 2). + AddIngredient(ItemID.HealingPotion). + AddTile(TileID.Anvils). + ReplaceResult(ItemID.LifeCrystal); + + CreateRecipe(). + AddIngredient(10). + AddIngredient(). + AddTile(TileID.MythrilAnvil). + ReplaceResult(ItemID.LifeFruit); + + CreateRecipe(33). + AddIngredient(ItemID.Torch, 33). + AddIngredient(). + AddTile(TileID.Anvils). + ReplaceResult(ItemID.UltrabrightTorch); CreateRecipe() - .AddIngredient(ItemID.Lens) - .AddIngredient(ItemID.BlackDye) - .AddTile(TileID.DyeVat) - .ReplaceResult(ItemID.BlackLens); + AddIngredient(ItemID.PiggyBank). + AddIngredient(ItemID.Feather, 2). + AddIngredient(). + AddIngredient(ItemID.GoldCoin, 15). + AddRecipeGroup("AnyGoldBar", 8). + AddTile(TileID.Anvils). + ReplaceResult(ItemID.MoneyTrough); - CreateRecipe() - .AddIngredient(5) - .AddTile(TileID.Anvils) - .ReplaceResult(ItemID.FallenStar); - - CreateRecipe() - .AddIngredient(4) - .AddTile(TileID.AdamantiteForge) - .ReplaceResult(ItemID.HallowedBar); - - CreateRecipe(20) - .AddIngredient(ItemID.EmptyBullet, 20) - .AddIngredient(ItemID.ExplosivePowder, 1) - .AddTile(TileID.MythrilAnvil).ReplaceResult(ItemID.RocketI); - - CreateRecipe() - .AddIngredient(ItemID.StoneBlock, 5) - .AddIngredient(ItemID.Ruby, 2) - .AddIngredient(ItemID.HealingPotion) - .AddTile(TileID.Anvils) - .ReplaceResult(ItemID.LifeCrystal); - - CreateRecipe() - .AddIngredient(10) - .AddIngredient() - .AddTile(TileID.MythrilAnvil) - .ReplaceResult(ItemID.LifeFruit); - - CreateRecipe(33) - .AddIngredient(ItemID.Torch, 33) - .AddIngredient() - .AddTile(TileID.Anvils) - .ReplaceResult(ItemID.UltrabrightTorch); - - CreateRecipe() - .AddIngredient(ItemID.PiggyBank) - .AddIngredient(ItemID.Feather, 2) - .AddIngredient() - .AddIngredient(ItemID.GoldCoin, 15) - .AddRecipeGroup("AnyGoldBar", 8) - .AddTile(TileID.Anvils) - .ReplaceResult(ItemID.MoneyTrough); - - CreateRecipe() - .AddIngredient() - .AddTile(TileID.Anvils) - .ReplaceResult(ItemID.TargetDummy); + CreateRecipe(). + AddIngredient(). + AddTile(TileID.Anvils). + ReplaceResult(ItemID.TargetDummy); } // Change Leather's recipe to require 2 Rotten Chunks/Vertebrae From a01414fe672f778cec88cfbe11d848b68533ff56 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 6 Apr 2022 18:03:10 -0500 Subject: [PATCH 09/14] Cleared CalamityRecipes.cs and a lot of tile stuff --- Items/Accessories/BloomStone.cs | 14 +- Items/Armor/AuricTeslaCuisses.cs | 2 +- Items/Armor/PlaguebringerPistons.cs | 14 +- Items/Tools/ClimateChange/Cosmolight.cs | 2 +- NPCs/Providence/Providence.cs | 4 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 2 +- Tiles/Abyss/AcidWoodTreeSapling.cs | 8 +- Tiles/Abyss/HardenedSulphurousSandstone.cs | 10 +- Tiles/Abyss/LumenylCrystals.cs | 20 +- Tiles/Abyss/PlantyMush.cs | 8 +- Tiles/Abyss/SulphurousSand.cs | 20 +- Tiles/Abyss/SulphurousSandstone.cs | 8 +- Tiles/Abyss/SulphurousVines.cs | 6 +- Tiles/Abyss/Tenebris.cs | 2 +- Tiles/Abyss/ViperVines.cs | 6 +- Tiles/Abyss/Voidstone.cs | 2 +- Tiles/AstralBrick.cs | 2 +- Tiles/Crags/BrimstoneSlag.cs | 4 +- .../AgedLaboratoryConsole.cs | 2 +- .../AgedLaboratoryDisplay.cs | 2 +- .../DraedonStructures/AgedLaboratoryScreen.cs | 2 +- .../DraedonStructures/AgedLaboratoryServer.cs | 2 +- .../DraedonStructures/AgedReinforcedCrate.cs | 2 +- Tiles/DraedonStructures/ChargingStation.cs | 2 +- .../DraedonStructures/LabHologramProjector.cs | 2 +- Tiles/DraedonStructures/LaboratoryConsole.cs | 2 +- Tiles/DraedonStructures/LaboratoryDisplay.cs | 2 +- Tiles/DraedonStructures/LaboratoryScreen.cs | 2 +- Tiles/DraedonStructures/LaboratoryServer.cs | 2 +- Tiles/DraedonStructures/LaboratoryTerminal.cs | 2 +- Tiles/DraedonStructures/PowerCellFactory.cs | 2 +- Tiles/DraedonStructures/ReinforcedCrate.cs | 2 +- Tiles/DraedonSummoner/CodebreakerTile.cs | 2 +- Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBrick.cs | 2 +- Tiles/FurnitureExo/ExoBathtubTile.cs | 2 +- Tiles/FurnitureExo/ExoBedTile.cs | 2 +- Tiles/FurnitureExo/ExoBookcaseTile.cs | 2 +- Tiles/FurnitureExo/ExoChairTile.cs | 2 +- Tiles/FurnitureExo/ExoClockTile.cs | 2 +- Tiles/FurnitureExo/ExoConsoleTile.cs | 2 +- Tiles/FurnitureExo/ExoDisplayTile.cs | 2 +- Tiles/FurnitureExo/ExoDresserTile.cs | 2 +- Tiles/FurnitureExo/ExoKeyboardTile.cs | 2 +- Tiles/FurnitureExo/ExoPlatingTile.cs | 2 +- Tiles/FurnitureExo/ExoServerTile.cs | 2 +- Tiles/FurnitureExo/ExoSinkTile.cs | 2 +- Tiles/FurnitureExo/ExoSofaTile.cs | 2 +- Tiles/FurnitureExo/ExoTableTile.cs | 2 +- Tiles/FurnitureExo/ExoTerminalTile.cs | 2 +- Tiles/FurnitureExo/ExoToiletTile.cs | 2 +- Tiles/FurnitureExo/ExoWorkbenchTile.cs | 2 +- Tiles/FurniturePlaguedPlate/PlaguedPlate.cs | 2 +- Tiles/FurnitureProfaned/ProfanedRock.cs | 2 +- Tiles/FurnitureProfaned/RunicProfanedBrick.cs | 2 +- Tiles/FurnitureStratus/StratusBricks.cs | 2 +- Tiles/FurnitureStratus/StratusPlatform.cs | 2 +- Tiles/FurnitureStratus/StratusStarPlatform.cs | 2 +- Tiles/FurnitureVoid/SmoothVoidstone.cs | 2 +- Tiles/FurnitureVoid/VoidstoneSlab.cs | 2 +- Tiles/Ores/ChaoticOre.cs | 4 +- Tiles/Plates/Chaosplate.cs | 2 +- Tiles/Plates/Cinderplate.cs | 2 +- Tiles/Plates/Elumplate.cs | 2 +- Tiles/Plates/Navyplate.cs | 2 +- Tiles/Plates/PlagueContainmentCells.cs | 2 +- Tiles/SunkenSea/SeaPrismCrystals.cs | 16 +- Utilities/CalamityRecipes.cs | 569 ++++++++---------- Utilities/WorldgenUtils.cs | 2 +- Walls/AbyssGravelWall.cs | 2 +- Walls/EutrophicSandWall.cs | 2 +- Walls/SulphurousSandWall.cs | 2 +- Walls/SulphurousSandstoneWall.cs | 2 +- Walls/VoidstoneWallUnsafe.cs | 2 +- World/Abyss.cs | 46 +- World/AstralBiome.cs | 8 +- World/CustomTemple.cs | 46 +- World/MiscWorldgenRoutines.cs | 52 +- World/Planets/MainPlanet.cs | 4 +- World/Planets/MudPlanet.cs | 6 +- World/SulphurousSea.cs | 28 +- World/SunkenSea.cs | 28 +- World/UndergroundShrines.cs | 20 +- World/WorldEvilIsland.cs | 18 +- 84 files changed, 499 insertions(+), 586 deletions(-) diff --git a/Items/Accessories/BloomStone.cs b/Items/Accessories/BloomStone.cs index 1befa1705e..94c2892df6 100644 --- a/Items/Accessories/BloomStone.cs +++ b/Items/Accessories/BloomStone.cs @@ -46,14 +46,14 @@ namespace CalamityMod.Items.Accessories if (!walkTile.HasTile && walkTile.LiquidAmount == 0 && groundTile != null && WorldGen.SolidTile(groundTile)) { walkTile.TileFrameY = 0; - walkTile.slope(0); + walkTile.Get().Slope = SlopeType.Solid; walkTile.halfBrick(false); // On dirt blocks, there's a small chance to grow a dye plant. if (groundTile.TileType == TileID.Dirt) { if (Main.rand.NextBool(1000)) { - walkTile.active(true); + walkTile.Get().HasTile = true; walkTile.TileType = TileID.DyePlants; walkTile.TileFrameX = (short)(34 * Main.rand.Next(1, 13)); while (walkTile.TileFrameX == 144) @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Accessories { if (Main.rand.NextBool(2)) { - walkTile.active(true); + walkTile.Get().HasTile = true; walkTile.TileType = TileID.Plants; walkTile.TileFrameX = (short)(18 * Main.rand.Next(6, 11)); @@ -78,7 +78,7 @@ namespace CalamityMod.Items.Accessories } else { - walkTile.active(true); + walkTile.Get().HasTile = true; walkTile.TileType = TileID.Plants2; walkTile.TileFrameX = (short)(18 * Main.rand.Next(6, 21)); @@ -95,7 +95,7 @@ namespace CalamityMod.Items.Accessories { if (Main.rand.NextBool(2)) { - walkTile.active(true); + walkTile.Get().HasTile = true; walkTile.TileType = TileID.HallowedPlants; walkTile.TileFrameX = (short)(18 * Main.rand.Next(4, 7)); while (walkTile.TileFrameX == 90) @@ -103,7 +103,7 @@ namespace CalamityMod.Items.Accessories } else { - walkTile.active(true); + walkTile.Get().HasTile = true; walkTile.TileType = TileID.HallowedPlants2; walkTile.TileFrameX = (short)(18 * Main.rand.Next(2, 8)); while (walkTile.TileFrameX == 90) @@ -117,7 +117,7 @@ namespace CalamityMod.Items.Accessories // On jungle grass, grow jungle flowers. else if (groundTile.TileType == TileID.JungleGrass) { - walkTile.active(true); + walkTile.Get().HasTile = true; walkTile.TileType = TileID.JunglePlants2; walkTile.TileFrameX = (short)(18 * Main.rand.Next(9, 17)); diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 480562a891..005c4a5adc 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void AddRecipes() { - CreateRecipe() + CreateRecipe(). AddIngredient(). AddIngredient(). AddIngredient(). diff --git a/Items/Armor/PlaguebringerPistons.cs b/Items/Armor/PlaguebringerPistons.cs index aacc34017d..603f082553 100644 --- a/Items/Armor/PlaguebringerPistons.cs +++ b/Items/Armor/PlaguebringerPistons.cs @@ -46,14 +46,14 @@ namespace CalamityMod.Items.Armor if (!tile.HasTile && tile.LiquidAmount == 0 && Main.tile[x, y + 1] != null && WorldGen.SolidTile(x, y + 1)) { tile.TileFrameY = 0; - tile.slope(0); + tile.Get().Slope = SlopeType.Solid; tile.halfBrick(false); //On dirt blocks, there's a small chance to grow a dye plant if (Main.tile[x, y + 1].TileType == TileID.Dirt) { if (Main.rand.NextBool(1000)) { - tile.active(true); + tile.Get().HasTile = true; tile.TileType = TileID.DyePlants; tile.TileFrameX = (short)(34 * Main.rand.Next(1, 13)); while (tile.TileFrameX == 144) @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Armor { if (Main.rand.NextBool(2)) { - tile.active(true); + tile.Get().HasTile = true; tile.TileType = TileID.Plants; tile.TileFrameX = (short)(18 * Main.rand.Next(6, 11)); while (tile.TileFrameX == 144) @@ -81,7 +81,7 @@ namespace CalamityMod.Items.Armor } else { - tile.active(true); + tile.Get().HasTile = true; tile.TileType = TileID.Plants2; tile.TileFrameX = (short)(18 * Main.rand.Next(6, 21)); while (tile.TileFrameX == 144) @@ -99,7 +99,7 @@ namespace CalamityMod.Items.Armor { if (Main.rand.NextBool(2)) { - tile.active(true); + tile.Get().HasTile = true; tile.TileType = TileID.HallowedPlants; tile.TileFrameX = (short)(18 * Main.rand.Next(4, 7)); while (tile.TileFrameX == 90) @@ -109,7 +109,7 @@ namespace CalamityMod.Items.Armor } else { - tile.active(true); + tile.Get().HasTile = true; tile.TileType = TileID.HallowedPlants2; tile.TileFrameX = (short)(18 * Main.rand.Next(2, 8)); while (tile.TileFrameX == 90) @@ -125,7 +125,7 @@ namespace CalamityMod.Items.Armor //On jungle grass, grow jungle flowers else if (Main.tile[x, y + 1].TileType == TileID.JungleGrass) { - tile.active(true); + tile.Get().HasTile = true; tile.TileType = TileID.JunglePlants2; tile.TileFrameX = (short)(18 * Main.rand.Next(9, 17)); if (Main.netMode == NetmodeID.MultiplayerClient) diff --git a/Items/Tools/ClimateChange/Cosmolight.cs b/Items/Tools/ClimateChange/Cosmolight.cs index 5442b965e1..9cbf724400 100644 --- a/Items/Tools/ClimateChange/Cosmolight.cs +++ b/Items/Tools/ClimateChange/Cosmolight.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Tools.ClimateChange public override void AddRecipes() { - CreateRecipe() + CreateRecipe(). AddIngredient(ItemID.FallenStar, 10). AddIngredient(ItemID.SoulofLight, 7). AddIngredient(ItemID.SoulofNight, 7). diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 74610c0e6c..730d44741b 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1563,9 +1563,9 @@ namespace CalamityMod.NPCs.Providence && !Main.tile[x, y].HasTile) { Main.tile[x, y].TileType = (ushort)ModContent.TileType(); - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; } - Main.tile[x, y].LiquidType = LiquidID.Water; + Main.tile[x, y].Get().LiquidType = LiquidID.Water; Main.tile[x, y].LiquidAmount = 0; if (Main.netMode == NetmodeID.Server) diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index dcff8df3f3..c9b16c4fa6 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -504,7 +504,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if ((num55 == num52 - num54 || num55 == num52 + num54 || num56 == num53 - num54 || num56 == num53 + num54) && !Main.tile[num55, num56].HasTile) { Main.tile[num55, num56].TileType = (ushort)ModContent.TileType(); - Main.tile[num55, num56].active(true); + Main.tile[num55, num56].Get().HasTile = true; } if (Main.netMode == NetmodeID.Server) { diff --git a/Tiles/Abyss/AcidWoodTreeSapling.cs b/Tiles/Abyss/AcidWoodTreeSapling.cs index adde19edc8..4a8ac0be42 100644 --- a/Tiles/Abyss/AcidWoodTreeSapling.cs +++ b/Tiles/Abyss/AcidWoodTreeSapling.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Tiles.Abyss } Tile tileAtPosition = Main.tile[i, trueStartingPositionY]; Tile tileAbovePosition = Main.tile[i, trueStartingPositionY - 1]; - if (!tileAtPosition.HasTile || tileAtPosition.IsHalfBlock || tileAtPosition.slope() != 0) + if (!tileAtPosition.HasTile || tileAtPosition.IsHalfBlock || tileAtPosition.Slope != 0) { return; } @@ -81,14 +81,14 @@ namespace CalamityMod.Tiles.Abyss tileAtPosition = Main.tile[i, trueStartingPositionY - 1 - k]; if (k == 0) { - tileAtPosition.active(true); + tileAtPosition.Get().HasTile = true; tileAtPosition.TileType = TileID.PalmTree; tileAtPosition.TileFrameX = 66; tileAtPosition.TileFrameY = 0; } else if (k == treeHeight - 1) { - tileAtPosition.active(true); + tileAtPosition.Get().HasTile = true; tileAtPosition.TileType = TileID.PalmTree; tileAtPosition.TileFrameX = (short)(22 * WorldGen.genRand.Next(4, 7)); tileAtPosition.TileFrameY = frameY; @@ -104,7 +104,7 @@ namespace CalamityMod.Tiles.Abyss frameY += (short)(Math.Sign(frameYIdeal) * 2); } } - tileAtPosition.active(true); + tileAtPosition.Get().HasTile = true; tileAtPosition.TileType = TileID.PalmTree; tileAtPosition.TileFrameX = (short)(22 * WorldGen.genRand.Next(0, 3)); tileAtPosition.TileFrameY = frameY; diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.cs b/Tiles/Abyss/HardenedSulphurousSandstone.cs index 25a75e0cd9..29de34f59b 100644 --- a/Tiles/Abyss/HardenedSulphurousSandstone.cs +++ b/Tiles/Abyss/HardenedSulphurousSandstone.cs @@ -67,12 +67,12 @@ namespace CalamityMod.Tiles.Abyss bool flag13 = false; for (int num52 = num8; num52 > num8 - 10; num52--) { - if (CalamityUtils.ParanoidTileRetrieval(i, num52).bottomSlope()) + if (CalamityUtils.ParanoidTileRetrieval(i, num52).BottomSlope) { flag13 = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) { flag13 = true; break; @@ -83,7 +83,7 @@ namespace CalamityMod.Tiles.Abyss int num53 = i; int num54 = j + 1; Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].active(true); + Main.tile[num53, num54].Get().HasTile = true; WorldGen.SquareTileFrame(num53, num54, true); if (Main.netMode == NetmodeID.Server) { @@ -91,8 +91,8 @@ namespace CalamityMod.Tiles.Abyss } } } - Main.tile[i, j].slope(0); - Main.tile[i, j].halfBrick(false); + Main.tile[i, j].Get().Slope = SlopeType.Solid; + Main.tile[i, j].Get().IsHalfBlock = false; } } } diff --git a/Tiles/Abyss/LumenylCrystals.cs b/Tiles/Abyss/LumenylCrystals.cs index 22f158717e..92310ea815 100644 --- a/Tiles/Abyss/LumenylCrystals.cs +++ b/Tiles/Abyss/LumenylCrystals.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.Abyss AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); AddMapEntry(new Color(0, 150, 200), name); SoundType = SoundID.Item; - soundStyle = 27; + SoundStyle = 27; DustType = 67; ItemDrop = ModContent.ItemType(); Main.tileSpelunker[Type] = true; @@ -39,32 +39,32 @@ namespace CalamityMod.Tiles.Abyss public override bool CanPlace(int i, int j) { - if (Main.tile[i, j + 1].slope() == 0 && !Main.tile[i, j + 1].IsHalfBlock) + if (Main.tile[i, j + 1].Slope == 0 && !Main.tile[i, j + 1].IsHalfBlock) return true; - if (Main.tile[i, j - 1].slope() == 0 && !Main.tile[i, j - 1].IsHalfBlock) + if (Main.tile[i, j - 1].Slope == 0 && !Main.tile[i, j - 1].IsHalfBlock) return true; - if (Main.tile[i + 1, j].slope() == 0 && !Main.tile[i + 1, j].IsHalfBlock) + if (Main.tile[i + 1, j].Slope == 0 && !Main.tile[i + 1, j].IsHalfBlock) return true; - if (Main.tile[i - 1, j].slope() == 0 && !Main.tile[i - 1, j].IsHalfBlock) + if (Main.tile[i - 1, j].Slope == 0 && !Main.tile[i - 1, j].IsHalfBlock) return true; return false; } public override void PlaceInWorld(int i, int j, Item item) { - if (Main.tile[i, j + 1].HasTile && Main.tileSolid[Main.tile[i, j + 1].TileType] && Main.tile[i, j + 1].slope() == 0 && !Main.tile[i, j + 1].IsHalfBlock) + if (Main.tile[i, j + 1].HasTile && Main.tileSolid[Main.tile[i, j + 1].TileType] && Main.tile[i, j + 1].Slope == 0 && !Main.tile[i, j + 1].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(0 * 18); } - else if (Main.tile[i, j - 1].HasTile && Main.tileSolid[Main.tile[i, j - 1].TileType] && Main.tile[i, j - 1].slope() == 0 && !Main.tile[i, j - 1].IsHalfBlock) + else if (Main.tile[i, j - 1].HasTile && Main.tileSolid[Main.tile[i, j - 1].TileType] && Main.tile[i, j - 1].Slope == 0 && !Main.tile[i, j - 1].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(1 * 18); } - else if (Main.tile[i + 1, j].HasTile && Main.tileSolid[Main.tile[i + 1, j].TileType] && Main.tile[i + 1, j].slope() == 0 && !Main.tile[i + 1, j].IsHalfBlock) + else if (Main.tile[i + 1, j].HasTile && Main.tileSolid[Main.tile[i + 1, j].TileType] && Main.tile[i + 1, j].Slope == 0 && !Main.tile[i + 1, j].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(2 * 18); } - else if (Main.tile[i - 1, j].HasTile && Main.tileSolid[Main.tile[i - 1, j].TileType] && Main.tile[i - 1, j].slope() == 0 && !Main.tile[i - 1, j].IsHalfBlock) + else if (Main.tile[i - 1, j].HasTile && Main.tileSolid[Main.tile[i - 1, j].TileType] && Main.tile[i - 1, j].Slope == 0 && !Main.tile[i - 1, j].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(3 * 18); } diff --git a/Tiles/Abyss/PlantyMush.cs b/Tiles/Abyss/PlantyMush.cs index f36f5acff6..29ed91ed21 100644 --- a/Tiles/Abyss/PlantyMush.cs +++ b/Tiles/Abyss/PlantyMush.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i, j].LiquidAmount <= 0) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } } @@ -57,12 +57,12 @@ namespace CalamityMod.Tiles.Abyss bool flag13 = false; for (int num52 = num8; num52 > num8 - 10; num52--) { - if (Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].BottomSlope) { flag13 = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) { flag13 = true; break; @@ -73,7 +73,7 @@ namespace CalamityMod.Tiles.Abyss int num53 = i; int num54 = j + 1; Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].active(true); + Main.tile[num53, num54].Get().HasTile = true; WorldGen.SquareTileFrame(num53, num54, true); if (Main.netMode == NetmodeID.Server) { diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index 88eb936a72..68369f7cd5 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i - 1, j].LiquidAmount <= 128) { Main.tile[i - 1, j].LiquidAmount = 255; - Main.tile[i - 1, j].LiquidType = LiquidID.Water; + Main.tile[i - 1, j].Get().LiquidType = LiquidID.Water; } } } @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i - 2, j].LiquidAmount <= 128) { Main.tile[i - 2, j].LiquidAmount = 255; - Main.tile[i - 2, j].LiquidType = LiquidID.Water; + Main.tile[i - 2, j].Get().LiquidType = LiquidID.Water; } } } @@ -67,7 +67,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i - 3, j].LiquidAmount <= 128) { Main.tile[i - 3, j].LiquidAmount = 255; - Main.tile[i - 3, j].LiquidType = LiquidID.Water; + Main.tile[i - 3, j].Get().LiquidType = LiquidID.Water; } } } @@ -84,7 +84,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i + 1, j].LiquidAmount <= 128) { Main.tile[i + 1, j].LiquidAmount = 255; - Main.tile[i + 1, j].LiquidType = LiquidID.Water; + Main.tile[i + 1, j].Get().LiquidType = LiquidID.Water; } } } @@ -95,7 +95,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i + 2, j].LiquidAmount <= 128) { Main.tile[i + 2, j].LiquidAmount = 255; - Main.tile[i + 2, j].LiquidType = LiquidID.Water; + Main.tile[i + 2, j].Get().LiquidType = LiquidID.Water; } } } @@ -106,7 +106,7 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i + 3, j].LiquidAmount <= 128) { Main.tile[i + 3, j].LiquidAmount = 255; - Main.tile[i + 3, j].LiquidType = LiquidID.Water; + Main.tile[i + 3, j].Get().LiquidType = LiquidID.Water; } } } @@ -219,12 +219,12 @@ namespace CalamityMod.Tiles.Abyss bool flag13 = false; for (int num52 = num8; num52 > num8 - 10; num52--) { - if (Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].BottomSlope) { flag13 = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) { flag13 = true; break; @@ -235,14 +235,14 @@ namespace CalamityMod.Tiles.Abyss int num53 = i; int num54 = j + 1; Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].active(true); + Main.tile[num53, num54].Get().HasTile = true; WorldGen.SquareTileFrame(num53, num54, true); if (Main.netMode == NetmodeID.Server) { NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); } } - Main.tile[i, j].slope(0); + Main.tile[i, j].Get().Slope = SlopeType.Solid; Main.tile[i, j].halfBrick(false); } } diff --git a/Tiles/Abyss/SulphurousSandstone.cs b/Tiles/Abyss/SulphurousSandstone.cs index b4265a7d56..334811a3ff 100644 --- a/Tiles/Abyss/SulphurousSandstone.cs +++ b/Tiles/Abyss/SulphurousSandstone.cs @@ -67,12 +67,12 @@ namespace CalamityMod.Tiles.Abyss bool flag13 = false; for (int num52 = num8; num52 > num8 - 10; num52--) { - if (Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].BottomSlope) { flag13 = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) { flag13 = true; break; @@ -83,14 +83,14 @@ namespace CalamityMod.Tiles.Abyss int num53 = i; int num54 = j + 1; Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].active(true); + Main.tile[num53, num54].Get().HasTile = true; WorldGen.SquareTileFrame(num53, num54, true); if (Main.netMode == NetmodeID.Server) { NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); } } - Main.tile[i, j].slope(0); + Main.tile[i, j].Get().Slope = SlopeType.Solid; Main.tile[i, j].halfBrick(false); } } diff --git a/Tiles/Abyss/SulphurousVines.cs b/Tiles/Abyss/SulphurousVines.cs index 1a754960ea..1a52bbf6d7 100644 --- a/Tiles/Abyss/SulphurousVines.cs +++ b/Tiles/Abyss/SulphurousVines.cs @@ -60,12 +60,12 @@ namespace CalamityMod.Tiles.Abyss bool flag13 = false; for (int num52 = j; num52 > j - 10; j--) { - if (Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].BottomSlope) { flag13 = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) { flag13 = true; break; @@ -80,7 +80,7 @@ namespace CalamityMod.Tiles.Abyss Main.tile[num53, num54].TileFrameY = (short)(4 * 18); Main.tile[num53, num54 - 1].TileFrameX = (short)(WorldGen.genRand.Next(12) * 18); Main.tile[num53, num54 - 1].TileFrameY = (short)(WorldGen.genRand.Next(4) * 18); - Main.tile[num53, num54].active(true); + Main.tile[num53, num54].Get().HasTile = true; WorldGen.SquareTileFrame(num53, num54, true); WorldGen.SquareTileFrame(num53, num54 - 1, true); if (Main.netMode == NetmodeID.Server) diff --git a/Tiles/Abyss/Tenebris.cs b/Tiles/Abyss/Tenebris.cs index da92860fc6..47b10cabba 100644 --- a/Tiles/Abyss/Tenebris.cs +++ b/Tiles/Abyss/Tenebris.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Tiles.Abyss if (t.LiquidAmount <= 0) { t.LiquidAmount = 255; - t.LiquidType = LiquidID.Water; + t.Get().LiquidType = LiquidID.Water; } } } diff --git a/Tiles/Abyss/ViperVines.cs b/Tiles/Abyss/ViperVines.cs index e0ab73adc6..2f6be91719 100644 --- a/Tiles/Abyss/ViperVines.cs +++ b/Tiles/Abyss/ViperVines.cs @@ -59,12 +59,12 @@ namespace CalamityMod.Tiles.Abyss bool flag13 = false; for (int num52 = j; num52 > j - 10; j--) { - if (Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].BottomSlope) { flag13 = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].bottomSlope()) + if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) { flag13 = true; break; @@ -79,7 +79,7 @@ namespace CalamityMod.Tiles.Abyss Main.tile[num53, num54].TileFrameY = (short)(4 * 18); Main.tile[num53, num54 - 1].TileFrameX = (short)(WorldGen.genRand.Next(12) * 18); Main.tile[num53, num54 - 1].TileFrameY = (short)(WorldGen.genRand.Next(4) * 18); - Main.tile[num53, num54].active(true); + Main.tile[num53, num54].Get().HasTile = true; WorldGen.SquareTileFrame(num53, num54, true); WorldGen.SquareTileFrame(num53, num54 - 1, true); if (Main.netMode == NetmodeID.Server) diff --git a/Tiles/Abyss/Voidstone.cs b/Tiles/Abyss/Voidstone.cs index 00416b1e00..00ec217566 100644 --- a/Tiles/Abyss/Voidstone.cs +++ b/Tiles/Abyss/Voidstone.cs @@ -233,7 +233,7 @@ namespace CalamityMod.Tiles.Abyss Color drawColour = GetDrawColour(i, j, new Color(25, 25, 25, 25)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(GlowTexture, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/AstralBrick.cs b/Tiles/AstralBrick.cs index b3f1569cc3..1353f4dc89 100644 --- a/Tiles/AstralBrick.cs +++ b/Tiles/AstralBrick.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Crags/BrimstoneSlag.cs b/Tiles/Crags/BrimstoneSlag.cs index e97eb56211..6435787ee2 100644 --- a/Tiles/Crags/BrimstoneSlag.cs +++ b/Tiles/Crags/BrimstoneSlag.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Tiles.Crags { zero = Vector2.Zero; } - if (tile.slope() == (byte)0 && !tile.IsHalfBlock) + if (tile.Slope == (byte)0 && !tile.IsHalfBlock) Main.spriteBatch.Draw(sprite, new Vector2((float)(i * 16 - (int)Main.screenPosition.X), (float)(j * 16 - (int)Main.screenPosition.Y)) + zero, new Rectangle(tile.frameX + frameXOffset, tile.frameY + frameYOffset, 16, 16), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (tile.IsHalfBlock) { @@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.Crags } else { - byte num9 = tile.slope(); + byte num9 = tile.Slope; for (int index4 = 0; index4 < 8; ++index4) { int width2 = index4 << 1; diff --git a/Tiles/DraedonStructures/AgedLaboratoryConsole.cs b/Tiles/DraedonStructures/AgedLaboratoryConsole.cs index 8d1545f4c7..881c40a86e 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryConsole.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryConsole.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/AgedLaboratoryDisplay.cs b/Tiles/DraedonStructures/AgedLaboratoryDisplay.cs index d97e0bf55c..281a377710 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryDisplay.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryDisplay.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/AgedLaboratoryScreen.cs b/Tiles/DraedonStructures/AgedLaboratoryScreen.cs index 8f7d3b37d9..3027b7c5dd 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryScreen.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryScreen.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/AgedLaboratoryServer.cs b/Tiles/DraedonStructures/AgedLaboratoryServer.cs index 871b93747f..43d140c545 100644 --- a/Tiles/DraedonStructures/AgedLaboratoryServer.cs +++ b/Tiles/DraedonStructures/AgedLaboratoryServer.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/AgedReinforcedCrate.cs b/Tiles/DraedonStructures/AgedReinforcedCrate.cs index 239d835f13..fb31073dda 100644 --- a/Tiles/DraedonStructures/AgedReinforcedCrate.cs +++ b/Tiles/DraedonStructures/AgedReinforcedCrate.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/ChargingStation.cs b/Tiles/DraedonStructures/ChargingStation.cs index 32fb77fe58..3a307ea974 100644 --- a/Tiles/DraedonStructures/ChargingStation.cs +++ b/Tiles/DraedonStructures/ChargingStation.cs @@ -127,7 +127,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + screenOffset; Color drawColor = charger?.LightColor ?? Color.Red; - if (!t.IsHalfBlock && t.slope() == 0) + if (!t.IsHalfBlock && t.Slope == 0) Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xFrame, yFrame, 18, 18)), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (t.IsHalfBlock) Main.spriteBatch.Draw(glowmask, drawOffset + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xFrame, yFrame, 18, 8)), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/LabHologramProjector.cs b/Tiles/DraedonStructures/LabHologramProjector.cs index 73d2caec1a..b433d20362 100644 --- a/Tiles/DraedonStructures/LabHologramProjector.cs +++ b/Tiles/DraedonStructures/LabHologramProjector.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + offset; Color drawColor = Lighting.GetColor(i, j); - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(tileTexture, drawOffset, new Rectangle(xPos, yPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(tileTexture, drawOffset + Vector2.UnitY * 8f, new Rectangle(xPos, yPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/LaboratoryConsole.cs b/Tiles/DraedonStructures/LaboratoryConsole.cs index 9b14f5cb81..eab3eb7e78 100644 --- a/Tiles/DraedonStructures/LaboratoryConsole.cs +++ b/Tiles/DraedonStructures/LaboratoryConsole.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/LaboratoryDisplay.cs b/Tiles/DraedonStructures/LaboratoryDisplay.cs index 20ff31a0e8..f9856cb38b 100644 --- a/Tiles/DraedonStructures/LaboratoryDisplay.cs +++ b/Tiles/DraedonStructures/LaboratoryDisplay.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/LaboratoryScreen.cs b/Tiles/DraedonStructures/LaboratoryScreen.cs index bed0b2cecc..464662f246 100644 --- a/Tiles/DraedonStructures/LaboratoryScreen.cs +++ b/Tiles/DraedonStructures/LaboratoryScreen.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/LaboratoryServer.cs b/Tiles/DraedonStructures/LaboratoryServer.cs index 24190d3e0c..5fb8ba0c59 100644 --- a/Tiles/DraedonStructures/LaboratoryServer.cs +++ b/Tiles/DraedonStructures/LaboratoryServer.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/LaboratoryTerminal.cs b/Tiles/DraedonStructures/LaboratoryTerminal.cs index f50e1a32c0..948db07dab 100644 --- a/Tiles/DraedonStructures/LaboratoryTerminal.cs +++ b/Tiles/DraedonStructures/LaboratoryTerminal.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/PowerCellFactory.cs b/Tiles/DraedonStructures/PowerCellFactory.cs index e638506653..ac88800729 100644 --- a/Tiles/DraedonStructures/PowerCellFactory.cs +++ b/Tiles/DraedonStructures/PowerCellFactory.cs @@ -139,7 +139,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + offset; Color drawColor = Lighting.GetColor(i, j); - if (!t.IsHalfBlock && t.slope() == 0) + if (!t.IsHalfBlock && t.Slope == 0) spriteBatch.Draw(tex, drawOffset, new Rectangle(frameXPos, frameYPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (t.IsHalfBlock) spriteBatch.Draw(tex, drawOffset + Vector2.UnitY * 8f, new Rectangle(frameXPos, frameYPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonStructures/ReinforcedCrate.cs b/Tiles/DraedonStructures/ReinforcedCrate.cs index 01c1043445..6e3ea45418 100644 --- a/Tiles/DraedonStructures/ReinforcedCrate.cs +++ b/Tiles/DraedonStructures/ReinforcedCrate.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.DraedonStructures Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/DraedonSummoner/CodebreakerTile.cs b/Tiles/DraedonSummoner/CodebreakerTile.cs index 1fbde281d5..d125906396 100644 --- a/Tiles/DraedonSummoner/CodebreakerTile.cs +++ b/Tiles/DraedonSummoner/CodebreakerTile.cs @@ -169,7 +169,7 @@ namespace CalamityMod.Tiles.DraedonSummoner Color drawColor = Lighting.GetColor(i, j); Rectangle frame = new Rectangle(frameXPos, frameYPos, 16, 16); - if ((!t.IsHalfBlock && t.slope() == 0) || t.IsHalfBlock) + if ((!t.IsHalfBlock && t.Slope == 0) || t.IsHalfBlock) { spriteBatch.Draw(TileTexture, drawPosition, frame, drawColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); diff --git a/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs b/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs index 228549a357..7b963480b8 100644 --- a/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs +++ b/Tiles/FurnitureAshen/SmoothBrimstoneSlag.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureAshen Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(25, 25, 25, 25)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureCosmilite/CosmiliteBrick.cs b/Tiles/FurnitureCosmilite/CosmiliteBrick.cs index 2152ccc056..b268d1ed8f 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBrick.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBrick.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite Color drawColour = GetDrawColour(i, j, Color.White); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureExo/ExoBathtubTile.cs b/Tiles/FurnitureExo/ExoBathtubTile.cs index 3d1ed2f9f2..0631aeb338 100644 --- a/Tiles/FurnitureExo/ExoBathtubTile.cs +++ b/Tiles/FurnitureExo/ExoBathtubTile.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoBedTile.cs b/Tiles/FurnitureExo/ExoBedTile.cs index f157dc98b3..31aeeae33a 100644 --- a/Tiles/FurnitureExo/ExoBedTile.cs +++ b/Tiles/FurnitureExo/ExoBedTile.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoBookcaseTile.cs b/Tiles/FurnitureExo/ExoBookcaseTile.cs index 2a33734d80..fad32c329f 100644 --- a/Tiles/FurnitureExo/ExoBookcaseTile.cs +++ b/Tiles/FurnitureExo/ExoBookcaseTile.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoChairTile.cs b/Tiles/FurnitureExo/ExoChairTile.cs index 3bf090b9b5..19dbf530f5 100644 --- a/Tiles/FurnitureExo/ExoChairTile.cs +++ b/Tiles/FurnitureExo/ExoChairTile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoClockTile.cs b/Tiles/FurnitureExo/ExoClockTile.cs index 9d61aa7c2b..2fbe7ce610 100644 --- a/Tiles/FurnitureExo/ExoClockTile.cs +++ b/Tiles/FurnitureExo/ExoClockTile.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoConsoleTile.cs b/Tiles/FurnitureExo/ExoConsoleTile.cs index 47d433b0bb..83cb852659 100644 --- a/Tiles/FurnitureExo/ExoConsoleTile.cs +++ b/Tiles/FurnitureExo/ExoConsoleTile.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoDisplayTile.cs b/Tiles/FurnitureExo/ExoDisplayTile.cs index 78fa97e101..07e276c0da 100644 --- a/Tiles/FurnitureExo/ExoDisplayTile.cs +++ b/Tiles/FurnitureExo/ExoDisplayTile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoDresserTile.cs b/Tiles/FurnitureExo/ExoDresserTile.cs index c19a1335ab..c01a15239d 100644 --- a/Tiles/FurnitureExo/ExoDresserTile.cs +++ b/Tiles/FurnitureExo/ExoDresserTile.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoKeyboardTile.cs b/Tiles/FurnitureExo/ExoKeyboardTile.cs index 7cd4c96345..95a9e6900e 100644 --- a/Tiles/FurnitureExo/ExoKeyboardTile.cs +++ b/Tiles/FurnitureExo/ExoKeyboardTile.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoPlatingTile.cs b/Tiles/FurnitureExo/ExoPlatingTile.cs index 89504f781a..43006745e7 100644 --- a/Tiles/FurnitureExo/ExoPlatingTile.cs +++ b/Tiles/FurnitureExo/ExoPlatingTile.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; - if (!tile.IsHalfBlock && tile.slope() == 0) + if (!tile.IsHalfBlock && tile.Slope == 0) { spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); } diff --git a/Tiles/FurnitureExo/ExoServerTile.cs b/Tiles/FurnitureExo/ExoServerTile.cs index 51e930f2a0..9073e7b3a8 100644 --- a/Tiles/FurnitureExo/ExoServerTile.cs +++ b/Tiles/FurnitureExo/ExoServerTile.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoSinkTile.cs b/Tiles/FurnitureExo/ExoSinkTile.cs index 8a36604b19..17f8503284 100644 --- a/Tiles/FurnitureExo/ExoSinkTile.cs +++ b/Tiles/FurnitureExo/ExoSinkTile.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoSofaTile.cs b/Tiles/FurnitureExo/ExoSofaTile.cs index 92cb085629..2e15d367ec 100644 --- a/Tiles/FurnitureExo/ExoSofaTile.cs +++ b/Tiles/FurnitureExo/ExoSofaTile.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoTableTile.cs b/Tiles/FurnitureExo/ExoTableTile.cs index b00d241925..41d2a58f6d 100644 --- a/Tiles/FurnitureExo/ExoTableTile.cs +++ b/Tiles/FurnitureExo/ExoTableTile.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoTerminalTile.cs b/Tiles/FurnitureExo/ExoTerminalTile.cs index 2d6f9df51a..42277b864c 100644 --- a/Tiles/FurnitureExo/ExoTerminalTile.cs +++ b/Tiles/FurnitureExo/ExoTerminalTile.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoToiletTile.cs b/Tiles/FurnitureExo/ExoToiletTile.cs index 2c65d5c931..ae93d101a6 100644 --- a/Tiles/FurnitureExo/ExoToiletTile.cs +++ b/Tiles/FurnitureExo/ExoToiletTile.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureExo/ExoWorkbenchTile.cs b/Tiles/FurnitureExo/ExoWorkbenchTile.cs index bf452da01f..45534e8e7c 100644 --- a/Tiles/FurnitureExo/ExoWorkbenchTile.cs +++ b/Tiles/FurnitureExo/ExoWorkbenchTile.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Tiles.FurnitureExo Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffest; Color drawColour = Color.White; Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) spriteBatch.Draw(glowmask, drawPosition, new Rectangle(xFrameOffset, yFrameOffset, 18, 18), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); else if (trackTile.IsHalfBlock) spriteBatch.Draw(glowmask, drawPosition + new Vector2(0f, 8f), new Rectangle(xFrameOffset, yFrameOffset, 18, 8), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs index 7864489132..ee88eed417 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate Color drawColour = GetDrawColour(i, j, new Color(128, 128, 128, 128)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureProfaned/ProfanedRock.cs b/Tiles/FurnitureProfaned/ProfanedRock.cs index a6df409606..7baf24de1c 100644 --- a/Tiles/FurnitureProfaned/ProfanedRock.cs +++ b/Tiles/FurnitureProfaned/ProfanedRock.cs @@ -224,7 +224,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned Color drawColour = GetDrawColour(i, j, new Color(25, 25, 25, 25)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs index f28bdecc56..0b384c5b98 100644 --- a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs +++ b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned Color drawColour = GetDrawColour(i, j, new Color(128, 128, 128, 128)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureStratus/StratusBricks.cs b/Tiles/FurnitureStratus/StratusBricks.cs index 248352502e..9518d9c11a 100644 --- a/Tiles/FurnitureStratus/StratusBricks.cs +++ b/Tiles/FurnitureStratus/StratusBricks.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Tiles.FurnitureStratus Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!(trackTile.IsHalfBlock && trackTile.slope() == 0)) + if (!(trackTile.IsHalfBlock && trackTile.Slope == 0)) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureStratus/StratusPlatform.cs b/Tiles/FurnitureStratus/StratusPlatform.cs index f043401cfe..09f84b783a 100644 --- a/Tiles/FurnitureStratus/StratusPlatform.cs +++ b/Tiles/FurnitureStratus/StratusPlatform.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.FurnitureStratus Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureStratus/StratusPlatformGlow"); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + (Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange)); Tile trackTile = Main.tile[i, j]; - if (!(trackTile.IsHalfBlock && trackTile.slope() == 0)) + if (!(trackTile.IsHalfBlock && trackTile.Slope == 0)) spriteBatch.Draw(glowmask, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); else if (trackTile.IsHalfBlock) diff --git a/Tiles/FurnitureStratus/StratusStarPlatform.cs b/Tiles/FurnitureStratus/StratusStarPlatform.cs index cf4943dd18..628204804d 100644 --- a/Tiles/FurnitureStratus/StratusStarPlatform.cs +++ b/Tiles/FurnitureStratus/StratusStarPlatform.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Tiles.FurnitureStratus Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureStratus/StratusStarPlatformGlow"); Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + (Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange)); Tile trackTile = Main.tile[i, j]; - if (!(trackTile.IsHalfBlock && trackTile.slope() == 0)) + if (!(trackTile.IsHalfBlock && trackTile.Slope == 0)) spriteBatch.Draw(glowmask, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); else if (trackTile.IsHalfBlock) diff --git a/Tiles/FurnitureVoid/SmoothVoidstone.cs b/Tiles/FurnitureVoid/SmoothVoidstone.cs index a610c32be7..025a51f354 100644 --- a/Tiles/FurnitureVoid/SmoothVoidstone.cs +++ b/Tiles/FurnitureVoid/SmoothVoidstone.cs @@ -222,7 +222,7 @@ namespace CalamityMod.Tiles.FurnitureVoid Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/FurnitureVoid/VoidstoneSlab.cs b/Tiles/FurnitureVoid/VoidstoneSlab.cs index cab670812f..17ce4367df 100644 --- a/Tiles/FurnitureVoid/VoidstoneSlab.cs +++ b/Tiles/FurnitureVoid/VoidstoneSlab.cs @@ -161,7 +161,7 @@ namespace CalamityMod.Tiles.FurnitureVoid Color drawColour = GetDrawColour(i, j, new Color(75, 75, 75, 75)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Ores/ChaoticOre.cs b/Tiles/Ores/ChaoticOre.cs index 87b4453d0b..de7eebfd90 100644 --- a/Tiles/Ores/ChaoticOre.cs +++ b/Tiles/Ores/ChaoticOre.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Tiles.Ores if (Main.tile[i, j].LiquidAmount <= 0) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } if (Main.gamePaused) @@ -92,7 +92,7 @@ namespace CalamityMod.Tiles.Ores Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; double num6 = Main.time * 0.08; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Plates/Chaosplate.cs b/Tiles/Plates/Chaosplate.cs index 8e0dc189e2..31f959f474 100644 --- a/Tiles/Plates/Chaosplate.cs +++ b/Tiles/Plates/Chaosplate.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Tiles.Plates //Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(GlowTexture, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Plates/Cinderplate.cs b/Tiles/Plates/Cinderplate.cs index e57d7c1bf9..045f256549 100644 --- a/Tiles/Plates/Cinderplate.cs +++ b/Tiles/Plates/Cinderplate.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Tiles.Plates //Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(GlowTexture, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Plates/Elumplate.cs b/Tiles/Plates/Elumplate.cs index 131e33aa7d..c191b3af7a 100644 --- a/Tiles/Plates/Elumplate.cs +++ b/Tiles/Plates/Elumplate.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Tiles.Plates //Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(GlowTexture, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Plates/Navyplate.cs b/Tiles/Plates/Navyplate.cs index a1d30d9ec9..88097f96df 100644 --- a/Tiles/Plates/Navyplate.cs +++ b/Tiles/Plates/Navyplate.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Tiles.Plates //Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(GlowTexture, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/Plates/PlagueContainmentCells.cs b/Tiles/Plates/PlagueContainmentCells.cs index 8dd9752910..9167187b4a 100644 --- a/Tiles/Plates/PlagueContainmentCells.cs +++ b/Tiles/Plates/PlagueContainmentCells.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.Plates //Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; - if (!trackTile.IsHalfBlock && trackTile.slope() == 0) + if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(GlowTexture, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); } diff --git a/Tiles/SunkenSea/SeaPrismCrystals.cs b/Tiles/SunkenSea/SeaPrismCrystals.cs index c626d0343b..0350ac11ae 100644 --- a/Tiles/SunkenSea/SeaPrismCrystals.cs +++ b/Tiles/SunkenSea/SeaPrismCrystals.cs @@ -50,10 +50,10 @@ namespace CalamityMod.Tiles.SunkenSea public override bool CanPlace(int i, int j) { - if ((Main.tile[i, j + 1].slope() == 0 && !Main.tile[i, j + 1].IsHalfBlock && Main.tile[i, j + 1].HasTile) || - (Main.tile[i, j - 1].slope() == 0 && !Main.tile[i, j - 1].IsHalfBlock && Main.tile[i, j - 1].HasTile) || - (Main.tile[i + 1, j].slope() == 0 && !Main.tile[i + 1, j].IsHalfBlock && Main.tile[i + 1, j].HasTile) || - (Main.tile[i - 1, j].slope() == 0 && !Main.tile[i - 1, j].IsHalfBlock && Main.tile[i - 1, j].HasTile)) + if ((Main.tile[i, j + 1].Slope == 0 && !Main.tile[i, j + 1].IsHalfBlock && Main.tile[i, j + 1].HasTile) || + (Main.tile[i, j - 1].Slope == 0 && !Main.tile[i, j - 1].IsHalfBlock && Main.tile[i, j - 1].HasTile) || + (Main.tile[i + 1, j].Slope == 0 && !Main.tile[i + 1, j].IsHalfBlock && Main.tile[i + 1, j].HasTile) || + (Main.tile[i - 1, j].Slope == 0 && !Main.tile[i - 1, j].IsHalfBlock && Main.tile[i - 1, j].HasTile)) return true; return false; @@ -61,19 +61,19 @@ namespace CalamityMod.Tiles.SunkenSea public override void PlaceInWorld(int i, int j, Item item) { - if (Main.tile[i, j + 1].HasTile && Main.tileSolid[Main.tile[i, j + 1].TileType] && Main.tile[i, j + 1].slope() == 0 && !Main.tile[i, j + 1].IsHalfBlock) + if (Main.tile[i, j + 1].HasTile && Main.tileSolid[Main.tile[i, j + 1].TileType] && Main.tile[i, j + 1].Slope == 0 && !Main.tile[i, j + 1].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(0 * 18); } - else if (Main.tile[i, j - 1].HasTile && Main.tileSolid[Main.tile[i, j - 1].TileType] && Main.tile[i, j - 1].slope() == 0 && !Main.tile[i, j - 1].IsHalfBlock) + else if (Main.tile[i, j - 1].HasTile && Main.tileSolid[Main.tile[i, j - 1].TileType] && Main.tile[i, j - 1].Slope == 0 && !Main.tile[i, j - 1].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(1 * 18); } - else if (Main.tile[i + 1, j].HasTile && Main.tileSolid[Main.tile[i + 1, j].TileType] && Main.tile[i + 1, j].slope() == 0 && !Main.tile[i + 1, j].IsHalfBlock) + else if (Main.tile[i + 1, j].HasTile && Main.tileSolid[Main.tile[i + 1, j].TileType] && Main.tile[i + 1, j].Slope == 0 && !Main.tile[i + 1, j].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(2 * 18); } - else if (Main.tile[i - 1, j].HasTile && Main.tileSolid[Main.tile[i - 1, j].TileType] && Main.tile[i - 1, j].slope() == 0 && !Main.tile[i - 1, j].IsHalfBlock) + else if (Main.tile[i - 1, j].HasTile && Main.tileSolid[Main.tile[i - 1, j].TileType] && Main.tile[i - 1, j].Slope == 0 && !Main.tile[i - 1, j].IsHalfBlock) { Main.tile[i, j].TileFrameY = (short)(3 * 18); } diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 40b26c23f7..8f3a707ca2 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -21,59 +21,66 @@ namespace CalamityMod { internal class CalamityRecipes { - private static ModRecipe GetNewRecipe() - { - return new ModRecipe(ModContent.GetInstance()); - } + private static Recipe CreateRecipe() => CalamityMod.Instance.CreateRecipe(ItemID.None); + private static Recipe CreateRecipe(int itemID, int stack = 1) => CalamityMod.Instance.CreateRecipe(itemID, stack); public static void AddRecipes() { - CreateRecipe(). - AddIngredient(ItemID.Vertebrae, 2). - AddTile(TileID.WorkBenches). - ReplaceResult(ItemID.Leather); - - CreateRecipe(). - AddIngredient(ItemID.Lens). - AddIngredient(ItemID.BlackDye). - AddTile(TileID.DyeVat). - ReplaceResult(ItemID.BlackLens); - - CreateRecipe(). - AddIngredient(5). - AddTile(TileID.Anvils). - ReplaceResult(ItemID.FallenStar); - - CreateRecipe(). - AddIngredient(4). - AddTile(TileID.AdamantiteForge). - ReplaceResult(ItemID.HallowedBar); - - CreateRecipe(20). - AddIngredient(ItemID.EmptyBullet, 20). - AddIngredient(ItemID.ExplosivePowder, 1). - AddTile(TileID.MythrilAnvil).ReplaceResult(ItemID.RocketI); - - CreateRecipe(). - AddIngredient(ItemID.StoneBlock, 5). - AddIngredient(ItemID.Ruby, 2). - AddIngredient(ItemID.HealingPotion). - AddTile(TileID.Anvils). - ReplaceResult(ItemID.LifeCrystal); - - CreateRecipe(). - AddIngredient(10). - AddIngredient(). - AddTile(TileID.MythrilAnvil). - ReplaceResult(ItemID.LifeFruit); - - CreateRecipe(33). - AddIngredient(ItemID.Torch, 33). - AddIngredient(). - AddTile(TileID.Anvils). - ReplaceResult(ItemID.UltrabrightTorch); + CreateRecipe() + .AddIngredient(ItemID.Vertebrae, 2) + .AddTile(TileID.WorkBenches) + .ReplaceResult(ItemID.Leather); CreateRecipe() + .AddIngredient(ItemID.Lens) + .AddIngredient(ItemID.BlackDye) + .AddTile(TileID.DyeVat) + .ReplaceResult(ItemID.BlackLens); + + CreateRecipe() + .AddIngredient(5) + .AddTile(TileID.Anvils) + .ReplaceResult(ItemID.FallenStar); + + CreateRecipe() + .AddIngredient(4) + .AddTile(TileID.AdamantiteForge) + .ReplaceResult(ItemID.HallowedBar); + + CreateRecipe() + .AddIngredient(ItemID.EmptyBullet, 20) + .AddIngredient(ItemID.ExplosivePowder, 1) + .AddTile(TileID.MythrilAnvil).ReplaceResult(ItemID.RocketI, 20); + + CreateRecipe() + .AddIngredient(ItemID.StoneBlock, 5) + .AddIngredient(ItemID.Ruby, 2) + .AddIngredient(ItemID.HealingPotion) + .AddTile(TileID.Anvils) + .ReplaceResult(ItemID.LifeCrystal); + + CreateRecipe() + .AddIngredient(10) + .AddIngredient() + .AddTile(TileID.MythrilAnvil) + .ReplaceResult(ItemID.LifeFruit); + + CreateRecipe() + .AddIngredient(ItemID.Torch, 33) + .AddIngredient() + .AddTile(TileID.Anvils) + .ReplaceResult(ItemID.UltrabrightTorch, 33); + + CreateRecipe() + .AddIngredient(ItemID.PiggyBank) + .AddIngredient(ItemID.Feather, 2) + .AddIngredient() + .AddIngredient(ItemID.GoldCoin, 15) + .AddRecipeGroup("AnyGoldBar", 8) + .AddTile(TileID.Anvils) + .ReplaceResult(ItemID.MoneyTrough); + + CreateRecipe(). AddIngredient(ItemID.PiggyBank). AddIngredient(ItemID.Feather, 2). AddIngredient(). @@ -104,7 +111,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.PhoenixBlaster).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -124,7 +131,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.Flamarang).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -144,7 +151,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.TerraBlade).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -166,7 +173,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.FireGauntlet).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -187,7 +194,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.SpiritFlame).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -202,14 +209,13 @@ namespace CalamityMod s.createItem.SetDefaults(ItemID.SpiritFlame, false); s.createItem.stack = 1; - ModRecipe r = GetNewRecipe(); // Vanilla items don't like custom item groups. + Recipe r = CreateRecipe(ItemID.SpiritFlame); // Vanilla items don't like custom item groups. r.AddIngredient(ItemID.DjinnLamp); r.AddIngredient(ItemID.AncientBattleArmorMaterial, 2); r.AddIngredient(ItemID.SoulofNight, 12); r.AddIngredient(ItemID.TitaniumBar, 2); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.SpiritFlame); - r.AddRecipe(); + r.Register(); }); } @@ -219,7 +225,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.BeetleHelmet).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -234,7 +240,7 @@ namespace CalamityMod rec.Where(x => x.createItem.type == ItemID.BeetleScaleMail).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -249,7 +255,7 @@ namespace CalamityMod rec.Where(x => x.createItem.type == ItemID.BeetleShell).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -264,7 +270,7 @@ namespace CalamityMod rec.Where(x => x.createItem.type == ItemID.BeetleLeggings).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -327,13 +333,12 @@ namespace CalamityMod s.requiredItem[2].stack = 10; }); - ModRecipe r = GetNewRecipe(); // Vanilla items don't like custom item groups so I have to do this instead. + Recipe r = CreateRecipe(ItemID.PumpkinMoonMedallion); // Vanilla items don't like custom item groups so I have to do this instead. r.AddIngredient(ItemID.Pumpkin, 30); r.AddIngredient(ItemID.Ectoplasm, 15); r.AddIngredient(ItemID.PlatinumBar, 10); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.PumpkinMoonMedallion); - r.AddRecipe(); + r.Register(); } public static void EditFrostMoonSummonRecipe() @@ -349,13 +354,12 @@ namespace CalamityMod s.requiredItem[2].stack = 10; }); - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.NaughtyPresent); r.AddIngredient(ItemID.Silk, 20); r.AddIngredient(ItemID.Ectoplasm, 15); r.AddIngredient(ItemID.PlatinumBar, 10); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.NaughtyPresent); - r.AddRecipe(); + r.Register(); } private static void EditWingRecipes() @@ -394,7 +398,7 @@ namespace CalamityMod List rec = Main.recipe.ToList(); rec.Where(x => x.createItem.type == ItemID.OpticStaff).ToList().ForEach(s => { - for (int i = 0; i < s.requiredItem.Length; i++) + for (int i = 0; i < s.requiredItem.Count; i++) { s.requiredItem[i] = new Item(); } @@ -563,25 +567,22 @@ namespace CalamityMod private static void AstralAlternatives() { //Bowl - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.Bowl); r.AddIngredient(ModContent.ItemType(), 2); r.AddTile(TileID.Furnaces); - r.SetResult(ItemID.Bowl); - r.AddRecipe(); + r.Register(); //Clay Pot - r = GetNewRecipe(); + r = CreateRecipe(ItemID.ClayPot); r.AddIngredient(ModContent.ItemType(), 2); r.AddTile(TileID.Furnaces); - r.SetResult(ItemID.ClayPot); - r.AddRecipe(); + r.Register(); //Pink Vase - r = GetNewRecipe(); + r = CreateRecipe(ItemID.PinkVase); r.AddIngredient(ModContent.ItemType(), 2); r.AddTile(TileID.Furnaces); - r.SetResult(ItemID.PinkVase); - r.AddRecipe(); + r.Register(); } #endregion @@ -634,60 +635,53 @@ namespace CalamityMod ItemID.StinkPotion, ItemID.RecallPotion }; - ModRecipe r; + Recipe r; foreach (var potion in potions) { - r = GetNewRecipe(); + r = CreateRecipe(potion); r.AddIngredient(ModContent.ItemType(), 10); r.AddIngredient(ItemID.BottledWater); r.AddTile(TileID.AlchemyTable); - r.SetResult(potion); - r.AddRecipe(); + r.Register(); } - r = GetNewRecipe(); + r = CreateRecipe(ItemID.ArcheryPotion); r.AddIngredient(ItemID.BottledWater); r.AddIngredient(ItemID.Daybloom); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.Bottles); - r.SetResult(ItemID.ArcheryPotion); - r.AddRecipe(); + r.Register(); } #endregion #region Cooked Food private static void AddCookedFood() { - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.CookedFish); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.CookingPots); - r.SetResult(ItemID.CookedFish); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.CookedFish); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.CookingPots); - r.SetResult(ItemID.CookedFish); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.CookedFish); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.CookingPots); - r.SetResult(ItemID.CookedFish); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.CookedShrimp); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.CookingPots); - r.SetResult(ItemID.CookedShrimp); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Bacon); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.CookingPots); - r.SetResult(ItemID.Bacon); - r.AddRecipe(); + r.Register(); } #endregion @@ -696,107 +690,90 @@ namespace CalamityMod private static void AddToolRecipes() { // Magic Mirror - ModRecipe r = GetNewRecipe(); - r.AddIngredient(ItemID.IronBar, 10); + Recipe r = CreateRecipe(ItemID.MagicMirror); + r.AddRecipeGroup("IronBar", 10); r.AddIngredient(ItemID.Glass, 10); r.AddIngredient(ItemID.FallenStar, 10); - r.anyIronBar = true; r.AddTile(TileID.Anvils); - r.SetResult(ItemID.MagicMirror); - r.AddRecipe(); + r.Register(); // Ice Mirror - r = GetNewRecipe(); + r = CreateRecipe(ItemID.IceMirror); r.AddRecipeGroup("AnyIceBlock", 20); r.AddIngredient(ItemID.Glass, 10); r.AddIngredient(ItemID.FallenStar, 10); - r.AddIngredient(ItemID.IronBar, 5); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.IceMirror); - r.AddRecipe(); + r.Register(); // Shadow Key - r = GetNewRecipe(); + r = CreateRecipe(ItemID.ShadowKey); r.AddIngredient(ItemID.GoldenKey); r.AddIngredient(ItemID.Obsidian, 20); r.AddIngredient(ItemID.Bone, 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.ShadowKey); - r.AddRecipe(); + r.Register(); // Sky Mill - r = GetNewRecipe(); + r = CreateRecipe(ItemID.SkyMill); r.AddIngredient(ItemID.SunplateBlock, 10); r.AddIngredient(ItemID.Cloud, 5); r.AddIngredient(ItemID.RainCloud, 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.SkyMill); - r.AddRecipe(); + r.Register(); // Ice Machine - r = GetNewRecipe(); + r = CreateRecipe(ItemID.IceMachine); r.AddRecipeGroup("AnyIceBlock", 25); r.AddRecipeGroup("AnySnowBlock", 15); - r.AddIngredient(ItemID.IronBar, 3); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.IceMachine); - r.AddRecipe(); + r.Register(); // Bug Net - r = GetNewRecipe(); + r = CreateRecipe(ItemID.BugNet); r.AddIngredient(ItemID.Cobweb, 30); - r.AddIngredient(ItemID.IronBar, 3); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.BugNet); - r.AddRecipe(); + r.Register(); // Umbrella - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Umbrella); r.AddIngredient(ItemID.Silk, 5); - r.AddIngredient(ItemID.IronBar, 2); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 2); r.AddTile(TileID.Loom); - r.SetResult(ItemID.Umbrella); - r.AddRecipe(); + r.Register(); // Living Loom - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LivingLoom); r.AddIngredient(ItemID.Loom); r.AddIngredient(ItemID.Vine, 2); r.AddTile(TileID.Sawmill); - r.SetResult(ItemID.LivingLoom); - r.AddRecipe(); + r.Register(); // Living Wood Wand - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LivingWoodWand); r.AddIngredient(ItemID.Wood, 30); r.AddTile(TileID.LivingLoom); - r.SetResult(ItemID.LivingWoodWand); - r.AddRecipe(); + r.Register(); // Living Leaf Wand - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LeafWand); r.AddIngredient(ItemID.Wood, 30); r.AddTile(TileID.LivingLoom); - r.SetResult(ItemID.LeafWand); - r.AddRecipe(); + r.Register(); // Living Mahogany Wand - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LivingMahoganyWand); r.AddIngredient(ItemID.RichMahogany, 30); r.AddTile(TileID.LivingLoom); - r.SetResult(ItemID.LivingMahoganyWand); - r.AddRecipe(); + r.Register(); // Living Mahogany Leaf Wand - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LivingMahoganyLeafWand); r.AddIngredient(ItemID.RichMahogany, 30); r.AddTile(TileID.LivingLoom); - r.SetResult(ItemID.LivingMahoganyLeafWand); - r.AddRecipe(); + r.Register(); } #endregion @@ -805,48 +782,43 @@ namespace CalamityMod private static void AddProgressionRecipes() { // Guide Voodoo Doll - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.GuideVoodooDoll); r.AddIngredient(ItemID.Leather, 2); r.AddRecipeGroup("EvilPowder", 10); r.AddTile(TileID.Hellforge); - r.SetResult(ItemID.GuideVoodooDoll); - r.AddRecipe(); + r.Register(); // Frost Legion recipe for consistency - r = GetNewRecipe(); + r = CreateRecipe(ItemID.SnowGlobe); r.AddRecipeGroup("AnySnowBlock", 50); r.AddIngredient(ItemID.Glass, 10); r.AddIngredient(ItemID.SoulofLight, 3); r.AddIngredient(ItemID.SoulofNight, 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.SnowGlobe); - r.AddRecipe(); + r.Register(); // Temple Key - r = GetNewRecipe(); + r = CreateRecipe(ItemID.TempleKey); r.AddIngredient(ItemID.JungleSpores, 15); r.AddIngredient(ItemID.RichMahogany, 15); r.AddIngredient(ItemID.SoulofNight, 15); r.AddIngredient(ItemID.SoulofLight, 15); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.TempleKey); - r.AddRecipe(); + r.Register(); // Lihzahrd Power Cell (NOT Calamity's Old Power Cell) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LihzahrdPowerCell); r.AddIngredient(ItemID.LihzahrdBrick, 15); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.LihzahrdFurnace); - r.SetResult(ItemID.LihzahrdPowerCell); - r.AddRecipe(); + r.Register(); // Truffle Worm - r = GetNewRecipe(); + r = CreateRecipe(ItemID.TruffleWorm); r.AddIngredient(ItemID.GlowingMushroom, 15); r.AddIngredient(ItemID.Worm); r.AddTile(TileID.Autohammer); - r.SetResult(ItemID.TruffleWorm); - r.AddRecipe(); + r.Register(); } #endregion @@ -855,92 +827,79 @@ namespace CalamityMod private static void AddEarlyGameWeaponRecipes() { // Shuriken - ModRecipe r = GetNewRecipe(); - r.AddIngredient(ItemID.IronBar); - r.anyIronBar = true; + Recipe r = CreateRecipe(ItemID.Shuriken, 50); + r.AddRecipeGroup("IronBar"); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Shuriken, 50); - r.AddRecipe(); + r.Register(); // Throwing Knife - r = GetNewRecipe(); - r.AddIngredient(ItemID.IronBar); - r.anyIronBar = true; + r = CreateRecipe(ItemID.ThrowingKnife, 50); + r.AddRecipeGroup("IronBar"); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.ThrowingKnife, 50); - r.AddRecipe(); + r.Register(); // Wand of Sparking - r = GetNewRecipe(); + r = CreateRecipe(ItemID.WandofSparking); r.AddIngredient(ItemID.Wood, 5); r.AddIngredient(ItemID.Torch, 3); r.AddIngredient(ItemID.FallenStar); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.WandofSparking); - r.AddRecipe(); + r.Register(); // Starfury w/ Gold Broadsword - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Starfury); r.AddIngredient(ItemID.GoldBroadsword); r.AddIngredient(ItemID.FallenStar, 10); r.AddIngredient(ModContent.ItemType(), 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Starfury); - r.AddRecipe(); + r.Register(); // Starfury w/ Platinum Broadsword - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Starfury); r.AddIngredient(ItemID.PlatinumBroadsword); r.AddIngredient(ItemID.FallenStar, 10); r.AddIngredient(ModContent.ItemType(), 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Starfury); - r.AddRecipe(); + r.Register(); // Enchanted Sword - r = GetNewRecipe(); + r = CreateRecipe(ItemID.EnchantedSword); r.AddIngredient(ModContent.ItemType(), 10); r.AddRecipeGroup("AnyGoldBar", 12); r.AddIngredient(ItemID.Diamond); r.AddIngredient(ItemID.Ruby); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.EnchantedSword); - r.AddRecipe(); + r.Register(); // Muramasa - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Muramasa); r.AddRecipeGroup("AnyCobaltBar", 15); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Muramasa); - r.AddRecipe(); + r.Register(); // Water Bolt w/ Hardmode Spell Tome - r = GetNewRecipe(); + r = CreateRecipe(ItemID.WaterBolt); r.AddIngredient(ItemID.SpellTome); r.AddIngredient(ItemID.Waterleaf, 3); r.AddIngredient(ItemID.WaterCandle); r.AddTile(TileID.Bookcases); - r.SetResult(ItemID.WaterBolt); - r.AddRecipe(); + r.Register(); //Slime Staff - r = GetNewRecipe(); - r.AddIngredient(ItemID.Wood, 6); - r.anyWood = true; + r = CreateRecipe(ItemID.SlimeStaff); + r.AddRecipeGroup("Wood", 6); r.AddIngredient(ItemID.Gel, 40); r.AddIngredient(ItemID.PinkGel, 10); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.SlimeStaff); - r.AddRecipe(); + r.Register(); //Ice Boomerang - r = GetNewRecipe(); + r = CreateRecipe(ItemID.IceBoomerang); r.AddRecipeGroup("AnyIceBlock", 20); r.AddRecipeGroup("AnySnowBlock", 10); r.AddIngredient(ItemID.Shiverthorn); r.AddTile(TileID.IceMachine); - r.SetResult(ItemID.IceBoomerang); - r.AddRecipe(); + r.Register(); } #endregion @@ -949,172 +908,148 @@ namespace CalamityMod private static void AddEarlyGameAccessoryRecipes() { // Cloud in a Bottle - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.CloudinaBottle); r.AddIngredient(ItemID.Feather, 2); r.AddIngredient(ItemID.Bottle); r.AddIngredient(ItemID.Cloud, 25); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.CloudinaBottle); - r.AddRecipe(); + r.Register(); // Hermes Boots - r = GetNewRecipe(); + r = CreateRecipe(ItemID.HermesBoots); r.AddIngredient(ItemID.Silk, 10); r.AddIngredient(ItemID.SwiftnessPotion, 2); r.AddTile(TileID.Loom); - r.SetResult(ItemID.HermesBoots); - r.AddRecipe(); + r.Register(); // Blizzard in a Bottle - r = GetNewRecipe(); + r = CreateRecipe(ItemID.BlizzardinaBottle); r.AddIngredient(ItemID.Feather, 4); r.AddIngredient(ItemID.Bottle); r.AddRecipeGroup("AnySnowBlock", 50); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.BlizzardinaBottle); - r.AddRecipe(); + r.Register(); // Sandstorm in a Bottle - r = GetNewRecipe(); + r = CreateRecipe(ItemID.SandstorminaBottle); r.AddIngredient(ModContent.ItemType(), 10); r.AddIngredient(ItemID.Feather, 6); r.AddIngredient(ItemID.Bottle); r.AddIngredient(ItemID.SandBlock, 70); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.SandstorminaBottle); - r.AddRecipe(); + r.Register(); // Frog Leg - r = GetNewRecipe(); + r = CreateRecipe(ItemID.FrogLeg); r.AddIngredient(ItemID.Frog, 6); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.FrogLeg); - r.AddRecipe(); + r.Register(); // Flying Carpet - r = GetNewRecipe(); + r = CreateRecipe(ItemID.FlyingCarpet); r.AddIngredient(ItemID.AncientCloth, 10); r.AddIngredient(ItemID.SoulofLight, 10); r.AddIngredient(ItemID.SoulofNight, 10); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.FlyingCarpet); - r.AddRecipe(); + r.Register(); // Aglet - r = GetNewRecipe(); - r.AddIngredient(ItemID.IronBar, 5); - r.anyIronBar = true; + r = CreateRecipe(ItemID.Aglet); + r.AddRecipeGroup("IronBar", 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Aglet); - r.AddRecipe(); + r.Register(); // Anklet of the Wind - r = GetNewRecipe(); + r = CreateRecipe(ItemID.AnkletoftheWind); r.AddIngredient(ItemID.JungleSpores, 15); r.AddIngredient(ItemID.Cloud, 15); r.AddIngredient(ItemID.PinkGel, 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.AnkletoftheWind); - r.AddRecipe(); + r.Register(); // Water Walking Boots - r = GetNewRecipe(); + r = CreateRecipe(ItemID.WaterWalkingBoots); r.AddIngredient(ItemID.Leather, 5); r.AddIngredient(ItemID.WaterWalkingPotion, 8); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.WaterWalkingBoots); - r.AddRecipe(); + r.Register(); // Ice Skates - r = GetNewRecipe(); + r = CreateRecipe(ItemID.IceSkates); r.AddRecipeGroup("AnyIceBlock", 20); r.AddIngredient(ItemID.Leather, 5); - r.AddIngredient(ItemID.IronBar, 5); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 5); r.AddTile(TileID.IceMachine); - r.SetResult(ItemID.IceSkates); - r.AddRecipe(); + r.Register(); // Lucky Horseshoe - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LuckyHorseshoe); r.AddIngredient(ItemID.SunplateBlock, 10); r.AddIngredient(ItemID.Cloud, 10); r.AddRecipeGroup("AnyGoldBar", 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.LuckyHorseshoe); - r.AddRecipe(); + r.Register(); // Shiny Red Balloon - r = GetNewRecipe(); + r = CreateRecipe(ItemID.ShinyRedBalloon); r.AddIngredient(ItemID.WhiteString); r.AddIngredient(ItemID.Gel, 80); r.AddIngredient(ItemID.Cloud, 40); r.AddTile(TileID.Solidifier); - r.SetResult(ItemID.ShinyRedBalloon); - r.AddRecipe(); + r.Register(); // Lava Charm - r = GetNewRecipe(); + r = CreateRecipe(ItemID.LavaCharm); r.AddIngredient(ItemID.LavaBucket, 5); r.AddIngredient(ItemID.Obsidian, 25); - r.AddIngredient(ItemID.IronBar, 5); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.LavaCharm); - r.AddRecipe(); + r.Register(); // Obsidian Rose - r = GetNewRecipe(); + r = CreateRecipe(ItemID.ObsidianRose); r.AddIngredient(ItemID.JungleRose); r.AddIngredient(ItemID.Obsidian, 10); r.AddIngredient(ItemID.Hellstone, 10); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.ObsidianRose); - r.AddRecipe(); + r.Register(); // Feral Claws - r = GetNewRecipe(); + r = CreateRecipe(ItemID.FeralClaws); r.AddIngredient(ItemID.Leather, 10); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.FeralClaws); - r.AddRecipe(); + r.Register(); // Radar - r = GetNewRecipe(); - r.AddIngredient(ItemID.IronBar, 5); - r.anyIronBar = true; + r = CreateRecipe(ItemID.Radar); + r.AddRecipeGroup("IronBar", 5); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Radar); - r.AddRecipe(); + r.Register(); // Metal Detector - r = GetNewRecipe(); + r = CreateRecipe(ItemID.MetalDetector); r.AddIngredient(ItemID.Wire, 10); r.AddIngredient(ItemID.GoldDust, 5); r.AddIngredient(ItemID.SpelunkerGlowstick, 5); - r.AddIngredient(ItemID.IronBar, 5); - r.anyIronBar = true; + r.AddRecipeGroup("IronBar", 5); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.MetalDetector); - r.AddRecipe(); + r.Register(); // Hand Warmer - r = GetNewRecipe(); + r = CreateRecipe(ItemID.HandWarmer); r.AddIngredient(ItemID.Silk, 5); r.AddIngredient(ItemID.Shiverthorn); r.AddRecipeGroup("AnySnowBlock", 10); r.AddTile(TileID.Loom); - r.SetResult(ItemID.HandWarmer); - r.AddRecipe(); + r.Register(); // Flower Boots - r = GetNewRecipe(); + r = CreateRecipe(ItemID.FlowerBoots); r.AddIngredient(ItemID.Silk, 7); r.AddIngredient(ItemID.JungleRose); r.AddIngredient(ItemID.JungleGrassSeeds, 5); r.AddTile(TileID.Loom); - r.SetResult(ItemID.FlowerBoots); - r.AddRecipe(); + r.Register(); } #endregion @@ -1123,42 +1058,37 @@ namespace CalamityMod private static void AddArmorRecipes() { // Eskimo armor - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.EskimoHood); r.AddIngredient(ItemID.Silk, 4); r.AddIngredient(ItemID.Leather); r.AddIngredient(ItemID.BorealWood, 12); r.AddTile(TileID.Loom); - r.SetResult(ItemID.EskimoHood); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.EskimoCoat); r.AddIngredient(ItemID.Silk, 8); r.AddIngredient(ItemID.Leather); r.AddIngredient(ItemID.BorealWood, 18); r.AddTile(TileID.Loom); - r.SetResult(ItemID.EskimoCoat); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.EskimoPants); r.AddIngredient(ItemID.Silk, 6); r.AddIngredient(ItemID.Leather); r.AddIngredient(ItemID.BorealWood, 15); r.AddTile(TileID.Loom); - r.SetResult(ItemID.EskimoPants); - r.AddRecipe(); + r.Register(); // Pharaoh set - r = GetNewRecipe(); + r = CreateRecipe(ItemID.PharaohsMask); r.AddIngredient(ItemID.AncientCloth, 3); r.AddTile(TileID.Loom); - r.SetResult(ItemID.PharaohsMask); - r.AddRecipe(); + r.Register(); - r = GetNewRecipe(); + r = CreateRecipe(ItemID.PharaohsRobe); r.AddIngredient(ItemID.AncientCloth, 4); r.AddTile(TileID.Loom); - r.SetResult(ItemID.PharaohsRobe); - r.AddRecipe(); + r.Register(); } #endregion @@ -1167,90 +1097,80 @@ namespace CalamityMod private static void AddAnkhShieldRecipes() { // Cobalt Shield - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.CobaltShield); r.AddRecipeGroup("AnyCobaltBar", 10); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.CobaltShield); - r.AddRecipe(); + r.Register(); // Armor Polish (broken armor) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.ArmorPolish); r.AddIngredient(ItemID.Bone, 50); r.AddIngredient(ModContent.ItemType(), 3); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.ArmorPolish); - r.AddRecipe(); + r.Register(); // Adhesive Bandage (bleeding) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.AdhesiveBandage); r.AddIngredient(ItemID.Silk, 10); r.AddIngredient(ItemID.Gel, 50); r.AddIngredient(ItemID.GreaterHealingPotion); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.AdhesiveBandage); - r.AddRecipe(); + r.Register(); // Bezoar (poison) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Bezoar); r.AddIngredient(ItemID.Stinger, 15); r.AddIngredient(ModContent.ItemType()); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.Bezoar); - r.AddRecipe(); + r.Register(); // Nazar (curse) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Nazar); r.AddIngredient(ItemID.SoulofNight, 15); r.AddIngredient(ItemID.Lens, 3); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.Nazar); - r.AddRecipe(); + r.Register(); // Vitamins (weakness) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Vitamins); r.AddIngredient(ItemID.BottledWater); r.AddIngredient(ItemID.Waterleaf, 5); r.AddIngredient(ItemID.Blinkroot, 5); r.AddIngredient(ItemID.Daybloom, 5); r.AddIngredient(ModContent.ItemType(), 3); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.Vitamins); - r.AddRecipe(); + r.Register(); // Blindfold (darkness) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Blindfold); r.AddIngredient(ItemID.Silk, 30); r.AddIngredient(ItemID.SoulofNight, 5); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.Blindfold); - r.AddRecipe(); + r.Register(); // Trifold Map (confusion) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.TrifoldMap); r.AddIngredient(ItemID.Silk, 20); r.AddIngredient(ItemID.SoulofLight, 3); r.AddIngredient(ItemID.SoulofNight, 3); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.TrifoldMap); - r.AddRecipe(); + r.Register(); // Fast Clock (slow) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.FastClock); r.AddIngredient(ItemID.Timer1Second); r.AddIngredient(ItemID.PixieDust, 15); r.AddIngredient(ItemID.SoulofLight, 5); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.FastClock); - r.AddRecipe(); + r.Register(); // Megaphone (silence) - r = GetNewRecipe(); + r = CreateRecipe(ItemID.Megaphone); r.AddIngredient(ItemID.Wire, 10); r.AddRecipeGroup("AnyCobaltBar", 5); r.AddIngredient(ItemID.Ruby, 3); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.Megaphone); - r.AddRecipe(); + r.Register(); } #endregion @@ -1259,65 +1179,58 @@ namespace CalamityMod private static void AddAlternateHardmodeRecipes() { // Avenger Emblem made with Rogue Emblem - ModRecipe r = GetNewRecipe(); + Recipe r = CreateRecipe(ItemID.AvengerEmblem); r.AddIngredient(ModContent.ItemType()); r.AddIngredient(ItemID.SoulofMight, 5); r.AddIngredient(ItemID.SoulofSight, 5); r.AddIngredient(ItemID.SoulofFright, 5); r.AddTile(TileID.TinkerersWorkbench); - r.SetResult(ItemID.AvengerEmblem); - r.AddRecipe(); + r.Register(); // Celestial Magnet - r = GetNewRecipe(); + r = CreateRecipe(ItemID.CelestialMagnet); r.AddIngredient(ItemID.FallenStar, 20); r.AddIngredient(ItemID.SoulofMight, 10); r.AddIngredient(ItemID.SoulofLight, 5); r.AddIngredient(ItemID.SoulofNight, 5); r.AddRecipeGroup("AnyCobaltBar", 3); r.AddTile(TileID.Anvils); - r.SetResult(ItemID.CelestialMagnet); - r.AddRecipe(); + r.Register(); // Frozen Turtle Shell - r = GetNewRecipe(); + r = CreateRecipe(ItemID.FrozenTurtleShell); r.AddIngredient(ItemID.TurtleShell, 3); r.AddIngredient(ModContent.ItemType(), 9); r.AddTile(TileID.IceMachine); - r.SetResult(ItemID.FrozenTurtleShell); - r.AddRecipe(); + r.Register(); // Magic Quiver - r = GetNewRecipe(); + r = CreateRecipe(ItemID.MagicQuiver); r.AddIngredient(ItemID.EndlessQuiver); r.AddIngredient(ItemID.PixieDust, 10); r.AddIngredient(ModContent.ItemType(), 5); r.AddIngredient(ItemID.SoulofLight, 8); r.AddTile(TileID.CrystalBall); - r.SetResult(ItemID.MagicQuiver); - r.AddRecipe(); + r.Register(); // Terra Blade w/ True Bloody Edge - r = GetNewRecipe(); + r = CreateRecipe(ItemID.TerraBlade); r.AddIngredient(ModContent.ItemType()); r.AddIngredient(ItemID.TrueExcalibur); r.AddIngredient(ModContent.ItemType(), 7); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.TerraBlade); - r.AddRecipe(); + r.Register(); // Turtle Shell with Giant Tortoise Shell - r = GetNewRecipe(); + r = CreateRecipe(ItemID.TurtleShell); r.AddIngredient(ModContent.ItemType()); - r.SetResult(ItemID.TurtleShell); - r.AddRecipe(); + r.Register(); // Pulse Bow - r = GetNewRecipe(); + r = CreateRecipe(ItemID.PulseBow); r.AddIngredient(ItemID.ShroomiteBar, 16); r.AddTile(TileID.MythrilAnvil); - r.SetResult(ItemID.PulseBow); - r.AddRecipe(); + r.Register(); } #endregion diff --git a/Utilities/WorldgenUtils.cs b/Utilities/WorldgenUtils.cs index eb6e2ad781..55017eec6b 100644 --- a/Utilities/WorldgenUtils.cs +++ b/Utilities/WorldgenUtils.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using Terraria; using Terraria.ID; diff --git a/Walls/AbyssGravelWall.cs b/Walls/AbyssGravelWall.cs index 88cfe72c29..edeb55200b 100644 --- a/Walls/AbyssGravelWall.cs +++ b/Walls/AbyssGravelWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Walls if (Main.tile[i, j].LiquidAmount <= 0 && j < Main.maxTilesY - 205) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } diff --git a/Walls/EutrophicSandWall.cs b/Walls/EutrophicSandWall.cs index dbc98a5708..b008b4f636 100644 --- a/Walls/EutrophicSandWall.cs +++ b/Walls/EutrophicSandWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Walls if (Main.tile[i, j].LiquidAmount <= 0) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } diff --git a/Walls/SulphurousSandWall.cs b/Walls/SulphurousSandWall.cs index 57d95d2459..801c711779 100644 --- a/Walls/SulphurousSandWall.cs +++ b/Walls/SulphurousSandWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Walls if (Main.tile[i, j].LiquidAmount <= 0) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } diff --git a/Walls/SulphurousSandstoneWall.cs b/Walls/SulphurousSandstoneWall.cs index 5be1e387b4..f170a08ba4 100644 --- a/Walls/SulphurousSandstoneWall.cs +++ b/Walls/SulphurousSandstoneWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Walls if (Main.tile[i, j].LiquidAmount <= 0) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } diff --git a/Walls/VoidstoneWallUnsafe.cs b/Walls/VoidstoneWallUnsafe.cs index 2b77d172d2..2000e4eed1 100644 --- a/Walls/VoidstoneWallUnsafe.cs +++ b/Walls/VoidstoneWallUnsafe.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Walls if (Main.tile[i, j].LiquidAmount <= 0 && j < Main.maxTilesY - 205) { Main.tile[i, j].LiquidAmount = 255; - Main.tile[i, j].LiquidType = LiquidID.Water; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; } } diff --git a/World/Abyss.cs b/World/Abyss.cs index a79ccca8a6..c5d41f71e2 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -66,7 +66,7 @@ namespace CalamityMod.World } else if (!tile.HasTile) { - tile.active(true); + tile.Get().HasTile = true; tile.WallType = (ushort)ModContent.WallType(); tile.TileType = (ushort)ModContent.TileType(); } @@ -83,7 +83,7 @@ namespace CalamityMod.World } else if (!tile.HasTile) { - tile.active(true); + tile.Get().HasTile = true; tile.WallType = (ushort)ModContent.WallType(); tile.TileType = (ushort)ModContent.TileType(); } @@ -111,7 +111,7 @@ namespace CalamityMod.World } else if (!tile.HasTile) { - tile.active(true); + tile.Get().HasTile = true; if (abyssIndex2 > (rockLayer + y * 0.262)) { tile.TileType = (ushort)ModContent.TileType(); @@ -162,7 +162,7 @@ namespace CalamityMod.World } else if (!tile.HasTile) { - tile.active(true); + tile.Get().HasTile = true; tile.WallType = (ushort)ModContent.WallType(); tile.TileType = (ushort)ModContent.TileType(); } @@ -179,7 +179,7 @@ namespace CalamityMod.World } else if (!tile.HasTile) { - tile.active(true); + tile.Get().HasTile = true; tile.WallType = (ushort)ModContent.WallType(); tile.TileType = (ushort)ModContent.TileType(); } @@ -207,7 +207,7 @@ namespace CalamityMod.World } else if (!tile.HasTile) { - tile.active(true); + tile.Get().HasTile = true; if (abyssIndex2 > (rockLayer + y * 0.262)) { tile.TileType = (ushort)ModContent.TileType(); @@ -448,7 +448,7 @@ namespace CalamityMod.World { num6 = l; } - Main.tile[k, l].active(true); + Main.tile[k, l].Get().HasTile = true; Main.tile[k, l].TileType = (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType()); CalamityUtils.SafeSquareTileFrame(k, l, true); } @@ -500,7 +500,7 @@ namespace CalamityMod.World float num18 = (float)(Math.Abs(num17 - num14) * 2); if (Math.Sqrt((double)(arg_409_0 * arg_409_0 + num18 * num18)) < (double)(num15 + WorldGen.genRand.Next(2))) { - Main.tile[n, num17].active(true); + Main.tile[n, num17].Get().HasTile = true; Main.tile[n, num17].TileType = (ushort)num16; CalamityUtils.SafeSquareTileFrame(n, num17, true); } @@ -532,7 +532,7 @@ namespace CalamityMod.World float num18 = (float)(Math.Abs(num17 - num14) * 2); if (Math.Sqrt((double)(arg_409_0 * arg_409_0 + num18 * num18)) < (double)(num150 + WorldGen.genRand.Next(2))) { - Main.tile[n, num17].active(true); + Main.tile[n, num17].Get().HasTile = true; Main.tile[n, num17].TileType = (ushort)num16; CalamityUtils.SafeSquareTileFrame(n, num17, true); } @@ -652,23 +652,23 @@ namespace CalamityMod.World { if (Main.tile[num37, num35].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) { - Main.tile[num37, num35].active(false); + Main.tile[num37, num35].Get().HasTile = false; Main.tile[num37, num35].LiquidAmount = 255; - Main.tile[num37, num35].LiquidType = LiquidID.Water; + Main.tile[num37, num35].Get().LiquidType = LiquidID.Water; CalamityUtils.SafeSquareTileFrame(num34, num35, true); } if (Main.tile[num37, num35 + 1].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) { - Main.tile[num37, num35 + 1].active(false); + Main.tile[num37, num35 + 1].Get().HasTile = false; Main.tile[num37, num35 + 1].LiquidAmount = 255; - Main.tile[num37, num35 + 1].LiquidType = LiquidID.Water; + Main.tile[num37, num35 + 1].Get().LiquidType = LiquidID.Water; CalamityUtils.SafeSquareTileFrame(num34, num35 + 1, true); } if (num37 > num34 - num36 && num37 < num34 + 2 && Main.tile[num37, num35 + 2].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) { - Main.tile[num37, num35 + 2].active(false); + Main.tile[num37, num35 + 2].Get().HasTile = false; Main.tile[num37, num35 + 2].LiquidAmount = 255; - Main.tile[num37, num35 + 2].LiquidType = LiquidID.Water; + Main.tile[num37, num35 + 2].Get().LiquidType = LiquidID.Water; CalamityUtils.SafeSquareTileFrame(num34, num35 + 2, true); } } @@ -677,7 +677,7 @@ namespace CalamityMod.World { Main.tile[num34, num35].LiquidAmount = 255; } - Main.tile[num34, num35].LiquidType = LiquidID.Water; + Main.tile[num34, num35].Get().LiquidType = LiquidID.Water; CalamityUtils.SafeSquareTileFrame(num34, num35, true); } } @@ -731,11 +731,11 @@ namespace CalamityMod.World { if (m != num6 - 1 || (l != num4 && l != num5)) { - Main.tile[l, m].active(true); + Main.tile[l, m].Get().HasTile = true; Main.tile[l, m].TileType = type; Main.tile[l, m].WallType = wall; - Main.tile[l, m].halfBrick(false); - Main.tile[l, m].slope(0); + Main.tile[l, m].Get().IsHalfBlock = false; + Main.tile[l, m].Get().Slope = SlopeType.Solid; } } } @@ -765,7 +765,7 @@ namespace CalamityMod.World { if ((num8 != num6 || (n != num4 && n != num5)) && Main.tile[n, num8].WallType == wall) { - Main.tile[n, num8].active(false); + Main.tile[n, num8].Get().HasTile = false; } } } @@ -773,9 +773,9 @@ namespace CalamityMod.World int num10 = (int)vector.Y; for (int num11 = num9 - 2; num11 <= num9 + 2; num11++) { - Main.tile[num11, num10].active(false); - Main.tile[num11, num10 - 1].active(false); - Main.tile[num11, num10 - 2].active(false); + Main.tile[num11, num10].Get().HasTile = false; + Main.tile[num11, num10 - 1].Get().HasTile = false; + Main.tile[num11, num10 - 2].Get().HasTile = false; } switch (itemChoice) { diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index a4c966fe7a..e73fb44d39 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -250,7 +250,7 @@ namespace CalamityMod.World { if (!Main.tileSolid[(int)Main.tile[num2, num3].TileType]) { - Main.tile[num2, num3].active(false); + Main.tile[num2, num3].Get().HasTile = false; } Main.tile[num2, num3].TileType = (ushort)ModContent.TileType(); } @@ -271,7 +271,7 @@ namespace CalamityMod.World if ((double)num11 < (double)num * 0.8 + (double)rand.Next(-3, 4)) { if (Main.tile[num7, num8] != null) - Main.tile[num7, num8].active(false); + Main.tile[num7, num8].Get().HasTile = false; } } } @@ -301,11 +301,11 @@ namespace CalamityMod.World { if (!WorldGen.SolidTile(num12 - 1, num13) && !WorldGen.SolidTile(num12 + 1, num13) && !WorldGen.SolidTile(num12, num13 - 1) && !WorldGen.SolidTile(num12, num13 + 1)) { - Main.tile[num12, num13].active(false); + Main.tile[num12, num13].Get().HasTile = false; } else if ((Main.tile[num12, num13].IsHalfBlock || Main.tile[num12 - 1, num13].topSlope()) && !WorldGen.SolidTile(num12, num13 + 1)) { - Main.tile[num12, num13].active(false); + Main.tile[num12, num13].Get().HasTile = false; } } WorldGen.SquareTileFrame(num12, num13, true); diff --git a/World/CustomTemple.cs b/World/CustomTemple.cs index 2af86a91d6..bbe17a643f 100644 --- a/World/CustomTemple.cs +++ b/World/CustomTemple.cs @@ -158,10 +158,10 @@ namespace CalamityMod.World } for (int roomPositionY = roomTop; roomPositionY < roomBottom; roomPositionY++) { - Main.tile[roomPositionX, roomPositionY].active(true); + Main.tile[roomPositionX, roomPositionY].Get().HasTile = true; Main.tile[roomPositionX, roomPositionY].TileType = TileID.LihzahrdBrick; Main.tile[roomPositionX, roomPositionY].LiquidAmount = 0; - Main.tile[roomPositionX, roomPositionY].slope(0); + Main.tile[roomPositionX, roomPositionY].Get().Slope = SlopeType.Solid; Main.tile[roomPositionX, roomPositionY].halfBrick(false); } } @@ -178,10 +178,10 @@ namespace CalamityMod.World { for (int roomPositionY = roomBounds[i].Y; roomPositionY < roomBounds[i].Y + roomBounds[i].Height; roomPositionY++) { - Main.tile[roomPositionX, roomPositionY].active(true); + Main.tile[roomPositionX, roomPositionY].Get().HasTile = true; Main.tile[roomPositionX, roomPositionY].TileType = TileID.LihzahrdBrick; Main.tile[roomPositionX, roomPositionY].LiquidAmount = 0; - Main.tile[roomPositionX, roomPositionY].slope(0); + Main.tile[roomPositionX, roomPositionY].Get().Slope = SlopeType.Solid; Main.tile[roomPositionX, roomPositionY].halfBrick(false); } } @@ -346,7 +346,7 @@ namespace CalamityMod.World } if (Main.tile[(int)endPathPosition.X, dy].HasTile && Main.tile[(int)endPathPosition.X, dy].TileType == TileID.LihzahrdBrick) { - Main.tile[(int)endPathPosition.X, dy].active(false); + Main.tile[(int)endPathPosition.X, dy].Get().HasTile = false; Main.tile[(int)endPathPosition.X, dy].WallType = WallID.LihzahrdBrickUnsafe; } dy++; @@ -371,10 +371,10 @@ namespace CalamityMod.World { for (int dy = doorTop; dy <= doorPositionY; dy++) { - Main.tile[dx, dy].active(true); + Main.tile[dx, dy].Get().HasTile = true; Main.tile[dx, dy].TileType = TileID.LihzahrdBrick; Main.tile[dx, dy].LiquidAmount = 0; - Main.tile[dx, dy].slope(0); + Main.tile[dx, dy].Get().Slope = SlopeType.Solid; Main.tile[dx, dy].halfBrick(false); } } @@ -382,7 +382,7 @@ namespace CalamityMod.World { for (int dy = doorPositionY - 1; dy < doorPositionY + 3; dy++) { - Main.tile[dx, dy].active(false); + Main.tile[dx, dy].Get().HasTile = false; Main.tile[dx, dy].WallType = WallID.LihzahrdBrickUnsafe; } } @@ -390,10 +390,10 @@ namespace CalamityMod.World { for (int dy = doorPositionY - 5; dy <= doorPositionY + 8; dy++) { - Main.tile[dx, dy].active(true); + Main.tile[dx, dy].Get().HasTile = true; Main.tile[dx, dy].TileType = TileID.LihzahrdBrick; Main.tile[dx, dy].LiquidAmount = 0; - Main.tile[dx, dy].slope(0); + Main.tile[dx, dy].Get().Slope = SlopeType.Solid; Main.tile[dx, dy].halfBrick(false); } } @@ -401,7 +401,7 @@ namespace CalamityMod.World { for (int dy = doorPositionY; dy < doorPositionY + 3; dy++) { - Main.tile[dx, dy].active(false); + Main.tile[dx, dy].Get().HasTile = false; Main.tile[dx, dy].WallType = WallID.LihzahrdBrickUnsafe; } } @@ -496,12 +496,12 @@ namespace CalamityMod.World if (yMoveDirection == 0) { Main.tile[dx, dy - 1].TileType = TileID.WoodenSpikes; - Main.tile[dx, dy - 1].active(true); + Main.tile[dx, dy - 1].Get().HasTile = true; } else { Main.tile[dx, dy + 1].TileType = TileID.WoodenSpikes; - Main.tile[dx, dy + 1].active(true); + Main.tile[dx, dy + 1].Get().HasTile = true; } yMoveDirection++; if (yMoveDirection > 1) @@ -553,12 +553,12 @@ namespace CalamityMod.World if (yMoveDirection == 0) { Main.tile[dx - 1, dy].TileType = TileID.WoodenSpikes; - Main.tile[dx - 1, dy].active(true); + Main.tile[dx - 1, dy].Get().HasTile = true; } else { Main.tile[dx + 1, dy].TileType = TileID.WoodenSpikes; - Main.tile[dx + 1, dy].active(true); + Main.tile[dx + 1, dy].Get().HasTile = true; } yMoveDirection++; if (yMoveDirection > 1) @@ -635,7 +635,7 @@ namespace CalamityMod.World if (dx >= offsettedRoomLeft && (dx < offsettedRoomRight & dy >= offsettedRoomTop) && dy <= offsettedRoomBottom) { - Main.tile[dx, dy].active(false); + Main.tile[dx, dy].Get().HasTile = false; Main.tile[dx, dy].LiquidAmount = 0; // Apparently this can indeed happen, and it can interfere with furniture placement. Main.tile[dx, dy].WallType = WallID.LihzahrdBrickUnsafe; } @@ -664,7 +664,7 @@ namespace CalamityMod.World if (dx >= offsettedRoomLeft && (dx < offsettedRoomRight & dy >= offsettedRoomTop) && dy <= offsettedRoomBottom) { - Main.tile[dx, dy].active(false); + Main.tile[dx, dy].Get().HasTile = false; Main.tile[dx, dy].LiquidAmount = 0; // Apparently this can indeed happen, and it can interfere with furniture placement. Main.tile[dx, dy].WallType = WallID.LihzahrdBrickUnsafe; } @@ -679,7 +679,7 @@ namespace CalamityMod.World { for (int dy = roomBounds.Top; dy < roomBounds.Bottom; dy++) { - Main.tile[dx, dy].active(false); + Main.tile[dx, dy].Get().HasTile = false; Main.tile[dx, dy].LiquidAmount = 0; // Apparently this can indeed happen, and it can interfere with furniture placement. Main.tile[dx, dy].WallType = WallID.LihzahrdBrickUnsafe; } @@ -709,10 +709,10 @@ namespace CalamityMod.World for (int y = roomBottom - height; y <= roomBottom; y++) { - Main.tile[roomCenterX - dx, y].active(true); + Main.tile[roomCenterX - dx, y].Get().HasTile = true; Main.tile[roomCenterX - dx, y].TileType = TileID.LihzahrdBrick; - Main.tile[roomCenterX + dx, y].active(true); + Main.tile[roomCenterX + dx, y].Get().HasTile = true; Main.tile[roomCenterX + dx, y].TileType = TileID.LihzahrdBrick; } } @@ -904,15 +904,15 @@ namespace CalamityMod.World { int framedAlterPositionX = alterPositionX + i; int framedAlterPositionY = alterPositionY + j; - Main.tile[framedAlterPositionX, framedAlterPositionY].active(true); + Main.tile[framedAlterPositionX, framedAlterPositionY].Get().HasTile = true; Main.tile[framedAlterPositionX, framedAlterPositionY].TileType = TileID.LihzahrdAltar; Main.tile[framedAlterPositionX, framedAlterPositionY].TileFrameX = (short)(i * 18); Main.tile[framedAlterPositionX, framedAlterPositionY].TileFrameY = (short)(j * 18); } // Ensure that the tiles below the altar are active and valid. - Main.tile[i, alterPositionY + 2].active(true); - Main.tile[i, alterPositionY + 2].slope(0); + Main.tile[i, alterPositionY + 2].Get().HasTile = true; + Main.tile[i, alterPositionY + 2].Get().Slope = SlopeType.Solid; Main.tile[i, alterPositionY + 2].halfBrick(false); Main.tile[i, alterPositionY + 2].TileType = TileID.LihzahrdBrick; } diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index df1ca58a32..934b488bd3 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -194,7 +194,7 @@ namespace CalamityMod.World for (int dx = -1; dx < 2; dx++) { for (int dy = -1; dy < 2; dy++) - Main.tile[x + dx, y + dy].active(false); + Main.tile[x + dx, y + dy].Get().HasTile = false; } WorldGen.PlaceTile(x, y + 1, ModContent.TileType()); @@ -295,7 +295,7 @@ namespace CalamityMod.World { num6 = l; } - Main.tile[k, l].active(true); + Main.tile[k, l].Get().HasTile = true; Main.tile[k, l].TileType = (ushort)ModContent.TileType(); WorldGen.SquareTileFrame(k, l, true); } @@ -349,7 +349,7 @@ namespace CalamityMod.World float num18 = (float)(Math.Abs(num17 - num14) * 2); if (Math.Sqrt((double)(arg_409_0 * arg_409_0 + num18 * num18)) < (double)(num15 + WorldGen.genRand.Next(2))) { - Main.tile[n, num17].active(true); + Main.tile[n, num17].Get().HasTile = true; Main.tile[n, num17].TileType = (ushort)num16; WorldGen.SquareTileFrame(n, num17, true); } @@ -444,23 +444,23 @@ namespace CalamityMod.World { if (Main.tile[num37, num35].TileType == (ushort)ModContent.TileType()) { - Main.tile[num37, num35].active(false); + Main.tile[num37, num35].Get().HasTile = false; Main.tile[num37, num35].LiquidAmount = 255; - Main.tile[num37, num35].LiquidType = LiquidID.Water; + Main.tile[num37, num35].Get().LiquidType = LiquidID.Water; WorldGen.SquareTileFrame(num34, num35, true); } if (Main.tile[num37, num35 + 1].TileType == (ushort)ModContent.TileType()) { - Main.tile[num37, num35 + 1].active(false); + Main.tile[num37, num35 + 1].Get().HasTile = false; Main.tile[num37, num35 + 1].LiquidAmount = 255; - Main.tile[num37, num35 + 1].LiquidType = LiquidID.Water; + Main.tile[num37, num35 + 1].Get().LiquidType = LiquidID.Water; WorldGen.SquareTileFrame(num34, num35 + 1, true); } if (num37 > num34 - num36 && num37 < num34 + 2 && Main.tile[num37, num35 + 2].TileType == (ushort)ModContent.TileType()) { - Main.tile[num37, num35 + 2].active(false); + Main.tile[num37, num35 + 2].Get().HasTile = false; Main.tile[num37, num35 + 2].LiquidAmount = 255; - Main.tile[num37, num35 + 2].LiquidType = LiquidID.Water; + Main.tile[num37, num35 + 2].Get().LiquidType = LiquidID.Water; WorldGen.SquareTileFrame(num34, num35 + 2, true); } } @@ -469,7 +469,7 @@ namespace CalamityMod.World { Main.tile[num34, num35].LiquidAmount = 255; } - Main.tile[num34, num35].LiquidType = LiquidID.Water; + Main.tile[num34, num35].Get().LiquidType = LiquidID.Water; WorldGen.SquareTileFrame(num34, num35, true); } } @@ -525,12 +525,12 @@ namespace CalamityMod.World { if (m != num6 - 1 || (l != num4 && l != num5)) { - Main.tile[l, m].active(true); + Main.tile[l, m].Get().HasTile = true; Main.tile[l, m].LiquidAmount = 0; Main.tile[l, m].TileType = type; Main.tile[l, m].WallType = 0; Main.tile[l, m].halfBrick(false); - Main.tile[l, m].slope(0); + Main.tile[l, m].Get().Slope = SlopeType.Solid; } } } @@ -560,7 +560,7 @@ namespace CalamityMod.World { if ((num8 != num6 || (n != num4 && n != num5)) && Main.tile[n, num8].WallType == 0) { - Main.tile[n, num8].active(false); + Main.tile[n, num8].Get().HasTile = false; Main.tile[n, num8].WallType = wall; } } @@ -569,20 +569,20 @@ namespace CalamityMod.World int num10 = (int)vector.Y; for (int num11 = num9 - 2; num11 <= num9 + 2; num11++) { - Main.tile[num11, num10].active(false); - Main.tile[num11, num10 - 1].active(false); - Main.tile[num11, num10 - 2].active(false); + Main.tile[num11, num10].Get().HasTile = false; + Main.tile[num11, num10 - 1].Get().HasTile = false; + Main.tile[num11, num10 - 2].Get().HasTile = false; } WorldGen.PlaceTile(num9, num10, ModContent.TileType(), true, false, -1); //door num9 = i + (num2 + 1) * -num - num; for (int num12 = num6; num12 <= num7 + 1; num12++) { - Main.tile[num9, num12].active(true); + Main.tile[num9, num12].Get().HasTile = true; Main.tile[num9, num12].LiquidAmount = 0; Main.tile[num9, num12].TileType = type; Main.tile[num9, num12].WallType = 0; Main.tile[num9, num12].halfBrick(false); - Main.tile[num9, num12].slope(0); + Main.tile[num9, num12].Get().Slope = SlopeType.Solid; } WorldGen.AddBuriedChest(i, num10 - 3, item, false, 4); //chest int num22 = i + (num2 / 2 + 1) * -num; @@ -729,13 +729,13 @@ namespace CalamityMod.World { if (ocean) { - Main.tile[k, l].active(false); + Main.tile[k, l].Get().HasTile = false; Main.tile[k, l].LiquidAmount = 255; - Main.tile[k, l].LiquidType = LiquidID.Water; + Main.tile[k, l].Get().LiquidType = LiquidID.Water; } else { - Main.tile[k, l].active(false); + Main.tile[k, l].Get().HasTile = false; Main.tile[k, l].LiquidAmount = 255; Main.tile[k, l].lava(true); } @@ -785,16 +785,16 @@ namespace CalamityMod.World { if (n > j + WorldGen.genRand.Next(7, 16)) { - Main.tile[m, n].active(false); + Main.tile[m, n].Get().HasTile = false; } if (steps <= num2) { - Main.tile[m, n].active(false); + Main.tile[m, n].Get().HasTile = false; } if (ocean) { Main.tile[m, n].LiquidAmount = 255; - Main.tile[m, n].LiquidType = LiquidID.Water; + Main.tile[m, n].Get().LiquidType = LiquidID.Water; } else { @@ -813,7 +813,7 @@ namespace CalamityMod.World if (ocean) { Main.tile[num11, num12].LiquidAmount = 255; - Main.tile[num11, num12].LiquidType = LiquidID.Water; + Main.tile[num11, num12].Get().LiquidType = LiquidID.Water; } else { @@ -822,7 +822,7 @@ namespace CalamityMod.World } if (steps <= num2) { - Main.tile[num11, num12].active(false); + Main.tile[num11, num12].Get().HasTile = false; } } } diff --git a/World/Planets/MainPlanet.cs b/World/Planets/MainPlanet.cs index 53b8680946..f748ac17c9 100644 --- a/World/Planets/MainPlanet.cs +++ b/World/Planets/MainPlanet.cs @@ -141,12 +141,12 @@ namespace CalamityMod.World.Planets List walls = ignoreWalls.ToList(); while (!_tiles[x, startY].HasTile && !walls.Contains(_tiles[x, startY].wall)) { - _tiles[x, startY].active(true); + _tiles[x, startY].Get().HasTile = true; _tiles[x, startY].type = beamType; startY++; if (Vector2.Distance(planetCenter, new Vector2(x * 16 + 8, startY * 16 + 8)) > radius * 16f - 64) { - _tiles[x, startY].active(true); + _tiles[x, startY].Get().HasTile = true; _tiles[x, startY].type = TileID.Stone; } } diff --git a/World/Planets/MudPlanet.cs b/World/Planets/MudPlanet.cs index fc31c15989..34d6316b67 100644 --- a/World/Planets/MudPlanet.cs +++ b/World/Planets/MudPlanet.cs @@ -113,7 +113,7 @@ namespace CalamityMod.World.Planets { for (int floorX = testX - 1; floorX <= testX + 1; floorX++) { - _tiles[floorX, testY + 2].active(true); + _tiles[floorX, testY + 2].Get().HasTile = true; _tiles[floorX, testY + 2].type = TileID.Hive; WorldGen.SquareTileFrame(floorX, testY + 2); } @@ -150,9 +150,9 @@ namespace CalamityMod.World.Planets } } //PLACE TILES BENEATH CHEST, IN CASE - _tiles[origin.X, chestY].active(true); + _tiles[origin.X, chestY].Get().HasTile = true; _tiles[origin.X, chestY].type = TileID.Mud; - _tiles[origin.X + 1, chestY].active(true); + _tiles[origin.X + 1, chestY].Get().HasTile = true; _tiles[origin.X + 1, chestY].type = TileID.Mud; //Place chest int chestID = WorldGen.PlaceChest(origin.X, chestY - 1, 21, false, 17); diff --git a/World/SulphurousSea.cs b/World/SulphurousSea.cs index 3cde395e76..4a1649846a 100644 --- a/World/SulphurousSea.cs +++ b/World/SulphurousSea.cs @@ -170,7 +170,7 @@ namespace CalamityMod.World if (y - YStart - 6 < wallBoundAtPosition(xRatio * MathHelper.TwoPi * 4f)) Main.tile[trueX, y].WallType = WallID.None; - Main.tile[trueX, y].active(true); + Main.tile[trueX, y].Get().HasTile = true; } } } @@ -388,9 +388,9 @@ namespace CalamityMod.World for (int y2 = 0; y2 <= extraHeight; y2++) { Main.tile[x + dx, y + dy - y2].TileType = (ushort)ModContent.TileType(); - Main.tile[x + dx, y + dy - y2].slope(0); + Main.tile[x + dx, y + dy - y2].Get().Slope = SlopeType.Solid; Main.tile[x + dx, y + dy - y2].halfBrick(false); - Main.tile[x + dx, y + dy - y2].active(true); + Main.tile[x + dx, y + dy - y2].Get().HasTile = true; } if (dy == -2 && dx == treePosition) { @@ -536,7 +536,7 @@ namespace CalamityMod.World liquid = 255, wall = oldWall }; - Main.tile[trueX, y - dy].active(true); + Main.tile[trueX, y - dy].Get().HasTile = true; if (Main.tile[trueX + 1, y - dy] is null) Main.tile[trueX + 1, y - dy] = new Tile(); @@ -550,7 +550,7 @@ namespace CalamityMod.World liquid = 255, wall = oldWall }; - Main.tile[trueX + 1, y - dy].active(true); + Main.tile[trueX + 1, y - dy].Get().HasTile = true; } previousX = trueX; } @@ -623,7 +623,7 @@ namespace CalamityMod.World { Main.tile[i, y + 1] = new Tile(); } - if (!Main.tile[i, y + 1].HasUnactuatedTile || Main.tile[i, y + 1].IsHalfBlock || Main.tile[i, y + 1].slope() != 0 || !Main.tileSolid[Main.tile[i, y + 1].TileType]) + if (!Main.tile[i, y + 1].HasUnactuatedTile || Main.tile[i, y + 1].IsHalfBlock || Main.tile[i, y + 1].Slope != 0 || !Main.tileSolid[Main.tile[i, y + 1].TileType]) { canGenerate = false; } @@ -649,7 +649,7 @@ namespace CalamityMod.World type = type, frameY = (short)(dy * 18) }; - Main.tile[x, y + dy].active(true); + Main.tile[x, y + dy].Get().HasTile = true; } } public static void PlaceStalacmite(int x, int y, int height, ushort type) @@ -663,7 +663,7 @@ namespace CalamityMod.World frameY = (short)(height * 18 - dy * 18), wall = oldWall }; - Main.tile[x, y - dy].active(true); + Main.tile[x, y - dy].Get().HasTile = true; } } #endregion @@ -760,7 +760,7 @@ namespace CalamityMod.World { if (Main.tile[trueX, y] is null) Main.tile[trueX, y] = new Tile(); - Main.tile[trueX, y].active(false); + Main.tile[trueX, y].Get().HasTile = false; } if (WallsForSulphSeaToDestroy.Contains(Main.tile[trueX, y].WallType)) { @@ -832,7 +832,7 @@ namespace CalamityMod.World if (Main.tile[trueX, y].TileType == TileID.Trees) WorldGen.KillTile(trueX, y); else - Main.tile[trueX, y].active(false); + Main.tile[trueX, y].Get().HasTile = false; } else if (tileAtPosition.HasTile && ValidBeachCovertTiles.Contains(tileAtPosition.TileType)) @@ -1002,7 +1002,7 @@ namespace CalamityMod.World } Tile tileAtPosition = Main.tile[i, trueStartingPositionY]; Tile tileAbovePosition = Main.tile[i, trueStartingPositionY - 1]; - if (!tileAtPosition.HasTile || tileAtPosition.IsHalfBlock || tileAtPosition.slope() != 0) + if (!tileAtPosition.HasTile || tileAtPosition.IsHalfBlock || tileAtPosition.Slope != 0) { return; } @@ -1023,14 +1023,14 @@ namespace CalamityMod.World tileAtPosition = Main.tile[i, trueStartingPositionY - 1 - k]; if (k == 0) { - tileAtPosition.active(true); + tileAtPosition.Get().HasTile = true; tileAtPosition.TileType = TileID.PalmTree; tileAtPosition.TileFrameX = 66; tileAtPosition.TileFrameY = 0; } else if (k == treeHeight - 1) { - tileAtPosition.active(true); + tileAtPosition.Get().HasTile = true; tileAtPosition.TileType = TileID.PalmTree; tileAtPosition.TileFrameX = (short)(22 * WorldGen.genRand.Next(4, 7)); tileAtPosition.TileFrameY = frameY; @@ -1046,7 +1046,7 @@ namespace CalamityMod.World frameY += (short)(Math.Sign(frameYIdeal) * 2); } } - tileAtPosition.active(true); + tileAtPosition.Get().HasTile = true; tileAtPosition.TileType = TileID.PalmTree; tileAtPosition.TileFrameX = (short)(22 * WorldGen.genRand.Next(0, 3)); tileAtPosition.TileFrameY = frameY; diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index eba171afed..86916cd588 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -247,7 +247,7 @@ namespace CalamityMod.World if (num4 % 15 == 2) { tile.ResetToType((ushort)ModContent.TileType()); - tile.active(true); + tile.Get().HasTile = true; tile.LiquidAmount = 0; } Tile.SmoothSlope(num6, num7, true); @@ -259,7 +259,7 @@ namespace CalamityMod.World if (!flag || tile.HasTile) { tile.ResetToType((ushort)ModContent.TileType()); - tile.active(true); + tile.Get().HasTile = true; Tile.SmoothSlope(num6, num7, true); tile.LiquidAmount = 0; } @@ -270,7 +270,7 @@ namespace CalamityMod.World if (!flag || tile.HasTile) { tile.ResetToType((ushort)ModContent.TileType()); - tile.active(true); + tile.Get().HasTile = true; Tile.SmoothSlope(num6, num7, true); tile.LiquidAmount = 0; } @@ -284,7 +284,7 @@ namespace CalamityMod.World if (tile.HasTile) { tile.ResetToType((ushort)ModContent.TileType()); - tile.active(true); + tile.Get().HasTile = true; Tile.SmoothSlope(num6, num7, true); tile.WallType = (ushort)ModContent.WallType(); tile.LiquidAmount = 0; @@ -495,7 +495,7 @@ namespace CalamityMod.World { if (flag3 ^ flag4) { - if (tile2.slope() == 0 && !tile2.IsHalfBlock) + if (tile2.Slope == 0 && !tile2.IsHalfBlock) { Tile tile3 = Main.tile[num5 + (flag3 ? -1 : 1), num6]; tile3.TileType = (ushort)ModContent.TileType(); @@ -508,12 +508,12 @@ namespace CalamityMod.World Main.tile[num5 + 1, num6].TileFrameY = (short)(3 * 18); } tile3.TileFrameX = (short)(WorldGen.genRand.Next(18) * 18); - tile3.active(true); + tile3.Get().HasTile = true; } } if (flag ^ flag2) { - if (tile2.slope() == 0 && !tile2.IsHalfBlock) + if (tile2.Slope == 0 && !tile2.IsHalfBlock) { Tile tile3 = Main.tile[num5, num6 + (flag ? -1 : 1)]; tile3.TileType = (ushort)ModContent.TileType(); @@ -526,7 +526,7 @@ namespace CalamityMod.World Main.tile[num5, num6 + 1].TileFrameY = (short)(1 * 18); } tile3.TileFrameX = (short)(WorldGen.genRand.Next(18) * 18); - tile3.active(true); + tile3.Get().HasTile = true; } } } @@ -625,7 +625,7 @@ namespace CalamityMod.World { int num2 = WorldGen.genRand.Next(3) * 18; Main.tile[x, y].TileType = type; - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; Main.tile[x, y].TileFrameX = (short)num2; Main.tile[x, y].TileFrameY = 72; } @@ -633,11 +633,11 @@ namespace CalamityMod.World { int num3 = WorldGen.genRand.Next(3) * 18; Main.tile[x, y].TileType = type; - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; Main.tile[x, y].TileFrameX = (short)num3; Main.tile[x, y].TileFrameY = 0; Main.tile[x, y + 1].TileType = type; - Main.tile[x, y + 1].active(true); + Main.tile[x, y + 1].Get().HasTile = true; Main.tile[x, y + 1].TileFrameX = (short)num3; Main.tile[x, y + 1].TileFrameY = 18; } @@ -653,7 +653,7 @@ namespace CalamityMod.World { int num13 = WorldGen.genRand.Next(3) * 18; Main.tile[x, y].TileType = type; - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; Main.tile[x, y].TileFrameX = (short)num13; Main.tile[x, y].TileFrameY = 90; } @@ -661,11 +661,11 @@ namespace CalamityMod.World { int num14 = WorldGen.genRand.Next(3) * 18; Main.tile[x, y - 1].TileType = type; - Main.tile[x, y - 1].active(true); + Main.tile[x, y - 1].Get().HasTile = true; Main.tile[x, y - 1].TileFrameX = (short)num14; Main.tile[x, y - 1].TileFrameY = 36; Main.tile[x, y].TileType = type; - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; Main.tile[x, y].TileFrameX = (short)num14; Main.tile[x, y].TileFrameY = 54; } diff --git a/World/UndergroundShrines.cs b/World/UndergroundShrines.cs index ac111f8b60..9d634d2219 100644 --- a/World/UndergroundShrines.cs +++ b/World/UndergroundShrines.cs @@ -39,11 +39,11 @@ namespace CalamityMod.World { for (int y = shrineLocationY - randomY - 1; y <= shrineLocationY + randomY + 1; y++) { - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; Main.tile[x, y].TileType = tile; - Main.tile[x, y].slope(0); + Main.tile[x, y].Get().Slope = SlopeType.Solid; Main.tile[x, y].LiquidAmount = 0; - Main.tile[x, y].LiquidType = LiquidID.Water; + Main.tile[x, y].Get().LiquidType = LiquidID.Water; } } @@ -52,7 +52,7 @@ namespace CalamityMod.World { for (int y = shrineLocationY - randomY; y <= shrineLocationY + randomY; y++) { - Main.tile[x, y].active(false); + Main.tile[x, y].Get().HasTile = false; Main.tile[x, y].WallType = wall; } } @@ -61,12 +61,12 @@ namespace CalamityMod.World for (int x = shrineLocationX - randomX - 1; x <= shrineLocationX + randomX + 1; x++) { for (int y = shrineLocationY + randomY - 2; y <= shrineLocationY + randomY; y++) - Main.tile[x, y].active(false); + Main.tile[x, y].Get().HasTile = false; } for (int x = shrineLocationX - randomX - 1; x <= shrineLocationX + randomX + 1; x++) { for (int y = shrineLocationY + randomY - 2; y <= shrineLocationY + randomY - 1; y++) - Main.tile[x, y].active(false); + Main.tile[x, y].Get().HasTile = false; } // Replace tiles from bottom of shrine area with shrine tile type 2 @@ -76,9 +76,9 @@ namespace CalamityMod.World int y = shrineLocationY + randomY + 2; while (!Main.tile[x, y].HasTile && y < Main.maxTilesY && verticalOffset > 0) { - Main.tile[x, y].active(true); + Main.tile[x, y].Get().HasTile = true; Main.tile[x, y].TileType = tile2; - Main.tile[x, y].slope(0); + Main.tile[x, y].Get().Slope = SlopeType.Solid; y++; verticalOffset--; } @@ -91,7 +91,7 @@ namespace CalamityMod.World { for (int x = shrineLocationX - randomX - 1; x <= shrineLocationX + randomX + 1; x++) { - Main.tile[x, num21].active(true); + Main.tile[x, num21].Get().HasTile = true; Main.tile[x, num21].TileType = tile; } randomX -= WorldGen.genRand.Next(1, 3); @@ -165,7 +165,7 @@ namespace CalamityMod.World { if (m < Main.maxTilesY) { - Main.tile[l, m].slope(0); + Main.tile[l, m].Get().Slope = SlopeType.Solid; Main.tile[l, m].halfBrick(false); } } diff --git a/World/WorldEvilIsland.cs b/World/WorldEvilIsland.cs index 94a951c8f4..0cf68a4c60 100644 --- a/World/WorldEvilIsland.cs +++ b/World/WorldEvilIsland.cs @@ -107,7 +107,7 @@ namespace CalamityMod.World if (!CalamityUtils.ParanoidTileRetrieval(i + dx, j + dy).HasTile) { Main.tile[i + dx, j + dy].TileType = WorldGen.crimson ? TileID.CorruptSandstone : TileID.CrimsonSandstone; - Main.tile[i + dx, j + dy].active(true); + Main.tile[i + dx, j + dy].Get().HasTile = true; } } } @@ -283,12 +283,12 @@ namespace CalamityMod.World { if (m != num6 - 1 || (l != num4 && l != num5)) { - Main.tile[l, m].active(true); + Main.tile[l, m].Get().HasTile = true; Main.tile[l, m].LiquidAmount = 0; Main.tile[l, m].TileType = type; Main.tile[l, m].WallType = 0; Main.tile[l, m].halfBrick(false); - Main.tile[l, m].slope(0); + Main.tile[l, m].Get().Slope = SlopeType.Solid; } } } @@ -318,7 +318,7 @@ namespace CalamityMod.World { if ((num8 != num6 || (n != num4 && n != num5)) && Main.tile[n, num8].WallType == 0) { - Main.tile[n, num8].active(false); + Main.tile[n, num8].Get().HasTile = false; Main.tile[n, num8].WallType = wall; } } @@ -327,20 +327,20 @@ namespace CalamityMod.World int num10 = (int)vector.Y; for (int num11 = num9 - 2; num11 <= num9 + 2; num11++) { - Main.tile[num11, num10].active(false); - Main.tile[num11, num10 - 1].active(false); - Main.tile[num11, num10 - 2].active(false); + Main.tile[num11, num10].Get().HasTile = false; + Main.tile[num11, num10 - 1].Get().HasTile = false; + Main.tile[num11, num10 - 2].Get().HasTile = false; } WorldGen.PlaceTile(num9, num10, 10, true, false, -1, WorldGen.crimson ? 1 : 10); //door num9 = i + (num2 + 1) * -num - num; for (int num12 = num6; num12 <= num7 + 1; num12++) { - Main.tile[num9, num12].active(true); + Main.tile[num9, num12].Get().HasTile = true; Main.tile[num9, num12].LiquidAmount = 0; Main.tile[num9, num12].TileType = type; Main.tile[num9, num12].WallType = 0; Main.tile[num9, num12].halfBrick(false); - Main.tile[num9, num12].slope(0); + Main.tile[num9, num12].Get().Slope = SlopeType.Solid; } int contain; if (WorldGen.crimson) From 1d2cba3cfa47ad9f0347504a6e816f94a5705910 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 6 Apr 2022 18:46:57 -0500 Subject: [PATCH 10/14] 1 - NPC drawing fixes. --- NPCs/DevourerofGods/DevourerofGodsBody.cs | 6 +++--- NPCs/DevourerofGods/DevourerofGodsBody2.cs | 6 +++--- NPCs/DevourerofGods/DevourerofGodsHead.cs | 6 +++--- NPCs/DevourerofGods/DevourerofGodsHead2.cs | 6 +++--- NPCs/DevourerofGods/DevourerofGodsTail.cs | 6 +++--- NPCs/DevourerofGods/DevourerofGodsTail2.cs | 6 +++--- NPCs/DraedonLabThings/RepairUnitCritter.cs | 4 ++-- NPCs/ExoMechs/Apollo/Apollo.cs | 14 +++++++------- NPCs/ExoMechs/Ares/AresBody.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 10 +++++----- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 8 ++++---- NPCs/ExoMechs/Draedon.cs | 4 ++-- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 4 ++-- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 4 ++-- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 6 +++--- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 4 ++-- NPCs/GreatSandShark/GreatSandShark.cs | 6 +++--- NPCs/HiveMind/HiveMind.cs | 6 +++--- NPCs/Yharon/Yharon.cs | 20 ++++++++++---------- 21 files changed, 75 insertions(+), 75 deletions(-) diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 8107cd4063..7355b224ff 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { float disintegrationFactor = Main.npc[NPC.realLife].ModNPC().DeathAnimationTimer / 640f; if (disintegrationFactor > 0f) @@ -295,10 +295,10 @@ namespace CalamityMod.NPCs.DevourerofGods Texture2D texture2D15 = useOtherTextures ? ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBodyS").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); if (!NPC.dontTakeDamage) { diff --git a/NPCs/DevourerofGods/DevourerofGodsBody2.cs b/NPCs/DevourerofGods/DevourerofGodsBody2.cs index 3352d3aad6..1aad76a45a 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody2.cs @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -159,10 +159,10 @@ namespace CalamityMod.NPCs.DevourerofGods 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsBody2Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Fuchsia, 0.5f); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index f2e23e99b9..e0a36f754c 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -2178,7 +2178,7 @@ namespace CalamityMod.NPCs.DevourerofGods return default; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { float disintegrationFactor = DeathAnimationTimer / 800f; if (disintegrationFactor > 0f) @@ -2198,10 +2198,10 @@ namespace CalamityMod.NPCs.DevourerofGods Texture2D texture2D15 = useOtherTextures ? ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsHeadS").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); if (!NPC.dontTakeDamage) { diff --git a/NPCs/DevourerofGods/DevourerofGodsHead2.cs b/NPCs/DevourerofGods/DevourerofGodsHead2.cs index 4c144f5331..fd7f4e0959 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead2.cs @@ -301,7 +301,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + 1.57f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -310,10 +310,10 @@ namespace CalamityMod.NPCs.DevourerofGods 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsHead2Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Fuchsia, 0.5f); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index d57d89a72e..8d1a7e4d39 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -295,7 +295,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { float disintegrationFactor = Main.npc[NPC.realLife].ModNPC().DeathAnimationTimer / 640f; if (disintegrationFactor > 0f) @@ -315,10 +315,10 @@ namespace CalamityMod.NPCs.DevourerofGods Texture2D texture2D15 = useOtherTextures ? ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTailS").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / 2); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); if (!NPC.dontTakeDamage) { diff --git a/NPCs/DevourerofGods/DevourerofGodsTail2.cs b/NPCs/DevourerofGods/DevourerofGodsTail2.cs index 139ec7c002..3f574939cb 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail2.cs @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.DevourerofGods } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -156,10 +156,10 @@ namespace CalamityMod.NPCs.DevourerofGods 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/DevourerofGods/DevourerofGodsTail2Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Cyan, 0.5f); diff --git a/NPCs/DraedonLabThings/RepairUnitCritter.cs b/NPCs/DraedonLabThings/RepairUnitCritter.cs index 385409331a..1b65f67ee8 100644 --- a/NPCs/DraedonLabThings/RepairUnitCritter.cs +++ b/NPCs/DraedonLabThings/RepairUnitCritter.cs @@ -315,11 +315,11 @@ namespace CalamityMod.NPCs.DraedonLabThings NPC.frame.Y = (int)(CurrentFrame * frameHeight); } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D critterTexture = TextureAssets.Npc[NPC.type].Value; Texture2D glowmask = ModContent.Request("CalamityMod/NPCs/DraedonLabThings/RepairUnitCritterGlowmask").Value; - Vector2 drawPosition = NPC.Center - Main.screenPosition + Vector2.UnitY * NPC.gfxOffY; + Vector2 drawPosition = NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; spriteBatch.Draw(critterTexture, drawPosition, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() * 0.5f, NPC.scale, direction, 0f); spriteBatch.Draw(glowmask, drawPosition, NPC.frame, NPC.GetAlpha(Color.White), NPC.rotation, NPC.frame.Size() * 0.5f, NPC.scale, direction, 0f); diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 2e9c23757d..d909bde494 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -1434,7 +1434,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo return Color.Lerp(startingColor, endColor, (float)Math.Pow(completionRatio, 1.5D)) * NPC.Opacity; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Declare the trail drawers if they have yet to be defined. if (ChargeFlameTrail is null) @@ -1453,7 +1453,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo Texture2D texture = TextureAssets.Npc[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 - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; Color afterimageBaseColor = Color.White; // Draws a single instance of a regular, non-glowmask based Artemis. @@ -1468,7 +1468,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); afterimageCenter += drawOffset; @@ -1505,7 +1505,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo currentSegmentRotation += segmentRotationOffset; } - RibbonTrail.Draw(ribbonDrawPositions, -Main.screenPosition, 66); + RibbonTrail.Draw(ribbonDrawPositions, -screenPos, 66); } int instanceCount = (int)MathHelper.Lerp(1f, 15f, ChargeComboFlash); @@ -1535,7 +1535,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, SpriteEffects.None, 0f); @@ -1568,11 +1568,11 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo for (int i = 0; i < 4; i++) { Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * 8f; - ChargeFlameTrailBig.Draw(drawPositions, drawOffset - Main.screenPosition, 70); + ChargeFlameTrailBig.Draw(drawPositions, drawOffset - screenPos, 70); } } else - ChargeFlameTrail.Draw(drawPositions, -Main.screenPosition, 70); + ChargeFlameTrail.Draw(drawPositions, -screenPos, 70); } } diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 85cbfaba2c..c5825bfa05 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -904,7 +904,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Draw the enrage smoke behind Ares SmokeDrawer.DrawSet(NPC.Center); @@ -1001,14 +1001,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, SpriteEffects.None, 0f); } } - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; spriteBatch.Draw(texture, center, frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, SpriteEffects.None, 0f); texture = ModContent.Request("CalamityMod/NPCs/ExoMechs/Ares/AresBodyGlow").Value; @@ -1021,7 +1021,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, SpriteEffects.None, 0f); diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index c6034623af..516143e800 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -514,7 +514,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Draw the enrage smoke behind Ares SmokeDrawer.DrawSet(NPC.Center); @@ -537,14 +537,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); } } - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; float telegraphDuration = Main.npc[(int)NPC.ai[2]].localAI[1] == (float)AresBody.Enraged.Yes ? (gaussNukeTelegraphDuration * 0.5f) : gaussNukeTelegraphDuration; //Draw an outline to the arm when it charges up @@ -578,7 +578,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(glowTexture.Width, glowTexture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(glowTexture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index eb73201777..597f7cc68f 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -557,7 +557,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Draw the enrage smoke behind Ares SmokeDrawer.DrawSet(NPC.Center); @@ -580,14 +580,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); } } - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; //Draw an outline to the arm when it charges up if ((NPC.Calamity().newAI[2] < deathrayTelegraphDuration) && AIState == (float)Phase.Deathray) @@ -620,7 +620,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(glowTexture.Width, glowTexture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(glowTexture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); @@ -641,7 +641,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares //Also draw a telegraph line aha Texture2D lineTex = ModContent.Request("CalamityMod/Particles/BloomLine").Value; Color outlineColor = Color.Lerp(Color.OrangeRed, Color.White, NPC.Calamity().newAI[2] / deathrayTelegraphDuration); - spriteBatch.Draw(lineTex, CoreSpritePosition - NPC.rotation.ToRotationVector2() * NPC.spriteDirection * 104 - Main.screenPosition, null, outlineColor, NPC.rotation - MathHelper.PiOver2 * NPC.spriteDirection, new Vector2(lineTex.Width / 2f, lineTex.Height), new Vector2(1f * NPC.Calamity().newAI[2] / deathrayTelegraphDuration, 2000f), spriteEffects, 0f); + spriteBatch.Draw(lineTex, CoreSpritePosition - NPC.rotation.ToRotationVector2() * NPC.spriteDirection * 104 - screenPos, null, outlineColor, NPC.rotation - MathHelper.PiOver2 * NPC.spriteDirection, new Vector2(lineTex.Width / 2f, lineTex.Height), new Vector2(1f * NPC.Calamity().newAI[2] / deathrayTelegraphDuration, 2000f), spriteEffects, 0f); float pulseRatio = (NPC.Calamity().newAI[2] % (deathrayTelegraphDuration / 5f)) / (deathrayTelegraphDuration / 5f); float pulseSize = MathHelper.Lerp(0.1f, 0.6f, (float)Math.Floor(NPC.Calamity().newAI[2] / (deathrayTelegraphDuration / 5f)) / 4f); diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index b201648081..6bf889e8a3 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -513,7 +513,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Draw the enrage smoke behind Ares SmokeDrawer.DrawSet(NPC.Center); @@ -536,14 +536,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); } } - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; //Draw an outline to the arm when it charges up if ((NPC.Calamity().newAI[2] < plasmaBoltTelegraphDuration) && AIState == (float)Phase.PlasmaBolts) @@ -576,7 +576,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(glowTexture.Width, glowTexture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(glowTexture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index 3c742b6069..7df7efbbc6 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -507,7 +507,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // Draw the enrage smoke behind Ares SmokeDrawer.DrawSet(NPC.Center); @@ -530,14 +530,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); } } - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; //Draw an outline to the arm when it charges up if ((NPC.Calamity().newAI[2] < teslaOrbTelegraphDuration) && AIState == (float)Phase.TeslaOrbs) @@ -569,7 +569,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(glowTexture.Width, glowTexture.Height) / new Vector2(maxFramesX, maxFramesY) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(glowTexture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ExoMechs/Draedon.cs b/NPCs/ExoMechs/Draedon.cs index 5c9181dc3f..37943925ed 100644 --- a/NPCs/ExoMechs/Draedon.cs +++ b/NPCs/ExoMechs/Draedon.cs @@ -623,7 +623,7 @@ namespace CalamityMod.NPCs.ExoMechs return true; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { spriteBatch.EnterShaderRegion(); @@ -631,7 +631,7 @@ namespace CalamityMod.NPCs.ExoMechs Texture2D glowmask = ModContent.Request("CalamityMod/NPCs/ExoMechs/DraedonGlowmask").Value; Rectangle frame = NPC.frame; - Vector2 drawPosition = NPC.Center - Main.screenPosition - Vector2.UnitY * 38f; + Vector2 drawPosition = NPC.Center - screenPos - Vector2.UnitY * 38f; Vector2 origin = frame.Size() * 0.5f; Color color = NPC.GetAlpha(drawColor); SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 58b233366d..fc37a1c3b1 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -590,7 +590,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -599,7 +599,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos 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); - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.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 f89b89bff3..44f1369045 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -591,7 +591,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -600,7 +600,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos 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); - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.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 249bbd48e8..92442e8507 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -1019,7 +1019,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -1028,7 +1028,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos 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); - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.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); @@ -1097,7 +1097,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Color reticleFlashBaseColor = Color.Lerp(reticleBaseColor, new Color(255, 255, 255, 0), reticleFadeToWhite) * reticleOpacity; Vector2 origin = leftReticleTexture.Size() * 0.5f; - Vector2 playerDrawPosition = target.Center - Main.screenPosition; + Vector2 playerDrawPosition = target.Center - screenPos; spriteBatch.Draw(leftReticleTexture, playerDrawPosition - Vector2.UnitX * reticleOffsetDistance, null, reticleBaseColor, 0f, origin, 1f, SpriteEffects.None, 0f); spriteBatch.Draw(rightReticleTexture, playerDrawPosition + Vector2.UnitX * reticleOffsetDistance, null, reticleBaseColor, 0f, origin, 1f, SpriteEffects.None, 0f); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 17005b6d02..c62904b4f1 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -591,7 +591,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -600,7 +600,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos 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); - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.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 1adb0e43fd..c2f212ddef 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -523,7 +523,7 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.frame.Y = frame * frameHeight; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -560,11 +560,11 @@ namespace CalamityMod.NPCs.GreatSandShark color26 *= num164 / ((float)NPCID.Sets.TrailCacheLength[NPC.type] * 1.5f); Vector2 value4 = NPC.oldPos[num161]; float num165 = NPC.rotation; - Main.spriteBatch.Draw(texture2D3, value4 + NPC.Size / 2f - Main.screenPosition + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), color26, num165 + NPC.rotation * num160 * (float)(num161 - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), origin2, NPC.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture2D3, value4 + NPC.Size / 2f - screenPos + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), color26, num165 + NPC.rotation * num160 * (float)(num161 - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), origin2, NPC.scale, spriteEffects, 0f); goto IL_6881; } var something = NPC.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - spriteBatch.Draw(texture2D3, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY), NPC.frame, color24, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); + spriteBatch.Draw(texture2D3, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, color24, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); return false; } diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index a4282cffe6..9481d7ad15 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.HiveMind } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { // When Hive Mind starts flying around bool phase2 = NPC.life / (float)NPC.lifeMax < 0.8f; @@ -263,14 +263,14 @@ namespace CalamityMod.NPCs.HiveMind afterimageColor = Color.Lerp(afterimageColor, afterimageBaseColor, 0.5f); afterimageColor = NPC.GetAlpha(afterimageColor); afterimageColor *= (numAfterimages - i) / 15f; - Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 afterimageCenter = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; afterimageCenter -= new Vector2(texture.Width, texture.Height) / new Vector2(maxFramesX_Phase2, maxFramesY_Phase2) * NPC.scale / 2f; afterimageCenter += vector * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, afterimageCenter, NPC.frame, afterimageColor, NPC.oldRot[i], vector, NPC.scale, spriteEffects, 0f); } } - Vector2 center = NPC.Center - Main.screenPosition; + Vector2 center = NPC.Center - screenPos; spriteBatch.Draw(texture, center, frame, NPC.GetAlpha(drawColor), NPC.rotation, vector, NPC.scale, spriteEffects, 0f); return false; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 309c721aff..c5eac36dad 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -2558,7 +2558,7 @@ namespace CalamityMod.NPCs.Yharon #endregion #region Drawing - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { bool idlePhases = (!startSecondAI && (NPC.ai[0] == 0f || NPC.ai[0] == 6f || NPC.ai[0] == 13f)) || (startSecondAI && (NPC.ai[0] == 5f || NPC.ai[0] < 2f)); @@ -2582,7 +2582,7 @@ namespace CalamityMod.NPCs.Yharon Texture2D texture = TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[NPC.type] / 2); - Color color = lightColor; + Color color = drawColor; Color invincibleColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); Color color36 = Color.White; @@ -2622,7 +2622,7 @@ namespace CalamityMod.NPCs.Yharon amount9 = 0.5f; } else - color = lightColor; + color = drawColor; if (CalamityConfig.Instance.Afterimages) { @@ -2632,7 +2632,7 @@ namespace CalamityMod.NPCs.Yharon color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); @@ -2679,21 +2679,21 @@ namespace CalamityMod.NPCs.Yharon { for (int num160 = 0; num160 < num156; num160++) { - Color color39 = lightColor; + Color color39 = drawColor; color39 = Color.Lerp(color39, color36, amount9); color39 = NPC.GetAlpha(color39); color39 *= 1f - num157; - Vector2 vector42 = NPC.Center + (num160 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; + Vector2 vector42 = NPC.Center + (num160 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - screenPos; vector42 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector42 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, vector42, NPC.frame, color39, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture, vector43, NPC.frame, invincible ? invincibleColor : NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector43, NPC.frame, invincible ? invincibleColor : NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); if (flag8 || NPC.ai[0] == 4f || startSecondAI) { @@ -2759,7 +2759,7 @@ namespace CalamityMod.NPCs.Yharon Color color41 = color40; color41 = Color.Lerp(color41, color36, amount9); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); @@ -2787,7 +2787,7 @@ namespace CalamityMod.NPCs.Yharon color42 = Color.Lerp(color42, color36, amount9); color42 = NPC.GetAlpha(color42); color42 *= 1f - num157; - Vector2 vector45 = NPC.Center + (num164 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; + Vector2 vector45 = NPC.Center + (num164 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - screenPos; vector45 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector45 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture, vector45, NPC.frame, color42, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); From 96ac20f93571a8ed4f69a2426393657d75b9ad91 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 6 Apr 2022 18:57:10 -0500 Subject: [PATCH 11/14] 1 - A few more NPC drawing fixes. --- NPCs/Leviathan/Leviathan.cs | 4 ++-- NPCs/Leviathan/LeviathanStart.cs | 6 +++--- NPCs/Leviathan/Siren.cs | 4 ++-- NPCs/NormalNPCs/CosmicElemental.cs | 4 ++-- NPCs/NormalNPCs/Parasea.cs | 4 ++-- NPCs/NormalNPCs/ProfanedEnergyLantern.cs | 4 ++-- NPCs/NormalNPCs/WildBumblefuck.cs | 10 +++++----- NPCs/OldDuke/OldDuke.cs | 22 +++++++++++----------- NPCs/OldDuke/OldDukeSharkron.cs | 10 +++++----- NPCs/Other/DemonPortal.cs | 4 ++-- NPCs/Other/LecherousOrb.cs | 4 ++-- NPCs/Perforator/PerforatorBodyLarge.cs | 6 +++--- NPCs/Perforator/PerforatorBodyMedium.cs | 6 +++--- NPCs/Perforator/PerforatorBodySmall.cs | 6 +++--- NPCs/Perforator/PerforatorCyst.cs | 6 +++--- NPCs/Perforator/PerforatorHeadLarge.cs | 6 +++--- NPCs/Perforator/PerforatorHeadMedium.cs | 6 +++--- NPCs/Perforator/PerforatorHeadSmall.cs | 6 +++--- NPCs/Perforator/PerforatorHive.cs | 6 +++--- NPCs/Perforator/PerforatorTailLarge.cs | 6 +++--- NPCs/Perforator/PerforatorTailMedium.cs | 6 +++--- NPCs/Perforator/PerforatorTailSmall.cs | 6 +++--- 22 files changed, 71 insertions(+), 71 deletions(-) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index b12e3cbc55..9fbf482649 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -771,7 +771,7 @@ namespace CalamityMod.NPCs.Leviathan return false; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D texture = AttackTexture; if (NPC.ai[0] == 1f || NPC.Calamity().newAI[3] < 180f) @@ -787,7 +787,7 @@ namespace CalamityMod.NPCs.Leviathan } Rectangle rectangle = new Rectangle(NPC.frame.X, NPC.frame.Y, texture.Width / 2, texture.Height / 3); Vector2 origin = rectangle.Size() / 2f; - spriteBatch.Draw(texture, NPC.Center - Main.screenPosition + new Vector2(xOffset, NPC.gfxOffY), rectangle, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(xOffset, NPC.gfxOffY), rectangle, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 9da30dfa82..b2be2b5282 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.active = false; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -96,10 +96,10 @@ namespace CalamityMod.NPCs.Leviathan Texture2D drawTex = TextureAssets.Npc[NPC.type].Value; Vector2 origin = new Vector2(drawTex.Width / 2, drawTex.Height / 2); - Vector2 drawPos = NPC.Center - Main.screenPosition; + Vector2 drawPos = NPC.Center - screenPos; drawPos -= new Vector2(drawTex.Width, drawTex.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; drawPos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(drawTex, drawPos, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(drawTex, drawPos, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); drawTex = ModContent.Request("CalamityMod/NPCs/Leviathan/LeviathanStartGlow").Value; diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index dfa9f80891..65bad32140 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -769,7 +769,7 @@ namespace CalamityMod.NPCs.Leviathan } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D texture = TextureAssets.Npc[NPC.type].Value; switch (frameUsed) @@ -788,7 +788,7 @@ namespace CalamityMod.NPCs.Leviathan SpriteEffects spriteEffects = charging ? SpriteEffects.None : SpriteEffects.FlipHorizontally; if (NPC.spriteDirection == -1) spriteEffects = charging ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Main.spriteBatch.Draw(texture, NPC.Center - Main.screenPosition + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2((float)width / 2f, (float)height / 2f), NPC.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2((float)width / 2f, (float)height / 2f), NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index d4d6510df1..568705a98e 100644 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ b/NPCs/NormalNPCs/CosmicElemental.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.NormalNPCs } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D texture = TextureAssets.Npc[NPC.type].Value; int height = texture.Height / Main.npcFrameCount[NPC.type]; @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.NormalNPCs { spriteEffects = SpriteEffects.FlipHorizontally; } - Main.spriteBatch.Draw(texture, NPC.Center - Main.screenPosition + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(width / 2f, height / 2f), NPC.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(width / 2f, height / 2f), NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/NormalNPCs/Parasea.cs b/NPCs/NormalNPCs/Parasea.cs index 3f8476bf72..5328af1eb6 100644 --- a/NPCs/NormalNPCs/Parasea.cs +++ b/NPCs/NormalNPCs/Parasea.cs @@ -63,7 +63,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y = frame * frameHeight; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D texture = TextureAssets.Npc[NPC.type].Value; int height = texture.Height / Main.npcFrameCount[NPC.type]; @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.NormalNPCs SpriteEffects spriteEffects = SpriteEffects.FlipHorizontally; if (NPC.spriteDirection == -1) spriteEffects = SpriteEffects.None; - Main.spriteBatch.Draw(texture, NPC.Center - Main.screenPosition + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2((float)width / 2f, (float)height / 2f), NPC.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2((float)width / 2f, (float)height / 2f), NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs index 270a2131d7..2e284e2c7a 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frame.Y = frame * frameHeight; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { if (CalamityGlobalNPC.energyFlame != -1) { @@ -213,7 +213,7 @@ namespace CalamityMod.NPCs.NormalNPCs drawPositionY -= 10f; Color color = Lighting.GetColor((int)center.X / 16, (int)(center.Y / 16f)); Texture2D chain = ModContent.Request("CalamityMod/NPCs/NormalNPCs/ProfanedEnergySegment").Value; - Main.spriteBatch.Draw(chain, new Vector2(center.X - Main.screenPosition.X, center.Y - Main.screenPosition.Y), + Main.spriteBatch.Draw(chain, new Vector2(center.X - screenPos.X, center.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, chain.Width, chain.Height)), color, rotation, new Vector2((float)chain.Width * 0.5f, (float)chain.Height * 0.5f), 1f, SpriteEffects.None, 0f); } diff --git a/NPCs/NormalNPCs/WildBumblefuck.cs b/NPCs/NormalNPCs/WildBumblefuck.cs index c89c4f0de6..74149945bb 100644 --- a/NPCs/NormalNPCs/WildBumblefuck.cs +++ b/NPCs/NormalNPCs/WildBumblefuck.cs @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.NormalNPCs } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -92,21 +92,21 @@ namespace CalamityMod.NPCs.NormalNPCs { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 99e918ea28..bd680b536f 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.OldDuke } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -185,7 +185,7 @@ namespace CalamityMod.NPCs.OldDuke } Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(texture2D15.Width / 2, texture2D15.Height / Main.npcFrameCount[NPC.type] / 2); - Color color = lightColor; + Color color = drawColor; Color color36 = Color.White; float amount9 = 0f; bool flag8 = NPC.ai[0] > 4f; @@ -224,7 +224,7 @@ namespace CalamityMod.NPCs.OldDuke } else { - color = lightColor; + color = drawColor; } if (CalamityConfig.Instance.Afterimages) @@ -235,7 +235,7 @@ namespace CalamityMod.NPCs.OldDuke color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); @@ -284,24 +284,24 @@ namespace CalamityMod.NPCs.OldDuke { for (int num160 = 0; num160 < num156; num160++) { - Color color39 = lightColor; + Color color39 = drawColor; color39 = Color.Lerp(color39, color36, amount9); color39 = NPC.GetAlpha(color39); color39 *= 1f - num157; - Vector2 vector42 = NPC.Center + (num160 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; + Vector2 vector42 = NPC.Center + (num160 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - screenPos; vector42 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector42 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector42, NPC.frame, color39, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Color color2 = lightColor; + Color color2 = drawColor; color2 = Color.Lerp(color2, color36, amount9); color2 = NPC.GetAlpha(color2); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, (NPC.ai[0] > 9f ? color2 : NPC.GetAlpha(lightColor)), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, (NPC.ai[0] > 9f ? color2 : NPC.GetAlpha(drawColor)), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); if (NPC.ai[0] >= 4f && NPC.Calamity().newAI[1] != 1f) { @@ -343,7 +343,7 @@ namespace CalamityMod.NPCs.OldDuke Color color41 = color40; color41 = Color.Lerp(color41, color36, amount9); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); @@ -355,7 +355,7 @@ namespace CalamityMod.NPCs.OldDuke color42 = Color.Lerp(color42, color36, amount9); color42 = NPC.GetAlpha(color42); color42 *= 1f - num157; - Vector2 vector45 = NPC.Center + (num164 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; + Vector2 vector45 = NPC.Center + (num164 / (float)num156 * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * scaleFactor9 * num157 - screenPos; vector45 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector45 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector45, NPC.frame, color42, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/OldDuke/OldDukeSharkron.cs b/NPCs/OldDuke/OldDukeSharkron.cs index d97c93126c..34fd254fcf 100644 --- a/NPCs/OldDuke/OldDukeSharkron.cs +++ b/NPCs/OldDuke/OldDukeSharkron.cs @@ -202,7 +202,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier()); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.FlipHorizontally; if (NPC.spriteDirection == -1) @@ -218,21 +218,21 @@ namespace CalamityMod.NPCs.OldDuke { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Other/DemonPortal.cs b/NPCs/Other/DemonPortal.cs index c9c614540d..e14b87b0ea 100644 --- a/NPCs/Other/DemonPortal.cs +++ b/NPCs/Other/DemonPortal.cs @@ -117,12 +117,12 @@ namespace CalamityMod.NPCs.Other return false; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { spriteBatch.SetBlendState(BlendState.AlphaBlend); Texture2D portalTexture = TextureAssets.Npc[NPC.type].Value; - Vector2 drawPosition = NPC.Center - Main.screenPosition; + Vector2 drawPosition = NPC.Center - screenPos; Vector2 origin = portalTexture.Size() * 0.5f; Color baseColor = Color.White; diff --git a/NPCs/Other/LecherousOrb.cs b/NPCs/Other/LecherousOrb.cs index 125edff766..ebcf03c0e3 100644 --- a/NPCs/Other/LecherousOrb.cs +++ b/NPCs/Other/LecherousOrb.cs @@ -154,10 +154,10 @@ namespace CalamityMod.NPCs.Other NPC.frame.Height = 90; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 drawPosition = NPC.Center - Main.screenPosition; + Vector2 drawPosition = NPC.Center - screenPos; SpriteEffects direction = NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; // Draw a faded version of the heart behind the main one that pulses. diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index b89c4234e8..371bfa9b16 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -147,10 +147,10 @@ namespace CalamityMod.NPCs.Perforator Texture2D texture2D15 = NPC.localAI[3] == 1f ? ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorBodyLargeAlt").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = NPC.localAI[3] == 1f ? ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorBodyLargeAltGlow").Value : ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorBodyLargeGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 49da783b22..0cc5180a18 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -165,7 +165,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -174,10 +174,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorBodyMediumGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 1a6107bea6..e69c7a726a 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -147,10 +147,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorBodySmallGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorCyst.cs b/NPCs/Perforator/PerforatorCyst.cs index 33c4a5e301..7f76e4e544 100644 --- a/NPCs/Perforator/PerforatorCyst.cs +++ b/NPCs/Perforator/PerforatorCyst.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator NPC.frame.Y = frame * frameHeight; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -52,10 +52,10 @@ namespace CalamityMod.NPCs.Perforator 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)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorCystGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 048797ceb1..503922b37c 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -508,7 +508,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -517,10 +517,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorHeadLargeGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 46fab4ede7..443aef5ae7 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -386,7 +386,7 @@ namespace CalamityMod.NPCs.Perforator NPC.netUpdate = true; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -395,10 +395,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorHeadMediumGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 2e17bc5a47..0e1a6c1271 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -450,7 +450,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -459,10 +459,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorHeadSmallGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index a1118a8c8e..26709085be 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -411,7 +411,7 @@ namespace CalamityMod.NPCs.Perforator NPC.SimpleFlyMovement(desiredVelocity, acceleration); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -420,10 +420,10 @@ namespace CalamityMod.NPCs.Perforator 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)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorHiveGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 9da4d41507..5af34d8350 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -147,10 +147,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorTailLargeGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 709e315a22..a3c07f6248 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -136,7 +136,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -145,10 +145,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorTailMediumGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index ed43120dd5..0effc6bae0 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -138,7 +138,7 @@ namespace CalamityMod.NPCs.Perforator } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -147,10 +147,10 @@ namespace CalamityMod.NPCs.Perforator 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Perforator/PerforatorTailSmallGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); From c395c31ed3cb09863d56f1dff83ec68750f27854 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 6 Apr 2022 19:08:42 -0500 Subject: [PATCH 12/14] 1 - A few more NPC drawing fixes. --- NPCs/PlagueEnemies/PlagueBee.cs | 12 ++++++------ NPCs/PlagueEnemies/PlagueBeeLarge.cs | 12 ++++++------ NPCs/PlagueEnemies/PlaguebringerShade.cs | 10 +++++----- NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs | 12 ++++++------ NPCs/PlaguebringerGoliath/PlagueMine.cs | 6 +++--- NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs | 12 ++++++------ NPCs/Polterghast/PhantomFuckYou.cs | 10 +++++----- NPCs/Polterghast/PolterPhantom.cs | 12 ++++++------ NPCs/Polterghast/Polterghast.cs | 12 ++++++------ NPCs/Polterghast/PolterghastHook.cs | 14 +++++++------- NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs | 12 ++++++------ NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs | 12 ++++++------ NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs | 12 ++++++------ NPCs/Providence/ProvSpawnDefense.cs | 12 ++++++------ NPCs/Providence/ProvSpawnHealer.cs | 12 ++++++------ NPCs/Providence/ProvSpawnOffense.cs | 12 ++++++------ NPCs/Providence/Providence.cs | 12 ++++++------ NPCs/Ravager/FlamePillar.cs | 6 +++--- NPCs/Ravager/RavagerClawLeft.cs | 4 ++-- NPCs/Ravager/RavagerClawRight.cs | 4 ++-- 20 files changed, 105 insertions(+), 105 deletions(-) diff --git a/NPCs/PlagueEnemies/PlagueBee.cs b/NPCs/PlagueEnemies/PlagueBee.cs index 2aad69e6dc..86dd59c0b4 100644 --- a/NPCs/PlagueEnemies/PlagueBee.cs +++ b/NPCs/PlagueEnemies/PlagueBee.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.Calamity().VulnerableToElectricity = true; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -60,21 +60,21 @@ namespace CalamityMod.NPCs.PlagueEnemies { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/PlagueEnemies/PlagueBeeGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); @@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.PlagueEnemies Color color41 = color37; color41 = Color.Lerp(color41, color36, amount9); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PlagueEnemies/PlagueBeeLarge.cs b/NPCs/PlagueEnemies/PlagueBeeLarge.cs index e3ee9db28a..792f027f87 100644 --- a/NPCs/PlagueEnemies/PlagueBeeLarge.cs +++ b/NPCs/PlagueEnemies/PlagueBeeLarge.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.Calamity().VulnerableToElectricity = true; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -60,21 +60,21 @@ namespace CalamityMod.NPCs.PlagueEnemies { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/PlagueEnemies/PlagueBeeGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); @@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.PlagueEnemies Color color41 = color37; color41 = Color.Lerp(color41, color36, amount9); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PlagueEnemies/PlaguebringerShade.cs b/NPCs/PlagueEnemies/PlaguebringerShade.cs index cdd98f6ac6..b1b0160800 100644 --- a/NPCs/PlagueEnemies/PlaguebringerShade.cs +++ b/NPCs/PlagueEnemies/PlaguebringerShade.cs @@ -544,7 +544,7 @@ namespace CalamityMod.NPCs.PlagueEnemies } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -562,21 +562,21 @@ namespace CalamityMod.NPCs.PlagueEnemies { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index 51829bdf2b..9b5599ced4 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -166,21 +166,21 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/PlaguebringerGoliath/PlagueHomingMissileGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); @@ -192,7 +192,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Color color41 = color37; color41 = Color.Lerp(color41, color36, amount9); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/PlaguebringerGoliath/PlagueMine.cs b/NPCs/PlaguebringerGoliath/PlagueMine.cs index 8e2790e7b9..02ba97d769 100644 --- a/NPCs/PlaguebringerGoliath/PlagueMine.cs +++ b/NPCs/PlaguebringerGoliath/PlagueMine.cs @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.frame.Y = 0; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -113,11 +113,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/PlaguebringerGoliath/PlagueMineGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 6a3dfb2971..95292652af 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -1089,7 +1089,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D texture = TextureAssets.Npc[NPC.type].Value; Texture2D glowTexture = ModContent.Request("CalamityMod/NPCs/PlaguebringerGoliath/PlaguebringerGoliathGlow").Value; @@ -1127,21 +1127,21 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture.Width, texture.Height / frameCount) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + posOffset; spriteBatch.Draw(texture, vector41, new Rectangle?(rectangle), color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture.Width, texture.Height / frameCount) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + posOffset; - spriteBatch.Draw(texture, vector43, new Rectangle?(rectangle), NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector43, new Rectangle?(rectangle), NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); @@ -1152,7 +1152,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Color color41 = color37; color41 = Color.Lerp(color41, color36, amount9); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(glowTexture.Width, glowTexture.Height / frameCount) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + posOffset; spriteBatch.Draw(glowTexture, vector44, new Rectangle?(rectangle), color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 9b2e4ab5c0..ec12ae56e8 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Polterghast return false; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -143,21 +143,21 @@ namespace CalamityMod.NPCs.Polterghast { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 6932b923ba..56a1c7bfbc 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -408,7 +408,7 @@ namespace CalamityMod.NPCs.Polterghast return new Color(200, 150, 255) * NPC.Opacity; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -425,7 +425,7 @@ namespace CalamityMod.NPCs.Polterghast { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; if (Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] > 300f) color38 = Color.Lerp(color38, lightRed, MathHelper.Clamp((Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] - 300f) / 120f, 0f, 1f)); @@ -433,19 +433,19 @@ namespace CalamityMod.NPCs.Polterghast color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Color color = NPC.GetAlpha(lightColor); + Color color = NPC.GetAlpha(drawColor); if (Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] > 300f) color = Color.Lerp(color, lightRed, MathHelper.Clamp((Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] - 300f) / 120f, 0f, 1f)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector43, NPC.frame, color, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); @@ -457,7 +457,7 @@ namespace CalamityMod.NPCs.Polterghast { for (int num163 = 1; num163 < num153; num163++) { - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); Color color43 = color42; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 92e59d3de8..e7938bebae 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -1027,7 +1027,7 @@ namespace CalamityMod.NPCs.Polterghast CalamityNetcode.SyncWorld(); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -1044,21 +1044,21 @@ namespace CalamityMod.NPCs.Polterghast { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastGlow").Value; @@ -1077,7 +1077,7 @@ namespace CalamityMod.NPCs.Polterghast color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index 4e48d4748b..8329e82c95 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -294,7 +294,7 @@ namespace CalamityMod.NPCs.Polterghast } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Color lightRed = new Color(255, 100, 100, 255); if (Main.npc[CalamityGlobalNPC.ghostBoss].active && !phase2) @@ -326,7 +326,7 @@ namespace CalamityMod.NPCs.Polterghast if (Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] > 300f) color2 = Color.Lerp(color2, lightRed, MathHelper.Clamp((Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] - 300f) / 120f, 0f, 1f)); - Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastChain").Value, new Vector2(center.X - Main.screenPosition.X, center.Y - Main.screenPosition.Y), + Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastChain").Value, new Vector2(center.X - screenPos.X, center.Y - screenPos.Y), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastChain").Value.Width, chainWidth)), color2, rotation2, new Vector2(ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastChain").Value.Width * 0.5f, ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastChain").Value.Height * 0.5f), 1f, SpriteEffects.None, 0f); } @@ -346,21 +346,21 @@ namespace CalamityMod.NPCs.Polterghast { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Polterghast/PolterghastHookGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Cyan, 0.5f); @@ -376,7 +376,7 @@ namespace CalamityMod.NPCs.Polterghast color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index 4046dad377..4c1552456f 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -403,7 +403,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -421,21 +421,21 @@ namespace CalamityMod.NPCs.ProfanedGuardians { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBossGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); @@ -448,7 +448,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs index e5ac14f498..87fa150b68 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs @@ -293,7 +293,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -311,21 +311,21 @@ namespace CalamityMod.NPCs.ProfanedGuardians { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss2Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs index 07962b1dda..d7e605e5a8 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians NPC.velocity *= 1.1f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -150,21 +150,21 @@ namespace CalamityMod.NPCs.ProfanedGuardians { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss3Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); @@ -178,7 +178,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 7cea70d209..ffa4cd7249 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.Providence NPC.ai[1] += 1f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -112,21 +112,21 @@ namespace CalamityMod.NPCs.Providence { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss2Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); @@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.Providence color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 43d27b4841..4b5addf8d2 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.Providence NPC.ai[1] += 1f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -112,21 +112,21 @@ namespace CalamityMod.NPCs.Providence { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBoss3Glow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); @@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.Providence color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index fa5db10e89..76d0b5ef67 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.Providence NPC.ai[1] += 1f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -114,21 +114,21 @@ namespace CalamityMod.NPCs.Providence { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/ProfanedGuardians/ProfanedGuardianBossGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Yellow, 0.5f); @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.Providence color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 730d44741b..f853a32e96 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1581,7 +1581,7 @@ namespace CalamityMod.NPCs.Providence potionType = ModContent.ItemType(); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { void drawProvidenceInstance(Vector2 drawOffset, Color? colorOverride) { @@ -1661,24 +1661,24 @@ namespace CalamityMod.NPCs.Providence { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; if (colorOverride != null) color38 = colorOverride.Value; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(texture, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; - spriteBatch.Draw(texture, vector43, NPC.frame, colorOverride ?? NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture, vector43, NPC.frame, colorOverride ?? NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); Color color37 = Color.Lerp(Color.White, nightTime ? Color.Cyan : Color.Yellow, 0.5f) * NPC.Opacity; Color color42 = Color.Lerp(Color.White, nightTime ? Color.BlueViolet : Color.Violet, 0.5f) * NPC.Opacity; @@ -1699,7 +1699,7 @@ namespace CalamityMod.NPCs.Providence if (colorOverride != null) color41 = colorOverride.Value; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(textureGlow.Width, textureGlow.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY) + drawOffset; spriteBatch.Draw(textureGlow, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index 4021ef7ed0..60d3909a54 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -133,7 +133,7 @@ namespace CalamityMod.NPCs.Ravager } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -141,11 +141,11 @@ namespace CalamityMod.NPCs.Ravager Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / 2); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Ravager/FlamePillarGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Cyan, 0.5f); diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index 6993af3d1e..d535c4c613 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.Ravager } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); float drawPositionX = Main.npc[CalamityGlobalNPC.scavenger].Center.X - center.X; @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.Ravager drawPositionY += 12f; drawPositionX -= 28f; Color color = Lighting.GetColor((int)center.X / 16, (int)(center.Y / 16f)); - spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value, new Vector2(center.X - Main.screenPosition.X, center.Y - Main.screenPosition.Y), + spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value, new Vector2(center.X - screenPos.X, center.Y - screenPos.Y), new Rectangle?(new Rectangle(0, 0, ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Width, ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Height)), color, rotation, new Vector2(ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Width * 0.5f, ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Height * 0.5f), 1f, SpriteEffects.None, 0f); } diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index 4234781931..5d7465346c 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.Ravager } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); float drawPositionX = Main.npc[CalamityGlobalNPC.scavenger].Center.X - center.X; @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.Ravager drawPositionY += 12f; drawPositionX += 28f; Color color = Lighting.GetColor((int)center.X / 16, (int)(center.Y / 16f)); - spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value, new Vector2(center.X - Main.screenPosition.X, center.Y - Main.screenPosition.Y), + spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value, new Vector2(center.X - screenPos.X, center.Y - screenPos.Y), new Rectangle?(new Rectangle(0, 0, ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Width, ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Height)), color, rotation, new Vector2(ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Width * 0.5f, ModContent.Request("CalamityMod/NPCs/Ravager/RavagerChain").Value.Height * 0.5f), 1f, SpriteEffects.None, 0f); } From 486e224b879dee7396ecd88725472b4e9aef8ddd Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 6 Apr 2022 19:18:58 -0500 Subject: [PATCH 13/14] 1 - A few more NPC drawing fixes. --- NPCs/Signus/CosmicLantern.cs | 12 ++++++------ NPCs/Signus/Signus.cs | 8 ++++---- NPCs/Signus/SignusBomb.cs | 10 +++++----- NPCs/SlimeGod/SlimeGodCore.cs | 6 +++--- NPCs/StormWeaver/StormWeaverBody.cs | 10 +++++----- NPCs/StormWeaver/StormWeaverHead.cs | 10 +++++----- NPCs/StormWeaver/StormWeaverTail.cs | 10 +++++----- NPCs/SupremeCalamitas/BrimstoneHeart.cs | 4 ++-- NPCs/SupremeCalamitas/SCalWormArm.cs | 6 +++--- NPCs/SupremeCalamitas/SCalWormBody.cs | 6 +++--- NPCs/SupremeCalamitas/SCalWormHead.cs | 6 +++--- NPCs/SupremeCalamitas/SCalWormTail.cs | 6 +++--- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 12 ++++++------ NPCs/SupremeCalamitas/SupremeCalamitas.cs | 10 +++++----- NPCs/SupremeCalamitas/SupremeCataclysm.cs | 12 ++++++------ NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 12 ++++++------ NPCs/TownNPCs/THIEF.cs | 4 ++-- 17 files changed, 72 insertions(+), 72 deletions(-) diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 56e3efe026..c3079248f8 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.Signus CalamityAI.DungeonSpiritAI(NPC, Mod, playerDistNormMult, 0f, true); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -100,21 +100,21 @@ namespace CalamityMod.NPCs.Signus { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Signus/CosmicLanternGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Cyan, 0.5f); @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Signus color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index e2b96a5b0e..d50971223e 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -660,7 +660,7 @@ namespace CalamityMod.NPCs.Signus } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D NPCTexture = TextureAssets.Npc[NPC.type].Value; Texture2D glowMaskTexture = ModContent.Request("CalamityMod/NPCs/Signus/SignusGlow").Value; @@ -710,14 +710,14 @@ namespace CalamityMod.NPCs.Signus color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(NPCTexture.Width, NPCTexture.Height / frameCount) * scale / 2f; vector41 += vector11 * scale + new Vector2(0f, 4f + offsetY); spriteBatch.Draw(NPCTexture, vector41, new Rectangle?(frame), color38, rotation, vector11, scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(NPCTexture.Width, NPCTexture.Height / frameCount) * scale / 2f; vector43 += vector11 * scale + new Vector2(0f, 4f + offsetY); spriteBatch.Draw(NPCTexture, vector43, new Rectangle?(frame), NPC.GetAlpha(drawColor), rotation, vector11, scale, spriteEffects, 0f); @@ -732,7 +732,7 @@ namespace CalamityMod.NPCs.Signus color41 = Color.Lerp(color41, color36, amount9); color41 = NPC.GetAlpha(color41); color41 *= (num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector44 -= new Vector2(glowMaskTexture.Width, glowMaskTexture.Height / frameCount) * scale / 2f; vector44 += vector11 * scale + new Vector2(0f, 4f + offsetY); spriteBatch.Draw(glowMaskTexture, vector44, new Rectangle?(frame), color41, rotation, vector11, scale, spriteEffects, 0f); diff --git a/NPCs/Signus/SignusBomb.cs b/NPCs/Signus/SignusBomb.cs index 7404324b48..c284ca8fc4 100644 --- a/NPCs/Signus/SignusBomb.cs +++ b/NPCs/Signus/SignusBomb.cs @@ -161,7 +161,7 @@ namespace CalamityMod.NPCs.Signus return new Color(200, Main.DiscoG, 255, 0); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { if (NPC.Calamity().newAI[0] >= 45f) return false; @@ -180,21 +180,21 @@ namespace CalamityMod.NPCs.Signus { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index d588ff9888..46bbf39309 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -529,7 +529,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.rotation = NPC.velocity.X * 0.1f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -548,7 +548,7 @@ namespace CalamityMod.NPCs.SlimeGod int num159 = 1; float num160 = 0f; int num161 = num159; - spriteBatch.Draw(texture2D3, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY), NPC.frame, color24, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0); + spriteBatch.Draw(texture2D3, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, color24, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0); while (((num158 > 0 && num161 < num157) || (num158 < 0 && num161 > num157)) && CalamityConfig.Instance.Afterimages) { Color color26 = NPC.GetAlpha(color25); @@ -567,7 +567,7 @@ namespace CalamityMod.NPCs.SlimeGod color26 *= num164 / ((float)NPCID.Sets.TrailCacheLength[NPC.type] * 1.5f); Vector2 value4 = NPC.oldPos[num161]; float num165 = NPC.rotation; - Main.spriteBatch.Draw(texture2D3, value4 + NPC.Size / 2f - Main.screenPosition + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), color26, num165 + NPC.rotation * num160 * (float)(num161 - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), origin2, NPC.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(texture2D3, value4 + NPC.Size / 2f - screenPos + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), color26, num165 + NPC.rotation * num160 * (float)(num161 - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), origin2, NPC.scale, spriteEffects, 0f); goto IL_6881; } return false; diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 748f0a2a61..cf178bcccb 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -210,7 +210,7 @@ namespace CalamityMod.NPCs.StormWeaver } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -227,7 +227,7 @@ namespace CalamityMod.NPCs.StormWeaver { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { @@ -240,17 +240,17 @@ namespace CalamityMod.NPCs.StormWeaver color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - Color color = NPC.GetAlpha(lightColor); + Color color = NPC.GetAlpha(drawColor); if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 8cca2ca128..bc60f8ded6 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -611,7 +611,7 @@ namespace CalamityMod.NPCs.StormWeaver } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -628,7 +628,7 @@ namespace CalamityMod.NPCs.StormWeaver { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { @@ -641,17 +641,17 @@ namespace CalamityMod.NPCs.StormWeaver color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - Color color = NPC.GetAlpha(lightColor); + Color color = NPC.GetAlpha(drawColor); if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index d95e56b3fa..78c6703679 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.StormWeaver } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -237,7 +237,7 @@ namespace CalamityMod.NPCs.StormWeaver { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { @@ -250,17 +250,17 @@ namespace CalamityMod.NPCs.StormWeaver color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - Color color = NPC.GetAlpha(lightColor); + Color color = NPC.GetAlpha(drawColor); if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { diff --git a/NPCs/SupremeCalamitas/BrimstoneHeart.cs b/NPCs/SupremeCalamitas/BrimstoneHeart.cs index 4355634475..a547cc665f 100644 --- a/NPCs/SupremeCalamitas/BrimstoneHeart.cs +++ b/NPCs/SupremeCalamitas/BrimstoneHeart.cs @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.frame.Y = frame * frameHeight; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { if (ChainDrawer is null) ChainDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction); @@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.Center, ChainEndpoints[i] + NPC.DirectionTo(ChainEndpoints[i]) * 25f }; - ChainDrawer.Draw(points, -Main.screenPosition, 40); + ChainDrawer.Draw(points, -screenPos, 40); } return true; diff --git a/NPCs/SupremeCalamitas/SCalWormArm.cs b/NPCs/SupremeCalamitas/SCalWormArm.cs index 6fb4a547dc..14218aedd1 100644 --- a/NPCs/SupremeCalamitas/SCalWormArm.cs +++ b/NPCs/SupremeCalamitas/SCalWormArm.cs @@ -170,17 +170,17 @@ namespace CalamityMod.NPCs.SupremeCalamitas Limbs[1].Center = Limbs[0].Center + offsetFromSegment * 0.5f + (NPC.Center - Limbs[0].Center).SafeNormalize(Vector2.UnitY) * 84f; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor_Unused) { Texture2D armTexture = TextureAssets.Npc[NPC.type].Value; Texture2D foreArmTexture = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SCalWormForeArm").Value; Texture2D handTexture = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SCalWormHand").Value; - Vector2 forearmDrawPosition = Limbs[0].Center - Main.screenPosition; + Vector2 forearmDrawPosition = Limbs[0].Center - screenPos; Color drawColor = Lighting.GetColor((int)(Limbs[0].Center.X / 16), (int)(Limbs[0].Center.Y / 16)); spriteBatch.Draw(foreArmTexture, forearmDrawPosition, null, drawColor, Limbs[0].Rotation + MathHelper.PiOver2, foreArmTexture.Size() * 0.5f, NPC.scale, SpriteEffects.None, 0f); - Vector2 armDrawPosition = Limbs[1].Center - Main.screenPosition; + Vector2 armDrawPosition = Limbs[1].Center - screenPos; drawColor = Lighting.GetColor((int)(Limbs[1].Center.X / 16), (int)(Limbs[1].Center.Y / 16)); spriteBatch.Draw(armTexture, armDrawPosition, null, drawColor, Limbs[1].Rotation + MathHelper.PiOver2, armTexture.Size() * new Vector2(0.5f, 0f), NPC.scale, SpriteEffects.FlipVertically, 0f); diff --git a/NPCs/SupremeCalamitas/SCalWormBody.cs b/NPCs/SupremeCalamitas/SCalWormBody.cs index b92dfb4682..3e72f42b13 100644 --- a/NPCs/SupremeCalamitas/SCalWormBody.cs +++ b/NPCs/SupremeCalamitas/SCalWormBody.cs @@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -139,10 +139,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas Texture2D texture2D15 = NPC.localAI[3] / 2f % 2f == 0f ? ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SCalWormBodyAlt").Value : TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/SupremeCalamitas/SCalWormHead.cs b/NPCs/SupremeCalamitas/SCalWormHead.cs index 91cccd91b8..28498d0a56 100644 --- a/NPCs/SupremeCalamitas/SCalWormHead.cs +++ b/NPCs/SupremeCalamitas/SCalWormHead.cs @@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -298,10 +298,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/SupremeCalamitas/SCalWormTail.cs b/NPCs/SupremeCalamitas/SCalWormTail.cs index d795dd4ae7..a7be2f8ad3 100644 --- a/NPCs/SupremeCalamitas/SCalWormTail.cs +++ b/NPCs/SupremeCalamitas/SCalWormTail.cs @@ -149,7 +149,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -158,10 +158,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas 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 / 2)); - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index f5b128e3e4..cbcba2c41b 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -179,7 +179,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override bool CheckActive() => false; - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -195,21 +195,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SoulSeekerSupremeGlow").Value; Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); @@ -221,7 +221,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Color color41 = color37; color41 = Color.Lerp(color41, color36, amount9); color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - Main.screenPosition; + Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index c9b16c4fa6..ef4fa008a3 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2845,7 +2845,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas return null; } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -2864,11 +2864,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas { for (int num155 = 1; num155 < num153; num155 += 2) { - Color color38 = lightColor; + Color color38 = drawColor; color38 = Color.Lerp(color38, color36, amount9); color38 = NPC.GetAlpha(color38); color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - Main.screenPosition; + Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; vector41 -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); spriteBatch.Draw(texture2D15, vector41, frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); @@ -2876,7 +2876,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } bool inPhase2 = NPC.ai[0] >= 3f && NPC.life > NPC.lifeMax * 0.01; - Vector2 vector43 = NPC.Center - Main.screenPosition; + Vector2 vector43 = NPC.Center - screenPos; vector43 -= new Vector2(texture2D15.Width / 2f, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); @@ -2895,7 +2895,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas spriteBatch.Draw(texture2D15, vector43 + rotationalDrawOffset, frame, auraColor, NPC.rotation, vector11, NPC.scale * 1.1f, spriteEffects, 0f); } } - spriteBatch.Draw(texture2D15, vector43, frame, NPC.GetAlpha(lightColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); DrawForcefield(spriteBatch); DrawShield(spriteBatch); diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index 18800dc71e..3454c35803 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -226,14 +226,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas { for (int i = 1; i < afterimageCount; i += 2) { - Color afterimageColor = NPC.GetAlpha(Color.Lerp(lightColor, Color.White, 0.5f)) * ((afterimageCount - i) / 15f); - Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - Main.screenPosition; + Color afterimageColor = NPC.GetAlpha(Color.Lerp(drawColor, Color.White, 0.5f)) * ((afterimageCount - i) / 15f); + Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - screenPos; spriteBatch.Draw(texture, drawPosition, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } } - Vector2 mainDrawPosition = NPC.Center - Main.screenPosition; - spriteBatch.Draw(texture, mainDrawPosition, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + Vector2 mainDrawPosition = NPC.Center - screenPos; + spriteBatch.Draw(texture, mainDrawPosition, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); texture = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SupremeCataclysmGlow").Value; Color baseGlowmaskColor = Color.Lerp(Color.White, Color.Red, 0.5f); @@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 1; i < afterimageCount; i++) { Color afterimageColor = Color.Lerp(baseGlowmaskColor, Color.White, 0.5f) * ((afterimageCount - i) / 15f); - Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - Main.screenPosition; + Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - screenPos; spriteBatch.Draw(texture, drawPosition, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } } diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index a3aa68ef7b..6cd48aa2a5 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -216,7 +216,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) @@ -230,14 +230,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas { for (int i = 1; i < afterimageCount; i += 2) { - Color afterimageColor = NPC.GetAlpha(Color.Lerp(lightColor, Color.White, 0.5f)) * ((afterimageCount - i) / 15f); - Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - Main.screenPosition; + Color afterimageColor = NPC.GetAlpha(Color.Lerp(drawColor, Color.White, 0.5f)) * ((afterimageCount - i) / 15f); + Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - screenPos; spriteBatch.Draw(texture, drawPosition, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } } - Vector2 mainDrawPosition = NPC.Center - Main.screenPosition; - spriteBatch.Draw(texture, mainDrawPosition, NPC.frame, NPC.GetAlpha(lightColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); + Vector2 mainDrawPosition = NPC.Center - screenPos; + spriteBatch.Draw(texture, mainDrawPosition, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, origin, NPC.scale, spriteEffects, 0f); texture = ModContent.Request("CalamityMod/NPCs/SupremeCalamitas/SupremeCatastropheGlow").Value; Color baseGlowmaskColor = Color.Lerp(Color.White, Color.Cyan, 0.35f); @@ -247,7 +247,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas for (int i = 1; i < afterimageCount; i++) { Color afterimageColor = Color.Lerp(baseGlowmaskColor, Color.White, 0.5f) * ((afterimageCount - i) / 15f); - Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - Main.screenPosition; + Vector2 drawPosition = NPC.oldPos[i] + NPC.Size * 0.5f - screenPos; spriteBatch.Draw(texture, drawPosition, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); } } diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index aba44ec546..abf131365c 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -216,10 +216,10 @@ namespace CalamityMod.NPCs.TownNPCs return "Sorry, I got nothing. Perhaps you could reforge something and come back later..."; } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { var something = NPC.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/TownNPCs/THIEF" + (BirthdayParty.PartyIsUp ? "Alt" : "")).Value, NPC.Center - Main.screenPosition + new Vector2(0, NPC.gfxOffY) - new Vector2(0f, 6f), NPC.frame, drawColor, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); + spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/TownNPCs/THIEF" + (BirthdayParty.PartyIsUp ? "Alt" : "")).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; } From a4e3c3bed1c37fc446716c3025408308901ece10 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 6 Apr 2022 19:37:15 -0500 Subject: [PATCH 14/14] 1 - NPC spawning fixes. --- NPCs/AquaticScourge/AquaticSeekerHead.cs | 4 ++-- NPCs/CalamityGlobalNPC.cs | 4 ++-- NPCs/CalamityVanillaMinibossesAI.cs | 8 ++++---- NPCs/ExoMechs/Ares/AresBody.cs | 8 ++++---- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 6 +++--- NPCs/GreatSandShark/GreatSandShark.cs | 2 +- NPCs/HiveMind/HiveMind.cs | 10 +++++----- NPCs/Leviathan/Leviathan.cs | 2 +- NPCs/Leviathan/Siren.cs | 4 ++-- NPCs/NormalNPCs/ArmoredDiggerHead.cs | 2 +- NPCs/NormalNPCs/ProfanedEnergyBody.cs | 2 +- NPCs/NormalNPCs/ThiccWaifu.cs | 2 +- NPCs/NormalNPCs/WulfrumPylon.cs | 2 +- NPCs/Perforator/PerforatorBodyMedium.cs | 4 ++-- NPCs/Perforator/PerforatorHeadLarge.cs | 4 ++-- NPCs/Perforator/PerforatorHeadMedium.cs | 2 +- NPCs/Perforator/PerforatorHeadSmall.cs | 4 ++-- NPCs/Perforator/PerforatorHive.cs | 2 +- NPCs/PlagueEnemies/PlaguebringerShade.cs | 2 +- .../PlaguebringerGoliath.cs | 8 ++++---- NPCs/Polterghast/Polterghast.cs | 14 +++++++------- NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs | 4 ++-- NPCs/Providence/Providence.cs | 2 +- NPCs/Ravager/RavagerBody.cs | 18 +++++++++--------- NPCs/Signus/Signus.cs | 8 ++++---- NPCs/SlimeGod/SlimeGod.cs | 8 ++++---- NPCs/SlimeGod/SlimeGodCore.cs | 4 ++-- NPCs/SlimeGod/SlimeGodRun.cs | 8 ++++---- NPCs/SlimeGod/SlimeGodRunSplit.cs | 4 ++-- NPCs/SlimeGod/SlimeGodSplit.cs | 4 ++-- NPCs/StormWeaver/StormWeaverHead.cs | 4 ++-- NPCs/SunkenSea/GiantClam.cs | 6 +++--- NPCs/SunkenSea/SeaSerpent1.cs | 8 ++++---- Projectiles/Boss/LeviathanSpawner.cs | 2 +- Projectiles/Boss/OverlyDramaticDukeSummoner.cs | 2 +- Projectiles/Pets/ChibiiDoggo.cs | 2 +- 36 files changed, 90 insertions(+), 90 deletions(-) diff --git a/NPCs/AquaticScourge/AquaticSeekerHead.cs b/NPCs/AquaticScourge/AquaticSeekerHead.cs index 60d5550306..3b4aebef39 100644 --- a/NPCs/AquaticScourge/AquaticSeekerHead.cs +++ b/NPCs/AquaticScourge/AquaticSeekerHead.cs @@ -66,11 +66,11 @@ namespace CalamityMod.NPCs.AquaticScourge int lol; if (num36 >= 0 && num36 < minLength) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = (float)NPC.whoAmI; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 583cd0bc60..8d3f5c8b3d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4093,7 +4093,7 @@ namespace CalamityMod.NPCs NPCType() }); - NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, randomType, 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(npc.GetSpawnSourceForNPCFromNPCAI(), (int)npc.Center.X, (int)npc.Center.Y, randomType, 0, 0f, 0f, 0f, 0f, 255); } } @@ -4119,7 +4119,7 @@ namespace CalamityMod.NPCs int slimeAmt = Main.rand.Next(2) + 2; //2 to 3 extra for (int s = 0; s < slimeAmt; s++) { - int slime = NPC.NewNPC((int)npc.Center.X, (int)(npc.position.Y + npc.height), NPCID.BlueSlime, 0, 0f, 0f, 0f, 0f, 255); + int slime = NPC.NewNPC(npc.GetSpawnSourceForNPCFromNPCAI(), (int)npc.Center.X, (int)(npc.position.Y + npc.height), NPCID.BlueSlime, 0, 0f, 0f, 0f, 0f, 255); NPC npc2 = Main.npc[slime]; npc2.SetDefaults(NPCID.BabySlime); npc2.velocity.X = npc.velocity.X * 2f; diff --git a/NPCs/CalamityVanillaMinibossesAI.cs b/NPCs/CalamityVanillaMinibossesAI.cs index d22a445f42..ed92a5e040 100644 --- a/NPCs/CalamityVanillaMinibossesAI.cs +++ b/NPCs/CalamityVanillaMinibossesAI.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; @@ -416,7 +416,7 @@ namespace CalamityMod.NPCs attackTimer++; if (attackTimer == eggLayTime) - NPC.NewNPC((int)spotToLayEgg.X, (int)spotToLayEgg.Y + 20, 478, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(npc.GetSpawnSourceForNPCFromNPCAI(), (int)spotToLayEgg.X, (int)spotToLayEgg.Y + 20, 478, npc.whoAmI, 0f, 0f, 0f, 0f, 255); else if (attackTimer == eggLayTime + waitTime) { aiState = (int)MothronAIState.NewAISelection; @@ -493,13 +493,13 @@ namespace CalamityMod.NPCs npc.TargetClosest(true); npc.ai[0] = 1f; - int num861 = NPC.NewNPC((int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + int num861 = NPC.NewNPC(npc.GetSpawnSourceForNPCFromNPCAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); Main.npc[num861].ai[0] = -1f; Main.npc[num861].ai[1] = (float)npc.whoAmI; Main.npc[num861].target = npc.target; Main.npc[num861].netUpdate = true; - num861 = NPC.NewNPC((int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + num861 = NPC.NewNPC(npc.GetSpawnSourceForNPCFromNPCAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); Main.npc[num861].ai[0] = 1f; Main.npc[num861].ai[1] = (float)npc.whoAmI; Main.npc[num861].ai[3] = 150f; diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index c5825bfa05..e17bbd777b 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -228,18 +228,18 @@ namespace CalamityMod.NPCs.ExoMechs.Ares switch (i) { case 0: - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); break; case 1: - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); Main.npc[lol].Calamity().newAI[1] = plasmaArmStartTimer; break; case 2: - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); Main.npc[lol].Calamity().newAI[1] = teslaArmStartTimer; break; case 3: - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); break; default: break; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 92442e8507..cfeae3d155 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -323,12 +323,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (num36 >= 0 && num36 < minLength) { if (num36 % 2 == 0) - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); else - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = NPC.whoAmI; diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index c2f212ddef..2e4a2d1eee 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -298,7 +298,7 @@ namespace CalamityMod.NPCs.GreatSandShark if (spawnFlag && Main.netMode != NetmodeID.MultiplayerClient) { - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y + 50, NPCID.SandShark, 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y + 50, NPCID.SandShark, 0, 0f, 0f, 0f, 0f, 255); SoundEngine.PlaySound(SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Custom/GreatSandSharkRoar"), (int)NPC.position.X, (int)NPC.position.Y); } } diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 9481d7ad15..27a82c1270 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.HiveMind while (NPC.AnyNPCs(type) && choice < 5); if (choice < 5) - NPC.NewNPC((int)NPC.position.X + Main.rand.Next(NPC.width), (int)NPC.position.Y + Main.rand.Next(NPC.height), type); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + Main.rand.Next(NPC.width), (int)NPC.position.Y + Main.rand.Next(NPC.height), type); } } @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.localAI[0] = 1f; int maxBlobs = death ? 15 : revenge ? 7 : expertMode ? 6 : 5; for (int i = 0; i < maxBlobs; i++) - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI); } } @@ -494,7 +494,7 @@ namespace CalamityMod.NPCs.HiveMind if (NPC.CountNPCS(ModContent.NPCType()) < maxDankSpawns) type = ModContent.NPCType(); - int num664 = NPC.NewNPC(x, y, type); + int num664 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), x, y, type); Main.npc[num664].SetDefaults(type); if (Main.netMode == NetmodeID.Server && num664 < Main.maxNPCs) NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num664, 0f, 0f, 0f, 0, 0, 0); @@ -871,10 +871,10 @@ namespace CalamityMod.NPCs.HiveMind if (NPC.ai[0] == 2 || NPC.ai[0] == 4) { if (expertMode && !NPC.AnyNPCs(ModContent.NPCType())) - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType()); } else if (!NPC.AnyNPCs(NPCID.EaterofSouls)) - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y, NPCID.EaterofSouls); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.EaterofSouls); } if (NPC.ai[0] == 6) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 9fbf482649..f99b8e226c 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -392,7 +392,7 @@ namespace CalamityMod.NPCs.Leviathan { SoundEngine.PlaySound(SoundID.Zombie, (int)vector.X, (int)vector.Y, soundChoice); if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, ModContent.NPCType()); } if (num1060 > ((sirenAlive && !phase4) ? 1000f : 800f)) diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 65bad32140..8bed6ebde2 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.Leviathan { if (NPC.ai[3] == 0f && NPC.localAI[1] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { - int num6 = NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI); + int num6 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI); NPC.ai[3] = num6 + 1; NPC.localAI[1] = -1f; NPC.localAI[2] += 1f; @@ -485,7 +485,7 @@ namespace CalamityMod.NPCs.Leviathan SoundEngine.PlaySound(SoundID.Item, (int)NPC.position.X, (int)NPC.position.Y, 85); if (Main.netMode != NetmodeID.MultiplayerClient) { - int spawn = NPC.NewNPC((int)vector119.X, (int)vector119.Y, NPCID.DetonatingBubble); + int spawn = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, NPCID.DetonatingBubble); Main.npc[spawn].target = NPC.target; Main.npc[spawn].velocity = player.Center - vector119; Main.npc[spawn].velocity.Normalize(); diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index 1adb80e9ab..a39af6beae 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.NormalNPCs { num4 = ModContent.NPCType(); } - int num5 = NPC.NewNPC((int)(NPC.position.X + (float)(NPC.width / 2)), (int)(NPC.position.Y + (float)NPC.height), num4, NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + int num5 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.position.X + (float)(NPC.width / 2)), (int)(NPC.position.Y + (float)NPC.height), num4, NPC.whoAmI, 0f, 0f, 0f, 0f, 255); Main.npc[num5].ai[3] = (float)NPC.whoAmI; Main.npc[num5].realLife = NPC.whoAmI; Main.npc[num5].ai[1] = (float)num2; diff --git a/NPCs/NormalNPCs/ProfanedEnergyBody.cs b/NPCs/NormalNPCs/ProfanedEnergyBody.cs index 627bc84415..2a2c592b5f 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyBody.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyBody.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.localAI[0] = 1f; for (int num723 = 0; num723 < 2; num723++) { - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); } } } diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index 3ed44f404c..506db216ad 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.NormalNPCs { Tile tileAtPosition = CalamityUtils.ParanoidTileRetrieval(spawnPosition.X, spawnPosition.Y); if (!(tileAtPosition.HasTile && Main.tileSolid[tileAtPosition.TileType])) - NPC.NewNPC(spawnPosition.X, spawnPosition.Y, NPCID.AngryNimbus); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), spawnPosition.X, spawnPosition.Y, NPCID.AngryNimbus); } // Create sound cloud dust at the position where the nimbus was spawned. diff --git a/NPCs/NormalNPCs/WulfrumPylon.cs b/NPCs/NormalNPCs/WulfrumPylon.cs index d42680774c..791befb0fc 100644 --- a/NPCs/NormalNPCs/WulfrumPylon.cs +++ b/NPCs/NormalNPCs/WulfrumPylon.cs @@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (tries < 500) { int npcToSpawn = Main.rand.NextBool(2) ? ModContent.NPCType() : ModContent.NPCType(); - NPC.NewNPC((int)spawnPosition.X, (int)spawnPosition.Y, npcToSpawn); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)spawnPosition.X, (int)spawnPosition.Y, npcToSpawn); } } Charging = true; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 0cc5180a18..4a1258c42a 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -80,9 +80,9 @@ namespace CalamityMod.NPCs.Perforator if (NPC.ai[0] == 0f) { if (NPC.ai[2] > 0f) - NPC.ai[0] = NPC.NewNPC((int)(NPC.position.X + (NPC.width / 2)), (int)(NPC.position.Y + NPC.height), NPC.type, NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.ai[0] = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.position.X + (NPC.width / 2)), (int)(NPC.position.Y + NPC.height), NPC.type, NPC.whoAmI, 0f, 0f, 0f, 0f, 255); else - NPC.ai[0] = NPC.NewNPC((int)(NPC.position.X + (NPC.width / 2)), (int)(NPC.position.Y + NPC.height), ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.ai[0] = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.position.X + (NPC.width / 2)), (int)(NPC.position.Y + NPC.height), ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); Main.npc[(int)NPC.ai[0]].ai[1] = NPC.whoAmI; Main.npc[(int)NPC.ai[0]].ai[2] = NPC.ai[2] - 1f; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 503922b37c..869c9add55 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -155,11 +155,11 @@ namespace CalamityMod.NPCs.Perforator int lol; if (num36 >= 0 && num36 < maxLength - 1) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } if (num36 % 2 == 0) { diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 443aef5ae7..dd171ae09e 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -107,7 +107,7 @@ namespace CalamityMod.NPCs.Perforator { int totalSegments = death ? 14 : revenge ? 13 : expertMode ? 12 : 10; NPC.ai[2] = totalSegments; - NPC.ai[0] = NPC.NewNPC((int)(NPC.position.X + (NPC.width / 2)), (int)(NPC.position.Y + NPC.height), ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.ai[0] = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.position.X + (NPC.width / 2)), (int)(NPC.position.Y + NPC.height), ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); Main.npc[(int)NPC.ai[0]].ai[1] = NPC.whoAmI; Main.npc[(int)NPC.ai[0]].ai[2] = NPC.ai[2] - 1f; NPC.netUpdate = true; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 0e1a6c1271..8fcbaece95 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -136,11 +136,11 @@ namespace CalamityMod.NPCs.Perforator int lol; if (num36 >= 0 && num36 < maxLength - 1) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = NPC.whoAmI; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 26709085be..faad3df39a 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -206,7 +206,7 @@ namespace CalamityMod.NPCs.Perforator large = true; wormType = ModContent.NPCType(); } - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y, wormType, 1); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y, wormType, 1); NPC.TargetClosest(); SoundEngine.PlaySound(SoundID.NPCDeath23, NPC.position); diff --git a/NPCs/PlagueEnemies/PlaguebringerShade.cs b/NPCs/PlagueEnemies/PlaguebringerShade.cs index b1b0160800..6b34db4378 100644 --- a/NPCs/PlagueEnemies/PlaguebringerShade.cs +++ b/NPCs/PlagueEnemies/PlaguebringerShade.cs @@ -346,7 +346,7 @@ namespace CalamityMod.NPCs.PlagueEnemies } if (NPC.CountNPCS(ModContent.NPCType()) < 3) { - int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, num1061, 0, 0f, 0f, 0f, 0f, 255); + int num1062 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, num1061, 0, 0f, 0f, 0f, 0f, 255); Main.npc[num1062].velocity.X = (float)Main.rand.Next(-200, 201) * 0.005f; Main.npc[num1062].velocity.Y = (float)Main.rand.Next(-200, 201) * 0.005f; Main.npc[num1062].localAI[0] = 60f; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 95292652af..bb7fb727a4 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -590,7 +590,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (Main.netMode != NetmodeID.MultiplayerClient) { if (expertMode && NPC.CountNPCS(ModContent.NPCType()) < 2) - NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); float npcSpeed = (revenge ? 9f : 7f) + enrageScale * 2f; @@ -602,7 +602,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath num1071 *= num1073; num1072 *= num1073; - int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); + int num1062 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); Main.npc[num1062].velocity.X = num1071; Main.npc[num1062].velocity.Y = num1072; Main.npc[num1062].netUpdate = true; @@ -670,7 +670,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (Main.netMode != NetmodeID.MultiplayerClient) { if (expertMode && NPC.CountNPCS(ModContent.NPCType()) < 3) - NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); float npcSpeed = (revenge ? 11f : 9f) + enrageScale * 2f; @@ -684,7 +684,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath num1071 += Main.rand.Next(-20, 21) * 0.05f; num1072 += Main.rand.Next(-20, 21) * 0.05f; - int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); + int num1062 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector119.X, (int)vector119.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, challengeAmt); Main.npc[num1062].velocity.X = num1071; Main.npc[num1062].velocity.Y = num1072; Main.npc[num1062].netUpdate = true; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index e7938bebae..e8e728855c 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -226,10 +226,10 @@ namespace CalamityMod.NPCs.Polterghast if (NPC.localAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { NPC.localAI[0] = 1f; - NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType(), NPC.whoAmI, 0f, 0f, 0f, 0f, 255); } if (!player.ZoneDungeon && !BossRushEvent.BossRushActive && player.position.Y < Main.worldSurface * 16.0) @@ -845,13 +845,13 @@ namespace CalamityMod.NPCs.Polterghast if (Main.netMode != NetmodeID.MultiplayerClient) { - NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); if (expertMode) { for (int I = 0; I < 3; I++) { - int spawn = NPC.NewNPC((int)(vector.X + (Math.Sin(I * 120) * 500)), (int)(vector.Y + (Math.Cos(I * 120) * 500)), ModContent.NPCType(), NPC.whoAmI, 0, 0, 0, -1); + int spawn = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(vector.X + (Math.Sin(I * 120) * 500)), (int)(vector.Y + (Math.Cos(I * 120) * 500)), ModContent.NPCType(), NPC.whoAmI, 0, 0, 0, -1); NPC npc2 = Main.npc[spawn]; npc2.ai[0] = I * 120; } @@ -950,7 +950,7 @@ namespace CalamityMod.NPCs.Polterghast if (NPC.CountNPCS(ModContent.NPCType()) < 2 && Main.netMode != NetmodeID.MultiplayerClient && !charging && !chargePhase) { - int num762 = NPC.NewNPC((int)vector.X, (int)vector.Y, ModContent.NPCType()); + int num762 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vector.X, (int)vector.Y, ModContent.NPCType()); Main.npc[num762].velocity.X = num758; Main.npc[num762].velocity.Y = num760; Main.npc[num762].netUpdate = true; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index 4c1552456f..97bf1d3dcd 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -101,8 +101,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (Main.netMode != NetmodeID.MultiplayerClient && NPC.localAI[1] == 0f) { NPC.localAI[1] = 1f; - NPC.NewNPC((int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); - NPC.NewNPC((int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); } bool defenderAlive = false; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index f853a32e96..dd57bc9aed 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -468,7 +468,7 @@ namespace CalamityMod.NPCs.Providence for (int i = 0; i < guardianRingAmt; i++) { int type = i == 0 ? ModContent.NPCType() : i == 1 ? ModContent.NPCType() : ModContent.NPCType(); - int spawn = NPC.NewNPC((int)(NPC.Center.X + (Math.Sin(i * guardianSpread) * guardianDistance)), (int)(NPC.Center.Y + (Math.Cos(i * guardianSpread) * guardianDistance)), type, NPC.whoAmI, 0, 0, 0, -1); + int spawn = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.Center.X + (Math.Sin(i * guardianSpread) * guardianDistance)), (int)(NPC.Center.Y + (Math.Cos(i * guardianSpread) * guardianDistance)), type, NPC.whoAmI, 0, 0, 0, -1); Main.npc[spawn].ai[0] = i * guardianSpread; } } diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index f59bf7cae7..5cf0f696fd 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -121,11 +121,11 @@ namespace CalamityMod.NPCs.Ravager if (NPC.localAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { NPC.localAI[0] = 1f; - NPC.NewNPC((int)NPC.Center.X - 70, (int)NPC.Center.Y + 88, ModContent.NPCType()); - NPC.NewNPC((int)NPC.Center.X + 70, (int)NPC.Center.Y + 88, ModContent.NPCType()); - NPC.NewNPC((int)NPC.Center.X - 120, (int)NPC.Center.Y + 50, ModContent.NPCType()); - NPC.NewNPC((int)NPC.Center.X + 120, (int)NPC.Center.Y + 50, ModContent.NPCType()); - NPC.NewNPC((int)NPC.Center.X + 1, (int)NPC.Center.Y - 20, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X - 70, (int)NPC.Center.Y + 88, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X + 70, (int)NPC.Center.Y + 88, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X - 120, (int)NPC.Center.Y + 50, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X + 120, (int)NPC.Center.Y + 50, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X + 1, (int)NPC.Center.Y - 20, ModContent.NPCType()); } if (NPC.target >= 0 && Main.player[NPC.target].dead) @@ -437,14 +437,14 @@ namespace CalamityMod.NPCs.Ravager if (!NPC.AnyNPCs(ModContent.NPCType())) { - NPC.NewNPC((int)(player.Center.X - spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); - NPC.NewNPC((int)(player.Center.X + spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(player.Center.X - spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(player.Center.X + spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); } else if (!NPC.AnyNPCs(ModContent.NPCType())) { float distanceMultiplier = finalPhase ? 2.5f : 2f; - NPC.NewNPC((int)player.Center.X - (int)(spawnDistance * distanceMultiplier), (int)player.Center.Y - 100, ModContent.NPCType()); - NPC.NewNPC((int)player.Center.X + (int)(spawnDistance * distanceMultiplier), (int)player.Center.Y - 100, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)player.Center.X - (int)(spawnDistance * distanceMultiplier), (int)player.Center.Y - 100, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)player.Center.X + (int)(spawnDistance * distanceMultiplier), (int)player.Center.Y - 100, ModContent.NPCType()); } } } diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index d50971223e..be4e21e77f 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -329,11 +329,11 @@ namespace CalamityMod.NPCs.Signus { SoundEngine.PlaySound(SoundID.Item, (int)NPC.position.X, (int)NPC.position.Y, 122); - int num660 = NPC.NewNPC((int)(player.position.X + 750f), (int)player.position.Y, ModContent.NPCType()); + int num660 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(player.position.X + 750f), (int)player.position.Y, ModContent.NPCType()); if (Main.netMode == NetmodeID.Server) NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num660, 0f, 0f, 0f, 0, 0, 0); - int num661 = NPC.NewNPC((int)(player.position.X - 750f), (int)player.position.Y, ModContent.NPCType()); + int num661 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(player.position.X - 750f), (int)player.position.Y, ModContent.NPCType()); if (Main.netMode == NetmodeID.Server) NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num661, 0f, 0f, 0f, 0, 0, 0); @@ -489,11 +489,11 @@ namespace CalamityMod.NPCs.Signus { for (int x = 0; x < 5; x++) { - int num660 = NPC.NewNPC((int)(player.position.X + spawnX), (int)(player.position.Y + spawnY), ModContent.NPCType()); + int num660 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(player.position.X + spawnX), (int)(player.position.Y + spawnY), ModContent.NPCType()); if (Main.netMode == NetmodeID.Server) NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num660, 0f, 0f, 0f, 0, 0, 0); - int num661 = NPC.NewNPC((int)(player.position.X - spawnX), (int)(player.position.Y + spawnY), ModContent.NPCType()); + int num661 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(player.position.X - spawnX), (int)(player.position.Y + spawnY), ModContent.NPCType()); if (Main.netMode == NetmodeID.Server) NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num661, 0f, 0f, 0f, 0, 0, 0); diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index c7e57bf10f..33b4dd7ab2 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -120,8 +120,8 @@ namespace CalamityMod.NPCs.SlimeGod { SoundEngine.PlaySound(SoundID.NPCDeath1, NPC.position); Vector2 spawnAt = vector + new Vector2(0f, NPC.height / 2f); - NPC.NewNPC((int)spawnAt.X - 30, (int)spawnAt.Y, ModContent.NPCType()); - NPC.NewNPC((int)spawnAt.X + 30, (int)spawnAt.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)spawnAt.X - 30, (int)spawnAt.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)spawnAt.X + 30, (int)spawnAt.Y, ModContent.NPCType()); NPC.active = false; NPC.netUpdate = true; return; @@ -524,8 +524,8 @@ namespace CalamityMod.NPCs.SlimeGod int x = (int)(NPC.position.X + (float)Main.rand.Next(NPC.width - 32)); int y = (int)(NPC.position.Y + (float)Main.rand.Next(NPC.height - 32)); int num663 = ModContent.NPCType(); - int num664 = NPC.NewNPC(x, y, num663, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num664].SetDefaults(num663, -1f); + int num664 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), x, y, num663, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num664].SetDefaults(num663); Main.npc[num664].velocity.X = (float)Main.rand.Next(-15, 16) * 0.1f; Main.npc[num664].velocity.Y = (float)Main.rand.Next(-30, 1) * 0.1f; Main.npc[num664].ai[0] = (float)(-1000 * Main.rand.Next(3)); diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 46bbf39309..e3a724977c 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -118,8 +118,8 @@ namespace CalamityMod.NPCs.SlimeGod if (Main.netMode != NetmodeID.MultiplayerClient && !slimesSpawned) { slimesSpawned = true; - NPC.NewNPC((int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); - NPC.NewNPC((int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)vectorCenter.X, (int)vectorCenter.Y, ModContent.NPCType()); } // Emit dust diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index d27026711b..3619a2b61e 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -124,8 +124,8 @@ namespace CalamityMod.NPCs.SlimeGod { SoundEngine.PlaySound(SoundID.NPCDeath1, NPC.position); Vector2 spawnAt = vector + new Vector2(0f, NPC.height / 2f); - NPC.NewNPC((int)spawnAt.X - 30, (int)spawnAt.Y, ModContent.NPCType()); - NPC.NewNPC((int)spawnAt.X + 30, (int)spawnAt.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)spawnAt.X - 30, (int)spawnAt.Y, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)spawnAt.X + 30, (int)spawnAt.Y, ModContent.NPCType()); NPC.active = false; NPC.netUpdate = true; return; @@ -532,8 +532,8 @@ namespace CalamityMod.NPCs.SlimeGod { num663 = ModContent.NPCType(); } - int num664 = NPC.NewNPC(x, y, num663, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num664].SetDefaults(num663, -1f); + int num664 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), x, y, num663, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num664].SetDefaults(num663); Main.npc[num664].velocity.X = (float)Main.rand.Next(-15, 16) * 0.1f; Main.npc[num664].velocity.Y = (float)Main.rand.Next(-30, 1) * 0.1f; Main.npc[num664].ai[0] = (float)(-1000 * Main.rand.Next(3)); diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 4c91d51c01..a6b079f301 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -505,8 +505,8 @@ namespace CalamityMod.NPCs.SlimeGod { num663 = ModContent.NPCType(); } - int num664 = NPC.NewNPC(x, y, num663, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num664].SetDefaults(num663, -1f); + int num664 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), x, y, num663, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num664].SetDefaults(num663); Main.npc[num664].velocity.X = (float)Main.rand.Next(-15, 16) * 0.1f; Main.npc[num664].velocity.Y = (float)Main.rand.Next(-30, 1) * 0.1f; Main.npc[num664].ai[0] = (float)(-1000 * Main.rand.Next(3)); diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index dcce1e0b8d..e742888701 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -502,8 +502,8 @@ namespace CalamityMod.NPCs.SlimeGod int x = (int)(NPC.position.X + (float)Main.rand.Next(NPC.width - 32)); int y = (int)(NPC.position.Y + (float)Main.rand.Next(NPC.height - 32)); int num663 = ModContent.NPCType(); - int num664 = NPC.NewNPC(x, y, num663, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num664].SetDefaults(num663, -1f); + int num664 = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), x, y, num663, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num664].SetDefaults(num663); Main.npc[num664].velocity.X = (float)Main.rand.Next(-15, 16) * 0.1f; Main.npc[num664].velocity.Y = (float)Main.rand.Next(-30, 1) * 0.1f; Main.npc[num664].ai[0] = (float)(-1000 * Main.rand.Next(3)); diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index bc60f8ded6..6ec7870850 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -231,9 +231,9 @@ namespace CalamityMod.NPCs.StormWeaver { int lol; if (num36 >= 0 && num36 < totalLength - 1) - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); else - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = NPC.whoAmI; diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index f711653584..9b8a225738 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -148,9 +148,9 @@ namespace CalamityMod.NPCs.SunkenSea hide = false; attack = -1; NPC.defense = Main.hardMode ? 35 : 10; - NPC.NewNPC((int)(NPC.Center.X + 5), (int)NPC.Center.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); - NPC.NewNPC((int)(NPC.Center.X - 5), (int)NPC.Center.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.Center.X + 5), (int)NPC.Center.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); + NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)(NPC.Center.X - 5), (int)NPC.Center.Y, ModContent.NPCType(), 0, 0f, 0f, 0f, 0f, 255); } } else if (attack == 1) diff --git a/NPCs/SunkenSea/SeaSerpent1.cs b/NPCs/SunkenSea/SeaSerpent1.cs index e891c742ce..48d2d90ace 100644 --- a/NPCs/SunkenSea/SeaSerpent1.cs +++ b/NPCs/SunkenSea/SeaSerpent1.cs @@ -66,19 +66,19 @@ namespace CalamityMod.NPCs.SunkenSea int lol = 0; if (segment == 0 || segment == 1 || segment == 4 || segment == 5) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else if (segment == 2 || segment == 3 || segment == 6) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else if (segment == 7) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } else if (segment == 8) { - lol = NPC.NewNPC((int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); + lol = NPC.NewNPC(NPC.GetSpawnSourceForNPCFromNPCAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } Main.npc[lol].realLife = NPC.whoAmI; Main.npc[lol].ai[2] = (float)NPC.whoAmI; diff --git a/Projectiles/Boss/LeviathanSpawner.cs b/Projectiles/Boss/LeviathanSpawner.cs index b44a6d2eff..43b465286d 100644 --- a/Projectiles/Boss/LeviathanSpawner.cs +++ b/Projectiles/Boss/LeviathanSpawner.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Boss if (Main.netMode == NetmodeID.MultiplayerClient) return; - int leviathan = NPC.NewNPC((int)Projectile.Center.X, (int)Projectile.Center.Y, ModContent.NPCType()); + int leviathan = NPC.NewNPC(Projectile.GetNPCSource_FromThis(), (int)Projectile.Center.X, (int)Projectile.Center.Y, ModContent.NPCType()); if (Main.npc.IndexInRange(leviathan)) Main.npc[leviathan].velocity = Vector2.UnitY * -7f; } diff --git a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs index e78f35d7b2..f6bae84a46 100644 --- a/Projectiles/Boss/OverlyDramaticDukeSummoner.cs +++ b/Projectiles/Boss/OverlyDramaticDukeSummoner.cs @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Boss } if (Main.netMode != NetmodeID.MultiplayerClient) { - int boomer = NPC.NewNPC((int)Projectile.Top.X, (int)Projectile.Top.Y + 100, ModContent.NPCType()); + int boomer = NPC.NewNPC(Projectile.GetNPCSource_FromThis(), (int)Projectile.Top.X, (int)Projectile.Top.Y + 100, ModContent.NPCType()); string boomerName = Main.npc[boomer].TypeName; if (Main.netMode == NetmodeID.SinglePlayer) diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index 91fa4796d3..9886f1ef94 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Pets int type = Mod.Find(doggoType).Type; - int n = NPC.NewNPC((int)Projectile.position.X, (int)Projectile.position.Y, type); + int n = NPC.NewNPC(Projectile.GetNPCSource_FromThis(), (int)Projectile.position.X, (int)Projectile.position.Y, type); NetMessage.SendData(MessageID.SyncNPC, -1, -1, (NetworkText)null, n, 0.0f, 0.0f, 0.0f, 0, 0, 0); Main.npc[n].netUpdate = true; }