Water dustparticle fixes, random variation in background color, submarine is automatically moved to origo when loading, configuring a fabricable item with no material requirements doesn't throw an error, AI characters can't open doors if in handcuffs, engines can be picked through doors
This commit is contained in:
@@ -64,6 +64,8 @@ namespace Barotrauma
|
||||
|
||||
private List<InterestingPosition> positionsOfInterest;
|
||||
|
||||
private Color backgroundColor;
|
||||
|
||||
public Vector2 StartPosition
|
||||
{
|
||||
get { return startPosition; }
|
||||
@@ -101,6 +103,11 @@ namespace Barotrauma
|
||||
private set;
|
||||
}
|
||||
|
||||
public Color BackgroundColor
|
||||
{
|
||||
get { return backgroundColor; }
|
||||
}
|
||||
|
||||
public Level(string seed, float difficulty, int width, int height, int siteInterval)
|
||||
{
|
||||
this.seed = seed;
|
||||
@@ -148,6 +155,12 @@ namespace Barotrauma
|
||||
|
||||
Rand.SetSyncedSeed(ToolBox.StringToInt(seed));
|
||||
|
||||
float brightness = Rand.Range(1.0f, 1.3f, false);
|
||||
backgroundColor = Color.Lerp(new Color(11, 18, 26), new Color(11, 26, 18), Rand.Range(0.0f, 1.0f, false)) * brightness;
|
||||
|
||||
|
||||
backgroundColor = new Color(backgroundColor, 1.0f);
|
||||
|
||||
float minWidth = Submarine.Loaded == null ? 0.0f : Math.Max(Submarine.Borders.Width, Submarine.Borders.Height);
|
||||
minWidth = Math.Max(minWidth, 3500.0f);
|
||||
|
||||
@@ -1049,8 +1062,10 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawBack(SpriteBatch spriteBatch, Camera cam, BackgroundCreatureManager backgroundSpriteManager = null)
|
||||
public void DrawBack(GraphicsDevice graphics, SpriteBatch spriteBatch, Camera cam, BackgroundCreatureManager backgroundSpriteManager = null)
|
||||
{
|
||||
graphics.Clear(backgroundColor);
|
||||
|
||||
if (renderer == null) return;
|
||||
renderer.DrawBackground(spriteBatch, cam, backgroundSpriteManager);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user