]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Allows a possibility for a new reagant to work on dead if applied. (#23298)
authorAdrian16199 <144424013+Adrian16199@users.noreply.github.com>
Fri, 5 Jan 2024 03:40:57 +0000 (04:40 +0100)
committerGitHub <noreply@github.com>
Fri, 5 Jan 2024 03:40:57 +0000 (22:40 -0500)
* Allows a possibility for a new reagant to work on dead if applied.

To use it, go to Resources\Prototypes\Reagents\medicine.yml and add worksOnTheDead: true to any reagent.

* Update Content.Shared/Chemistry/Reagent/ReagentPrototype.cs

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* Update Content.Server/Body/Systems/MetabolizerSystem.cs

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Content.Server/Body/Systems/MetabolizerSystem.cs
Content.Shared/Chemistry/Reagent/ReagentPrototype.cs

index d05e6c7f79649467b842d21b6fabaab602b93f94..e5f604f70dfb4ae6d7a44910e6f6c51fac9bbe7a 100644 (file)
@@ -171,7 +171,7 @@ namespace Content.Server.Body.Systems
                     // still remove reagents
                     if (EntityManager.TryGetComponent<MobStateComponent>(solutionEntityUid.Value, out var state))
                     {
-                        if (_mobStateSystem.IsDead(solutionEntityUid.Value, state))
+                        if (!proto.WorksOnTheDead && _mobStateSystem.IsDead(solutionEntityUid.Value, state))
                             continue;
                     }
 
index c9ce5f357c55e81320162527b98908f137eb73c5..0eea8b2baec1b8766f2ae230ffd52879520e0fe4 100644 (file)
@@ -102,6 +102,12 @@ namespace Content.Shared.Chemistry.Reagent
         [DataField]
         public float Viscosity;
 
+         /// <summary>
+        /// Should this reagent work on the dead?
+        /// </summary>
+        [DataField]
+        public bool WorksOnTheDead;
+
         [DataField(serverOnly: true)]
         public FrozenDictionary<ProtoId<MetabolismGroupPrototype>, ReagentEffectsEntry>? Metabolisms;