Fix RCS1112

This commit is contained in:
RoosterDragon
2023-03-18 12:53:22 +00:00
committed by Gustas
parent c63788b686
commit 0bb2bc651b
3 changed files with 12 additions and 7 deletions

View File

@@ -76,16 +76,18 @@ namespace OpenRA.Mods.Common.Traits.Render
{
// Per-actor production
queues = self.TraitsImplementing<ProductionQueue>()
.Where(q => productionInfos.Any(p => p.Produces.Contains(q.Info.Type)))
.Where(q => Info.Queues.Count == 0 || Info.Queues.Contains(q.Info.Type))
.Where(q =>
productionInfos.Any(p => p.Produces.Contains(q.Info.Type)) &&
(Info.Queues.Count == 0 || Info.Queues.Contains(q.Info.Type)))
.ToArray();
if (queues.Length == 0)
{
// Player-wide production
queues = self.Owner.PlayerActor.TraitsImplementing<ProductionQueue>()
.Where(q => productionInfos.Any(p => p.Produces.Contains(q.Info.Type)))
.Where(q => Info.Queues.Count == 0 || Info.Queues.Contains(q.Info.Type))
.Where(q =>
productionInfos.Any(p => p.Produces.Contains(q.Info.Type)) &&
(Info.Queues.Count == 0 || Info.Queues.Contains(q.Info.Type)))
.ToArray();
}
}