Move IOccupySpace interface right above IPositionable in TraitsInterfaces

This commit is contained in:
reaperrr
2018-05-05 03:17:38 +02:00
parent 030902f691
commit 45ee4ad4cf

View File

@@ -224,20 +224,6 @@ namespace OpenRA.Traits
public interface IDefaultVisibility { bool IsVisible(Actor self, Player byPlayer); } public interface IDefaultVisibility { bool IsVisible(Actor self, Player byPlayer); }
public interface IVisibilityModifier { bool IsVisible(Actor self, Player byPlayer); } public interface IVisibilityModifier { bool IsVisible(Actor self, Player byPlayer); }
public interface IOccupySpaceInfo : ITraitInfoInterface
{
IReadOnlyDictionary<CPos, SubCell> OccupiedCells(ActorInfo info, CPos location, SubCell subCell = SubCell.Any);
bool SharesCell { get; }
}
public interface IOccupySpace
{
WPos CenterPosition { get; }
CPos TopLeft { get; }
Pair<CPos, SubCell>[] OccupiedCells();
}
public enum SubCell { Invalid = int.MinValue, Any = int.MinValue / 2, FullCell = 0, First = 1 }
public interface IActorMap public interface IActorMap
{ {
IEnumerable<Actor> GetActorsAt(CPos a); IEnumerable<Actor> GetActorsAt(CPos a);
@@ -282,6 +268,21 @@ namespace OpenRA.Traits
[RequireExplicitImplementation] [RequireExplicitImplementation]
public interface ISelectionBar { float GetValue(); Color GetColor(); bool DisplayWhenEmpty { get; } } public interface ISelectionBar { float GetValue(); Color GetColor(); bool DisplayWhenEmpty { get; } }
public interface IOccupySpaceInfo : ITraitInfoInterface
{
IReadOnlyDictionary<CPos, SubCell> OccupiedCells(ActorInfo info, CPos location, SubCell subCell = SubCell.Any);
bool SharesCell { get; }
}
public interface IOccupySpace
{
WPos CenterPosition { get; }
CPos TopLeft { get; }
Pair<CPos, SubCell>[] OccupiedCells();
}
public enum SubCell { Invalid = int.MinValue, Any = int.MinValue / 2, FullCell = 0, First = 1 }
public interface IPositionableInfo : IOccupySpaceInfo public interface IPositionableInfo : IOccupySpaceInfo
{ {
bool CanEnterCell(World world, Actor self, CPos cell, Actor ignoreActor = null, bool checkTransientActors = true); bool CanEnterCell(World world, Actor self, CPos cell, Actor ignoreActor = null, bool checkTransientActors = true);