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,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);