* Remove WireNet node group from cables Implement extension cable components and system Remove connection over distance logic from ApcPower... components * Add extension cable components to prototypes * Implement ApcNetwork Implement ApcNetSwitch * Fix ignoredComponents.cs * Add friend attribute to new components * Add construction graph for a light switch * Address reviews * Fix broken test * Move ConnectionType enum to DeviceNetworkComponent Change netId data definition to use the ConnectionType enum values Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
34 lines
1.1 KiB
C#
34 lines
1.1 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 class ExtensionCableProviderComponent : Component
|
|
{
|
|
public override string Name => "ExtensionCableProvider";
|
|
|
|
/// <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;
|
|
|
|
|
|
}
|
|
}
|