Add the world components of the new editor.
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user