Literally Murder IExamine (#7352)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Server.Radio.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.Radio.EntitySystems
|
||||
{
|
||||
@@ -11,6 +10,19 @@ namespace Content.Server.Radio.EntitySystems
|
||||
{
|
||||
private readonly List<string> _messages = new();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<HandheldRadioComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
|
||||
private void OnExamine(EntityUid uid, HandheldRadioComponent component, ExaminedEvent args)
|
||||
{
|
||||
if (!args.IsInDetailsRange)
|
||||
return;
|
||||
args.PushMarkup(Loc.GetString("handheld-radio-component-on-examine",("frequency", component.BroadcastFrequency)));
|
||||
}
|
||||
|
||||
public void SpreadMessage(IRadio source, EntityUid speaker, string message, int channel)
|
||||
{
|
||||
if (_messages.Contains(message)) return;
|
||||
|
||||
Reference in New Issue
Block a user