mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
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 <snappingopossum@outlook.com> --------- Co-authored-by: SnappingOpossum <snappingopossum@outlook.com>
This commit is contained in:
parent
dd5b6fcc5f
commit
ec4518f0ef
3 changed files with 16 additions and 1 deletions
|
|
@ -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.
|
||||
/// </summary>
|
||||
[DataField("fixture")] public string FixtureID = "projectile";
|
||||
|
||||
///<summary>
|
||||
/// Allows blacklisting of entities
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public EntityWhitelist Blacklist = new();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<StunOnCollideComponent> 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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue