@@ -15,7 +15,7 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Server.GameObjects.Components.Items
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class FloorTileItemComponent : Component, IAfterAttack
|
||||
public class FloorTileItemComponent : Component, IAfterInteract
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager;
|
||||
@@ -39,11 +39,11 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
base.Initialize();
|
||||
Stack = Owner.GetComponent<StackComponent>();
|
||||
}
|
||||
public void AfterAttack(AfterAttackEventArgs eventArgs)
|
||||
public void AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (!InteractionChecks.InRangeUnobstructed(eventArgs)) return;
|
||||
|
||||
var attacked = eventArgs.Attacked;
|
||||
var attacked = eventArgs.Target;
|
||||
var mapGrid = _mapManager.GetGrid(eventArgs.ClickLocation.GridID);
|
||||
var tile = mapGrid.GetTileRef(eventArgs.ClickLocation);
|
||||
var tileDef = (ContentTileDefinition)_tileDefinitionManager[tile.Tile.TypeId];
|
||||
|
||||
Reference in New Issue
Block a user