@@ -3,6 +3,7 @@ using Content.Server.Chat.Managers;
|
|||||||
using Content.Server.Radio.EntitySystems;
|
using Content.Server.Radio.EntitySystems;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
|
using Content.Shared.Interaction.Helpers;
|
||||||
using Content.Shared.Notification;
|
using Content.Shared.Notification;
|
||||||
using Content.Shared.Notification.Managers;
|
using Content.Shared.Notification.Managers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -80,8 +81,7 @@ namespace Content.Server.Radio.Components
|
|||||||
public bool CanListen(string message, IEntity source)
|
public bool CanListen(string message, IEntity source)
|
||||||
{
|
{
|
||||||
return RadioOn &&
|
return RadioOn &&
|
||||||
Owner.Transform.Coordinates.TryDistance(Owner.EntityManager, source.Transform.Coordinates, out var distance) &&
|
Owner.InRangeUnobstructed(source.Transform.Coordinates, range: ListenRange);
|
||||||
distance <= ListenRange;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Receive(string message, int channel, IEntity speaker)
|
public void Receive(string message, int channel, IEntity speaker)
|
||||||
|
|||||||
Reference in New Issue
Block a user