From b5ff9106ae19144e0cba7fa9a191b1cc43f572d5 Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 27 Aug 2025 14:13:14 +0100 Subject: [PATCH] Reduced logging to debug: `GetAggressorBonusByDifficulty` and `GetStandingChangeForKillByDifficulty` + improved message text Inverted logic so happy path is first --- .../Generators/BotGenerator.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs index 1fac76df..ad281764 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotGenerator.cs @@ -328,14 +328,14 @@ public class BotGenerator( /// Standing change value protected double GetStandingChangeForKillByDifficulty(Dictionary standingsForKill, string botDifficulty, string role) { - if (!standingsForKill.TryGetValue(botDifficulty.ToLowerInvariant(), out var result)) + if (standingsForKill.TryGetValue(botDifficulty.ToLowerInvariant(), out var result)) { - logger.Warning($"Unable to find standing for kill value for: {role} {botDifficulty}, falling back to `normal`"); - - return standingsForKill["normal"]; + return result; } - return result; + logger.Debug($"Unable to find 'standing for kill' value for: {role} {botDifficulty}, using `normal` value"); + + return standingsForKill["normal"]; } /// @@ -347,14 +347,14 @@ public class BotGenerator( /// Standing change value protected double GetAggressorBonusByDifficulty(Dictionary aggressorBonuses, string botDifficulty, string role) { - if (!aggressorBonuses.TryGetValue(botDifficulty.ToLowerInvariant(), out var result)) + if (aggressorBonuses.TryGetValue(botDifficulty.ToLowerInvariant(), out var result)) { - logger.Warning($"Unable to find aggressor bonus for kill value for: {role} {botDifficulty}, falling back to `normal`"); - - return aggressorBonuses["normal"]; + return result; } - return result; + logger.Debug($"Unable to find 'aggressor bonus for kill' value for: {role} {botDifficulty}, using `normal` value"); + + return aggressorBonuses["normal"]; } ///