hands ECS (#7081)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
using Content.Server.DoAfter;
|
||||
using Content.Server.Engineering.Components;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Helpers;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
@@ -11,6 +10,8 @@ namespace Content.Server.Engineering.EntitySystems
|
||||
[UsedImplicitly]
|
||||
public sealed class DisassembleOnAltVerbSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -63,11 +64,7 @@ namespace Content.Server.Engineering.EntitySystems
|
||||
|
||||
var entity = EntityManager.SpawnEntity(component.Prototype, transformComp.Coordinates);
|
||||
|
||||
if (TryComp<HandsComponent?>(user, out var hands)
|
||||
&& TryComp<SharedItemComponent?>(entity, out var item))
|
||||
{
|
||||
hands.PutInHandOrDrop(item);
|
||||
}
|
||||
_handsSystem.TryPickup(user, entity);
|
||||
|
||||
EntityManager.DeleteEntity(component.Owner);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user