Electrocution. (#4958)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
Vera Aguilera Puerto
2021-10-25 16:21:56 +02:00
committed by GitHub
parent 66a3d5bf29
commit ed3bf94a3b
37 changed files with 934 additions and 30 deletions

View File

@@ -8,7 +8,14 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Power.Components
{
public abstract class BaseNetConnectorComponent<TNetType> : Component
public interface IBaseNetConnectorComponent<in TNetType>
{
public TNetType? Net { set; }
public Voltage Voltage { get; }
public string? NodeId { get; }
}
public abstract class BaseNetConnectorComponent<TNetType> : Component, IBaseNetConnectorComponent<TNetType>
{
[ViewVariables(VVAccess.ReadWrite)]
public Voltage Voltage { get => _voltage; set => SetVoltage(value); }
@@ -22,7 +29,7 @@ namespace Content.Server.Power.Components
[ViewVariables]
private bool _needsNet => _net != null;
[DataField("node")] [ViewVariables] public string? NodeId;
[DataField("node")] [ViewVariables] public string? NodeId { get; set; }
protected override void Initialize()
{