Remove IActivate (#9705)

* git mv

* purge IActivate

* File scoped NS
This commit is contained in:
Leon Friedrich
2022-07-14 22:29:29 +12:00
committed by GitHub
parent bad837fb85
commit e9616e40f9
5 changed files with 40 additions and 85 deletions

View File

@@ -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)