Skip to content

Commit

Permalink
Fix random test fail in DeleteAllThenGhost (#32753)
Browse files Browse the repository at this point in the history
It's simple. We kill the heisentest
  • Loading branch information
Errant-4 authored and VasilisThePikachu committed Oct 13, 2024
1 parent af72f2e commit e5ad32f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Content.Shared/Roles/SharedRoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,13 @@ public bool MindIsExclusiveAntagonist(EntityUid? mindId)
var exclusiveAntag = false;
foreach (var role in mind.MindRoles)
{
var roleComp = Comp<MindRoleComponent>(role);
if (!TryComp<MindRoleComponent>(role, out var roleComp))
{
//If this ever shows up outside of an integration test, then we need to look into this further.
Log.Warning($"Mind Role Entity {role} does not have MindRoleComponent!");
continue;
}

if (roleComp.Antag || exclusiveAntag)
antagonist = true;
if (roleComp.ExclusiveAntag)
Expand Down

0 comments on commit e5ad32f

Please sign in to comment.