diff --git a/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs index 97ff6ec10c6f..63b42d2ff61b 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs @@ -194,12 +194,13 @@ public bool IsProducing(string actorType) BuildableInfo GetBuildableInfo(string actorType, string queue) { var ri = Self.World.Map.Rules.Actors[actorType]; - var bi = BuildableInfo.GetTraitForQueue(ri, queue); + var bi = ri.TraitInfos().FirstOrDefault(); + // Error if there are no Buildable traits, return correct one otherwise. if (bi == null) throw new LuaException($"Actor of type {actorType} cannot be produced"); else - return bi; + return BuildableInfo.GetTraitForQueue(ri, queue); } }