summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-07-25 16:52:00 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-07-25 16:52:00 +0300
commit0346e68debc73c20be1220177bab4da8716ae402 (patch)
treec768513bee79285566d8104af28adb0b3d01abfe /doc
parentdb62c227c81285e23bd2949551a52a433dbfd8f9 (diff)
downloadminetest-0346e68debc73c20be1220177bab4da8716ae402.tar.gz
minetest-0346e68debc73c20be1220177bab4da8716ae402.tar.bz2
minetest-0346e68debc73c20be1220177bab4da8716ae402.zip
Add special return value -1 to inventry callbacks
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 4dcb0af87..35b89021d 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1370,10 +1370,12 @@ Node definition (register_node)
allow_metadata_inventory_put = func(pos, listname, index, stack, player),
^ Called when a player wants to put something into the inventory
^ Return value: number of items allowed to put
+ ^ Return value: -1: Allow and don't modify item count in inventory
allow_metadata_inventory_take = func(pos, listname, index, stack, player),
^ Called when a player wants to take something out of the inventory
^ Return value: number of items allowed to take
+ ^ Return value: -1: Allow and don't modify item count in inventory
on_metadata_inventory_move = func(pos, from_list, from_index,
to_list, to_index, count, player),
@@ -1446,10 +1448,12 @@ Detached inventory callbacks
allow_put = func(inv, listname, index, stack, player),
^ Called when a player wants to put something into the inventory
^ Return value: number of items allowed to put
+ ^ Return value: -1: Allow and don't modify item count in inventory
allow_take = func(inv, listname, index, stack, player),
^ Called when a player wants to take something out of the inventory
^ Return value: number of items allowed to take
+ ^ Return value: -1: Allow and don't modify item count in inventory
on_move = func(inv, from_list, from_index, to_list, to_index, count, player),
on_put = func(inv, listname, index, stack, player),