Fix crash on repair non-buildables (fact,proc). Allow special powers to depend on them too.
This commit is contained in:
@@ -101,7 +101,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<BuildableInfo>().Owner.Contains(Owner.Country.Race));
|
||||
.Where(a => Rules.Info[a].Traits.Get<ValuedInfo>().Owner.Contains(Owner.Country.Race));
|
||||
|
||||
if (Info.Prerequisites.Count() == 0)
|
||||
return Owner.PlayerActor.traits.Get<PlayerResources>().GetPowerState() == PowerState.Normal;
|
||||
|
||||
Reference in New Issue
Block a user