Set correct type on global LocationInfection
This commit is contained in:
@@ -12,7 +12,7 @@ public record Globals
|
||||
public required Config Configuration { get; init; }
|
||||
|
||||
[JsonPropertyName("LocationInfection")]
|
||||
public required LocationInfection LocationInfection { get; init; }
|
||||
public required Dictionary<string, int> LocationInfection { get; init; }
|
||||
|
||||
[JsonPropertyName("bot_presets")]
|
||||
public required IEnumerable<BotPreset> BotPresets { get; init; }
|
||||
|
||||
@@ -738,7 +738,7 @@ public class SeasonalEventService(
|
||||
infectionHalloween.DisplayUIEnabled = true;
|
||||
infectionHalloween.Enabled = true;
|
||||
|
||||
var globalInfectionDict = globals.LocationInfection.GetAllPropertiesAsDictionary();
|
||||
var globalInfectionDict = globals.LocationInfection;
|
||||
foreach (var (locationId, infectionPercentage) in zombieSettings.MapInfectionAmount)
|
||||
{
|
||||
// calculate a random value unless the rate is 100
|
||||
@@ -758,7 +758,7 @@ public class SeasonalEventService(
|
||||
}
|
||||
|
||||
// Globals data needs value updated too
|
||||
globalInfectionDict[locationId] = randomInfectionPercentage;
|
||||
globalInfectionDict[locationId] = Convert.ToInt32(randomInfectionPercentage);
|
||||
}
|
||||
|
||||
foreach (var locationId in zombieSettings.DisableBosses)
|
||||
|
||||
Reference in New Issue
Block a user