]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Reagent Fire Stacks (#30766)
authorCojoke <83733158+Cojoke-dot@users.noreply.github.com>
Mon, 12 Aug 2024 14:48:39 +0000 (09:48 -0500)
committerGitHub <noreply@github.com>
Mon, 12 Aug 2024 14:48:39 +0000 (10:48 -0400)
* Fix Reagent Fire Stacks

* Comments on code

* little nicer wording?

Content.Server/EntityEffects/Effects/FlammableReaction.cs

index edd499ab4a5cf3a50e706daa275e0ef31b12611d..c1d024a4efd4c354881039b0f711237c51199305 100644 (file)
@@ -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)
             {