diff --git a/Content.Server/Antag/AntagSelectionSystem.cs b/Content.Server/Antag/AntagSelectionSystem.cs index 0142474d31..c641ee2b5f 100644 --- a/Content.Server/Antag/AntagSelectionSystem.cs +++ b/Content.Server/Antag/AntagSelectionSystem.cs @@ -11,6 +11,7 @@ using Robust.Shared.Random; using Robust.Shared.Map; using System.Numerics; using Content.Server._Miracle.Components; +using Content.Server._Miracle.GulagSystem; using Content.Shared.Inventory; using Content.Server.Storage.EntitySystems; using Robust.Shared.Audio; @@ -48,6 +49,7 @@ public sealed class AntagSelectionSystem : GameRuleSystem [Dependency] private readonly EmergencyShuttleSystem _emergencyShuttle = default!; [Dependency] private readonly RoleSystem _roles = default!; // WD [Dependency] private readonly SharedPlayerSystem _sharedPlayerSystem = default!; // WD + [Dependency] private readonly GulagSystem _gulag = default!; // WD /// /// Attempts to start the game rule by checking if there are enough players in lobby and readied. @@ -102,12 +104,14 @@ public sealed class AntagSelectionSystem : GameRuleSystem chosen = new List(); foreach (var player in allPlayers) { + if (_gulag.IsUserGulaged(player.UserId, out _)) // WD + continue; + if (includeHeads == false) { // WD START if (!_mindSystem.TryGetMind(player, out _, out var mind) || - mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity) || - HasComp(ownedEntity)) + mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity)) continue; // WD END @@ -175,6 +179,9 @@ public sealed class AntagSelectionSystem : GameRuleSystem foreach (var player in candidates.Keys) { + if (_gulag.IsUserGulaged(player.UserId, out _)) // WD + continue; + if (_sharedPlayerSystem.ContentData(player) is not {Mind: { } mindId} || _roles.MindIsAntagonist(mindId)) continue; @@ -182,11 +189,6 @@ public sealed class AntagSelectionSystem : GameRuleSystem if (!_jobs.CanBeAntag(player)) continue; - // Gulag - if (!_mindSystem.TryGetMind(player, out _, out var mind) || - mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity)) - continue; - // Latejoin if (player.AttachedEntity != null && pendingQuery.HasComponent(player.AttachedEntity.Value)) continue; diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index a16280a198..a156c159c1 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; +using Content.Server._Miracle.GulagSystem; using Content.Server.Administration.Commands; using Content.Server.Administration.Managers; using Content.Server.Chat.Managers; @@ -91,6 +92,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem [Dependency] private readonly WarDeclaratorSystem _warDeclarator = default!; //WD EDIT [Dependency] private readonly ReputationManager _reputationManager = default!; + [Dependency] private readonly GulagSystem _gulag = default!; //WD EDIT @@ -632,6 +634,9 @@ public sealed class NukeopsRuleSystem : GameRuleSystem // ReSharper disable once ForeachCanBeConvertedToQueryUsingAnotherGetEnumerator foreach (var player in everyone) { + if (_gulag.IsUserGulaged(player.UserId, out _)) // WD + continue; + if (!ev.Profiles.ContainsKey(player.UserId)) { continue; diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 99a7a2cecd..98ffd6ac78 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -1,6 +1,7 @@ using System.Globalization; using System.Linq; using Content.Server._Miracle.Components; +using Content.Server._Miracle.GulagSystem; using Content.Server.Actions; using Content.Server.Chat.Managers; using Content.Server.Chat.Systems; @@ -50,6 +51,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem [Dependency] private readonly SharedRoleSystem _roles = default!; [Dependency] private readonly StationSystem _station = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly GulagSystem _gulag = default!; // WD public override void Initialize() { @@ -272,10 +274,10 @@ public sealed class ZombieRuleSystem : GameRuleSystem var prefList = new List(); foreach (var player in allPlayers) { - if (player.AttachedEntity == null || !HasComp(player.AttachedEntity) || HasComp(player.AttachedEntity)) + if (_gulag.IsUserGulaged(player.UserId, out _)) // WD continue; - if (HasComp(player.AttachedEntity)) // WD + if (player.AttachedEntity == null || !HasComp(player.AttachedEntity) || HasComp(player.AttachedEntity)) continue; if (HasComp(player.AttachedEntity)) diff --git a/Content.Server/_White/Carrying/CarryingSystem.cs b/Content.Server/_White/Carrying/CarryingSystem.cs index 6ea8f3e5bb..c73d748565 100644 --- a/Content.Server/_White/Carrying/CarryingSystem.cs +++ b/Content.Server/_White/Carrying/CarryingSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Resist; using Content.Server.Popups; using Content.Server.Contests; using Content.Server.Inventory; +using Content.Shared._White.Crossbow; using Content.Shared.Mobs; using Content.Shared.DoAfter; using Content.Shared.Buckle.Components; @@ -42,6 +43,7 @@ namespace Content.Server.Carrying [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly ContestsSystem _contests = default!; [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!; + [Dependency] private readonly PenetratedSystem _penetrated = default!; public override void Initialize() { @@ -241,6 +243,8 @@ namespace Content.Server.Carrying if (TryComp(carried, out var pullable)) _pullingSystem.TryStopPull(pullable); + _penetrated.FreePenetrated(carried); + Transform(carrier).AttachToGridOrMap(); Transform(carried).AttachToGridOrMap(); Transform(carried).Coordinates = Transform(carrier).Coordinates; diff --git a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs index 103ae5def7..86df5a0de4 100644 --- a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs +++ b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs @@ -1,5 +1,6 @@ using System.Linq; using Content.Server._Miracle.Components; +using Content.Server._Miracle.GulagSystem; using Content.Server.Actions; using Content.Server.Chat.Managers; using Content.Server.GameTicking; @@ -45,6 +46,7 @@ public sealed class CultRuleSystem : GameRuleSystem [Dependency] private readonly JobSystem _jobSystem = default!; [Dependency] private readonly SharedMindSystem _mindSystem = default!; [Dependency] private readonly ActionsSystem _actions = default!; + [Dependency] private readonly GulagSystem _gulag = default!; private ISawmill _sawmill = default!; @@ -324,14 +326,17 @@ public sealed class CultRuleSystem : GameRuleSystem foreach (var player in candidates.Keys) { + // Gulag + if (_gulag.IsUserGulaged(player.UserId, out _)) + continue; + // Role prevents antag. if (!_jobSystem.CanBeAntag(player)) continue; - // Gulag & chaplain + // Chaplain if (!_mindSystem.TryGetMind(player, out _, out var mind) || - mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity) || - HasComp(ownedEntity)) + mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity)) continue; // Latejoin diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs index fbf1ce33e2..e070e90b34 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs @@ -668,17 +668,7 @@ public sealed partial class CultSystem : EntitySystem foreach (var target in targets) { - // break pulls before portal enter so we dont break shit - if (TryComp(target, out var pullable) && pullable.BeingPulled) - { - _pulling.TryStopPull(pullable); - } - - if (TryComp(target, out var pulling) - && pulling.Pulling != null && TryComp(pulling.Pulling.Value, out var subjectPulling)) - { - _pulling.TryStopPull(subjectPulling); - } + StopPulling(target); _xform.SetCoordinates(target, xFormSelected.Coordinates); } @@ -978,6 +968,8 @@ public sealed partial class CultSystem : EntitySystem return; } + StopPulling(target, false); + _xform.SetCoordinates(target, xFormBase.Coordinates); _audio.PlayPvs(_teleportInSound, xFormBase.Coordinates); @@ -1319,6 +1311,22 @@ public sealed partial class CultSystem : EntitySystem _damageableSystem.TryChangeDamage(player, new DamageSpecifier(damageSpecifier2, -40)); } + private void StopPulling(EntityUid target, bool checkPullable = true) + { + // break pulls before portal enter so we dont break shit + if (checkPullable && TryComp(target, out var pullable) && pullable.BeingPulled) + { + _pulling.TryStopPull(pullable); + } + + if (TryComp(target, out var pulling) + && pulling.Pulling != null && + TryComp(pulling.Pulling.Value, out var subjectPulling)) + { + _pulling.TryStopPull(subjectPulling); + } + } + /* * Helpers End ---- */ diff --git a/Content.Server/_White/NonPeacefulRoundEnd/NonPeacefulRoundEndSystem.cs b/Content.Server/_White/NonPeacefulRoundEnd/NonPeacefulRoundEndSystem.cs index 65e610dacb..e840a33a00 100644 --- a/Content.Server/_White/NonPeacefulRoundEnd/NonPeacefulRoundEndSystem.cs +++ b/Content.Server/_White/NonPeacefulRoundEnd/NonPeacefulRoundEndSystem.cs @@ -88,7 +88,7 @@ public sealed class NonPeacefulRoundEndSystem : EntitySystem var weaponEntity = _entityManager.SpawnEntity(item, transform.Coordinates); - _handsSystem.TryDrop(player); + // _handsSystem.TryDrop(player); _handsSystem.PickupOrDrop(player, weaponEntity); } }