Release 1.11.4.1 (Winter Update)
This commit is contained in:
@@ -30,11 +30,23 @@ namespace Barotrauma
|
||||
: base(preset)
|
||||
{
|
||||
Location[] locations = { GameMain.GameSession.StartLocation, GameMain.GameSession.EndLocation };
|
||||
var mission = Mission.LoadRandom(locations, seed, requireCorrectLocationType: false, missionTypes, difficultyLevel: GameMain.NetworkMember.ServerSettings.SelectedLevelDifficulty);
|
||||
float difficulty = GameMain.NetworkMember.ServerSettings.SelectedLevelDifficulty;
|
||||
var mission = Mission.LoadRandom(locations, seed, requireCorrectLocationType: false, missionTypes, difficultyLevel: difficulty);
|
||||
if (mission == null)
|
||||
{
|
||||
DebugConsole.AddWarning(
|
||||
$"Could not find any missions matching the mission types {string.Join(", ", missionTypes.Select(m => m.Value))} " +
|
||||
$"and the difficulty {difficulty}. Ignoring the difficulty requirement...");
|
||||
mission = Mission.LoadRandom(locations, seed, requireCorrectLocationType: false, missionTypes);
|
||||
}
|
||||
if (mission != null)
|
||||
{
|
||||
missions.Add(mission);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.AddWarning($"Could not find any missions matching the mission types {string.Join(", ", missionTypes.Select(m => m.Value))}.");
|
||||
}
|
||||
}
|
||||
|
||||
protected static IEnumerable<MissionPrefab> ValidateMissionPrefabs(IEnumerable<MissionPrefab> missionPrefabs, Dictionary<Identifier, Type> missionClasses)
|
||||
|
||||
Reference in New Issue
Block a user