resources moved off player onto a synced trait

This commit is contained in:
Chris Forbes
2010-05-12 18:29:25 +12:00
parent a4592e7019
commit 46e465cf33
24 changed files with 186 additions and 152 deletions

View File

@@ -108,7 +108,7 @@ namespace OpenRA.Traits
.Where(a => Rules.Info[a].Traits.Get<BuildableInfo>().Owner.Contains(Owner.Country.Race));
if (Info.Prerequisites.Count() == 0)
return Owner.GetPowerState() == PowerState.Normal;
return Owner.PlayerActor.traits.Get<PlayerResources>().GetPowerState() == PowerState.Normal;
return effectivePrereq.Any() &&
effectivePrereq.All(a => buildings[a].Any(b => !b.traits.Get<Building>().Disabled));