Remove IInteractHand (#7601)

* Plantholder

* Strap

* Finish him

* Mirror review stuff
This commit is contained in:
Rane
2022-04-22 23:49:45 -04:00
committed by GitHub
parent e5bc79a713
commit c022afaec4
8 changed files with 71 additions and 112 deletions

View File

@@ -1,24 +1,17 @@
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Acts;
using Content.Shared.Alert;
using Content.Shared.Buckle.Components;
using Content.Shared.DragDrop;
using Content.Shared.Interaction;
using Content.Shared.Sound;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Buckle.Components
{
[RegisterComponent]
[ComponentReference(typeof(SharedStrapComponent))]
public sealed class StrapComponent : SharedStrapComponent, IInteractHand, ISerializationHooks, IDestroyAct
public sealed class StrapComponent : SharedStrapComponent, ISerializationHooks, IDestroyAct
{
[Dependency] private readonly IEntityManager _entityManager = default!;
@@ -216,18 +209,6 @@ namespace Content.Server.Buckle.Components
return new StrapComponentState(Position);
}
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
{
var entManager = IoCManager.Resolve<IEntityManager>();
if (!entManager.TryGetComponent<BuckleComponent>(eventArgs.User, out var buckle))
{
return false;
}
return buckle.ToggleBuckle(eventArgs.User, Owner);
}
public override bool DragDropOn(DragDropEvent eventArgs)
{
var entManager = IoCManager.Resolve<IEntityManager>();