1
0

SharedFirestarterSystem.cs 754 B

123456789101112131415161718192021222324
  1. using Content.Shared.Actions;
  2. using Content.Shared.Atmos.Components;
  3. namespace Content.Shared.Atmos.EntitySystems;
  4. public abstract class SharedFirestarterSystem : EntitySystem
  5. {
  6. [Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
  7. public override void Initialize()
  8. {
  9. base.Initialize();
  10. SubscribeLocalEvent<FirestarterComponent, ComponentInit>(OnComponentInit);
  11. }
  12. /// <summary>
  13. /// Adds the firestarter action.
  14. /// </summary>
  15. private void OnComponentInit(EntityUid uid, FirestarterComponent component, ComponentInit args)
  16. {
  17. _actionsSystem.AddAction(uid, ref component.FireStarterActionEntity, component.FireStarterAction, uid);
  18. Dirty(uid, component);
  19. }
  20. }