ExtensionCableProviderComponent.cs 883 B

1234567891011121314151617181920212223242526
  1. using Content.Server.Power.EntitySystems;
  2. namespace Content.Server.Power.Components
  3. {
  4. [RegisterComponent]
  5. [Access(typeof(ExtensionCableSystem))]
  6. public sealed partial class ExtensionCableProviderComponent : Component
  7. {
  8. /// <summary>
  9. /// The max distance this can connect to <see cref="ExtensionCableReceiverComponent"/>s from.
  10. /// </summary>
  11. [ViewVariables(VVAccess.ReadWrite)]
  12. [DataField("transferRange")]
  13. public int TransferRange { get; set; } = 3;
  14. [ViewVariables] public List<ExtensionCableReceiverComponent> LinkedReceivers { get; } = new();
  15. /// <summary>
  16. /// If <see cref="ExtensionCableReceiverComponent"/>s should consider connecting to this.
  17. /// </summary>
  18. [ViewVariables(VVAccess.ReadWrite)]
  19. public bool Connectable { get; set; } = true;
  20. }
  21. }