Add IPositionable.CanExistInCell

This is like CanEnterCell, but doesn't take into account conflicting
actors, etc.
This commit is contained in:
Chris Forbes
2018-04-06 20:37:56 -07:00
committed by abcdefg30
parent fba08cd066
commit dddd057e3d
6 changed files with 32 additions and 6 deletions

View File

@@ -154,6 +154,7 @@ namespace OpenRA.Mods.Cnc.Traits
init.Add(new FacingInit(Facing));
}
public bool CanExistInCell(CPos cell) { return true; }
public bool IsLeavingCell(CPos location, SubCell subCell = SubCell.Any) { return false; }
public bool CanEnterCell(CPos cell, Actor ignoreActor = null, bool checkTransientActors = false) { return true; }
public SubCell GetValidSubCell(SubCell preferred) { return SubCell.Invalid; }