From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:53:21 +0000 (+0100) Subject: fix cognizine ghost role (#20632) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=0fafd98db8491f098bd44d781ad87d042b04532e;p=space-station-14.git fix cognizine ghost role (#20632) Co-authored-by: deltanedas <@deltanedas:kde.org> --- diff --git a/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs b/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs index 00266c39a8..be8dbbaf52 100644 --- a/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs +++ b/Content.Server/Chemistry/ReagentEffects/MakeSentient.cs @@ -23,7 +23,7 @@ public sealed partial class MakeSentient : ReagentEffect entityManager.RemoveComponent(uid); // Stops from adding a ghost role to things like people who already have a mind - if (entityManager.HasComponent(uid)) + if (entityManager.TryGetComponent(uid, out var mindContainer) && mindContainer.HasMind) { return; }