rename WRange to WDist
This commit is contained in:
@@ -65,9 +65,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
public WRangeGlobal(ScriptContext context) : base(context) { }
|
||||
|
||||
[Desc("Create a new WRange.")]
|
||||
public WRange New(int r) { return new WRange(r); }
|
||||
public WDist New(int r) { return new WDist(r); }
|
||||
|
||||
[Desc("Create a new WRange by cell distance")]
|
||||
public WRange FromCells(int numCells) { return WRange.FromCells(numCells); }
|
||||
public WDist FromCells(int numCells) { return WDist.FromCells(numCells); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
|
||||
[Desc("Returns a table of all actors within the requested region, filtered using the specified function.")]
|
||||
public Actor[] ActorsInCircle(WPos location, WRange radius, LuaFunction filter = null)
|
||||
public Actor[] ActorsInCircle(WPos location, WDist radius, LuaFunction filter = null)
|
||||
{
|
||||
var actors = Context.World.FindActorsInCircle(location, radius);
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Call a function when an actor enters this range." +
|
||||
"Returns the trigger id for later removal using RemoveProximityTrigger(int id)." +
|
||||
"The callback function will be called as func(Actor a, int id).")]
|
||||
public int OnEnteredProximityTrigger(WPos pos, WRange range, LuaFunction func)
|
||||
public int OnEnteredProximityTrigger(WPos pos, WDist range, LuaFunction func)
|
||||
{
|
||||
var triggerId = 0;
|
||||
var onEntry = (LuaFunction)func.CopyReference();
|
||||
@@ -370,7 +370,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Call a function when an actor leaves this range." +
|
||||
"Returns the trigger id for later removal using RemoveProximityTrigger(int id)." +
|
||||
"The callback function will be called as func(Actor a, int id).")]
|
||||
public int OnExitedProximityTrigger(WPos pos, WRange range, LuaFunction func)
|
||||
public int OnExitedProximityTrigger(WPos pos, WDist range, LuaFunction func)
|
||||
{
|
||||
var triggerId = 0;
|
||||
var onExit = (LuaFunction)func.CopyReference();
|
||||
|
||||
Reference in New Issue
Block a user