From e7e74aac3c57a0c7222169cfeb7cb587500f6767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 8 Apr 2013 19:14:31 +0200 Subject: [PATCH] allow the cloak palette to stay empty and use it for mines --- OpenRA.Mods.RA/Cloak.cs | 5 ++++- mods/ra/rules/system.yaml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/Cloak.cs b/OpenRA.Mods.RA/Cloak.cs index 86e0180b45..3bef1e3b8d 100644 --- a/OpenRA.Mods.RA/Cloak.cs +++ b/OpenRA.Mods.RA/Cloak.cs @@ -74,7 +74,10 @@ namespace OpenRA.Mods.RA return r; if (Cloaked && IsVisible(self.World.RenderedShroud, self)) - return r.Select(a => a.WithPalette(wr.Palette(info.Palette))); + if (string.IsNullOrEmpty(info.Palette)) + return r; + else + return r.Select(a => a.WithPalette(wr.Palette(info.Palette))); else return Nothing; } diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index 970f1dd8e1..03c595e238 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -640,6 +640,7 @@ MINP: Cloak: CloakSound: UncloakSound: + Palette: Tooltip: Name: Anti-Personnel Mine Icon: jmin @@ -659,6 +660,7 @@ MINV: Cloak: CloakSound: UncloakSound: + Palette: Tooltip: Name: Anti-Tank Mine Icon: jmin @@ -732,7 +734,7 @@ CAMERA: Health: HP:1000 RevealsShroud: - Range: 10 + Range: 10 ProximityCaptor: Types:Camera