@@ -17,7 +17,7 @@ namespace Content.Server.BodySystem {
|
||||
/// Component representing the many BodyParts attached to each other.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public class BodyManagerComponent : Component, IAttackHand {
|
||||
public class BodyManagerComponent : Component, IInteractHand {
|
||||
|
||||
public sealed override string Name => "BodyManager";
|
||||
#pragma warning disable CS0649
|
||||
@@ -117,7 +117,7 @@ namespace Content.Server.BodySystem {
|
||||
///////// Server-specific stuff
|
||||
/////////
|
||||
|
||||
public bool AttackHand(AttackHandEventArgs eventArgs)
|
||||
public bool InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
//TODO: remove organs?
|
||||
return false;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
{
|
||||
|
||||
[RegisterComponent]
|
||||
public class ServerSurgeryToolComponent : SharedSurgeryToolComponent, IAfterAttack
|
||||
public class ServerSurgeryToolComponent : SharedSurgeryToolComponent, IAfterInteract
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly IMapManager _mapManager;
|
||||
@@ -41,13 +41,13 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
private BodyManagerComponent _targetCache;
|
||||
private IEntity _performerCache;
|
||||
|
||||
void IAfterAttack.AfterAttack(AfterAttackEventArgs eventArgs)
|
||||
void IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (!InteractionChecks.InRangeUnobstructed(eventArgs)) return;
|
||||
|
||||
if (eventArgs.Attacked == null)
|
||||
if (eventArgs.Target == null)
|
||||
return;
|
||||
if (eventArgs.Attacked.TryGetComponent<BodySystem.BodyManagerComponent>(out BodySystem.BodyManagerComponent bodyManager))
|
||||
if (eventArgs.Target.TryGetComponent<BodySystem.BodyManagerComponent>(out BodySystem.BodyManagerComponent bodyManager))
|
||||
{
|
||||
_surgeryOptionsCache.Clear();
|
||||
var toSend = new Dictionary<string, string>();
|
||||
|
||||
Reference in New Issue
Block a user