From: Adrian16199 <144424013+Adrian16199@users.noreply.github.com> Date: Fri, 5 Jan 2024 03:40:57 +0000 (+0100) Subject: Allows a possibility for a new reagant to work on dead if applied. (#23298) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=78f4bec3e1fe51ab29b5b7e5b3a6e5416298f377;p=space-station-14.git Allows a possibility for a new reagant to work on dead if applied. (#23298) * 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> --- diff --git a/Content.Server/Body/Systems/MetabolizerSystem.cs b/Content.Server/Body/Systems/MetabolizerSystem.cs index d05e6c7f79..e5f604f70d 100644 --- a/Content.Server/Body/Systems/MetabolizerSystem.cs +++ b/Content.Server/Body/Systems/MetabolizerSystem.cs @@ -171,7 +171,7 @@ namespace Content.Server.Body.Systems // still remove reagents if (EntityManager.TryGetComponent(solutionEntityUid.Value, out var state)) { - if (_mobStateSystem.IsDead(solutionEntityUid.Value, state)) + if (!proto.WorksOnTheDead && _mobStateSystem.IsDead(solutionEntityUid.Value, state)) continue; } diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index c9ce5f357c..0eea8b2bae 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -102,6 +102,12 @@ namespace Content.Shared.Chemistry.Reagent [DataField] public float Viscosity; + /// + /// Should this reagent work on the dead? + /// + [DataField] + public bool WorksOnTheDead; + [DataField(serverOnly: true)] public FrozenDictionary, ReagentEffectsEntry>? Metabolisms;