Prevent production cycling when producing actor does not occupy space
This commit is contained in:
@@ -46,7 +46,7 @@ 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>()
|
||||
.Where(a => a.Owner == player && a.OccupiesSpace != null && !a.Info.HasTraitInfo<BaseBuildingInfo>()
|
||||
&& a.TraitsImplementing<Production>().Any(t => !t.IsTraitDisabled))
|
||||
.OrderBy(f => f.TraitsImplementing<Production>().First(t => !t.IsTraitDisabled).Info.Produces.First())
|
||||
.ToList();
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var facility = CurrentQueue.MostLikelyProducer().Actor;
|
||||
|
||||
if (facility == null)
|
||||
if (facility == null || facility.OccupiesSpace == null)
|
||||
return true;
|
||||
|
||||
if (selection.Actors.Count() == 1 && selection.Contains(facility))
|
||||
|
||||
Reference in New Issue
Block a user