diff --git a/OpenRA.Mods.RA/InvisibleToEnemy.cs b/OpenRA.Mods.RA/InvisibleToEnemy.cs deleted file mode 100644 index 876ef101a2..0000000000 --- a/OpenRA.Mods.RA/InvisibleToEnemy.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System.Collections.Generic; -using System.Drawing; -using OpenRA.Graphics; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - class InvisibleToEnemyInfo : TraitInfo { } - - class InvisibleToEnemy : IRenderModifier, IVisibilityModifier, IRadarColorModifier - { - public bool IsVisible(Shroud s, Actor self) - { - if (s != null && s.Observing) - return true; - - if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) - return true; - - return false; - } - - public Color RadarColorOverride(Actor self) - { - // TODO: why is making this half-opaque conflated with hiding the actor from non-allies? - return Color.FromArgb(128, self.Owner.ColorRamp.GetColor(0)); - } - - static readonly Renderable[] Nothing = { }; - - public IEnumerable ModifyRender(Actor self, WorldRenderer wr, IEnumerable r) - { - return IsVisible(self.World.RenderedShroud, self) ? r : Nothing; - } - } -} diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index cc99b3e14d..a2c32afb33 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -231,7 +231,6 @@ - diff --git a/mods/ra-classic/rules/system.yaml b/mods/ra-classic/rules/system.yaml index 5c49d83a19..178e94f2f9 100644 --- a/mods/ra-classic/rules/system.yaml +++ b/mods/ra-classic/rules/system.yaml @@ -250,7 +250,7 @@ MINP: HP: 1 RenderSimple: BelowUnits: - InvisibleToEnemy: + Cloak: Tooltip: Name: Anti-Personnel Mine Icon: jmin @@ -267,7 +267,7 @@ MINV: HP: 1 RenderSimple: BelowUnits: - InvisibleToEnemy: + Cloak: Tooltip: Name: Anti-Tank Mine Icon: jmin diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index b2b0e2d5a5..9ceb7360a2 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -636,7 +636,7 @@ MINP: HP: 1 RenderSimple: BelowUnits: - InvisibleToEnemy: + Cloak: Tooltip: Name: Anti-Personnel Mine Icon: jmin @@ -653,7 +653,7 @@ MINV: HP: 1 RenderSimple: BelowUnits: - InvisibleToEnemy: + Cloak: Tooltip: Name: Anti-Tank Mine Icon: jmin