Fix declaration of war (#20399)
This commit is contained in:
@@ -122,11 +122,14 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
||||
if (!GameTicker.IsGameRuleAdded(ruleEnt, gameRule))
|
||||
continue;
|
||||
|
||||
var found = nukeops.OperativePlayers.Values.Any(v => v == opUid);
|
||||
if (found)
|
||||
if (_mind.TryGetMind(opUid, out var mind, out _))
|
||||
{
|
||||
comps = (nukeops, gameRule);
|
||||
return true;
|
||||
var found = nukeops.OperativePlayers.Values.Any(v => v == mind);
|
||||
if (found)
|
||||
{
|
||||
comps = (nukeops, gameRule);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -990,6 +993,14 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
||||
|
||||
//ok hardcoded value bad but so is everything else here
|
||||
_roles.MindAddRole(mindId, new NukeopsRoleComponent { PrototypeId = NukeopsId }, mind);
|
||||
if (mind.CurrentEntity != null)
|
||||
{
|
||||
foreach (var (nukeops, gameRule) in EntityQuery<NukeopsRuleComponent, GameRuleComponent>())
|
||||
{
|
||||
nukeops.OperativePlayers.Add(mind.CharacterName!, mind.CurrentEntity.GetValueOrDefault());
|
||||
}
|
||||
}
|
||||
|
||||
SetOutfitCommand.SetOutfit(mind.OwnedEntity.Value, "SyndicateOperativeGearFull", EntityManager);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user