aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-11-05 02:11:35 -0500
committerkwolekr <kwolekr@minetest.net>2013-11-06 21:08:36 -0500
commitd886f340035d35e0cfc12dc57e35679430830919 (patch)
treeb48a884dd389d6642b06714bff73ae0bb55e42d6 /doc/lua_api.txt
parent8903c68460d79aeac6b1c5074003743f98371339 (diff)
downloadminetest-d886f340035d35e0cfc12dc57e35679430830919.tar.gz
minetest-d886f340035d35e0cfc12dc57e35679430830919.tar.bz2
minetest-d886f340035d35e0cfc12dc57e35679430830919.zip
Add 6d facedir rotation prediction routine
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 689496e22..122fbde99 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1543,6 +1543,23 @@ minetest.is_protected(pos, name) -> bool
minetest.record_protection_violation(pos, name)
^ This function calls functions registered with
minetest.register_on_protection_violation.
+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
+ hanging from the ceiling). Stacks are handled normally if the infinitestacks
+ field is false or omitted (else, the itemstack is not changed). orient_flags
+ is an optional table containing extra tweaks to the placement code:
+ invert_wall: if true, place wall-orientation on the ground and ground-
+ orientation on the wall.
+ force_wall: if true, always place the node in wall orientation.
+ force_ceiling: if true, always place on the ceiling.
+ force_floor: if true, always place the node on the floor.
+
+ The above four options are mutually-exclusive; the last in the list takes
+ precedence over the first.
+
+ force_facedir: if true, forcably reset the facedir to north when placing on
+ the floor or ceiling
Global objects:
minetest.env - EnvRef of the server environment and world.