Slight mind test cleanup (#17521)

This commit is contained in:
Leon Friedrich
2023-06-21 14:11:58 +12:00
committed by GitHub
parent 7f203be3c9
commit 3fa99b8abf
7 changed files with 115 additions and 189 deletions

View File

@@ -390,14 +390,10 @@ public sealed class MindSystem : EntitySystem
if (entity != null)
{
if (!TryComp(entity.Value, out component))
{
component = AddComp<MindContainerComponent>(entity.Value);
}
else if (component.HasMind)
{
component = EnsureComp<MindContainerComponent>(entity.Value);
if (component.HasMind)
_gameTicker.OnGhostAttempt(component.Mind, false);
}
if (TryComp<ActorComponent>(entity.Value, out var actor))
{