Move Cloak, HiddenUnderFog, FrozenUnderFog into Mods.RA; Simplify a pile of related stuff.

This commit is contained in:
Paul Chote
2010-07-28 21:11:50 +12:00
parent 6854d9853b
commit 8fab45ae39
12 changed files with 38 additions and 52 deletions

View File

@@ -11,7 +11,6 @@
using System.Collections.Generic;
using OpenRA.Traits;
using OpenRA.Traits.Activities;
using System.Drawing;
namespace OpenRA.Mods.RA
{
@@ -25,7 +24,7 @@ namespace OpenRA.Mods.RA
public object Create(ActorInitializer init) { return new Mine(init, this); }
}
class Mine : ICrushable, IOccupySpace, IRadarVisibilityModifier, IRadarColorModifier
class Mine : ICrushable, IOccupySpace
{
readonly Actor self;
readonly MineInfo info;
@@ -56,16 +55,6 @@ namespace OpenRA.Mods.RA
public int2 TopLeft { get { return location; } }
public IEnumerable<int2> OccupiedCells() { yield return TopLeft; }
public bool VisibleOnRadar(Actor self)
{
return self.Owner == self.World.LocalPlayer;
}
public Color RadarColorOverride(Actor self)
{
return Color.FromArgb(128, self.Owner.Color);
}
}
/* tag trait for stuff that shouldnt trigger mines */