Tiny shove fix. (#25353)

* Remove second shove check.

* Change when popups and sounds are created.
Reduces phantom shoves that feel bad.

* why didn't i think of this i saw it earlier...

* Replaced Is fields with prefix

* remove some dependencies to fix tests???
This commit is contained in:
Callmore
2024-02-21 04:01:45 +00:00
committed by GitHub
parent 811858a155
commit 5a2c744998
4 changed files with 55 additions and 32 deletions

View File

@@ -6,15 +6,20 @@ using Content.Server.Stunnable;
using Content.Shared.ActionBlocker;
using Content.Shared.Body.Part;
using Content.Shared.CombatMode;
using Content.Shared.Damage.Systems;
using Content.Shared.Explosion;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.IdentityManagement;
using Content.Shared.Input;
using Content.Shared.Inventory.VirtualItem;
using Content.Shared.Physics.Pull;
using Content.Shared.Popups;
using Content.Shared.Pulling.Components;
using Content.Shared.Stacks;
using Content.Shared.Throwing;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.GameStates;
using Robust.Shared.Input.Binding;
using Robust.Shared.Map;
@@ -38,7 +43,7 @@ namespace Content.Server.Hands.Systems
{
base.Initialize();
SubscribeLocalEvent<HandsComponent, DisarmedEvent>(OnDisarmed, before: new[] {typeof(StunSystem)});
SubscribeLocalEvent<HandsComponent, DisarmedEvent>(OnDisarmed, before: new[] {typeof(StunSystem), typeof(StaminaSystem)});
SubscribeLocalEvent<HandsComponent, PullStartedMessage>(HandlePullStarted);
SubscribeLocalEvent<HandsComponent, PullStoppedMessage>(HandlePullStopped);
@@ -95,6 +100,8 @@ namespace Content.Server.Hands.Systems
if (!_handsSystem.TryDrop(uid, component.ActiveHand!, null, checkActionBlocker: false))
return;
args.PopupPrefix = "disarm-action-";
args.Handled = true; // no shove/stun.
}