Consider BuildAtProductionType for exit types too for normal ProductionQueue

This commit is contained in:
Mustafa Alperen Seki
2017-12-14 11:29:09 +03:00
committed by Paul Chote
parent 5ac0625f97
commit acf25354b0

View File

@@ -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<BuildableInfo>();
var type = developerMode.AllTech ? Info.Type : (bi.BuildAtProductionType ?? Info.Type);
if (!mostLikelyProducerTrait.IsTraitPaused && mostLikelyProducerTrait.Produce(self, unit, type, inits))
{
FinishProduction();
return true;