From 0fafd98db8491f098bd44d781ad87d042b04532e Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:53:21 +0100 Subject: [PATCH] fix cognizine ghost role (#20632) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/Chemistry/ReagentEffects/MakeSentient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.51.2