Remove some functions from HandsComponent (#4937)

* remove wrapper functions

* Remove InteractionSystem wrapper functions

* remove two more functions

* add missing `using`

* clean diff
This commit is contained in:
Leon Friedrich
2021-10-25 20:06:12 +13:00
committed by GitHub
parent e621a82e65
commit 6e84e23ba1
10 changed files with 437 additions and 509 deletions

View File

@@ -140,7 +140,7 @@ namespace Content.Server.Hands.Systems
if (!TryGetHandsComp(args.SenderSession, out var hands))
return;
hands.UseActiveHeldEntity();
hands.ActivateItem();
}
private void HandleInteractUsingInHand(ClientInteractUsingInHandMsg msg, EntitySessionEventArgs args)
@@ -212,7 +212,7 @@ namespace Content.Server.Hands.Systems
if (!TryGetHandsComp(session, out var hands))
return;
hands.UseActiveHeldEntity();
hands.ActivateItem();
}
private void HandleAltActivateItem(ICommonSession? session)
@@ -220,7 +220,7 @@ namespace Content.Server.Hands.Systems
if (!TryGetHandsComp(session, out var hands))
return;
hands.UseActiveHeldEntity(altInteract: true);
hands.ActivateItem(altInteract: true);
}
private bool HandleThrowItem(ICommonSession? session, EntityCoordinates coords, EntityUid uid)
@@ -247,7 +247,7 @@ namespace Content.Server.Hands.Systems
throwEnt = splitStack;
}
else if (!hands.TryDropEntityToFloor(throwEnt))
else if (!hands.Drop(throwEnt))
return false;
var direction = coords.ToMapPos(EntityManager) - playerEnt.Transform.WorldPosition;