Add support for negative prerequisites (#1323)

This commit is contained in:
Chris Forbes
2012-02-11 11:13:39 +13:00
parent 1f8859f26b
commit 3cf09e656f
2 changed files with 11 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA
var bi = i.Value.Traits.GetOrDefault<BuildableInfo>();
if (bi != null)
foreach( var prereq in bi.Prerequisites )
if ( !providedPrereqs.Contains(prereq) )
if ( !providedPrereqs.Contains(prereq.Replace("!","")) )
emitError( "Buildable actor {0} has prereq {1} not provided by anything.".F( i.Key, prereq ) );
}
}