autoupdater fixes, cursor fix, consistent directory separators + use of Path.Combine(), wire bugfixes, more loading screens

This commit is contained in:
Regalis
2015-10-02 21:33:33 +03:00
parent 24f7a1baa5
commit a285b00eb9
51 changed files with 451 additions and 1304 deletions
@@ -82,21 +82,10 @@ namespace Subsurface.Items.Components
}
float degreeOfSuccess = DegreeOfSuccess(character);
if (Rand.Range(0.0f, 0.5f) < degreeOfSuccess) return false;
if (Rand.Range(0.0f, 50.0f) < degreeOfSuccess) return false;
item.ApplyStatusEffects(ActionType.OnFailure, 1.0f, character);
//Vector2 baseVel = Rand.Vector(300.0f);
//for (int i = 0; i < 10; i++)
//{
// var particle = GameMain.ParticleManager.CreateParticle("spark", item.Position,
// baseVel + Rand.Vector(100.0f), 0.0f);
// if (particle != null) particle.Size *= Rand.Range(0.5f, 1.0f);
//}
//character.AddDamage(item.SimPosition, DamageType.None, Math.Abs(degreeOfSuccess-100.0f)/10.0f, 0.0f, 3.0f, false);
return true;
}
@@ -68,6 +68,15 @@ namespace Subsurface.Items.Components
if (connections[i] == newConnection) return;
}
for (int i = 0; i < 2; i++)
{
if (connections[i] != null && connections[i].Item == newConnection.Item)
{
addNode = false;
break;
}
}
for (int i = 0; i < 2; i++)
{
if (connections[i] != null) continue;
@@ -76,6 +85,9 @@ namespace Subsurface.Items.Components
if (!addNode) break;
if (Nodes.Count>0&&Nodes[0] == newConnection.Item.Position) break;
if (Nodes.Count > 1 && Nodes[Nodes.Count-1] == newConnection.Item.Position) break;
if (i == 0)
{
Nodes.Insert(0, newConnection.Item.Position);