Files
tbd-station-14/Content.Server/Power/Components/ExtensionCableProviderComponent.cs
2022-02-16 18:23:23 +11:00

32 lines
1.0 KiB
C#

using System.Collections.Generic;
using Content.Server.Power.EntitySystems;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Power.Components
{
[RegisterComponent]
[Friend(typeof(ExtensionCableSystem))]
public sealed class ExtensionCableProviderComponent : Component
{
/// <summary>
/// The max distance this can connect to <see cref="ExtensionCableReceiverComponent"/>s from.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("transferRange")]
public int TransferRange { get; set; } = 3;
[ViewVariables] public List<ExtensionCableReceiverComponent> LinkedReceivers { get; } = new();
/// <summary>
/// If <see cref="ExtensionCableReceiverComponent"/>s should consider connecting to this.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public bool Connectable { get; set; } = true;
}
}