0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-12 17:10:44 -05:00

Rename property to improve clarity

This commit is contained in:
Chomp 2024-11-22 22:43:29 +00:00
parent 25801e3eda
commit a0d37fb35d

View File

@ -30,24 +30,24 @@ namespace SPT.Custom.Patches
// Get settings from server
var json = RequestHandler.GetJson("/singleplayer/settings/raid/menu");
var settings = Json.Deserialize<DefaultRaidSettings>(json);
var defaultSettings = Json.Deserialize<DefaultRaidSettings>(json);
// TODO: Not all settings are used and they also don't cover all the new settings that are available client-side
if (settings == null)
if (defaultSettings == null)
{
return;
}
// We use PVE mode from Tarkov now we need to modify PVE MODE instead of ONLINE Mode
offlineRaidSettings.BotSettings.BotAmount = settings.AiAmount;
offlineRaidSettings.WavesSettings.BotAmount = settings.AiAmount;
offlineRaidSettings.WavesSettings.BotDifficulty = settings.AiDifficulty;
offlineRaidSettings.WavesSettings.IsBosses = settings.BossEnabled;
offlineRaidSettings.BotSettings.BotAmount = defaultSettings.AiAmount;
offlineRaidSettings.WavesSettings.BotAmount = defaultSettings.AiAmount;
offlineRaidSettings.WavesSettings.BotDifficulty = defaultSettings.AiDifficulty;
offlineRaidSettings.WavesSettings.IsBosses = defaultSettings.BossEnabled;
offlineRaidSettings.BotSettings.IsScavWars = false;
offlineRaidSettings.WavesSettings.IsTaggedAndCursed = settings.TaggedAndCursed;
offlineRaidSettings.TimeAndWeatherSettings.IsRandomWeather = settings.RandomWeather;
offlineRaidSettings.TimeAndWeatherSettings.IsRandomTime = settings.RandomTime;
offlineRaidSettings.WavesSettings.IsTaggedAndCursed = defaultSettings.TaggedAndCursed;
offlineRaidSettings.TimeAndWeatherSettings.IsRandomWeather = defaultSettings.RandomWeather;
offlineRaidSettings.TimeAndWeatherSettings.IsRandomTime = defaultSettings.RandomTime;
}
[PatchPostfix]