Fix Botcaps not getting set correctly
This commit is contained in:
@@ -81,10 +81,15 @@ public record Locations
|
||||
return _locationDictionaryCache;
|
||||
}
|
||||
|
||||
public string GetMappedKey(string key)
|
||||
{
|
||||
return _locationMappings.TryGetValue(key, out var value) ? value : key;
|
||||
}
|
||||
|
||||
private Dictionary<string, string> _locationMappings = new()
|
||||
{
|
||||
{ "factory4_day", "Factory4Day" },
|
||||
{ "bigmap", "bigmap" },
|
||||
{ "bigmap", "Bigmap" },
|
||||
{ "develop", "Develop" },
|
||||
{ "factory4_night", "Factory4Night" },
|
||||
{ "hideout", "Hideout" },
|
||||
|
||||
@@ -283,11 +283,13 @@ public class PostDbLoadService(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO: CWX Change the way we get Maps
|
||||
protected void AdjustLocationBotValues()
|
||||
{
|
||||
var mapsDb = _databaseService.GetLocations().GetDictionary();
|
||||
foreach (var (key, cap) in _botConfig.MaxBotCap) {
|
||||
if (!mapsDb.TryGetValue(key, out var map))
|
||||
if (!mapsDb.TryGetValue(_databaseService.GetLocations().GetMappedKey(key), out var map))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user