DelayWireAction.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.Administration.Logs;
  8. using Content.Shared.Database;
  9. using Content.Shared.Defusable;
  10. using Content.Shared.Doors;
  11. using Content.Shared.Doors.Components;
  12. using Content.Shared.Wires;
  13. using Robust.Server.GameObjects;
  14. namespace Content.Server.Defusable.WireActions;
  15. public sealed partial class DelayWireAction : ComponentWireAction<DefusableComponent>
  16. {
  17. public override Color Color { get; set; } = Color.Yellow;
  18. public override string Name { get; set; } = "wire-name-bomb-delay";
  19. public override bool LightRequiresPower { get; set; } = false;
  20. public override StatusLightState? GetLightState(Wire wire, DefusableComponent comp)
  21. {
  22. return comp.DelayWireUsed ? StatusLightState.On : StatusLightState.Off;
  23. }
  24. public override object StatusKey { get; } = DefusableWireStatus.DelayIndicator;
  25. public override bool Cut(EntityUid user, Wire wire, DefusableComponent comp)
  26. {
  27. return true;
  28. }
  29. public override bool Mend(EntityUid user, Wire wire, DefusableComponent comp)
  30. {
  31. return true;
  32. }
  33. public override void Pulse(EntityUid user, Wire wire, DefusableComponent comp)
  34. {
  35. EntityManager.System<DefusableSystem>().DelayWirePulse(user, wire, comp);
  36. }
  37. }