[fix] lone ops fix (#15478)

This commit is contained in:
Scribbles0
2023-04-17 02:01:36 -07:00
committed by GitHub
parent e812e6b3e3
commit ea4a4a8358
4 changed files with 354 additions and 137 deletions

View File

@@ -595,8 +595,11 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
var mind = mindComponent.Mind;
if (_operativeMindPendingData.TryGetValue(uid, out var role))
if (_operativeMindPendingData.TryGetValue(uid, out var role) || !_nukeopsRuleConfig.SpawnOutpost || !_nukeopsRuleConfig.EndsRound)
{
if (role == null)
role = _nukeopsRuleConfig.OperativeRoleProto;
mind.AddRole(new TraitorRole(mind, _prototypeManager.Index<AntagPrototype>(role)));
_operativeMindPendingData.Remove(uid);
}