перенос общих файлов из папки White в _White
This commit is contained in:
27
Content.Shared/_White/Harpy/HarpySingerSystem.cs
Normal file
27
Content.Shared/_White/Harpy/HarpySingerSystem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Shared.Actions;
|
||||
|
||||
namespace Content.Shared._White.Harpy
|
||||
{
|
||||
public class HarpySingerSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<HarpySingerComponent, ComponentStartup>(OnStartup);
|
||||
SubscribeLocalEvent<HarpySingerComponent, ComponentShutdown>(OnShutdown);
|
||||
}
|
||||
|
||||
private void OnStartup(EntityUid uid, HarpySingerComponent component, ComponentStartup args)
|
||||
{
|
||||
_actionsSystem.AddAction(uid, ref component.MidiAction, component.MidiActionId);
|
||||
}
|
||||
|
||||
private void OnShutdown(EntityUid uid, HarpySingerComponent component, ComponentShutdown args)
|
||||
{
|
||||
_actionsSystem.RemoveAction(uid, component.MidiAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user