This commit is contained in:
Chris Forbes
2010-03-19 20:07:58 +13:00
parent a3a62d2c14
commit 58041f1b45
3 changed files with 7 additions and 5 deletions

View File

@@ -35,7 +35,8 @@ namespace OpenRA.FileFormats
public static void Load(object self, MiniYaml my)
{
foreach (var x in my.Nodes)
LoadField( self, x.Key, x.Value.Value );
if (!x.Key.StartsWith("-"))
LoadField( self, x.Key, x.Value.Value );
}
public static void LoadField( object self, string key, string value )

View File

@@ -113,9 +113,10 @@ namespace OpenRA.FileFormats
a.TryGetValue( key, out aa );
b.TryGetValue( key, out bb );
if( key.Length > 0 && key[ 0 ] == '-' )
continue;
else if( noInherit.Contains( key ) )
// if( key.Length > 0 && key[ 0 ] == '-' )
// continue;
// else
if( noInherit.Contains( key ) )
{
if( aa != null )
ret.Add( key, aa );

View File

@@ -42,7 +42,7 @@ namespace OpenRA.GameRules
Category = categoryNode.Value;
foreach( var t in mergedNode )
if( t.Key != "Inherits" && t.Key != "Category" )
if( t.Key != "Inherits" && t.Key != "Category" && !t.Key.StartsWith("-") )
Traits.Add( LoadTraitInfo( t.Key, t.Value ) );
}