From a5cc68efee7ac7d1cec5a1586730f42392d2a1f4 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 12 Jul 2013 22:50:35 +1200 Subject: [PATCH] Allow production ownership test to be disabled. --- OpenRA.Mods.RA/Player/ProductionQueue.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs index e1d81e38bc..34d5e5cece 100644 --- a/OpenRA.Mods.RA/Player/ProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs @@ -26,6 +26,9 @@ namespace OpenRA.Mods.RA [Desc("Group queues from separate buildings together into the same tab.")] public readonly string Group = null; + [Desc("Filter buildable items based on their Owner.")] + public readonly bool RequireOwner = true; + [Desc("This value is used to translate the unit cost into build time.")] public float BuildSpeed = 0.4f; [Desc("The build time is multiplied with this value on low power.")] @@ -122,10 +125,13 @@ namespace OpenRA.Mods.RA foreach (var a in AllBuildables(Info.Type)) { var bi = a.Traits.Get(); + // Can our race build this by satisfying normal prerequisites? - var buildable = bi.Owner.Contains(Race.Race); + var buildable = !Info.RequireOwner || bi.Owner.Contains(Race.Race); + // Checks if Prerequisites want to hide the Actor from buildQueue if they are false tech.Add(a, new ProductionState { Visible = buildable }); + if (buildable) ttc.Add(a.Name, bi.Prerequisites, bi.BuildLimit, this); }