summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2018-02-25 12:25:39 +0100
committerGitHub <noreply@github.com>2018-02-25 12:25:39 +0100
commit66372e75d9b584fbb3b3fbce0de572585dd86dca (patch)
treea6eddfb278f2f51b443cbb235e79e8788adf8434 /doc
parent4118e150f8841a507e3fcb546902d1e07150e4a2 (diff)
downloadminetest-66372e75d9b584fbb3b3fbce0de572585dd86dca.tar.gz
minetest-66372e75d9b584fbb3b3fbce0de572585dd86dca.tar.bz2
minetest-66372e75d9b584fbb3b3fbce0de572585dd86dca.zip
is_area_protected: Rename from intersects_protection (#7073)
* is_area_protected: Rename from intersects_protection Return first protected position Clarify docs: Mods may overwrite the function
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 5f06a4ccc..962a56e10 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3429,9 +3429,10 @@ These functions return the leftover itemstack.
* `minetest.record_protection_violation(pos, name)`
* This function calls functions registered with
`minetest.register_on_protection_violation`.
-* `minetest.intersects_protection(minp, maxp, player_name, interval)
- * Returns a boolean, returns true if the volume defined by `minp` and `maxp`
- intersects a protected area not owned by `player_name`.
+* `minetest.is_area_protected(pos1, pos2, player_name, interval)
+ * Returns the position of the first node that `player_name` may not modify in
+ the specified cuboid between `pos1` and `pos2`.
+ * Returns `false` if no protections were found.
* Applies `is_protected()` to a 3D lattice of points in the defined volume.
The points are spaced evenly throughout the volume and have a spacing
similar to, but no larger than, `interval`.
@@ -3439,6 +3440,8 @@ These functions return the leftover itemstack.
* `interval` defaults to 4.
* `interval` should be carefully chosen and maximised to avoid an excessive
number of points being checked.
+ * Like `minetest.is_protected`, this function may be extended or overwritten by
+ mods to provide a faster implementation to check the cuboid for intersections.
* `minetest.rotate_and_place(itemstack, placer, pointed_thing, infinitestacks, orient_flags)`
* Attempt to predict the desired orientation of the facedir-capable node
defined by `itemstack`, and place it accordingly (on-wall, on the floor, or