GeneratorSignalControlComponent.cs 959 B

123456789101112131415161718192021222324252627282930
  1. using Content.Shared.DeviceLinking;
  2. using Content.Shared.Power.Generator;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.Power.Generator;
  5. /// <summary>
  6. /// When attached to an entity with <see cref="FuelGeneratorComponent"/> it will allow the signal network to exert control over the generator.
  7. /// </summary>
  8. [RegisterComponent]
  9. public sealed partial class GeneratorSignalControlComponent: Component
  10. {
  11. /// <summary>
  12. /// The port that should be invoked when turning the generator on.
  13. /// </summary>
  14. [DataField]
  15. public ProtoId<SinkPortPrototype> OnPort = "On";
  16. /// <summary>
  17. /// The port that should be invoked when turning the generator off.
  18. /// </summary>
  19. [DataField]
  20. public ProtoId<SinkPortPrototype> OffPort = "Off";
  21. /// <summary>
  22. /// The port that should be invoked when toggling the generator.
  23. /// </summary>
  24. [DataField]
  25. public ProtoId<SinkPortPrototype> TogglePort = "Toggle";
  26. }