Fix two interaction obstruction checks (#6793)

This commit is contained in:
Leon Friedrich
2022-02-22 18:01:01 +13:00
committed by GitHub
parent 4a68718050
commit 536234f232
3 changed files with 10 additions and 2 deletions

View File

@@ -161,12 +161,18 @@ namespace Content.Server.RCD.Systems
}
var coordinates = mapGrid.ToCoordinates(tile.GridIndices);
if (coordinates == EntityCoordinates.Invalid ||
!_interactionSystem.InRangeUnobstructed(eventArgs.User, coordinates, popup: true))
if (coordinates == EntityCoordinates.Invalid)
{
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)
{
//Floor mode just needs the tile to be a space tile (subFloor)

View File

@@ -77,6 +77,7 @@
name: air alarm assembly
description: An air alarm. Doesn't look like it'll be alarming air any time soon.
components:
- type: WallMount
- type: Clickable
- type: InteractionOutline
- type: Sprite

View File

@@ -61,6 +61,7 @@
name: fire alarm assembly
description: A fire alarm assembly. Very mild.
components:
- type: WallMount
- type: Clickable
- type: InteractionOutline
- type: Sprite