diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs index ac2db192..d5d9f2c7 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs @@ -190,11 +190,11 @@ public class BotInventoryGenerator( if ( randomistionDetails?.NighttimeChanges is not null && raidConfig is not null && - _weatherHelper.IsNightTime(raidConfig.TimeVariant) + _weatherHelper.IsNightTime(raidConfig.TimeVariant, raidConfig.Location) ) { foreach (var equipmentSlotKvP in randomistionDetails.NighttimeChanges.EquipmentModsModifiers) - // Never let mod chance go outside of 0 - 100 + // Never let mod chance go outside 0 - 100 { randomistionDetails.EquipmentMods[equipmentSlotKvP.Key] = Math.Min( Math.Max(randomistionDetails.EquipmentMods[equipmentSlotKvP.Key] + equipmentSlotKvP.Value, 0), diff --git a/Libraries/SPTarkov.Server.Core/Helpers/WeatherHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/WeatherHelper.cs index 61670378..222570f6 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/WeatherHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/WeatherHelper.cs @@ -41,9 +41,19 @@ public class WeatherHelper( /// Is the current raid at nighttime /// /// PASS OR CURR (from raid settings) + /// map name. E.g. factory4_day /// True when nighttime - public bool IsNightTime(DateTimeEnum timeVariant) + public bool IsNightTime(DateTimeEnum timeVariant, string mapLocation) { + switch (mapLocation) + { + // Factory differs from other maps, has static times + case "factory4_night": + return true; + case "factory4_day": + return false; + } + var time = GetInRaidTime(); // getInRaidTime() provides left side value, if player chose right side, set ahead 12 hrs