From 4b2663015b290fb7b91e3904c8f5185858ce38a5 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 21 Jun 2014 22:22:23 +1200 Subject: [PATCH] Fix CanBuild not checking DeveloperMode.AllTech. --- OpenRA.Mods.RA/Player/ProductionQueue.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Player/ProductionQueue.cs b/OpenRA.Mods.RA/Player/ProductionQueue.cs index 7aaeeb2a58..1747226d34 100644 --- a/OpenRA.Mods.RA/Player/ProductionQueue.cs +++ b/OpenRA.Mods.RA/Player/ProductionQueue.cs @@ -220,7 +220,11 @@ namespace OpenRA.Mods.RA public bool CanBuild(ActorInfo actor) { - return produceable.ContainsKey(actor) && produceable[actor].Buildable; + ProductionState ps; + if (!produceable.TryGetValue(actor, out ps)) + return false; + + return ps.Buildable || (self.World.AllowDevCommands && developerMode.AllTech); } public virtual void Tick(Actor self)