Unstable 0.16.3.0
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user