waypoint selection bug, unequipped captain uniform sprites, repairtool sounds & particle tweaking, wire overlap bug, connectionpanel loading bug, looting dead crew members
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Subsurface.Items.Components
|
||||
|
||||
private List<StatusEffect> effects;
|
||||
|
||||
int[] wireId;
|
||||
public readonly int[] wireId;
|
||||
|
||||
public List<Connection> Recipients
|
||||
{
|
||||
@@ -463,7 +463,7 @@ namespace Subsurface.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
wireId = null;
|
||||
//wireId = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,21 +74,26 @@ namespace Subsurface.Items.Components
|
||||
public override void Load(XElement element)
|
||||
{
|
||||
base.Load(element);
|
||||
|
||||
connections.Clear();
|
||||
|
||||
List<Connection> loadedConnections = new List<Connection>();
|
||||
|
||||
foreach (XElement subElement in element.Elements())
|
||||
{
|
||||
switch (subElement.Name.ToString())
|
||||
{
|
||||
case "input":
|
||||
connections.Add(new Connection(subElement, item));
|
||||
loadedConnections.Add(new Connection(subElement, item));
|
||||
break;
|
||||
case "output":
|
||||
connections.Add(new Connection(subElement, item));
|
||||
loadedConnections.Add(new Connection(subElement, item));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i<loadedConnections.Count && i<connections.Count; i++)
|
||||
{
|
||||
loadedConnections[i].wireId.CopyTo(connections[i].wireId, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Remove()
|
||||
|
||||
@@ -274,12 +274,12 @@ namespace Subsurface.Items.Components
|
||||
|
||||
for (int i = 1; i < Nodes.Count; i++)
|
||||
{
|
||||
DrawSection(spriteBatch, Nodes[i], Nodes[i - 1], i, item.Color);
|
||||
DrawSection(spriteBatch, Nodes[i], Nodes[i - 1], item.Color);
|
||||
}
|
||||
|
||||
if (isActive && Vector2.Distance(newNodePos, Nodes[Nodes.Count - 1]) > nodeDistance)
|
||||
{
|
||||
DrawSection(spriteBatch, Nodes[Nodes.Count - 1], newNodePos, Nodes.Count, item.Color * 0.5f);
|
||||
DrawSection(spriteBatch, Nodes[Nodes.Count - 1], newNodePos, item.Color * 0.5f);
|
||||
//nodes.Add(newNodePos);
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ selectedNodeIndex = null;
|
||||
|
||||
}
|
||||
|
||||
private void DrawSection(SpriteBatch spriteBatch, Vector2 start, Vector2 end, int i, Color color)
|
||||
private void DrawSection(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
|
||||
{
|
||||
start.Y = -start.Y;
|
||||
end.Y = -end.Y;
|
||||
@@ -344,7 +344,7 @@ selectedNodeIndex = null;
|
||||
new Vector2(0.0f, wireSprite.size.Y / 2.0f),
|
||||
new Vector2((Vector2.Distance(start, end)) / wireSprite.Texture.Width, 0.3f),
|
||||
SpriteEffects.None,
|
||||
wireSprite.Depth + 0.1f + i * 0.00001f);
|
||||
wireSprite.Depth + ((item.ID % 100) * 0.00001f));
|
||||
}
|
||||
|
||||
public override XElement Save(XElement parentElement)
|
||||
|
||||
Reference in New Issue
Block a user