From acf25354b0fa51ef2767e17fa99190c09fb54bc3 Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Thu, 14 Dec 2017 11:29:09 +0300 Subject: [PATCH] Consider BuildAtProductionType for exit types too for normal ProductionQueue --- OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs index f70297e56f..2790a3ed21 100644 --- a/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs +++ b/OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs @@ -419,7 +419,10 @@ namespace OpenRA.Mods.Common.Traits new FactionInit(BuildableInfo.GetInitialFaction(unit, Faction)) }; - if (!mostLikelyProducerTrait.IsTraitPaused && mostLikelyProducerTrait.Produce(self, unit, developerMode.AllTech ? null : Info.Type, inits)) + var bi = unit.TraitInfo(); + var type = developerMode.AllTech ? Info.Type : (bi.BuildAtProductionType ?? Info.Type); + + if (!mostLikelyProducerTrait.IsTraitPaused && mostLikelyProducerTrait.Produce(self, unit, type, inits)) { FinishProduction(); return true;