Require explicit ITargetableCells

This commit is contained in:
reaperrr
2017-09-27 23:25:35 +02:00
committed by abcdefg30
parent 7ca9679b34
commit 0ce3c113e1
3 changed files with 7 additions and 6 deletions

View File

@@ -193,11 +193,6 @@ namespace OpenRA.Traits
bool HasFogVisibility(); bool HasFogVisibility();
} }
public interface ITargetableCells
{
IEnumerable<Pair<CPos, SubCell>> TargetableCells();
}
public interface IOccupySpaceInfo : ITraitInfoInterface public interface IOccupySpaceInfo : ITraitInfoInterface
{ {
IReadOnlyDictionary<CPos, SubCell> OccupiedCells(ActorInfo info, CPos location, SubCell subCell = SubCell.Any); IReadOnlyDictionary<CPos, SubCell> OccupiedCells(ActorInfo info, CPos location, SubCell subCell = SubCell.Any);

View File

@@ -287,7 +287,7 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<Pair<CPos, SubCell>> OccupiedCells() { return occupiedCells; } public IEnumerable<Pair<CPos, SubCell>> OccupiedCells() { return occupiedCells; }
public IEnumerable<Pair<CPos, SubCell>> TargetableCells() { return targetableCells; } IEnumerable<Pair<CPos, SubCell>> ITargetableCells.TargetableCells() { return targetableCells; }
void INotifyCreated.Created(Actor self) void INotifyCreated.Created(Actor self)
{ {

View File

@@ -376,4 +376,10 @@ namespace OpenRA.Mods.Common.Traits
void OnAcceptingCash(Actor self, Actor donor); void OnAcceptingCash(Actor self, Actor donor);
void OnDeliveringCash(Actor self, Actor acceptor); void OnDeliveringCash(Actor self, Actor acceptor);
} }
[RequireExplicitImplementation]
public interface ITargetableCells
{
IEnumerable<Pair<CPos, SubCell>> TargetableCells();
}
} }