Only render units our race can build. That FACT prerequisite was unnecessary.

This commit is contained in:
Bob
2010-01-13 00:20:55 +13:00
parent f1bbbac39d
commit ac9e58cf73
5 changed files with 3 additions and 5 deletions

View File

@@ -50,8 +50,7 @@ namespace OpenRa.Game
var buildings = Rules.TechTree.GatherBuildings(Owner);
var effectivePrereq = Info.Prerequisite
.Select( a => a.ToLowerInvariant() )
.Where( a => Rules.NewUnitInfo[a].Traits.Get<BuildableInfo>().Owner
.Any( r => r == Owner.Race ));
.Where( a => Rules.NewUnitInfo[a].Traits.Get<BuildableInfo>().Owner.Contains( Owner.Race ));
IsAvailable = Info.TechLevel > -1
&& effectivePrereq.Any()