diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-09-11 16:32:05 +0200 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-09-28 23:46:48 +0200 |
commit | 731392866f3f2595a08ca279b1d39584f6783ec0 (patch) | |
tree | 2a0fbe082061c80f1b1430a564282063e3616194 /doc/lua_api.txt | |
parent | 5dce44ec5e5f7231dba3cdbec3f1fdc683ce5a34 (diff) | |
download | minetest-731392866f3f2595a08ca279b1d39584f6783ec0.tar.gz minetest-731392866f3f2595a08ca279b1d39584f6783ec0.tar.bz2 minetest-731392866f3f2595a08ca279b1d39584f6783ec0.zip |
Allow to manually specify param2 in minetest.item_place() and return success
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 43c719a43..06230eaa7 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1361,14 +1361,18 @@ minetest.rollback_revert_actions_by(actor, seconds) -> bool, log messages Defaults for the on_* item definition functions: (These return the leftover itemstack) -minetest.item_place_node(itemstack, placer, pointed_thing) +minetest.item_place_node(itemstack, placer, pointed_thing, param2) ^ Place item as a node +^ param2 overrides facedir and wallmounted param2 +^ returns itemstack, success minetest.item_place_object(itemstack, placer, pointed_thing) ^ Place item as-is -minetest.item_place(itemstack, placer, pointed_thing) +minetest.item_place(itemstack, placer, pointed_thing, param2) ^ Use one of the above based on what the item is. ^ Calls on_rightclick of pointed_thing.under if defined instead ^ Note: is not called when wielded item overrides on_place +^ param2 overrides facedir and wallmounted param2 +^ returns itemstack, success minetest.item_drop(itemstack, dropper, pos) ^ Drop the item minetest.item_eat(hp_change, replace_with_item) |