1
0

AnomalySynchronizerComponent.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using Content.Shared.DeviceLinking;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.Anomaly.Components;
  5. /// <summary>
  6. /// a device that allows you to translate anomaly activity into multitool signals.
  7. /// </summary>
  8. [RegisterComponent, AutoGenerateComponentPause, Access(typeof(AnomalySynchronizerSystem))]
  9. public sealed partial class AnomalySynchronizerComponent : Component
  10. {
  11. /// <summary>
  12. /// The uid of the anomaly to which the synchronizer is connected.
  13. /// </summary>
  14. [DataField, ViewVariables(VVAccess.ReadWrite)]
  15. public EntityUid? ConnectedAnomaly;
  16. /// <summary>
  17. /// Should the anomaly pulse when connected to the synchronizer?
  18. /// </summary>
  19. [DataField]
  20. public bool PulseOnConnect = true;
  21. /// <summary>
  22. /// Should the anomaly pulse when disconnected from synchronizer?
  23. /// </summary>
  24. [DataField]
  25. public bool PulseOnDisconnect = false;
  26. /// <summary>
  27. /// minimum distance from the synchronizer to the anomaly to be attached
  28. /// </summary>
  29. [DataField]
  30. public float AttachRange = 0.4f;
  31. /// <summary>
  32. /// Periodicheski checks to see if the anomaly has moved to disconnect it.
  33. /// </summary>
  34. [DataField]
  35. public TimeSpan CheckFrequency = TimeSpan.FromSeconds(1f);
  36. [DataField, AutoPausedField]
  37. public TimeSpan NextCheckTime = TimeSpan.Zero;
  38. [DataField]
  39. public ProtoId<SourcePortPrototype> DecayingPort = "Decaying";
  40. [DataField]
  41. public ProtoId<SourcePortPrototype> StabilizePort = "Stabilize";
  42. [DataField]
  43. public ProtoId<SourcePortPrototype> GrowingPort = "Growing";
  44. [DataField]
  45. public ProtoId<SourcePortPrototype> PulsePort = "Pulse";
  46. [DataField]
  47. public ProtoId<SourcePortPrototype> SupercritPort = "Supercritical";
  48. [DataField, ViewVariables(VVAccess.ReadWrite)]
  49. public SoundSpecifier ConnectedSound = new SoundPathSpecifier("/Audio/Machines/anomaly_sync_connect.ogg");
  50. [DataField, ViewVariables(VVAccess.ReadWrite)]
  51. public SoundSpecifier DisconnectedSound = new SoundPathSpecifier("/Audio/Machines/anomaly_sync_connect.ogg");
  52. }