From 44b9192986f90e124ca57e6ef993e23c47f5c778 Mon Sep 17 00:00:00 2001 From: Fansana <116083121+Fansana@users.noreply.github.com> Date: Sat, 14 Dec 2024 16:27:02 +0100 Subject: [PATCH] Update PowerNetSystem.cs --- .../Power/EntitySystems/PowerNetSystem.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Content.Server/Power/EntitySystems/PowerNetSystem.cs b/Content.Server/Power/EntitySystems/PowerNetSystem.cs index 2d80c810e2..1c395c224a 100644 --- a/Content.Server/Power/EntitySystems/PowerNetSystem.cs +++ b/Content.Server/Power/EntitySystems/PowerNetSystem.cs @@ -3,11 +3,9 @@ using Content.Server.Power.Components; using Content.Server.Power.NodeGroups; using Content.Server.Power.Pow3r; -using Content.Shared.CCVar; using Content.Shared.Power; using JetBrains.Annotations; using Robust.Server.GameObjects; -using Robust.Shared.Configuration; using Robust.Shared.Threading; namespace Content.Server.Power.EntitySystems @@ -20,21 +18,19 @@ public sealed class PowerNetSystem : EntitySystem { [Dependency] private readonly AppearanceSystem _appearance = default!; [Dependency] private readonly PowerNetConnectorSystem _powerNetConnector = default!; - [Dependency] private readonly IConfigurationManager _cfg = default!; [Dependency] private readonly IParallelManager _parMan = default!; private readonly PowerState _powerState = new(); private readonly HashSet _powerNetReconnectQueue = new(); private readonly HashSet _apcNetReconnectQueue = new(); - private BatteryRampPegSolver _solver = new(); - + private readonly BatteryRampPegSolver _solver = new(); + public override void Initialize() { base.Initialize(); UpdatesAfter.Add(typeof(NodeGroupSystem)); - _solver = new(_cfg.GetCVar(CCVars.DebugPow3rDisableParallel)); SubscribeLocalEvent(ApcPowerReceiverInit); SubscribeLocalEvent(ApcPowerReceiverShutdown); @@ -57,12 +53,6 @@ public override void Initialize() SubscribeLocalEvent(PowerSupplierPaused); SubscribeLocalEvent(PowerSupplierUnpaused); - Subs.CVar(_cfg, CCVars.DebugPow3rDisableParallel, DebugPow3rDisableParallelChanged); - } - - private void DebugPow3rDisableParallelChanged(bool val) - { - _solver = new(val); } private void ApcPowerReceiverInit(EntityUid uid, ApcPowerReceiverComponent component, ComponentInit args)