mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Don't call LandEvent if the item is caught (#4512)
* Don't call LandEvent if the item is caught Or more specifically if it's inserted into a container. * Soft hands check
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Physics.Pull;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
@@ -77,6 +79,10 @@ namespace Content.Shared.Throwing
|
||||
|
||||
private void HandleSleep(EntityUid uid, ThrownItemComponent thrownItem, PhysicsSleepMessage message)
|
||||
{
|
||||
// Unfortunately we can't check for hands containers as they have specific names.
|
||||
if (EntityManager.GetEntity(uid).TryGetContainerMan(out var manager) &&
|
||||
manager.Owner.HasComponent<SharedHandsComponent>()) return;
|
||||
|
||||
LandComponent(thrownItem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user