mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
26 lines
737 B
C#
26 lines
737 B
C#
using Content.Shared.Actions;
|
|
|
|
namespace Content.Shared.Jaunt;
|
|
public sealed partial class JauntSystem : EntitySystem
|
|
{
|
|
[Dependency] private SharedActionsSystem _actions = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<JauntComponent, MapInitEvent>(OnInit);
|
|
SubscribeLocalEvent<JauntComponent, ComponentShutdown>(OnShutdown);
|
|
}
|
|
|
|
private void OnInit(Entity<JauntComponent> ent, ref MapInitEvent args)
|
|
{
|
|
_actions.AddAction(ent.Owner, ref ent.Comp.Action, ent.Comp.JauntAction);
|
|
}
|
|
|
|
private void OnShutdown(Entity<JauntComponent> ent, ref ComponentShutdown args)
|
|
{
|
|
_actions.RemoveAction(ent.Owner, ent.Comp.Action);
|
|
}
|
|
|
|
}
|
|
|