Add minetest.get_nearby_objects
This commit is contained in:
parent
47d0882cce
commit
19e0528e33
@ -54,3 +54,7 @@ end
|
|||||||
function core.close_formspec(formname)
|
function core.close_formspec(formname)
|
||||||
return core.show_formspec(formname, "")
|
return core.show_formspec(formname, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function core.get_nearby_objects(radius)
|
||||||
|
return core.get_objects_inside_radius(core.localplayer:get_pos(), radius)
|
||||||
|
end
|
||||||
|
@ -934,6 +934,8 @@ Call these functions only at load time!
|
|||||||
* `minetest.get_objects_inside_radius(pos, radius)`: returns a list of
|
* `minetest.get_objects_inside_radius(pos, radius)`: returns a list of
|
||||||
ClientObjectRefs.
|
ClientObjectRefs.
|
||||||
* `radius`: using an euclidean metric
|
* `radius`: using an euclidean metric
|
||||||
|
* `minetest.get_nearby_objects(radius)`
|
||||||
|
* alias for minetest.get_objects_inside_radius(minetest.localplayer:get_pos(), radius)
|
||||||
* `minetest.disconnect()`
|
* `minetest.disconnect()`
|
||||||
* Disconnect from the server and exit to main menu.
|
* Disconnect from the server and exit to main menu.
|
||||||
* Returns `false` if the client is already disconnecting otherwise returns `true`.
|
* Returns `false` if the client is already disconnecting otherwise returns `true`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user