From ec4518f0efc2d0d7cd072cfeb6865fa21e5a1fd2 Mon Sep 17 00:00:00 2001 From: MissKay1994 <15877268+MissKay1994@users.noreply.github.com> Date: Sat, 1 Aug 2026 05:54:05 -0400 Subject: [PATCH] Shorten goliath stun duration (#45052) * No more permastuns * Throwing rocks at the problem * Update StunOnCollideSystem.cs * Update Content.Server/Stunnable/Systems/StunOnCollideSystem.cs Co-authored-by: SnappingOpossum --------- Co-authored-by: SnappingOpossum --- .../Stunnable/Components/StunOnCollideComponent.cs | 7 +++++++ Content.Server/Stunnable/Systems/StunOnCollideSystem.cs | 5 +++++ Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Content.Server/Stunnable/Components/StunOnCollideComponent.cs b/Content.Server/Stunnable/Components/StunOnCollideComponent.cs index cbf6b17af8..d38a74df4a 100644 --- a/Content.Server/Stunnable/Components/StunOnCollideComponent.cs +++ b/Content.Server/Stunnable/Components/StunOnCollideComponent.cs @@ -1,4 +1,5 @@ using Content.Server.Stunnable.Systems; +using Content.Shared.Whitelist; namespace Content.Server.Stunnable.Components; @@ -62,5 +63,11 @@ public sealed partial class StunOnCollideComponent : Component /// Fixture we track for the collision. /// [DataField("fixture")] public string FixtureID = "projectile"; + + /// + /// Allows blacklisting of entities + /// + [DataField] + public EntityWhitelist Blacklist = new(); } diff --git a/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs b/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs index 990091b704..cc1aabf861 100644 --- a/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs +++ b/Content.Server/Stunnable/Systems/StunOnCollideSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Movement.Systems; using JetBrains.Annotations; using Content.Shared.Throwing; using Robust.Shared.Physics.Events; +using Content.Shared.Whitelist; namespace Content.Server.Stunnable.Systems; @@ -11,6 +12,7 @@ internal sealed partial class StunOnCollideSystem : EntitySystem { [Dependency] private StunSystem _stunSystem = default!; [Dependency] private MovementModStatusSystem _movementMod = default!; + [Dependency] private EntityWhitelistSystem _entityWhitelist = default!; public override void Initialize() { @@ -22,6 +24,9 @@ internal sealed partial class StunOnCollideSystem : EntitySystem private void TryDoCollideStun(Entity ent, EntityUid target) { + if (_entityWhitelist.IsWhitelistPass(ent.Comp.Blacklist, target)) + return; + _stunSystem.TryKnockdown(target, ent.Comp.KnockdownAmount, ent.Comp.Refresh, ent.Comp.AutoStand, ent.Comp.Drop, true); if (ent.Comp.Refresh) diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml b/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml index c4e2649550..ed3bbdd657 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/asteroid.yml @@ -131,7 +131,10 @@ sprite: Mobs/Aliens/Asteroid/goliath.rsi layers: - state: goliath_tentacle_wiggle - - type: StunOnContact + - type: StunOnCollide + stunAmount: 1 + knockdownAmount: 5 + fixture: fix blacklist: tags: - Goliath