This commit is contained in:
Clyybber
2020-05-23 17:23:25 +02:00
committed by GitHub
parent 05b910d9db
commit 1ad9a10050
40 changed files with 200 additions and 199 deletions

View File

@@ -18,7 +18,7 @@ namespace Content.Server.GameObjects.Components.Power
/// Component to transfer power to nearby components, can create powernets and connect to nodes
/// </summary>
[RegisterComponent]
public class PowerTransferComponent : Component, IAttackBy
public class PowerTransferComponent : Component, IInteractUsing
{
public override string Name => "PowerTransfer";
@@ -139,9 +139,9 @@ namespace Content.Server.GameObjects.Components.Power
return Parent != null && Parent.Dirty == false && !Regenerating;
}
public bool AttackBy(AttackByEventArgs eventArgs)
public bool InteractUsing(InteractUsingEventArgs eventArgs)
{
if (eventArgs.AttackWith.TryGetComponent(out WirecutterComponent wirecutter))
if (eventArgs.Using.TryGetComponent(out WirecutterComponent wirecutter))
{
Owner.Delete();
var droppedEnt = Owner.EntityManager.SpawnEntity("CableStack", eventArgs.ClickLocation);