diff options
author | sfan5 <sfan5@live.de> | 2016-10-14 13:08:59 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-10-15 12:42:59 +0200 |
commit | 9a3129da5e39e3495a038c9da94586247365fa8b (patch) | |
tree | 7d0c618fb1bc646ec8366b243d5a6395e7d76ae5 | |
parent | a468acce2ccd0197aa662fa592dba7dfe3e46f96 (diff) | |
download | minetest-9a3129da5e39e3495a038c9da94586247365fa8b.tar.gz minetest-9a3129da5e39e3495a038c9da94586247365fa8b.tar.bz2 minetest-9a3129da5e39e3495a038c9da94586247365fa8b.zip |
Make documentation about ItemStack:set_{name,count,wear} clearer
These methods do not actually fail but instead clear the item stack
and return false if a value like e.g. "" is passed.
-rw-r--r-- | doc/lua_api.txt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index a1d598e7d..8cb3f72bd 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2966,13 +2966,11 @@ an itemstring, a table or `nil`. #### Methods * `is_empty()`: Returns `true` if stack is empty. * `get_name()`: Returns item name (e.g. `"default:stone"`). -* `set_name(item_name)`: Returns boolean success. - Clears item on failure. +* `set_name(item_name)`: Returns boolean whether item was cleared * `get_count()`: Returns number of items on the stack. -* `set_count(count)` +* `set_count(count)`: Returns boolean whether item was cleared * `get_wear()`: Returns tool wear (`0`-`65535`), `0` for non-tools. -* `set_wear(wear)`: Returns boolean success. - Clears item on failure. +* `set_wear(wear)`: Returns boolean whether item was cleared * `get_metadata()`: Returns metadata (a string attached to an item stack). * `set_metadata(metadata)`: Returns true. * `clear()`: removes all items from the stack, making it empty. |