Don’t export certain Init types.

This commit is contained in:
Paul Chote
2015-04-20 02:52:03 +12:00
parent b5ff247fa5
commit 8a171bb452
5 changed files with 9 additions and 4 deletions

View File

@@ -15,6 +15,8 @@ using OpenRA.Primitives;
namespace OpenRA
{
public interface ISuppressInitExport { }
public class ActorReference : IEnumerable
{
public string Type;
@@ -51,6 +53,9 @@ namespace OpenRA
var ret = new MiniYaml(Type);
foreach (var init in InitDict)
{
if (init is ISuppressInitExport)
continue;
var initName = init.GetType().Name;
ret.Nodes.Add(new MiniYamlNode(initName.Substring(0, initName.Length - 4), FieldSaver.Save(init)));
}