SharedCommsHackerSystem.cs 785 B

12345678910111213141516171819202122232425262728
  1. using Content.Shared.DoAfter;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Communications;
  4. /// <summary>
  5. /// Only exists in shared to provide API and for access.
  6. /// All logic is serverside.
  7. /// </summary>
  8. public abstract class SharedCommsHackerSystem : EntitySystem
  9. {
  10. /// <summary>
  11. /// Set the threats prototype to choose from when hacking a comms console.
  12. /// </summary>
  13. public void SetThreats(EntityUid uid, string threats, CommsHackerComponent? comp = null)
  14. {
  15. if (!Resolve(uid, ref comp))
  16. return;
  17. comp.Threats = threats;
  18. }
  19. }
  20. /// <summary>
  21. /// DoAfter event for comms console terror ability.
  22. /// </summary>
  23. [Serializable, NetSerializable]
  24. public sealed partial class TerrorDoAfterEvent : SimpleDoAfterEvent { }