CatStation/Content.Shared/Jaunt/JauntSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

26 lines
740 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);
}
}