From 07da7ec901c745cae304bb97d604bf37a588d32e Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Sat, 28 Dec 2024 07:35:10 +0200 Subject: [PATCH] Diona immune to FTL Knockdown (#2543) * Strong * Update ShuttleSystem.FasterThanLight.cs Signed-off-by: Dvir <39403717+dvir001@users.noreply.github.com> --------- Signed-off-by: Dvir <39403717+dvir001@users.noreply.github.com> --- .../Shuttles/Systems/ShuttleSystem.FasterThanLight.cs | 4 +++- .../Shuttles/Components/FTLKnockdownImmuneComponent.cs | 9 +++++++++ Resources/Prototypes/Entities/Mobs/Species/diona.yml | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Content.Server/_NF/Shuttles/Components/FTLKnockdownImmuneComponent.cs diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index b550db93ed..c43b8aced3 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -1,6 +1,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; +using Content.Server._NF.Shuttles.Components; // Frontier: FTL knockdown immunity using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Events; using Content.Server.Station.Events; @@ -631,7 +632,8 @@ public sealed partial class ShuttleSystem if (!_statusQuery.TryGetComponent(child, out var status)) continue; - _stuns.TryParalyze(child, _hyperspaceKnockdownTime, true, status); + if (!HasComp(child)) // Frontier: FTL knockdown immunity + _stuns.TryParalyze(child, _hyperspaceKnockdownTime, true, status); // If the guy we knocked down is on a spaced tile, throw them too if (grid != null) diff --git a/Content.Server/_NF/Shuttles/Components/FTLKnockdownImmuneComponent.cs b/Content.Server/_NF/Shuttles/Components/FTLKnockdownImmuneComponent.cs new file mode 100644 index 0000000000..678e89f0c5 --- /dev/null +++ b/Content.Server/_NF/Shuttles/Components/FTLKnockdownImmuneComponent.cs @@ -0,0 +1,9 @@ +namespace Content.Server._NF.Shuttles.Components; + +/// +/// Denotes an entity as being immune from knockdown on FTL +/// +[RegisterComponent] +public sealed partial class FTLKnockdownImmuneComponent : Component +{ +} diff --git a/Resources/Prototypes/Entities/Mobs/Species/diona.yml b/Resources/Prototypes/Entities/Mobs/Species/diona.yml index 7c12787a8c..979c0981f8 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/diona.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/diona.yml @@ -117,6 +117,7 @@ - type: MovementSpeedModifier # DeltaV baseWalkSpeed: 1.0 baseSprintSpeed: 3.0 + - type: FTLKnockdownImmune # Frontier - type: entity parent: BaseSpeciesDummy