Release 1.9.7.0 - Summer Update 2025

This commit is contained in:
Regalis11
2025-06-17 16:38:11 +03:00
parent 22227f13e5
commit ea5a2bc693
297 changed files with 7344 additions and 2421 deletions
@@ -4481,6 +4481,10 @@ namespace Barotrauma
}
}
}
bool onlyEntrance = LevelData.Type != LevelData.LevelType.Outpost;
LocationType locationType = location?.Type;
if (missionForcedOutpostParamsId != null &&
OutpostGenerationParams.OutpostParams.TryGet(missionForcedOutpostParamsId, out var missionForcedOutpostParams))
{
@@ -4490,6 +4494,13 @@ namespace Barotrauma
{
outpostGenerationParams = LevelData.ForceOutpostGenerationParams;
}
else if (locationType != null &&
locationType.GetForcedOutpostGenerationParams() is { } forcedOutpostGenerationParams &&
//do not use the forced parameters if we want to generate only the entrance, and the parameters define a full, pre-built outpost
(!onlyEntrance || forcedOutpostGenerationParams.OutpostFilePath.IsNullOrEmpty()))
{
outpostGenerationParams = forcedOutpostGenerationParams;
}
else
{
outpostGenerationParams =
@@ -4497,7 +4508,6 @@ namespace Barotrauma
LevelData.GetSuitableOutpostGenerationParams(location, LevelData).GetRandom(Rand.RandSync.ServerAndClient);
}
LocationType locationType = location?.Type;
if (locationType == null)
{
locationType = LocationType.Prefabs.GetRandom(Rand.RandSync.ServerAndClient);
@@ -4512,7 +4522,7 @@ namespace Barotrauma
if (location != null)
{
DebugConsole.NewMessage($"Generating an outpost for the {(isStart ? "start" : "end")} of the level... (Location: {location.DisplayName}, level type: {LevelData.Type})");
outpost = OutpostGenerator.Generate(outpostGenerationParams, location, onlyEntrance: LevelData.Type != LevelData.LevelType.Outpost, LevelData.AllowInvalidOutpost);
outpost = OutpostGenerator.Generate(outpostGenerationParams, location, onlyEntrance: onlyEntrance, LevelData.AllowInvalidOutpost);
}
else
{