Bunch of editor improvements/bugfixes: free node positioning when placing wires, options to hide hulls, gaps & links, hidden entities can't be selected, more accurate stair selecting, disabled UImessages, camera position fixes
This commit is contained in:
@@ -16,7 +16,7 @@ namespace Barotrauma
|
||||
{
|
||||
public static List<WayPoint> WayPointList = new List<WayPoint>();
|
||||
|
||||
public static bool ShowWayPoints, ShowSpawnPoints;
|
||||
public static bool ShowWayPoints = true, ShowSpawnPoints = true;
|
||||
|
||||
private SpawnType spawnType;
|
||||
|
||||
@@ -75,6 +75,10 @@ namespace Barotrauma
|
||||
ConnectedGap = gap;
|
||||
}
|
||||
|
||||
public WayPoint(Rectangle rectangle)
|
||||
: this (rectangle, Submarine.Loaded)
|
||||
{ }
|
||||
|
||||
public WayPoint(Rectangle newRect, Submarine submarine)
|
||||
: base (submarine)
|
||||
{
|
||||
@@ -88,18 +92,18 @@ namespace Barotrauma
|
||||
currentHull = Hull.FindHull(WorldPosition);
|
||||
}
|
||||
|
||||
public override bool IsMouseOn(Vector2 position)
|
||||
{
|
||||
if (IsHidden()) return false;
|
||||
|
||||
return base.IsMouseOn(position);
|
||||
}
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch, bool editing, bool back=true)
|
||||
{
|
||||
if (!editing && !GameMain.DebugDraw) return;
|
||||
|
||||
if (spawnType == SpawnType.Path)
|
||||
{
|
||||
if (!GameMain.DebugDraw && !ShowWayPoints) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GameMain.DebugDraw && !ShowSpawnPoints) return;
|
||||
}
|
||||
if (IsHidden()) return;
|
||||
|
||||
Rectangle drawRect =
|
||||
Submarine == null ? rect : new Rectangle((int)(Submarine.DrawPosition.X + rect.X), (int)(Submarine.DrawPosition.Y + rect.Y), rect.Width, rect.Height);
|
||||
@@ -119,6 +123,18 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsHidden()
|
||||
{
|
||||
if (spawnType == SpawnType.Path)
|
||||
{
|
||||
return (!GameMain.DebugDraw && !ShowWayPoints);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (!GameMain.DebugDraw && !ShowSpawnPoints);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DrawEditing(SpriteBatch spriteBatch, Camera cam)
|
||||
{
|
||||
if (editingHUD == null || editingHUD.UserData != this)
|
||||
@@ -247,6 +263,8 @@ namespace Barotrauma
|
||||
|
||||
foreach (Hull hull in Hull.hullList)
|
||||
{
|
||||
if (hull.Rect.Height < 150) continue;
|
||||
|
||||
WayPoint prevWaypoint = null;
|
||||
|
||||
if (hull.Rect.Width<minDist*3.0f)
|
||||
|
||||
Reference in New Issue
Block a user