diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 3bf0f5c137..e302e3cf27 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -532,6 +532,7 @@ namespace OpenRa.Game var allItems = Rules.TechTree.AllItems(Game.LocalPlayer, queueName) .Where(a => Rules.NewUnitInfo[a].Traits.Contains()) + .Where(a => Rules.NewUnitInfo[a].Traits.Get().Owner.Contains(Game.LocalPlayer.Race)) .OrderBy(a => Rules.NewUnitInfo[a].Traits.Get().TechLevel); var queue = Game.LocalPlayer.PlayerActor.traits.Get(); diff --git a/OpenRa.Game/GameRules/TechTree.cs b/OpenRa.Game/GameRules/TechTree.cs index 080eff3913..135d38dacd 100755 --- a/OpenRa.Game/GameRules/TechTree.cs +++ b/OpenRa.Game/GameRules/TechTree.cs @@ -40,7 +40,7 @@ namespace OpenRa.Game.GameRules var bi = info.Traits.GetOrDefault(); if( bi == null ) return false; - if( !bi.Owner.Any( x => x == player.Race ) ) + if( !bi.Owner.Contains( player.Race ) ) return false; foreach( var p in bi.Prerequisites ) diff --git a/OpenRa.Game/SupportPower.cs b/OpenRa.Game/SupportPower.cs index 074c36c7fc..75471de595 100644 --- a/OpenRa.Game/SupportPower.cs +++ b/OpenRa.Game/SupportPower.cs @@ -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().Owner - .Any( r => r == Owner.Race )); + .Where( a => Rules.NewUnitInfo[a].Traits.Get().Owner.Contains( Owner.Race )); IsAvailable = Info.TechLevel > -1 && effectivePrereq.Any() diff --git a/ra.yaml b/ra.yaml index 4aee273e10..ee0f4cd8ee 100644 --- a/ra.yaml +++ b/ra.yaml @@ -1172,7 +1172,6 @@ POWR: Buildable: TechLevel: 1 Tab: Building - Prerequisites: fact Owner: allies,soviet Cost: 300 Description: Power Plant diff --git a/rules.ini b/rules.ini index 13a31613ec..1bb007ac1a 100644 --- a/rules.ini +++ b/rules.ini @@ -1256,7 +1256,6 @@ Crewed=yes ; normal power plant [POWR] -Prerequisite=fact Strength=400 Armor=wood TechLevel=1