Move ChooseRandomCell from WorldUtils to Map
This commit is contained in:
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
[Desc("Returns a random cell inside the visible region of the map.")]
|
||||
public CPos RandomCell()
|
||||
{
|
||||
return context.World.ChooseRandomCell(context.World.SharedRandom);
|
||||
return context.World.Map.ChooseRandomCell(context.World.SharedRandom);
|
||||
}
|
||||
|
||||
[Desc("Returns a random cell on the visible border of the map.")]
|
||||
|
||||
@@ -339,7 +339,7 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
[LuaGlobal]
|
||||
public CPos GetRandomCell()
|
||||
{
|
||||
return world.ChooseRandomCell(world.SharedRandom);
|
||||
return world.Map.ChooseRandomCell(world.SharedRandom);
|
||||
}
|
||||
|
||||
[LuaGlobal]
|
||||
|
||||
Reference in New Issue
Block a user