.NET Format Style Fixes

This commit is contained in:
chompDev
2025-06-24 18:23:28 +00:00
committed by Format Bot
parent 5bba5a7cd7
commit ea0b1dab08
@@ -806,18 +806,22 @@ public class SeasonalEventService(
foreach (var (locationId, infectionPercentage) in zombieSettings.MapInfectionAmount)
{
// calculate a random value unless the rate is 100
double randomInfectionPercentage = infectionPercentage == 100
? infectionPercentage
: Convert.ToDouble(_randomUtil.GetInt(Convert.ToInt32(infectionPercentage), 100));
double randomInfectionPercentage =
infectionPercentage == 100
? infectionPercentage
: Convert.ToDouble(
_randomUtil.GetInt(Convert.ToInt32(infectionPercentage), 100)
);
if (_logger.IsLogEnabled(LogLevel.Debug))
_logger.Debug($"Percent infected from map {locationId} is {randomInfectionPercentage}");
_logger.Debug(
$"Percent infected from map {locationId} is {randomInfectionPercentage}"
);
// Infection rates sometimes apply to multiple maps, e.g. Factory day/night or Sandbox/sandbox_high
// Get the list of maps that should have infection value applied to their base
// 90% of locations are just 1 map e.g. bigmap = customs
var mappedLocations = GetLocationFromInfectedLocation(locationId);
foreach (var locationKey in mappedLocations)
{
_databaseService
.GetLocation(locationKey)
.Base.Events.Halloween2024.InfectionPercentage = randomInfectionPercentage;