From 794cb9684775e636856a37c3c007ff577e43a6eb Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Mon, 13 May 2024 18:59:05 -0700 Subject: [PATCH] blood particles go rainbow with blood off --- Particles/BloodParticle.cs | 6 ++++++ Particles/BloodParticle2.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Particles/BloodParticle.cs b/Particles/BloodParticle.cs index 9bb8333486..bfe3e02e8f 100644 --- a/Particles/BloodParticle.cs +++ b/Particles/BloodParticle.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ModLoader; namespace CalamityMod.Particles @@ -31,6 +32,11 @@ namespace CalamityMod.Particles Velocity.Y = MathHelper.Clamp(Velocity.Y + 0.9f, -22f, 22f); Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); Rotation = Velocity.ToRotation() + MathHelper.PiOver2; + // Cycle through disco colors if blood and gore is off + if (!ChildSafety.Disabled) + { + Color = Main.DiscoColor; + } } public override void CustomDraw(SpriteBatch spriteBatch) diff --git a/Particles/BloodParticle2.cs b/Particles/BloodParticle2.cs index ee8b9bf707..53320c9c1b 100644 --- a/Particles/BloodParticle2.cs +++ b/Particles/BloodParticle2.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ModLoader; namespace CalamityMod.Particles @@ -29,6 +30,11 @@ namespace CalamityMod.Particles Velocity *= 0.98f; Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 4D)); Rotation = Velocity.ToRotation(); + // Cycle through disco colors if blood and gore is off + if (!ChildSafety.Disabled) + { + Color = Main.DiscoColor; + } } public override void CustomDraw(SpriteBatch spriteBatch)