From e9b49b00efb1d6ad604f67a0276e5798f5877856 Mon Sep 17 00:00:00 2001 From: Kyle Tyo <36606155+VerinSenpai@users.noreply.github.com> Date: Sat, 19 Apr 2025 08:37:10 -0400 Subject: [PATCH] Fix a minor warning in BatterySystem.cs (#36726) change timing from protected to private, rename, and adjust references. --- Content.Server/Power/EntitySystems/BatterySystem.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Content.Server/Power/EntitySystems/BatterySystem.cs b/Content.Server/Power/EntitySystems/BatterySystem.cs index 6e636622e6..89e3ed2c1f 100644 --- a/Content.Server/Power/EntitySystems/BatterySystem.cs +++ b/Content.Server/Power/EntitySystems/BatterySystem.cs @@ -13,7 +13,7 @@ namespace Content.Server.Power.EntitySystems [UsedImplicitly] public sealed class BatterySystem : EntitySystem { - [Dependency] protected readonly IGameTiming Timing = default!; + [Dependency] private readonly IGameTiming _timing = default!; public override void Initialize() { @@ -92,7 +92,7 @@ namespace Content.Server.Power.EntitySystems if (comp.AutoRechargePause) { - if (comp.NextAutoRecharge > Timing.CurTime) + if (comp.NextAutoRecharge > _timing.CurTime) continue; } @@ -179,7 +179,7 @@ namespace Content.Server.Power.EntitySystems if (value < 0) value = batteryself.AutoRechargePauseTime; - if (Timing.CurTime + TimeSpan.FromSeconds(value) <= batteryself.NextAutoRecharge) + if (_timing.CurTime + TimeSpan.FromSeconds(value) <= batteryself.NextAutoRecharge) return; SetChargeCooldown(uid, batteryself.AutoRechargePauseTime, batteryself); @@ -194,9 +194,9 @@ namespace Content.Server.Power.EntitySystems return; if (value >= 0) - batteryself.NextAutoRecharge = Timing.CurTime + TimeSpan.FromSeconds(value); + batteryself.NextAutoRecharge = _timing.CurTime + TimeSpan.FromSeconds(value); else - batteryself.NextAutoRecharge = Timing.CurTime; + batteryself.NextAutoRecharge = _timing.CurTime; } ///