aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-09-28 22:47:09 +0200
committerPilzAdam <pilzadam@minetest.net>2013-09-28 23:46:48 +0200
commita9c0961e0c9c3b854aca34b6d582198be1cd2277 (patch)
tree23985c8a62f0cca08257e112f358de09e382ba0c /doc
parent731392866f3f2595a08ca279b1d39584f6783ec0 (diff)
downloadminetest-a9c0961e0c9c3b854aca34b6d582198be1cd2277.tar.gz
minetest-a9c0961e0c9c3b854aca34b6d582198be1cd2277.tar.bz2
minetest-a9c0961e0c9c3b854aca34b6d582198be1cd2277.zip
Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStack
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 06230eaa7..335f8af65 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1658,9 +1658,13 @@ ItemStack: A stack of items.
methods:
- is_empty(): return true if stack is empty
- get_name(): returns item name (e.g. "default:stone")
+- set_name(itemname)
- get_count(): returns number of items on the stack
+- set_count(count)
- get_wear(): returns tool wear (0-65535), 0 for non-tools
+- set_wear(wear)
- get_metadata(): returns metadata (a string attached to an item stack)
+- set_metadata(metadata)
- clear(): removes all items from the stack, making it empty
- replace(item): replace the contents of this stack (item can also
be an itemstring or table)