This commit is contained in:
Leon Friedrich
2022-03-17 20:13:31 +13:00
committed by GitHub
parent 7b84362901
commit bfd95c493b
94 changed files with 1454 additions and 2185 deletions

View File

@@ -1,6 +1,5 @@
using Content.Server.Hands.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Content.Shared.Hands.EntitySystems;
namespace Content.Server.AI.Operators.Inventory
{
@@ -20,9 +19,12 @@ namespace Content.Server.AI.Operators.Inventory
return Outcome.Failed;
}
foreach (var item in handsComponent.GetAllHeldItems())
var sys = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<SharedHandsSystem>();
foreach (var hand in handsComponent.Hands.Values)
{
handsComponent.Drop(item.Owner);
if (!hand.IsEmpty)
sys.TryDrop(_owner, hand, handsComp: handsComponent);
}
return Outcome.Success;