Unstable 0.16.3.0

This commit is contained in:
Markus Isberg
2022-02-10 02:52:08 +09:00
parent 6814a11520
commit 2190fe08ef
115 changed files with 993 additions and 453 deletions

View File

@@ -130,18 +130,31 @@ namespace Barotrauma
int tilesY = (int)Math.Ceiling(Height / tileSize.Y);
mapTiles = new Sprite[tilesX, tilesY];
tileDiscovered = new bool[tilesX, tilesY];
HashSet<Biome> missingBiomes = new HashSet<Biome>();
for (int x = 0; x < tilesX; x++)
{
for (int y = 0; y < tilesY; y++)
{
var biome = GetBiome(x * tileSize.X);
var tileList = generationParams.MapTiles.ContainsKey(biome.Identifier) ?
generationParams.MapTiles[biome.Identifier] :
generationParams.MapTiles.Values.First();
List<Sprite> tileList = null;
if (generationParams.MapTiles.ContainsKey(biome.Identifier))
{
tileList = generationParams.MapTiles[biome.Identifier];
}
else
{
tileList = generationParams.MapTiles.Values.First();
missingBiomes.Add(biome);
}
mapTiles[x, y] = tileList[x % tileList.Count];
}
}
foreach (var missingBiome in missingBiomes)
{
DebugConsole.ThrowError($"Could not find campaign map sprites for the biome \"{missingBiome.Identifier}\". Using the sprites of the first biome instead...");
}
RemoveFogOfWar(StartLocation);
GenerateLocationConnectionVisuals();