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();
|
||||
|
||||
@@ -772,7 +772,7 @@ namespace Barotrauma
|
||||
if (item.FlippedX && item.Prefab.CanSpriteFlipX) { spriteEffects ^= SpriteEffects.FlipHorizontally; }
|
||||
if (item.flippedY && item.Prefab.CanSpriteFlipY) { spriteEffects ^= SpriteEffects.FlipVertically; }
|
||||
var wire = item.GetComponent<Wire>();
|
||||
if (wire != null && !wire.Item.body.Enabled)
|
||||
if (wire != null && wire.Item.body != null && !wire.Item.body.Enabled)
|
||||
{
|
||||
wire.Draw(spriteBatch, editing: false, new Vector2(moveAmount.X, -moveAmount.Y));
|
||||
continue;
|
||||
|
||||
@@ -55,9 +55,9 @@ namespace Barotrauma
|
||||
if (closestSub != null && subsToMove.Contains(closestSub))
|
||||
{
|
||||
GameMain.GameScreen.Cam.Position += moveAmount;
|
||||
if (GameMain.GameScreen.Cam.TargetPos != Vector2.Zero) GameMain.GameScreen.Cam.TargetPos += moveAmount;
|
||||
if (GameMain.GameScreen.Cam.TargetPos != Vector2.Zero) { GameMain.GameScreen.Cam.TargetPos += moveAmount; }
|
||||
|
||||
if (Character.Controlled != null) Character.Controlled.CursorPosition += moveAmount;
|
||||
if (Character.Controlled != null) { Character.Controlled.CursorPosition += moveAmount; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -316,11 +316,11 @@ namespace Barotrauma
|
||||
var srcRect = prefab.sprite.SourceRect;
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (flippedX)
|
||||
if (flippedX && ((prefab as ItemPrefab)?.CanSpriteFlipX ?? true))
|
||||
{
|
||||
spriteEffects |= SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
if (flippedY)
|
||||
if (flippedY && ((prefab as ItemPrefab)?.CanSpriteFlipY ?? true))
|
||||
{
|
||||
spriteEffects |= SpriteEffects.FlipVertically;
|
||||
}
|
||||
|
||||
@@ -90,14 +90,14 @@ namespace Barotrauma
|
||||
{
|
||||
GUI.DrawLine(spriteBatch,
|
||||
drawPos,
|
||||
new Vector2(ConnectedGap.WorldPosition.X, -ConnectedGap.WorldPosition.Y),
|
||||
new Vector2(ConnectedGap.DrawPosition.X, -ConnectedGap.DrawPosition.Y),
|
||||
GUI.Style.Green * 0.5f, width: 1);
|
||||
}
|
||||
if (Ladders != null)
|
||||
{
|
||||
GUI.DrawLine(spriteBatch,
|
||||
drawPos,
|
||||
new Vector2(Ladders.Item.WorldPosition.X, -Ladders.Item.WorldPosition.Y),
|
||||
new Vector2(Ladders.Item.DrawPosition.X, -Ladders.Item.DrawPosition.Y),
|
||||
GUI.Style.Green * 0.5f, width: 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user