Sync with changes made to node since 35146

This commit is contained in:
Chomp
2025-03-04 16:19:47 +00:00
parent ade0fd6e22
commit 4939efa273
93 changed files with 36301 additions and 45199 deletions
+5 -3
View File
@@ -346,8 +346,10 @@ public class BotController(
/// <returns>bot cap for map</returns>
public int GetBotCap(string location)
{
var botCap = _botConfig.MaxBotCap.FirstOrDefault(x =>
string.Equals(x.Key.ToLower(), location.ToLower(), StringComparison.OrdinalIgnoreCase));
if (!_botConfig.MaxBotCap.TryGetValue(location.ToLower(), out var maxCap))
{
return _botConfig.MaxBotCap["default"];
}
if (location == "default")
{
_logger.Warning(
@@ -355,7 +357,7 @@ public class BotController(
);
}
return botCap.Value;
return maxCap;
}
/// <summary>