mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 07:30:43 -05:00
Formatting improvements
This commit is contained in:
parent
47b6f926f5
commit
814470f93c
@ -64,23 +64,24 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
|||||||
// Set new raid time
|
// Set new raid time
|
||||||
____raidSettings.SelectedLocation.EscapeTimeLimit = serverResult.RaidTimeMinutes;
|
____raidSettings.SelectedLocation.EscapeTimeLimit = serverResult.RaidTimeMinutes;
|
||||||
|
|
||||||
// Reset survival time
|
// Handle survival time changes
|
||||||
AdjustSurviveTimeForExtraction(serverResult.OriginalSurvivalTimeSeconds);
|
AdjustSurviveTimeForExtraction(serverResult.OriginalSurvivalTimeSeconds);
|
||||||
if (serverResult.NewSurviveTimeSeconds.HasValue)
|
if (serverResult.NewSurviveTimeSeconds.HasValue)
|
||||||
{
|
{
|
||||||
AdjustSurviveTimeForExtraction(serverResult.NewSurviveTimeSeconds.Value);
|
AdjustSurviveTimeForExtraction(serverResult.NewSurviveTimeSeconds.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle exit changes
|
||||||
ResetMapExits(____raidSettings.SelectedLocation, originalLocationSettings[currentMapId]);
|
ResetMapExits(____raidSettings.SelectedLocation, originalLocationSettings[currentMapId]);
|
||||||
if (serverResult.ExitChanges != null && serverResult.ExitChanges.Count > 0)
|
if (serverResult.ExitChanges != null && serverResult.ExitChanges.Count > 0)
|
||||||
{
|
{
|
||||||
AdjustExtracts(____raidSettings.SelectedLocation, serverResult.ExitChanges);
|
AdjustMapExits(____raidSettings.SelectedLocation, serverResult.ExitChanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConsoleScreen.LogError($"Finished");
|
|
||||||
return true; // Do original method
|
return true; // Do original method
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AdjustExtracts(LocationSettingsClass.Location location, List<ExitChanges> exitChangesToApply)
|
private static void AdjustMapExits(LocationSettingsClass.Location location, List<ExitChanges> exitChangesToApply)
|
||||||
{
|
{
|
||||||
// Loop over each exit change from server
|
// Loop over each exit change from server
|
||||||
foreach (var exitChange in exitChangesToApply)
|
foreach (var exitChange in exitChangesToApply)
|
||||||
@ -147,7 +148,6 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
|||||||
private static void AdjustSurviveTimeForExtraction(int newSurvivalTimeSeconds)
|
private static void AdjustSurviveTimeForExtraction(int newSurvivalTimeSeconds)
|
||||||
{
|
{
|
||||||
var matchEndConfig = Singleton<BackendConfigSettingsClass>.Instance.Experience.MatchEnd;
|
var matchEndConfig = Singleton<BackendConfigSettingsClass>.Instance.Experience.MatchEnd;
|
||||||
ConsoleScreen.LogError($"Changed survive time to {newSurvivalTimeSeconds}");
|
|
||||||
matchEndConfig.SurvivedTimeRequirement = newSurvivalTimeSeconds;
|
matchEndConfig.SurvivedTimeRequirement = newSurvivalTimeSeconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user