GoliathTentacleSystem.cs 1.0 KB

12345678910111213141516171819202122232425262728
  1. // SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
  2. // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
  3. //
  4. // SPDX-License-Identifier: AGPL-3.0-or-later
  5. using Content.Shared.Actions;
  6. namespace Content.Shared._Shitmed.GoliathTentacle;
  7. internal sealed class GoliathTentacleSystem : EntitySystem
  8. {
  9. [Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
  10. public override void Initialize()
  11. {
  12. SubscribeLocalEvent<GoliathTentacleComponent, ComponentStartup>(OnStartup);
  13. SubscribeLocalEvent<GoliathTentacleComponent, ComponentShutdown>(OnShutdown);
  14. }
  15. private void OnStartup(EntityUid uid, GoliathTentacleComponent component, ComponentStartup args)
  16. {
  17. _actionsSystem.AddAction(uid, ref component.ActionEntity, component.Action);
  18. }
  19. private void OnShutdown(EntityUid uid, GoliathTentacleComponent component, ComponentShutdown args)
  20. {
  21. _actionsSystem.RemoveAction(uid, component.ActionEntity);
  22. }
  23. }