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

@@ -6,7 +6,7 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components
{
[RegisterComponent]
public class PlaceableSurfaceComponent : Component, IAttackBy
public class PlaceableSurfaceComponent : Component, IInteractUsing
{
public override string Name => "PlaceableSurface";
@@ -19,7 +19,7 @@ namespace Content.Server.GameObjects.Components
serializer.DataField(ref _isPlaceable, "IsPlaceable", true);
}
public bool AttackBy(AttackByEventArgs eventArgs)
public bool InteractUsing(InteractUsingEventArgs eventArgs)
{
if (!IsPlaceable)
return false;
@@ -28,8 +28,8 @@ namespace Content.Server.GameObjects.Components
{
return false;
}
handComponent.Drop(eventArgs.AttackWith);
eventArgs.AttackWith.Transform.WorldPosition = eventArgs.ClickLocation.Position;
handComponent.Drop(eventArgs.Using);
eventArgs.Using.Transform.WorldPosition = eventArgs.ClickLocation.Position;
return true;
}
}