add location in sequence yaml to FormatExceptions

This commit is contained in:
Matthias Mailänder
2013-08-15 07:55:37 +02:00
parent 3457255fa9
commit 1a9c762115

View File

@@ -40,6 +40,8 @@ namespace OpenRA.Graphics
var offset = float2.Zero;
var blendMode = BlendMode.Alpha;
try
{
if (d.ContainsKey("Start"))
Start = int.Parse(d["Start"].Value);
@@ -118,6 +120,11 @@ namespace OpenRA.Graphics
.F(unit, name, Start, Start + Facings * Stride - 1, srcOverride ?? unit, sprites.Length - 1,
info.Nodes[0].Location));
}
catch (FormatException f)
{
throw new FormatException("Failed to parse sequences for {0}.{1} at {2}:\n{3}".F(unit, name, info.Nodes[0].Location, f));
}
}
public Sprite GetSprite(int frame)
{