fix cognizine ghost role (#20632)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-30 18:53:21 +01:00
committed by GitHub
parent bcb79eff4b
commit 0fafd98db8

View 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;
}