Remove plumbing for trait unit tests.
This commit is contained in:
committed by
Paul Chote
parent
8d0acaaa4f
commit
044b51742f
@@ -22,30 +22,13 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
public interface IActor
|
||||
{
|
||||
ActorInfo Info { get; }
|
||||
IWorld World { get; }
|
||||
uint ActorID { get; }
|
||||
Player Owner { get; set; }
|
||||
|
||||
T TraitOrDefault<T>();
|
||||
T Trait<T>();
|
||||
IEnumerable<T> TraitsImplementing<T>();
|
||||
|
||||
IEnumerable<IRenderable> Render(WorldRenderer wr);
|
||||
}
|
||||
|
||||
public class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>, IActor
|
||||
public class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>
|
||||
{
|
||||
public readonly ActorInfo Info;
|
||||
ActorInfo IActor.Info { get { return this.Info; } }
|
||||
|
||||
public readonly World World;
|
||||
IWorld IActor.World { get { return World; } }
|
||||
|
||||
public readonly uint ActorID;
|
||||
uint IActor.ActorID { get { return this.ActorID; } }
|
||||
|
||||
[Sync] public Player Owner { get; set; }
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA
|
||||
|
||||
readonly T[] entries;
|
||||
|
||||
public CellLayer(IMap map)
|
||||
public CellLayer(Map map)
|
||||
: this(map.TileShape, new Size(map.MapSize.X, map.MapSize.Y)) { }
|
||||
|
||||
public CellLayer(TileShape shape, Size size)
|
||||
|
||||
@@ -111,19 +111,7 @@ namespace OpenRA
|
||||
MissionSelector = 4
|
||||
}
|
||||
|
||||
public interface IMap
|
||||
{
|
||||
TileShape TileShape { get; }
|
||||
|
||||
int2 MapSize { get; set; }
|
||||
bool Contains(CPos cell);
|
||||
CPos CellContaining(WPos pos);
|
||||
WVec OffsetOfSubCell(SubCell subCell);
|
||||
IEnumerable<CPos> FindTilesInCircle(CPos center, int maxRange);
|
||||
WPos CenterOfCell(CPos cell);
|
||||
}
|
||||
|
||||
public class Map : IMap
|
||||
public class Map
|
||||
{
|
||||
static readonly int[][] CellCornerHalfHeights = new int[][]
|
||||
{
|
||||
@@ -163,10 +151,6 @@ namespace OpenRA
|
||||
|
||||
public const int MaxTilesInCircleRange = 50;
|
||||
public readonly TileShape TileShape;
|
||||
TileShape IMap.TileShape
|
||||
{
|
||||
get { return TileShape; }
|
||||
}
|
||||
|
||||
[FieldLoader.Ignore] public readonly WVec[] SubCellOffsets;
|
||||
public readonly SubCell DefaultSubCell;
|
||||
@@ -243,12 +227,6 @@ namespace OpenRA
|
||||
|
||||
public int2 MapSize;
|
||||
|
||||
int2 IMap.MapSize
|
||||
{
|
||||
get { return MapSize; }
|
||||
set { MapSize = value; }
|
||||
}
|
||||
|
||||
[FieldLoader.Ignore] public Lazy<CellLayer<TerrainTile>> MapTiles;
|
||||
[FieldLoader.Ignore] public Lazy<CellLayer<ResourceTile>> MapResources;
|
||||
[FieldLoader.Ignore] public Lazy<CellLayer<byte>> MapHeight;
|
||||
|
||||
@@ -24,15 +24,7 @@ namespace OpenRA
|
||||
{
|
||||
public enum WorldType { Regular, Shellmap }
|
||||
|
||||
public interface IWorld
|
||||
{
|
||||
IActor WorldActor { get; }
|
||||
int WorldTick { get; }
|
||||
IMap Map { get; }
|
||||
TileSet TileSet { get; }
|
||||
}
|
||||
|
||||
public class World : IWorld
|
||||
public class World
|
||||
{
|
||||
class ActorIDComparer : IComparer<Actor>
|
||||
{
|
||||
@@ -122,13 +114,10 @@ namespace OpenRA
|
||||
}
|
||||
|
||||
public readonly Actor WorldActor;
|
||||
IActor IWorld.WorldActor { get { return WorldActor; } }
|
||||
|
||||
public readonly Map Map;
|
||||
IMap IWorld.Map { get { return Map; } }
|
||||
|
||||
public readonly TileSet TileSet;
|
||||
TileSet IWorld.TileSet { get { return TileSet; } }
|
||||
|
||||
public readonly ActorMap ActorMap;
|
||||
public readonly ScreenMap ScreenMap;
|
||||
|
||||
Reference in New Issue
Block a user