From 0c1cfe8f188e727a69814271e817932379ab8356 Mon Sep 17 00:00:00 2001 From: Cojoke <83733158+Cojoke-dot@users.noreply.github.com> Date: Mon, 12 Aug 2024 09:48:39 -0500 Subject: [PATCH] Fix Reagent Fire Stacks (#30766) * Fix Reagent Fire Stacks * Comments on code * little nicer wording? --- Content.Server/EntityEffects/Effects/FlammableReaction.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Content.Server/EntityEffects/Effects/FlammableReaction.cs b/Content.Server/EntityEffects/Effects/FlammableReaction.cs index edd499ab4a..c1d024a4ef 100644 --- a/Content.Server/EntityEffects/Effects/FlammableReaction.cs +++ b/Content.Server/EntityEffects/Effects/FlammableReaction.cs @@ -13,8 +13,9 @@ namespace Content.Server.EntityEffects.Effects [DataField] public float Multiplier = 0.05f; + // The fire stack multiplier if fire stacks already exist on target, only works if 0 or greater [DataField] - public float MultiplierOnExisting = 1f; + public float MultiplierOnExisting = -1f; public override bool ShouldLog => true; @@ -28,7 +29,8 @@ namespace Content.Server.EntityEffects.Effects if (!args.EntityManager.TryGetComponent(args.TargetEntity, out FlammableComponent? flammable)) return; - var multiplier = flammable.FireStacks == 0f ? Multiplier : MultiplierOnExisting; + // Sets the multiplier for FireStacks to MultiplierOnExisting is 0 or greater and target already has FireStacks + var multiplier = flammable.FireStacks != 0f && MultiplierOnExisting >= 0 ? MultiplierOnExisting : Multiplier; var quantity = 1f; if (args is EntityEffectReagentArgs reagentArgs) {