Add the world components of the new editor.

This commit is contained in:
Paul Chote
2015-04-06 14:57:13 +01:00
parent 1f024a8695
commit d211fe9fe1
15 changed files with 833 additions and 117 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenRA
return info;
}
public MiniYaml Save()
public MiniYaml Save(Func<object, bool> initFilter = null)
{
var ret = new MiniYaml(Type);
foreach (var init in InitDict)
@@ -56,6 +56,9 @@ namespace OpenRA
if (init is ISuppressInitExport)
continue;
if (initFilter != null && !initFilter(init))
continue;
var initName = init.GetType().Name;
ret.Nodes.Add(new MiniYamlNode(initName.Substring(0, initName.Length - 4), FieldSaver.Save(init)));
}