Stunnable New Status and Cleanup (#38618)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
This commit is contained in:
committed by
GitHub
parent
2b2b9b11b8
commit
e85bc1bb8c
@@ -20,6 +20,7 @@ using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using System.Linq;
|
||||
using Content.Shared.Movement.Systems;
|
||||
|
||||
namespace Content.Shared.Flash;
|
||||
|
||||
@@ -33,6 +34,7 @@ public abstract class SharedFlashSystem : EntitySystem
|
||||
[Dependency] private readonly ExamineSystemShared _examine = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stun = default!;
|
||||
[Dependency] private readonly MovementModStatusSystem _movementMod = default!;
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
@@ -163,9 +165,9 @@ public abstract class SharedFlashSystem : EntitySystem
|
||||
return;
|
||||
|
||||
if (stunDuration != null)
|
||||
_stun.TryParalyze(target, stunDuration.Value, true);
|
||||
_stun.TryUpdateParalyzeDuration(target, stunDuration.Value);
|
||||
else
|
||||
_stun.TrySlowdown(target, flashDuration, true, slowTo, slowTo);
|
||||
_movementMod.TryUpdateMovementSpeedModDuration(target, MovementModStatusSystem.FlashSlowdown, flashDuration, slowTo);
|
||||
|
||||
if (displayPopup && user != null && target != user && Exists(user.Value))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user