Clean up Buildable vs Tooltip vs Valued. cnc only.

This commit is contained in:
Paul Chote
2010-08-26 18:00:48 +12:00
parent 7b7b9d3319
commit 1d7ca206f4
15 changed files with 381 additions and 261 deletions

View File

@@ -96,7 +96,7 @@ namespace OpenRA.Traits
var buildings = Rules.TechTree.GatherBuildings(Owner);
var effectivePrereq = Info.Prerequisites
.Select(a => a.ToLowerInvariant())
.Where(a => Rules.Info[a].Traits.Get<ValuedInfo>().Owner.Contains(Owner.Country.Race));
.Where(a => Rules.Info[a].Traits.Get<BuildableInfo>().Owner.Contains(Owner.Country.Race));
if (Info.Prerequisites.Count() == 0)
return Owner.PlayerActor.Trait<PlayerResources>().GetPowerState() == PowerState.Normal;