]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix cognizine ghost role (#20632)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sat, 30 Sep 2023 17:53:21 +0000 (18:53 +0100)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2023 17:53:21 +0000 (10:53 -0700)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Server/Chemistry/ReagentEffects/MakeSentient.cs

index 00266c39a85d638b20a2e5890c9bdfd063a7ab53..be8dbbaf52acbe3d29d08087b13ad1116ec6a717 100644 (file)
@@ -23,7 +23,7 @@ public sealed partial class MakeSentient : ReagentEffect
         entityManager.RemoveComponent<MonkeyAccentComponent>(uid);
 
         // Stops from adding a ghost role to things like people who already have a mind
-        if (entityManager.HasComponent<MindContainerComponent>(uid))
+        if (entityManager.TryGetComponent<MindContainerComponent>(uid, out var mindContainer) && mindContainer.HasMind)
         {
             return;
         }