Build 0.21.6.0 (1.0 pre-patch)

This commit is contained in:
Regalis11
2023-01-31 18:08:26 +02:00
parent e1c04bc31d
commit cf9ecd35b3
231 changed files with 4479 additions and 2276 deletions
@@ -559,12 +559,9 @@ namespace Barotrauma
killedCharacterIdentifiers = element.GetAttributeIntArray("killedcharacters", Array.Empty<int>()).ToHashSet();
System.Diagnostics.Debug.Assert(Type != null, $"Could not find the location type \"{locationTypeId}\"!");
if (Type == null)
{
Type = LocationType.Prefabs.First();
}
Type ??= LocationType.Prefabs.First();
LevelData = new LevelData(element.Element("Level"));
LevelData = new LevelData(element.Element("Level"), clampDifficultyToBiome: true);
PortraitId = ToolBox.StringToInt(Name);
@@ -171,7 +171,7 @@ namespace Barotrauma
}
int startLocationindex = element.GetAttributeInt("startlocation", -1);
if (startLocationindex > 0 && startLocationindex < Locations.Count)
if (startLocationindex >= 0 && startLocationindex < Locations.Count)
{
StartLocation = Locations[startLocationindex];
}
@@ -188,7 +188,7 @@ namespace Barotrauma
}
}
int endLocationindex = element.GetAttributeInt("endlocation", -1);
if (endLocationindex > 0 && endLocationindex < Locations.Count)
if (endLocationindex >= 0 && endLocationindex < Locations.Count)
{
EndLocation = Locations[endLocationindex];
}