Add FieldLoader support for Size.

This commit is contained in:
Paul Chote
2013-12-28 19:00:13 +13:00
parent ef77ec21d0
commit d116f8a1ce

View File

@@ -282,6 +282,12 @@ namespace OpenRA.FileFormats
return ret;
}
else if (fieldType == typeof(Size))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Size(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType == typeof(int2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);