using Robust.Shared.Input.Binding;
using Robust.Shared.Map;
using Robust.Shared.Player;
+using Robust.Shared.Random;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
public sealed class HandsSystem : SharedHandsSystem
{
[Dependency] private readonly IGameTiming _timing = default!;
+ [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly StackSystem _stackSystem = default!;
[Dependency] private readonly VirtualItemSystem _virtualItemSystem = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!;
if (TryComp(uid, out PullerComponent? puller) && TryComp(puller.Pulling, out PullableComponent? pullable))
_pullingSystem.TryStopPull(puller.Pulling.Value, pullable);
- if (!_handsSystem.TryDrop(uid, component.ActiveHand!, null, checkActionBlocker: false))
+ var offsetRandomCoordinates = _transformSystem.GetMoverCoordinates(args.Target).Offset(_random.NextVector2(1f, 1.5f));
+ if (!ThrowHeldItem(args.Target, offsetRandomCoordinates))
return;
args.PopupPrefix = "disarm-action-";