From 229f33f22a0c619a2a9aef41b45f06cc23367966 Mon Sep 17 00:00:00 2001 From: UpAndLeaves <92269094+Alpha-Two@users.noreply.github.com> Date: Mon, 14 Jul 2025 06:13:01 +0000 Subject: [PATCH] Voltage enum to shared (#38964) --- .../Power/Components/BaseNetConnectorComponent.cs | 8 +------- Content.Server/Power/Generator/PowerSwitchableSystem.cs | 1 + Content.Shared/Power/SharedPower.cs | 9 +++++++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Content.Server/Power/Components/BaseNetConnectorComponent.cs b/Content.Server/Power/Components/BaseNetConnectorComponent.cs index b22950c1a1..464bbd6f39 100644 --- a/Content.Server/Power/Components/BaseNetConnectorComponent.cs +++ b/Content.Server/Power/Components/BaseNetConnectorComponent.cs @@ -4,6 +4,7 @@ using Content.Server.NodeContainer; using Content.Server.NodeContainer.NodeGroups; using Content.Shared.NodeContainer; using Content.Shared.NodeContainer.NodeGroups; +using Content.Shared.Power; namespace Content.Server.Power.Components { @@ -94,11 +95,4 @@ namespace Content.Server.Power.Components TryFindAndSetNet(); } } - - public enum Voltage - { - High = NodeGroupID.HVPower, - Medium = NodeGroupID.MVPower, - Apc = NodeGroupID.Apc, - } } diff --git a/Content.Server/Power/Generator/PowerSwitchableSystem.cs b/Content.Server/Power/Generator/PowerSwitchableSystem.cs index 7b7d7ce256..25de3bd293 100644 --- a/Content.Server/Power/Generator/PowerSwitchableSystem.cs +++ b/Content.Server/Power/Generator/PowerSwitchableSystem.cs @@ -4,6 +4,7 @@ using Content.Server.Popups; using Content.Server.Power.Components; using Content.Server.Power.Nodes; using Content.Shared.NodeContainer; +using Content.Shared.Power; using Content.Shared.Power.Generator; using Content.Shared.Timing; using Content.Shared.Verbs; diff --git a/Content.Shared/Power/SharedPower.cs b/Content.Shared/Power/SharedPower.cs index da88198825..d45fb96cac 100644 --- a/Content.Shared/Power/SharedPower.cs +++ b/Content.Shared/Power/SharedPower.cs @@ -1,3 +1,4 @@ +using Content.Shared.NodeContainer.NodeGroups; using Robust.Shared.Serialization; namespace Content.Shared.Power @@ -31,4 +32,12 @@ namespace Content.Shared.Power MediumVoltage, Apc, } + + [Serializable, NetSerializable] + public enum Voltage + { + High = NodeGroupID.HVPower, + Medium = NodeGroupID.MVPower, + Apc = NodeGroupID.Apc, + } }