.NET Format Style Fixes

This commit is contained in:
refringe
2025-06-18 17:09:20 +00:00
committed by Format Bot
parent ca0a7d6345
commit 6e01428b2b
774 changed files with 23507 additions and 40003 deletions
@@ -81,16 +81,25 @@ public class WeatherGenerator(
Temperature = 0,
Fog = GetWeightedFog(weatherValues),
RainIntensity =
rain > 1 ? GetRandomDouble(weatherValues.RainIntensity.Min, weatherValues.RainIntensity.Max) : 0,
rain > 1
? GetRandomDouble(
weatherValues.RainIntensity.Min,
weatherValues.RainIntensity.Max
)
: 0,
Rain = rain,
WindGustiness = GetRandomDouble(weatherValues.WindGustiness.Min, weatherValues.WindGustiness.Max, 2),
WindGustiness = GetRandomDouble(
weatherValues.WindGustiness.Min,
weatherValues.WindGustiness.Max,
2
),
WindDirection = GetWeightedWindDirection(weatherValues),
WindSpeed = GetWeightedWindSpeed(weatherValues),
Cloud = clouds,
Time = "",
Date = "",
Timestamp = 0,
SptInRaidTimestamp = 0
SptInRaidTimestamp = 0,
};
SetCurrentDateTime(result, timestamp);
@@ -102,7 +111,10 @@ public class WeatherGenerator(
protected SeasonalValues GetWeatherValuesBySeason(Season currentSeason)
{
var result = _weatherConfig.Weather.SeasonValues.TryGetValue(currentSeason.ToString(), out var value);
var result = _weatherConfig.Weather.SeasonValues.TryGetValue(
currentSeason.ToString(),
out var value
);
if (!result)
{
return _weatherConfig.Weather.SeasonValues["default"];
@@ -137,9 +149,13 @@ public class WeatherGenerator(
{
var inRaidTime = timestamp is null
? _weatherHelper.GetInRaidTime()
: _weatherHelper.GetInRaidTime(timestamp.Value);
: _weatherHelper.GetInRaidTime(timestamp.Value);
var normalTime = GetBsgFormattedTime(inRaidTime);
var formattedDate = _timeUtil.FormatDate(timestamp.HasValue ? _timeUtil.GetDateTimeFromTimeStamp(timestamp.Value) : DateTime.UtcNow);
var formattedDate = _timeUtil.FormatDate(
timestamp.HasValue
? _timeUtil.GetDateTimeFromTimeStamp(timestamp.Value)
: DateTime.UtcNow
);
var datetimeBsgFormat = $"{formattedDate} {normalTime}";
weather.Timestamp = timestamp ?? _timeUtil.GetTimeStamp(); // matches weather.date
@@ -150,17 +166,23 @@ public class WeatherGenerator(
protected WindDirection GetWeightedWindDirection(SeasonalValues weather)
{
return _weightedRandomHelper.WeightedRandom(weather.WindDirection.Values, weather.WindDirection.Weights).Item;
return _weightedRandomHelper
.WeightedRandom(weather.WindDirection.Values, weather.WindDirection.Weights)
.Item;
}
protected double GetWeightedClouds(SeasonalValues weather)
{
return _weightedRandomHelper.WeightedRandom(weather.Clouds.Values, weather.Clouds.Weights).Item;
return _weightedRandomHelper
.WeightedRandom(weather.Clouds.Values, weather.Clouds.Weights)
.Item;
}
protected double GetWeightedWindSpeed(SeasonalValues weather)
{
return _weightedRandomHelper.WeightedRandom(weather.WindSpeed.Values, weather.WindSpeed.Weights).Item;
return _weightedRandomHelper
.WeightedRandom(weather.WindSpeed.Values, weather.WindSpeed.Weights)
.Item;
}
protected double GetWeightedFog(SeasonalValues weather)