leave a warning for thirdparty scripters
This commit is contained in:
@@ -142,6 +142,7 @@ namespace OpenRA
|
|||||||
switch (key.ToString())
|
switch (key.ToString())
|
||||||
{
|
{
|
||||||
case "Length": return Length;
|
case "Length": return Length;
|
||||||
|
case "Range": Game.Debug("WRange.Range is deprecated. Use WDist.Length instead"); return Length;
|
||||||
default: throw new LuaException("WDist does not define a member '{0}'".F(key));
|
default: throw new LuaException("WDist does not define a member '{0}'".F(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,4 +70,16 @@ namespace OpenRA.Mods.Common.Scripting
|
|||||||
[Desc("Create a new WDist by cell distance")]
|
[Desc("Create a new WDist by cell distance")]
|
||||||
public WDist FromCells(int numCells) { return WDist.FromCells(numCells); }
|
public WDist FromCells(int numCells) { return WDist.FromCells(numCells); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ScriptGlobal("WRange")]
|
||||||
|
public class WRangeGlobal : ScriptGlobal
|
||||||
|
{
|
||||||
|
public WRangeGlobal(ScriptContext context) : base(context) { }
|
||||||
|
|
||||||
|
[Desc("Create a new WRange. DEPRECATED! Will be removed.")]
|
||||||
|
public WDist New(int r) { Game.Debug("WRange is deprecated. Use WDist instead."); return new WDist(r); }
|
||||||
|
|
||||||
|
[Desc("Create a new WRange by cell distance. DEPRECATED! Will be removed.")]
|
||||||
|
public WDist FromCells(int numCells) { Game.Debug("WRange is deprecated. Use WDist instead."); return WDist.FromCells(numCells); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user