(42d13c09f) Merge remote-tracking branch 'origin/tutorial-rework' into dev

This commit is contained in:
Joonas Rikkonen
2019-04-25 18:07:37 +03:00
parent 99344e4031
commit e83dba2959
53 changed files with 3623 additions and 550 deletions
@@ -33,7 +33,7 @@ namespace Barotrauma
if (!editing || !ShowGaps) return;
Color clr = (open == 0.0f) ? Color.Red : Color.Cyan;
if (isHighlighted) clr = Color.Gold;
if (IsHighlighted) clr = Color.Gold;
float depth = (ID % 255) * 0.000001f;
@@ -292,12 +292,12 @@ namespace Barotrauma
}*/
}
if ((IsSelected || isHighlighted) && editing)
if ((IsSelected || IsHighlighted) && editing)
{
GUI.DrawRectangle(spriteBatch,
new Vector2(drawRect.X + 5, -drawRect.Y + 5),
new Vector2(rect.Width - 10, rect.Height - 10),
isHighlighted ? Color.LightBlue * 0.5f : Color.Red * 0.5f, true, 0, (int)Math.Max((1.5f / GameScreen.Selected.Cam.Zoom), 1.0f));
IsHighlighted ? Color.LightBlue * 0.5f : Color.Red * 0.5f, true, 0, (int)Math.Max((1.5f / GameScreen.Selected.Cam.Zoom), 1.0f));
}
foreach (MapEntity e in linkedTo)
@@ -13,7 +13,7 @@ namespace Barotrauma
{
if (!editing || wallVertices == null) return;
Color color = (isHighlighted) ? Color.Orange : Color.Green;
Color color = (IsHighlighted) ? Color.Orange : Color.Green;
if (IsSelected) color = Color.Red;
Vector2 pos = Position;
@@ -1,4 +1,5 @@
using Barotrauma.Lights;
using Barotrauma.Extensions;
using Barotrauma.Lights;
using Barotrauma.Networking;
using Lidgren.Network;
using Microsoft.Xna.Framework;
@@ -41,7 +42,21 @@ namespace Barotrauma
MathHelper.Clamp(value.Y, 0.01f, 10));
}
}
private string specialTag;
[Editable, Serialize("", true)]
public string SpecialTag
{
get { return specialTag; }
set { specialTag = value; }
}
// Only for testing in the debug build. Not saved.
#if DEBUG
[Editable, Serialize(true, false)]
#endif
public bool DrawTiled { get; protected set; } = true;
protected Vector2 textureOffset = Vector2.Zero;
[Editable(MinValueFloat = -1000f, MaxValueFloat = 1000f, ValueStep = 10f), Serialize("0.0, 0.0", true)]
public Vector2 TextureOffset
@@ -180,7 +195,7 @@ namespace Barotrauma
if (HasBody && !ShowWalls) return;
}
Color color = isHighlighted ? Color.Orange : spriteColor;
Color color = IsHighlighted ? Color.Orange : spriteColor;
if (IsSelected && editing)
{
//color = Color.Lerp(color, Color.Gold, 0.5f);
@@ -30,7 +30,7 @@ namespace Barotrauma
Color clr = currentHull == null ? Color.Blue : Color.White;
if (IsSelected) clr = Color.Red;
if (isHighlighted) clr = Color.DarkRed;
if (IsHighlighted) clr = Color.DarkRed;
int iconX = iconIndices[(int)spawnType] * IconSize % iconTexture.Width;
int iconY = (int)(Math.Floor(iconIndices[(int)spawnType] * IconSize / (float)iconTexture.Width)) * IconSize;