Fix two interaction obstruction checks (#6793)
This commit is contained in:
@@ -161,12 +161,18 @@ namespace Content.Server.RCD.Systems
|
|||||||
}
|
}
|
||||||
|
|
||||||
var coordinates = mapGrid.ToCoordinates(tile.GridIndices);
|
var coordinates = mapGrid.ToCoordinates(tile.GridIndices);
|
||||||
if (coordinates == EntityCoordinates.Invalid ||
|
if (coordinates == EntityCoordinates.Invalid)
|
||||||
!_interactionSystem.InRangeUnobstructed(eventArgs.User, coordinates, popup: true))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var unobstructed = eventArgs.Target == null
|
||||||
|
? _interactionSystem.InRangeUnobstructed(eventArgs.User, coordinates, popup: true)
|
||||||
|
: _interactionSystem.InRangeUnobstructed(eventArgs.User, eventArgs.Target.Value, popup: true);
|
||||||
|
|
||||||
|
if (!unobstructed)
|
||||||
|
return false;
|
||||||
|
|
||||||
switch (rcd.Mode)
|
switch (rcd.Mode)
|
||||||
{
|
{
|
||||||
//Floor mode just needs the tile to be a space tile (subFloor)
|
//Floor mode just needs the tile to be a space tile (subFloor)
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
name: air alarm assembly
|
name: air alarm assembly
|
||||||
description: An air alarm. Doesn't look like it'll be alarming air any time soon.
|
description: An air alarm. Doesn't look like it'll be alarming air any time soon.
|
||||||
components:
|
components:
|
||||||
|
- type: WallMount
|
||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: InteractionOutline
|
- type: InteractionOutline
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
name: fire alarm assembly
|
name: fire alarm assembly
|
||||||
description: A fire alarm assembly. Very mild.
|
description: A fire alarm assembly. Very mild.
|
||||||
components:
|
components:
|
||||||
|
- type: WallMount
|
||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: InteractionOutline
|
- type: InteractionOutline
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
|
|||||||
Reference in New Issue
Block a user