Change ITargetable TargetableCells -> TargetablePositions.
This commit is contained in:
@@ -80,7 +80,7 @@ namespace OpenRA.Traits
|
|||||||
if (targetable == null)
|
if (targetable == null)
|
||||||
return new []{actor.CenterPosition};
|
return new []{actor.CenterPosition};
|
||||||
|
|
||||||
return targetable.TargetableCells(actor).Select(c => c.CenterPosition);
|
return targetable.TargetablePositions(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ namespace OpenRA.Traits
|
|||||||
public interface ITargetable
|
public interface ITargetable
|
||||||
{
|
{
|
||||||
string[] TargetTypes { get; }
|
string[] TargetTypes { get; }
|
||||||
IEnumerable<CPos> TargetableCells(Actor self);
|
IEnumerable<WPos> TargetablePositions(Actor self);
|
||||||
bool TargetableBy(Actor self, Actor byActor);
|
bool TargetableBy(Actor self, Actor byActor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ namespace OpenRA.Mods.RA
|
|||||||
public string[] TargetTypes { get { return info.TargetTypes; } }
|
public string[] TargetTypes { get { return info.TargetTypes; } }
|
||||||
public bool TargetableBy(Actor self, Actor byActor) { return true; }
|
public bool TargetableBy(Actor self, Actor byActor) { return true; }
|
||||||
|
|
||||||
public IEnumerable<CPos> TargetableCells( Actor self )
|
public IEnumerable<WPos> TargetablePositions(Actor self)
|
||||||
{
|
{
|
||||||
return self.Trait<Building>().OccupiedCells().Select(c => c.First);
|
return self.Trait<Building>().OccupiedCells().Select(c => c.First.CenterPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
public virtual string[] TargetTypes { get { return info.TargetTypes; } }
|
public virtual string[] TargetTypes { get { return info.TargetTypes; } }
|
||||||
|
|
||||||
public virtual IEnumerable<CPos> TargetableCells( Actor self )
|
public virtual IEnumerable<WPos> TargetablePositions(Actor self)
|
||||||
{
|
{
|
||||||
yield return self.CenterPosition.ToCPos();
|
yield return self.CenterPosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user