From b3ea880ca5f320e4e8f865b4644c252ab42c6a09 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 18 Jan 2010 18:43:23 +1300 Subject: [PATCH] fixed spurious 'building...' on impossible to build stuff in the palette --- OpenRa.Game/Chrome.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 76c6b964d3..96a7e8301e 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -721,8 +721,9 @@ namespace OpenRa overlayBits.Add(Pair.New(cantBuild.Image, drawPos)); var closureItemName = item.Name; - AddButton(rect, isLmb => HandleBuildPalette(closureItemName, isLmb)); - + AddButton(rect, buildableItems.Contains(item.Name) + ? isLmb => HandleBuildPalette(closureItemName, isLmb) + : (Action)(_ => Sound.Play("briefing.aud"))); if (++x == columns) { x = 0; y++; } }