diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-28 23:58:06 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-28 23:59:24 -0500 |
commit | 3c637b4bafcef7b90c98a8d656d300ccd8d37eac (patch) | |
tree | 4ff93d0d27da017f43ab970829881758d95e8838 /doc | |
parent | acb351950287339b3dcd44e462999e3317047401 (diff) | |
download | minetest-3c637b4bafcef7b90c98a8d656d300ccd8d37eac.tar.gz minetest-3c637b4bafcef7b90c98a8d656d300ccd8d37eac.tar.bz2 minetest-3c637b4bafcef7b90c98a8d656d300ccd8d37eac.zip |
LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set_metadata
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 1bfe0a0c2..557fdccb1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2152,13 +2152,16 @@ 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) +- set_name(itemname): returns true/false (success) + ^ clears item on failure - get_count(): returns number of items on the stack -- set_count(count) +- set_count(count): returns true/false (success) + ^ clears item on failure - get_wear(): returns tool wear (0-65535), 0 for non-tools -- set_wear(wear) +- set_wear(wear): returns true/false (success) + ^ clears item on failure - get_metadata(): returns metadata (a string attached to an item stack) -- set_metadata(metadata) +- set_metadata(metadata): returns true - 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) |