(d9829ac) v0.9.4.0

This commit is contained in:
Regalis
2019-10-24 18:05:42 +02:00
parent 9aa12bcac2
commit b39922a074
319 changed files with 12516 additions and 6815 deletions
@@ -10,7 +10,7 @@ namespace Barotrauma.Items.Components
get { return new Vector2(rangeX, rangeY) * 2.0f; }
}
public void Draw(SpriteBatch spriteBatch, bool editing)
public void Draw(SpriteBatch spriteBatch, bool editing, float itemDepth = -1)
{
if (!editing || !MapEntity.SelectedList.Contains(item)) return;
@@ -10,7 +10,7 @@ namespace Barotrauma.Items.Components
get { return new Vector2(range * 2); }
}
public void Draw(SpriteBatch spriteBatch, bool editing)
public void Draw(SpriteBatch spriteBatch, bool editing, float itemDepth = -1)
{
if (!editing || !MapEntity.SelectedList.Contains(item)) return;
@@ -48,7 +48,7 @@ namespace Barotrauma.Items.Components
get { return sectionExtents; }
}
public void Draw(SpriteBatch spriteBatch, bool editing)
public void Draw(SpriteBatch spriteBatch, bool editing, float itemDepth = -1)
{
if (sections.Count == 0 && !IsActive || Hidden)
{
@@ -154,6 +154,18 @@ namespace Barotrauma.Items.Components
public static void UpdateEditing(List<Wire> wires)
{
Wire equippedWire =
Character.Controlled?.SelectedItems[0]?.GetComponent<Wire>() ??
Character.Controlled?.SelectedItems[1]?.GetComponent<Wire>();
if (equippedWire != null)
{
if (PlayerInput.LeftButtonClicked() && Character.Controlled.SelectedConstruction == null)
{
equippedWire.Use(1.0f, Character.Controlled);
}
return;
}
//dragging a node of some wire
if (draggingWire != null)
{