@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user