diff --git a/Content.Server/Changeling/ChangelingRuleSystem.cs b/Content.Server/Changeling/ChangelingRuleSystem.cs index fd5afb8ab9..04b85cc92a 100644 --- a/Content.Server/Changeling/ChangelingRuleSystem.cs +++ b/Content.Server/Changeling/ChangelingRuleSystem.cs @@ -1,4 +1,5 @@ using System.Linq; +using Content.Server._Miracle.GulagSystem; using Content.Server.Antag; using Content.Server.Chat.Managers; using Content.Server.GameTicking; @@ -31,6 +32,7 @@ public sealed class ChangelingRuleSystem : GameRuleSystem= MaxChangelings) continue; + if (_gulag.IsUserGulaged(ev.Player.UserId, out _)) + continue; + if (!ev.LateJoin) continue; diff --git a/Content.Server/Changeling/Objectives/ChangelingConditionsSystem.cs b/Content.Server/Changeling/Objectives/ChangelingConditionsSystem.cs index 0eb98cc90d..033c2bfb8d 100644 --- a/Content.Server/Changeling/Objectives/ChangelingConditionsSystem.cs +++ b/Content.Server/Changeling/Objectives/ChangelingConditionsSystem.cs @@ -1,4 +1,5 @@ using System.Linq; +using Content.Server._Miracle.Components; using Content.Server.Changeling.Objectives.Components; using Content.Server.Forensics; using Content.Server.Mind; @@ -184,6 +185,7 @@ public sealed class ChangelingConditionsSystem : EntitySystem return; var allHumans = _mind.GetAliveHumansExcept(args.MindId); + allHumans = allHumans.Where(x => !HasComp(x)).ToList(); if (allHumans.Count == 0) { args.Cancelled = true; diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index 5dad02d07c..e7c2e300ce 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -1,4 +1,5 @@ using System.Linq; +using Content.Server._Miracle.GulagSystem; using Content.Server.Antag; using Content.Server.Chat.Managers; using Content.Server.GameTicking.Rules.Components; @@ -50,6 +51,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem [Dependency] private readonly ObjectivesSystem _objectives = default!; //WD EDIT [Dependency] private readonly GameTicker _gameTicker = default!; + [Dependency] private readonly GulagSystem _gulag = default!; private ISawmill _sawmill = default!; @@ -308,6 +310,9 @@ public sealed class TraitorRuleSystem : GameRuleSystem if (!GameTicker.IsGameRuleAdded(uid, gameRule)) continue; + if (_gulag.IsUserGulaged(ev.Player.UserId, out _)) // WD + continue; + if (traitor.TotalTraitors >= MaxTraitors) continue; if (!ev.LateJoin) diff --git a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs index d9f2e808e0..d5de4b5bee 100644 --- a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs +++ b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs @@ -1,4 +1,5 @@ using System.Linq; +using Content.Server._Miracle.Components; using Content.Server._White.Cult.GameRule; using Content.Server.Objectives.Components; using Content.Server.Shuttles.Systems; @@ -59,6 +60,7 @@ public sealed class KillPersonConditionSystem : EntitySystem // no other humans to kill var allHumans = _mind.GetAliveHumansExcept(args.MindId); + allHumans = allHumans.Where(x => !HasComp(x)).ToList(); // WD if (allHumans.Count == 0) { args.Cancelled = true; @@ -83,6 +85,7 @@ public sealed class KillPersonConditionSystem : EntitySystem // no other humans to kill var allHumans = _mind.GetAliveHumansExcept(args.MindId); + allHumans = allHumans.Where(x => !HasComp(x)).ToList(); // WD if (allHumans.Count == 0) { args.Cancelled = true; diff --git a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs index 86df5a0de4..af9ab98432 100644 --- a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs +++ b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs @@ -307,6 +307,9 @@ public sealed class CultRuleSystem : GameRuleSystem if (entity == default) continue; + if (_gulag.IsUserGulaged(actor.PlayerSession.UserId, out _)) + continue; + if (exclude?.Contains(actor.PlayerSession) is true) { continue;