diff --git a/Items/Weapons/Melee/EntropicClaymore.cs b/Items/Weapons/Melee/EntropicClaymore.cs index 8316a87785..d1978f29e1 100644 --- a/Items/Weapons/Melee/EntropicClaymore.cs +++ b/Items/Weapons/Melee/EntropicClaymore.cs @@ -90,8 +90,7 @@ namespace CalamityMod.Items.Weapons.Melee Particle spark3 = new AltSparkParticle(partPos, partVel, false, 24, partScale, Color.Black); GeneralParticleHandler.SpawnParticle(spark3); Particle spark2 = new SparkParticle(partPos, partVel, false, 24, partScale * 0.6f, Color.LightGreen); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } Vector2 dustVel2 = new Vector2(5 * swordDirection, -5).RotatedBy(swingRotation - 1.7f * swordDirection); diff --git a/NPCs/CalamityTileCollisionHarmNPC.cs b/NPCs/CalamityTileCollisionHarmNPC.cs index 65507bd0af..9b18e6fe5d 100644 --- a/NPCs/CalamityTileCollisionHarmNPC.cs +++ b/NPCs/CalamityTileCollisionHarmNPC.cs @@ -136,11 +136,9 @@ namespace CalamityMod.NPCs { Vector2 pulseVel = -safeVel; Particle pulse1 = new CustomSpark(npc.Center, pulseVel * 2, "CalamityMod/Particles/BloomCircle", false, (int)(23 * MathF.Pow(scale, 2)), 0.6f * MathF.Pow(scale, 2), Color.DodgerBlue, new Vector2(2f, 1f), shrinkSpeed: -0.1f / scale, noShrink: true, glowCenter: true, glowOpacity: 0.8f); - GeneralParticleHandler.SpawnParticle(pulse1); - pulse1.Pixelate = true; + GeneralParticleHandler.SpawnParticle(pulse1, true); Particle pulse2 = new CustomSpark(npc.Center, pulseVel, "CalamityMod/Particles/BloomRing", false, (int)(18 * MathF.Pow(scale, 2)), 0.5f * MathF.Pow(scale, 2), Color.Blue, new Vector2(4f, 0.7f), shrinkSpeed: -0.3f / scale, noShrink: true); - GeneralParticleHandler.SpawnParticle(pulse2); - pulse2.Pixelate = true; + GeneralParticleHandler.SpawnParticle(pulse2, true); } diff --git a/Projectiles/Magic/CosmicTentacle.cs b/Projectiles/Magic/CosmicTentacle.cs index f1edf2171f..d129b88402 100644 --- a/Projectiles/Magic/CosmicTentacle.cs +++ b/Projectiles/Magic/CosmicTentacle.cs @@ -58,8 +58,7 @@ namespace CalamityMod.Projectiles.Magic Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.6f * scaler, 0f, 4, false); GeneralParticleHandler.SpawnParticle(blastRing); Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor * 0.6f, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.48f * scaler, 0f, 4, true); - GeneralParticleHandler.SpawnParticle(blastRing2); - blastRing2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing2, false, GeneralDrawLayer.AfterEverything); } Projectile.velocity *= 0.96f; if (time == 3) @@ -90,8 +89,7 @@ namespace CalamityMod.Projectiles.Magic Particle spark = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark2", false, 12, 0.07f * scaling, Color.Black * 0.85f, new Vector2(1.7f - (1 - sharpScaling), 0.9f + (1 - sharpScaling) * 2), false); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark", false, 12, 0.035f * scaling, Color.LightGreen * 0.75f, new Vector2(1.7f - (1 - sharpScaling), 0.9f + (1 - sharpScaling) * 2)); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } if (Main.rand.NextBool(6)) { @@ -113,8 +111,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 2; i++) { Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.36f, 0f, scalingTimerMax / 2, true); - GeneralParticleHandler.SpawnParticle(blastRing2); - blastRing2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing2, false, GeneralDrawLayer.AfterEverything); } Projectile.velocity = Vector2.Zero; } diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index 630fa6b82b..e1f52ba954 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -316,12 +316,9 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { Particle spark = new CustomSpark(target.Center, launchVel * 65, "CalamityMod/Particles/GlowSpark2", false, (int)(16 - Projectile.numHits * 3), 0.145f - Projectile.numHits * 0.015f, Color.Black, new Vector2(2f, 1f), false, shrinkSpeed: 1f, colorFadeSpeed: 10); - GeneralParticleHandler.SpawnParticle(spark); - spark.Pixelate = true; + GeneralParticleHandler.SpawnParticle(spark, true); Particle spark2 = new CustomSpark(target.Center, launchVel * 65, "CalamityMod/Particles/GlowSpark", false, (int)(16 - Projectile.numHits * 3), 0.105f - Projectile.numHits * 0.015f, Color.Lerp(Color.Blue, Color.DodgerBlue, 0.65f), new Vector2(2f, 1f), true, false, shrinkSpeed: 1f, colorFadeSpeed: 10); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.Pixelate = true; - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, true, GeneralDrawLayer.AfterEverything); } for (int i = 0; i < 25 - Projectile.numHits * 3; i++) diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index 6105c72c87..989ceead5a 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -60,8 +60,7 @@ namespace CalamityMod.Projectiles.Ranged Particle spark = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark2", false, 17, 0.052f, Color.Black, new Vector2(0.6f, 1.3f), false); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark", false, 17, 0.027f, Color.LightGreen, new Vector2(0.6f, 1.3f), true, false); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } if (Time == 9f) @@ -111,8 +110,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 3; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.48f, 0.52f, 38); - GeneralParticleHandler.SpawnParticle(blastRing); - blastRing.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing, false, GeneralDrawLayer.AfterEverything); } float numberOfDusts = 10; @@ -124,8 +122,6 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(1.6f, 2.2f); dust.color = InnerColor; } - //Particle pulse = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor, "CalamityMod/Particles/SoftRoundExplosion", new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0f, 0.1f, 15); - //GeneralParticleHandler.SpawnParticle(pulse); if (BounceHits == 0f) SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); diff --git a/Projectiles/Ranged/DeadSunExplosion.cs b/Projectiles/Ranged/DeadSunExplosion.cs index 18d952eb85..06872fddbf 100644 --- a/Projectiles/Ranged/DeadSunExplosion.cs +++ b/Projectiles/Ranged/DeadSunExplosion.cs @@ -33,8 +33,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, color1, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); - GeneralParticleHandler.SpawnParticle(explosion); - explosion.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(explosion, false, GeneralDrawLayer.AfterEverything); Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22), false); GeneralParticleHandler.SpawnParticle(explosion2); Particle explosion3 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0030f + 0.1f, Main.rand.Next(15, 22), false); @@ -43,8 +42,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 4; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, color1, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0, ExplosionRadius * 0.005f + 0.05f, 25); - GeneralParticleHandler.SpawnParticle(blastRing); - blastRing.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing, false, GeneralDrawLayer.AfterEverything); } float numberOfDusts = ExplosionRadius * 0.1f + 10; diff --git a/Projectiles/Rogue/AntumbraShardProjectile.cs b/Projectiles/Rogue/AntumbraShardProjectile.cs index d35823a7da..120b2934d0 100644 --- a/Projectiles/Rogue/AntumbraShardProjectile.cs +++ b/Projectiles/Rogue/AntumbraShardProjectile.cs @@ -109,8 +109,7 @@ namespace CalamityMod.Projectiles.Rogue Particle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * randVel, false, lifetime, 1.2f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * randVel, false, lifetime, 0.9f, Color.LightGreen); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); if (Main.rand.NextBool() && !Projectile.Calamity().stealthStrike) { Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB); @@ -127,8 +126,7 @@ namespace CalamityMod.Projectiles.Rogue Particle spark = new AltSparkParticle(placement, -Projectile.velocity * speed, false, 11, 0.8f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new SparkParticle(placement, -Projectile.velocity * speed, false, 11, 0.5f, Color.LightGreen); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } if (closestTarget != null && Projectile.numHits < 1 && closestTarget.CanBeChasedBy(Projectile)) { @@ -221,8 +219,7 @@ namespace CalamityMod.Projectiles.Rogue } Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen * 0.85f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1f, 18); - GeneralParticleHandler.SpawnParticle(bolt2); - bolt2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt2, false, GeneralDrawLayer.AfterEverything); Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f * (storedVelocity.X > 0 ? 1 : -1)); } diff --git a/Projectiles/Rogue/DestructionBolt.cs b/Projectiles/Rogue/DestructionBolt.cs index d7f5e1c37c..9b6affec5e 100644 --- a/Projectiles/Rogue/DestructionBolt.cs +++ b/Projectiles/Rogue/DestructionBolt.cs @@ -106,8 +106,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 2; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen with { A = 0 }, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), Projectile.ai[1] * 0.5f, Projectile.ai[1] * 0.3f, 15, false); - GeneralParticleHandler.SpawnParticle(blastRing); - blastRing.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing, false, GeneralDrawLayer.AfterEverything); } } else diff --git a/Projectiles/Rogue/DestructionStar.cs b/Projectiles/Rogue/DestructionStar.cs index f8aff95cac..7a12927668 100644 --- a/Projectiles/Rogue/DestructionStar.cs +++ b/Projectiles/Rogue/DestructionStar.cs @@ -157,11 +157,9 @@ namespace CalamityMod.Projectiles.Rogue float bigExplosionDamage = 3f; Player Owner = Main.player[Projectile.owner]; Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen with { A = 0 }, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0f, 0.82f * sizeBonus, 11); - GeneralParticleHandler.SpawnParticle(orb); - orb.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb, false, GeneralDrawLayer.AfterEverything); Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0f, 0.74f * sizeBonus, 11); - GeneralParticleHandler.SpawnParticle(orb2); - orb2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb2, false, GeneralDrawLayer.AfterEverything); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * (big ? bigExplosionDamage : Projectile.Calamity().stealthStrike ? 0.25f : 1f)), Projectile.knockBack * 1.5f, Projectile.owner); @@ -187,16 +185,13 @@ namespace CalamityMod.Projectiles.Rogue } Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f * 1.3f * sizeBonus, 18); - GeneralParticleHandler.SpawnParticle(bolt2); - bolt2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt2, false, GeneralDrawLayer.AfterEverything); Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.3f * sizeBonus, 30); - GeneralParticleHandler.SpawnParticle(bolt3); - bolt3.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt3, false, GeneralDrawLayer.AfterEverything); Particle bolt4 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen * 0.55f, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.3f * 1.35f * sizeBonus, 30); - GeneralParticleHandler.SpawnParticle(bolt4); - bolt4.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt4, false, GeneralDrawLayer.AfterEverything); for (int i = 0; i < 2; i++) { diff --git a/Projectiles/Rogue/RadiationRain.cs b/Projectiles/Rogue/RadiationRain.cs index 5938658b73..7a7740025e 100644 --- a/Projectiles/Rogue/RadiationRain.cs +++ b/Projectiles/Rogue/RadiationRain.cs @@ -45,18 +45,15 @@ namespace CalamityMod.Projectiles.Rogue Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, smokeColor * 0.7f, "CalamityMod/ExtraTextures/GreyscaleVortex", new Vector2(1, 1), Projectile.ai[2] * 0.45f, orbScale, orbScale * 1.1f, 12, false); GeneralParticleHandler.SpawnParticle(orb); Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Chartreuse, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.8f, 0.4f, 18); - GeneralParticleHandler.SpawnParticle(orb3); - orb3.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb3, false, GeneralDrawLayer.AfterEverything); Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.4f, 0.2f, 18); - GeneralParticleHandler.SpawnParticle(orb2); - orb2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb2, false, GeneralDrawLayer.AfterEverything); for (int i = 0; i < 2; i++) { int dir = (i == 0 ? 1 : -1); Particle pulse3 = new GlowSparkParticle(Projectile.Center + new Vector2(20 * dir, 0), new Vector2(10 * dir, 0), false, 12, 0.087f, Color.Chartreuse, new Vector2(1.7f, 0.8f), true, true, 0.8f); - GeneralParticleHandler.SpawnParticle(pulse3); - pulse3.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(pulse3, false, GeneralDrawLayer.AfterEverything); } for (int i = 0; i < 3; i++)