Ignore disabled production traits.

This commit is contained in:
abcdefg30
2018-11-03 14:58:43 +00:00
committed by abcdefg30
parent 4a4415c74b
commit a03abe78af
2 changed files with 4 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Traits
if (queue == null)
{
var types = world.Selection.Actors.Where(a => a.IsInWorld && a.World.LocalPlayer == a.Owner)
.SelectMany(a => a.TraitsImplementing<Production>())
.SelectMany(a => a.TraitsImplementing<Production>().Where(p => !p.IsTraitDisabled))
.SelectMany(t => t.Info.Produces);
queue = world.LocalPlayer.PlayerActor.TraitsImplementing<ProductionQueue>()