Ignore disabled production traits.
This commit is contained in:
@@ -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>()
|
||||
|
||||
@@ -45,8 +45,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame
|
||||
var player = world.RenderPlayer ?? world.LocalPlayer;
|
||||
|
||||
var facilities = world.ActorsHavingTrait<Production>()
|
||||
.Where(a => a.Owner == player && !a.Info.HasTraitInfo<BaseBuildingInfo>())
|
||||
.OrderBy(f => f.Info.TraitInfo<ProductionInfo>().Produces.First())
|
||||
.Where(a => a.Owner == player && !a.Info.HasTraitInfo<BaseBuildingInfo>()
|
||||
&& a.TraitsImplementing<Production>().Any(t => !t.IsTraitDisabled))
|
||||
.OrderBy(f => f.TraitsImplementing<Production>().First(t => !t.IsTraitDisabled).Info.Produces.First())
|
||||
.ToList();
|
||||
|
||||
if (!facilities.Any())
|
||||
|
||||
Reference in New Issue
Block a user