tidy in TileSet

This commit is contained in:
Chris Forbes
2011-10-10 17:47:57 +13:00
parent 1f1c2b25b0
commit e2cbfb920b

View File

@@ -50,10 +50,12 @@ namespace OpenRA.FileFormats
t => t.Value.Value );
}
static readonly string[] Fields = { "Id", "Image", "Size", "PickAny" };
public MiniYaml Save()
{
var root = new List<MiniYamlNode>();
foreach (var field in new string[] {"Id", "Image", "Size", "PickAny"})
foreach (var field in Fields)
{
FieldInfo f = this.GetType().GetField(field);
if (f.GetValue(this) == null) continue;