From 9bd5c2a401bb620daa543d260d49f89182517f18 Mon Sep 17 00:00:00 2001 From: Cj <161484149+CJ-SPT@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:08:59 -0400 Subject: [PATCH] Prefer fallthrough over `or` and newline --- .../Generators/BotEquipmentModGenerator.cs | 3 ++- .../SPTarkov.Server.Core/Helpers/DurabilityLimitsHelper.cs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs index e084821e..cc5daa2a 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs @@ -176,7 +176,8 @@ public class BotEquipmentModGenerator( ); switch (plateSlotFilteringOutcome.Result) { - case Result.UNKNOWN_FAILURE or Result.NO_DEFAULT_FILTER: + case Result.UNKNOWN_FAILURE: + case Result.NO_DEFAULT_FILTER: if (logger.IsLogEnabled(LogLevel.Debug)) { logger.Debug( diff --git a/Libraries/SPTarkov.Server.Core/Helpers/DurabilityLimitsHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/DurabilityLimitsHelper.cs index 9e3f854b..4c599f40 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/DurabilityLimitsHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/DurabilityLimitsHelper.cs @@ -149,7 +149,8 @@ public class DurabilityLimitsHelper( { switch (botRole) { - case null or "default": + case null + or "default": return _botConfig.Durability.Default.Weapon.LowestMax; case "pmc": return _botConfig.Durability.Pmc.Weapon.LowestMax; @@ -167,7 +168,8 @@ public class DurabilityLimitsHelper( { switch (botRole) { - case null or "default": + case null: + case "default": return _botConfig.Durability.Default.Weapon.HighestMax; case "pmc": return _botConfig.Durability.Pmc.Weapon.HighestMax;