@@ -1,8 +1,9 @@
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Server.Radio.Components;
|
||||
using Content.Shared.Radio;
|
||||
using JetBrains.Annotations;
|
||||
using Content.Shared.Interaction;
|
||||
|
||||
namespace Content.Server.Radio.EntitySystems
|
||||
{
|
||||
@@ -15,6 +16,16 @@ namespace Content.Server.Radio.EntitySystems
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<HandheldRadioComponent, ExaminedEvent>(OnExamine);
|
||||
SubscribeLocalEvent<HandheldRadioComponent, ActivateInWorldEvent>(OnActivate);
|
||||
}
|
||||
|
||||
private void OnActivate(EntityUid uid, HandheldRadioComponent component, ActivateInWorldEvent args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
args.Handled = true;
|
||||
component.Use(args.User);
|
||||
}
|
||||
|
||||
private void OnExamine(EntityUid uid, HandheldRadioComponent component, ExaminedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user