diff --git a/Content.Shared/Cuffs/Components/HandcuffComponent.cs b/Content.Shared/Cuffs/Components/HandcuffComponent.cs index 9465d605ed..a94e48a35c 100644 --- a/Content.Shared/Cuffs/Components/HandcuffComponent.cs +++ b/Content.Shared/Cuffs/Components/HandcuffComponent.cs @@ -1,4 +1,3 @@ -using Content.Shared.Damage; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; @@ -33,24 +32,6 @@ public sealed partial class HandcuffComponent : Component [DataField, ViewVariables(VVAccess.ReadWrite)] public float StunBonus = 2f; - /// - /// Modifier for the amount of time it takes an entity to stand up if cuffed. - /// - [DataField] - public float StandupMod = 5f; - - /// - /// Modifier to the speed of an entity who is cuffed, does not stack with KnockedMovementMod - /// - [DataField] - public float MovementMod = 1f; - - /// - /// Modifier to the knocked down speed of an entity who is cuffed - /// - [DataField] - public float KnockedMovementMod = 0.4f; - /// /// Will the cuffs break when removed? /// diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index 931028052c..3b0f6c8a30 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -21,7 +21,6 @@ using Content.Shared.Inventory.VirtualItem; using Content.Shared.Item; using Content.Shared.Movement.Events; using Content.Shared.Movement.Pulling.Events; -using Content.Shared.Movement.Systems; using Content.Shared.Popups; using Content.Shared.Pulling.Events; using Content.Shared.Rejuvenate; @@ -46,7 +45,6 @@ namespace Content.Shared.Cuffs [Dependency] private readonly ISharedAdminLogManager _adminLog = default!; [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; [Dependency] private readonly AlertsSystem _alerts = default!; - [Dependency] private readonly MovementSpeedModifierSystem _move = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; @@ -58,14 +56,10 @@ namespace Content.Shared.Cuffs [Dependency] private readonly UseDelaySystem _delay = default!; [Dependency] private readonly SharedCombatModeSystem _combatMode = default!; - private EntityQuery _cuffQuery; - public override void Initialize() { base.Initialize(); - _cuffQuery = GetEntityQuery(); - SubscribeLocalEvent(OnHandCountChanged); SubscribeLocalEvent(OnUncuffAttempt); @@ -95,9 +89,6 @@ namespace Content.Shared.Cuffs SubscribeLocalEvent(OnCuffMeleeHit); SubscribeLocalEvent(OnAddCuffDoAfter); SubscribeLocalEvent(OnCuffVirtualItemDeleted); - SubscribeLocalEvent(OnCuffableStandupArgs); - SubscribeLocalEvent(OnCuffableKnockdownRefresh); - SubscribeLocalEvent(OnRefreshMovementSpeedModifiers); } private void CheckInteract(Entity ent, ref InteractionAttemptEvent args) @@ -375,9 +366,6 @@ namespace Content.Shared.Cuffs _adminLog.Add(LogType.Action, LogImpact.High, $"{ToPrettyString(user):player} has cuffed {ToPrettyString(target):player}"); } - - if (!MathHelper.CloseTo(component.MovementMod, 1f)) - _move.RefreshMovementSpeedModifiers(target); } else { @@ -432,72 +420,6 @@ namespace Content.Shared.Cuffs } } - /// - /// Takes longer to stand up when cuffed - /// - private void OnCuffableStandupArgs(Entity ent, ref GetStandUpTimeEvent time) - { - if (!HasComp(ent) || !IsCuffed(ent)) - return; - - var cuffs = GetAllCuffs(ent.Comp); - var mod = 1f; - - if (cuffs.Count == 0) - return; - - foreach (var cuff in cuffs) - { - if (!_cuffQuery.TryComp(cuff, out var comp)) - continue; - - // Get the worst modifier - mod = Math.Max(mod, comp.StandupMod); - } - - time.DoAfterTime *= mod; - } - - private void OnCuffableKnockdownRefresh(Entity ent, ref KnockedDownRefreshEvent args) - { - var cuffs = GetAllCuffs(ent.Comp); - var mod = 1f; - - if (cuffs.Count == 0) - return; - - foreach (var cuff in cuffs) - { - if (!_cuffQuery.TryComp(cuff, out var comp)) - continue; - - // Get the worst modifier - mod = Math.Min(mod, comp.KnockedMovementMod); - } - - args.SpeedModifier *= mod; - } - - private void OnRefreshMovementSpeedModifiers(Entity ent, ref RefreshMovementSpeedModifiersEvent args) - { - var cuffs = GetAllCuffs(ent.Comp); - var mod = 1f; - - if (cuffs.Count == 0) - return; - - foreach (var cuff in cuffs) - { - if (!_cuffQuery.TryComp(cuff, out var comp)) - continue; - - // Get the worst modifier - mod = Math.Min(mod, comp.MovementMod); - } - - args.ModifySpeed(mod); - } - /// /// Adds virtual cuff items to the user's hands. /// @@ -814,9 +736,6 @@ namespace Content.Shared.Cuffs shoved = true; } - if (!MathHelper.CloseTo(cuff.MovementMod, 1f)) - _move.RefreshMovementSpeedModifiers(target); - if (cuffable.CuffedHandCount == 0) { if (user != null) diff --git a/Content.Shared/Stunnable/SharedStunSystem.Knockdown.cs b/Content.Shared/Stunnable/SharedStunSystem.Knockdown.cs index d609acff04..2146c27a21 100644 --- a/Content.Shared/Stunnable/SharedStunSystem.Knockdown.cs +++ b/Content.Shared/Stunnable/SharedStunSystem.Knockdown.cs @@ -4,7 +4,6 @@ using Content.Shared.Damage; using Content.Shared.Damage.Components; using Content.Shared.Database; using Content.Shared.DoAfter; -using Content.Shared.Hands; using Content.Shared.Hands.EntitySystems; using Content.Shared.Input; using Content.Shared.Movement.Events; @@ -58,8 +57,6 @@ public abstract partial class SharedStunSystem SubscribeLocalEvent(OnRefreshKnockedSpeed); SubscribeLocalEvent(OnRefreshFriction); SubscribeLocalEvent(OnKnockedTileFriction); - SubscribeLocalEvent(OnHandEquipped); - SubscribeLocalEvent(OnHandUnequipped); // DoAfter event subscriptions SubscribeLocalEvent(OnStandDoAfter); @@ -518,15 +515,5 @@ public abstract partial class SharedStunSystem args.ModifyAcceleration(entity.Comp.FrictionModifier); } - private void OnHandEquipped(Entity entity, ref DidEquipHandEvent args) - { - RefreshKnockedMovement(entity); - } - - private void OnHandUnequipped(Entity entity, ref DidUnequipHandEvent args) - { - RefreshKnockedMovement(entity); - } - #endregion }