Files
tbd-station-14/Content.Server/Power/Components/ExtensionCableReceiverComponent.cs
Julian Giebel 45caf25ea9 Apc device network and apc based light switch (#4908)
* 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>
2021-10-23 16:23:19 -07:00

29 lines
913 B
C#

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 ExtensionCableReceiverComponent : Component
{
public override string Name => "ExtensionCableReceiver";
[ViewVariables]
public ExtensionCableProviderComponent? Provider { get; set; }
[ViewVariables]
public bool Connectable = false;
/// <summary>
/// The max distance from a <see cref="ExtensionCableProviderComponent"/> that this can receive power from.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("receptionRange")]
public int ReceptionRange { get; set; } = 3;
}
}