1
0

ActivateWireAction.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Content.Server.Defusable.Components;
  2. using Content.Server.Defusable.Systems;
  3. using Content.Server.Doors.Systems;
  4. using Content.Server.Explosion.EntitySystems;
  5. using Content.Server.Popups;
  6. using Content.Server.Wires;
  7. using Content.Shared.Defusable;
  8. using Content.Shared.Doors;
  9. using Content.Shared.Doors.Components;
  10. using Content.Shared.Wires;
  11. namespace Content.Server.Defusable.WireActions;
  12. public sealed partial class ActivateWireAction : ComponentWireAction<DefusableComponent>
  13. {
  14. public override Color Color { get; set; } = Color.Lime;
  15. public override string Name { get; set; } = "wire-name-bomb-live";
  16. public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
  17. {
  18. return comp.Activated ? StatusLightState.BlinkingFast : StatusLightState.Off;
  19. }
  20. public override object StatusKey { get; } = DefusableWireStatus.LiveIndicator;
  21. public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
  22. {
  23. return EntityManager.System<DefusableSystem>().ActivateWireCut(user, wire, comp);
  24. }
  25. public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
  26. {
  27. // if its not disposable defusable system already handles* this
  28. // *probably
  29. return true;
  30. }
  31. public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
  32. {
  33. EntityManager.System<DefusableSystem>().ActivateWirePulse(user, wire, comp);
  34. }
  35. }