From 78f4bec3e1fe51ab29b5b7e5b3a6e5416298f377 Mon Sep 17 00:00:00 2001 From: Adrian16199 <144424013+Adrian16199@users.noreply.github.com> Date: Fri, 5 Jan 2024 04:40:57 +0100 Subject: [PATCH] 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> --- Content.Server/Body/Systems/MetabolizerSystem.cs | 2 +- Content.Shared/Chemistry/Reagent/ReagentPrototype.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- 2.51.2