summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-07-24 20:57:17 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-07-24 20:57:17 +0300
commit2ac20982e0772b94b21d95b53519bd2164632d98 (patch)
tree3a2e7b783ff4362ac723dee22809a8e6b7f8750a /doc
parent96eac87d47e4d9e815dff5c9f830326e515d4ea2 (diff)
downloadminetest-2ac20982e0772b94b21d95b53519bd2164632d98.tar.gz
minetest-2ac20982e0772b94b21d95b53519bd2164632d98.tar.bz2
minetest-2ac20982e0772b94b21d95b53519bd2164632d98.zip
Detached inventories
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 176745a2d..c9fafd65f 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -677,6 +677,7 @@ size[<W>,<H>]
^ deprecated: invsize[<W>,<H>;]
list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;]
+list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;<starting item index>]
^ Show an inventory list
image[<X>,<Y>;<W>,<H>;<texture name>]
@@ -726,10 +727,12 @@ image_button_exit[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]
^ When clicked, fields will be sent and the form will quit.
Inventory location:
+
- "context": Selected node metadata (deprecated: "current_name")
- "current_player": Player to whom the menu is shown
- "player:<name>": Any player
- "nodemeta:<X>,<Y>,<Z>": Any node metadata
+- "detached:<name>": A detached inventory
Helper functions
-----------------
@@ -847,6 +850,9 @@ Inventory:
minetest.get_inventory(location) -> InvRef
^ location = eg. {type="player", name="celeron55"}
{type="node", pos={x=, y=, z=}}
+ {type="detached", name="creative"}
+minetest.create_detached_inventory(name) -> InvRef
+^ Creates a detached inventory. If it already exists, it is cleared.
Item handling:
minetest.inventorycube(img1, img2, img3)