Fixes uplink account creation failing if you have any non-antag role.

Fixes #2740
This commit is contained in:
Vera Aguilera Puerto
2020-12-15 11:29:11 +01:00
parent a9481bc05f
commit 0a50f608c6
2 changed files with 5 additions and 16 deletions

View File

@@ -53,17 +53,9 @@ namespace Content.Server.PDA
{
var entity = _entityManager.GetEntity(acc.AccountHolder);
if (entity.TryGetComponent(out MindComponent mindComponent))
if (entity.TryGetComponent(out MindComponent mindComponent) && !mindComponent.HasMind)
{
if (!mindComponent.HasMind)
{
return false;
}
if (mindComponent.Mind!.AllRoles.Any(role => !role.Antagonist))
{
return false;
}
return false;
}
if (_accounts.Contains(acc))