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

@@ -31,7 +31,7 @@ namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(StoreableComponent))]
public class ItemComponent : StoreableComponent, IAttackHand, IExAct, IEquipped, IUnequipped
public class ItemComponent : StoreableComponent, IInteractHand, IExAct, IEquipped, IUnequipped
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;
@@ -102,7 +102,7 @@ namespace Content.Server.GameObjects
return InteractionChecks.InRangeUnobstructed(user, itemPos, ignoredEnt: Owner, insideBlockerValid:true);
}
public bool AttackHand(AttackHandEventArgs eventArgs)
public bool InteractHand(InteractHandEventArgs eventArgs)
{
if (!CanPickup(eventArgs.User)) return false;

View File

@@ -32,7 +32,7 @@ namespace Content.Server.GameObjects
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(IStorageComponent))]
public class ServerStorageComponent : SharedStorageComponent, IAttackBy, IUse, IActivate, IStorageComponent, IDestroyAct
public class ServerStorageComponent : SharedStorageComponent, IInteractUsing, IUse, IActivate, IStorageComponent, IDestroyAct
{
#pragma warning disable 649
[Dependency] private readonly IMapManager _mapManager;
@@ -141,9 +141,9 @@ namespace Content.Server.GameObjects
/// <param name="user"></param>
/// <param name="attackwith"></param>
/// <returns></returns>
public bool AttackBy(AttackByEventArgs eventArgs)
public bool InteractUsing(InteractUsingEventArgs eventArgs)
{
Logger.DebugS("Storage", "Storage (UID {0}) attacked by user (UID {1}) with entity (UID {2}).", Owner.Uid, eventArgs.User.Uid, eventArgs.AttackWith.Uid);
Logger.DebugS("Storage", "Storage (UID {0}) attacked by user (UID {1}) with entity (UID {2}).", Owner.Uid, eventArgs.User.Uid, eventArgs.Using.Uid);
if(Owner.TryGetComponent<PlaceableSurfaceComponent>(out var placeableSurfaceComponent))
{