From 57d57939f7f5e321694a20509c6f52680bad4992 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Sun, 18 Feb 2024 17:30:52 +0900 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B3=D1=84=D0=B8=D0=BA=D1=81?= =?UTF-8?q?=D1=8B=20(#92)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - fix: Fix airlock draw depth. * - fix: Fix headrev command staff message. * - fix: Fix gulag bound antags. * - fix: Double health icon fix. * - fix: Fix cult start exception. * - fix: Fix cult pull teleport. * - fix: Fix another exception. * - fix: Fix drawdepth again. * - fix: Clown font fix. --- Content.Server/Antag/AntagSelectionSystem.cs | 14 ++++++++++++++ .../Rules/RevolutionaryRuleSystem.cs | 1 - .../GameTicking/Rules/ZombieRuleSystem.cs | 4 ++++ .../Radio/EntitySystems/RadioSystem.cs | 2 +- .../_White/Cult/GameRule/CultRuleSystem.cs | 16 ++++++++++++---- .../Cult/Runes/Systems/CultSystem.Rune.cs | 14 ++++++++++++++ .../_White/Cult/UI/TeleportSpellEui.cs | 17 +++++++++++++++++ .../Doors/Components/DoorComponent.cs | 2 +- Resources/Prototypes/StatusEffects/health.yml | 2 +- .../Misc/health_state.rsi/empty_state.png | Bin 0 -> 85 bytes .../Interface/Misc/health_state.rsi/meta.json | 3 +++ 11 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 Resources/Textures/Interface/Misc/health_state.rsi/empty_state.png diff --git a/Content.Server/Antag/AntagSelectionSystem.cs b/Content.Server/Antag/AntagSelectionSystem.cs index 759bc998f4..0142474d31 100644 --- a/Content.Server/Antag/AntagSelectionSystem.cs +++ b/Content.Server/Antag/AntagSelectionSystem.cs @@ -10,11 +10,13 @@ using Content.Server.Mind; using Robust.Shared.Random; using Robust.Shared.Map; using System.Numerics; +using Content.Server._Miracle.Components; using Content.Shared.Inventory; using Content.Server.Storage.EntitySystems; using Robust.Shared.Audio; using Content.Server.Chat.Managers; using Content.Server.GameTicking; +using Content.Server.Revolutionary.Components; using Content.Server.Roles; using Robust.Shared.Containers; using Content.Shared.Mobs.Components; @@ -102,6 +104,13 @@ public sealed class AntagSelectionSystem : GameRuleSystem { if (includeHeads == false) { + // WD START + if (!_mindSystem.TryGetMind(player, out _, out var mind) || + mind.OwnedEntity is not { } ownedEntity || HasComp(ownedEntity) || + HasComp(ownedEntity)) + continue; + // WD END + if (!_jobs.CanBeAntag(player)) continue; } @@ -173,6 +182,11 @@ 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/RevolutionaryRuleSystem.cs b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs index e680e6c364..501784bd4c 100644 --- a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs @@ -156,7 +156,6 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem !HasComp(x)).ToList(); // WD if (chosen.Any()) GiveHeadRev(chosen, comp.HeadRevPrototypeId, comp); else diff --git a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs index 886ff965c7..99a7a2cecd 100644 --- a/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/ZombieRuleSystem.cs @@ -1,5 +1,6 @@ using System.Globalization; using System.Linq; +using Content.Server._Miracle.Components; using Content.Server.Actions; using Content.Server.Chat.Managers; using Content.Server.Chat.Systems; @@ -274,6 +275,9 @@ public sealed class ZombieRuleSystem : GameRuleSystem if (player.AttachedEntity == null || !HasComp(player.AttachedEntity) || HasComp(player.AttachedEntity)) continue; + if (HasComp(player.AttachedEntity)) // WD + continue; + if (HasComp(player.AttachedEntity)) continue; // used (for example) on ERT diff --git a/Content.Server/Radio/EntitySystems/RadioSystem.cs b/Content.Server/Radio/EntitySystems/RadioSystem.cs index 5d3074b06b..9c8c58fa18 100644 --- a/Content.Server/Radio/EntitySystems/RadioSystem.cs +++ b/Content.Server/Radio/EntitySystems/RadioSystem.cs @@ -44,7 +44,7 @@ public sealed class RadioSystem : EntitySystem { if (args.Channel != null && component.Channels.Contains(args.Channel.ID)) { - SendRadioMessage(uid, args.Message, args.Channel, uid); + SendRadioMessage(uid, args.Message, args.Channel, uid, false); // WD EDIT args.Channel = null; // prevent duplicate messages from other listeners. } } diff --git a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs index 9f034f465b..d543a02221 100644 --- a/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs +++ b/Content.Server/_White/Cult/GameRule/CultRuleSystem.cs @@ -1,4 +1,5 @@ using System.Linq; +using Content.Server._Miracle.Components; using Content.Server.Actions; using Content.Server.Chat.Managers; using Content.Server.GameTicking; @@ -326,6 +327,11 @@ public sealed class CultRuleSystem : GameRuleSystem if (!_jobSystem.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; @@ -349,6 +355,7 @@ public sealed class CultRuleSystem : GameRuleSystem { _sawmill.Info("Insufficient preferred cultists, picking at random."); prefList = list; + return prefList; } if (prefList.Count >= _minimalCultists) @@ -375,15 +382,16 @@ public sealed class CultRuleSystem : GameRuleSystem private List PickCultists(List prefList) { var result = new List(); - if (prefList.Count == 0) + + var minCultists = _cfg.GetCVar(WhiteCVars.CultMinPlayers); + var maxCultists = _cfg.GetCVar(WhiteCVars.CultMaxStartingPlayers); + + if (prefList.Count < minCultists) { _sawmill.Info("Insufficient ready players to fill up with cultists, stopping the selection."); return result; } - var minCultists = _cfg.GetCVar(WhiteCVars.CultMinPlayers); - var maxCultists = _cfg.GetCVar(WhiteCVars.CultMaxStartingPlayers); - var actualCultistCount = prefList.Count > maxCultists ? maxCultists : minCultists; for (var i = 0; i < actualCultistCount; i++) diff --git a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs index 560ad78688..716a5cd396 100644 --- a/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs +++ b/Content.Server/_White/Cult/Runes/Systems/CultSystem.Rune.cs @@ -33,6 +33,7 @@ using Content.Shared._White.Cult.Components; using Content.Shared._White.Cult.Runes; using Content.Shared._White.Cult.UI; using Content.Shared.Mindshield.Components; +using Content.Shared.Pulling; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Audio.Components; @@ -62,6 +63,7 @@ public sealed partial class CultSystem : EntitySystem [Dependency] private readonly GunSystem _gunSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly FlammableSystem _flammableSystem = default!; + [Dependency] private readonly SharedPullingSystem _pulling = default!; public override void Initialize() @@ -664,6 +666,18 @@ 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); + } + _xform.SetCoordinates(target, xFormSelected.Coordinates); } diff --git a/Content.Server/_White/Cult/UI/TeleportSpellEui.cs b/Content.Server/_White/Cult/UI/TeleportSpellEui.cs index 4206743089..4923740490 100644 --- a/Content.Server/_White/Cult/UI/TeleportSpellEui.cs +++ b/Content.Server/_White/Cult/UI/TeleportSpellEui.cs @@ -5,6 +5,8 @@ using Content.Shared.Actions; using Content.Shared.Eui; using Content.Shared.Popups; using Content.Shared._White.Cult.UI; +using Content.Shared.Pulling; +using Content.Shared.Pulling.Components; using Robust.Server.GameObjects; using Robust.Shared.Map; using Robust.Shared.Timing; @@ -15,6 +17,7 @@ public sealed class TeleportSpellEui : BaseEui { [Dependency] private readonly EntityManager _entityManager = default!; private SharedTransformSystem _transformSystem; + private SharedPullingSystem _pulling; private PopupSystem _popupSystem; @@ -32,6 +35,7 @@ public sealed class TeleportSpellEui : BaseEui IoCManager.InjectDependencies(this); _transformSystem = _entityManager.System(); + _pulling = _entityManager.System(); _popupSystem = _entityManager.System(); _performer = performer; @@ -97,6 +101,19 @@ public sealed class TeleportSpellEui : BaseEui _used = true; + // break pulls before portal enter so we dont break shit + if (_entityManager.TryGetComponent(_target, out var pullable) && pullable.BeingPulled) + { + _pulling.TryStopPull(pullable); + } + + if (_entityManager.TryGetComponent(_target, out var pulling) + && pulling.Pulling != null && + _entityManager.TryGetComponent(pulling.Pulling.Value, out var subjectPulling)) + { + _pulling.TryStopPull(subjectPulling); + } + _transformSystem.SetCoordinates(_target, runeTransform.Coordinates); Close(); } diff --git a/Content.Shared/Doors/Components/DoorComponent.cs b/Content.Shared/Doors/Components/DoorComponent.cs index 135f8b0856..46a33695fa 100644 --- a/Content.Shared/Doors/Components/DoorComponent.cs +++ b/Content.Shared/Doors/Components/DoorComponent.cs @@ -298,7 +298,7 @@ public sealed partial class DoorComponent : Component public bool ClickOpen = true; [DataField(customTypeSerializer: typeof(ConstantSerializer))] - public int OpenDrawDepth = (int) DrawDepth.DrawDepth.Doors; + public int OpenDrawDepth = (int) DrawDepth.DrawDepth.SmallObjects; [DataField(customTypeSerializer: typeof(ConstantSerializer))] public int ClosedDrawDepth = (int) DrawDepth.DrawDepth.Doors; diff --git a/Resources/Prototypes/StatusEffects/health.yml b/Resources/Prototypes/StatusEffects/health.yml index 355b9acbb7..69407c17a7 100644 --- a/Resources/Prototypes/StatusEffects/health.yml +++ b/Resources/Prototypes/StatusEffects/health.yml @@ -3,5 +3,5 @@ priority: 0 icon: sprite: Interface/Misc/health_state.rsi - state: life_state + state: empty_state locationPreference: Right diff --git a/Resources/Textures/Interface/Misc/health_state.rsi/empty_state.png b/Resources/Textures/Interface/Misc/health_state.rsi/empty_state.png new file mode 100644 index 0000000000000000000000000000000000000000..01220e2182b563b664666aee5281a53d39ada5d2 GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|_&r@5LnNjq eCrGgJ009Fd2LofR