split ITeleportable off as a base interface from IMove; Crate no longer pretends to be moveable.
This commit is contained in:
@@ -121,7 +121,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
if (order.OrderString == "Move")
|
||||
{
|
||||
if (self.traits.GetOrDefault<IMove>().CanEnterCell(order.TargetLocation))
|
||||
if (CanEnterCell(order.TargetLocation))
|
||||
{
|
||||
if (self.Owner == self.World.LocalPlayer)
|
||||
self.World.AddFrameEndTask(w =>
|
||||
|
||||
@@ -99,13 +99,18 @@ namespace OpenRA.Traits
|
||||
public interface IPaletteModifier { void AdjustPalette(Bitmap b); }
|
||||
public interface IPips { IEnumerable<PipType> GetPips(Actor self); }
|
||||
public interface ITags { IEnumerable<TagType> GetTags(); }
|
||||
public interface IMove
|
||||
|
||||
public interface ITeleportable /* crap name! */
|
||||
{
|
||||
bool CanEnterCell(int2 location);
|
||||
void SetPosition(Actor self, int2 cell);
|
||||
}
|
||||
|
||||
public interface IMove : ITeleportable
|
||||
{
|
||||
float MovementCostForCell(Actor self, int2 cell);
|
||||
float MovementSpeedForCell(Actor self, int2 cell);
|
||||
IEnumerable<float2> GetCurrentPath(Actor self);
|
||||
void SetPosition(Actor self, int2 cell);
|
||||
}
|
||||
|
||||
public interface IOffsetCenterLocation { float2 CenterOffset { get; } }
|
||||
|
||||
Reference in New Issue
Block a user