diff --git a/Content.Server/Power/Pow3r/BatteryRampPegSolver.cs b/Content.Server/Power/Pow3r/BatteryRampPegSolver.cs index f21a37d824..17d1265260 100644 --- a/Content.Server/Power/Pow3r/BatteryRampPegSolver.cs +++ b/Content.Server/Power/Pow3r/BatteryRampPegSolver.cs @@ -7,16 +7,15 @@ namespace Content.Server.Power.Pow3r { public sealed class BatteryRampPegSolver : IPowerSolver { - private sealed class HeightComparer : IComparer + private sealed class HeightComparer : Comparer { public static HeightComparer Instance { get; } = new(); - public int Compare(Network? x, Network? y) + public override int Compare(Network? x, Network? y) { - if (ReferenceEquals(x, y)) return 0; - if (ReferenceEquals(null, y)) return 1; - if (ReferenceEquals(null, x)) return -1; - return x.Height.CompareTo(y.Height); + if (x!.Height == y!.Height) return 0; + if (x!.Height > y!.Height) return 1; + return -1; } }