summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2022-03-29 18:06:16 +0200
committerGitHub <noreply@github.com>2022-03-29 18:06:16 +0200
commit8d387433b14791db95e59127b5e6e30f58155c1e (patch)
treef7ce345cb892a6c9fdc0f210559e744c57e1f0d4 /doc
parent0f25fa7af655b98fa401176a523f269c843d1943 (diff)
downloadminetest-8d387433b14791db95e59127b5e6e30f58155c1e.tar.gz
minetest-8d387433b14791db95e59127b5e6e30f58155c1e.tar.bz2
minetest-8d387433b14791db95e59127b5e6e30f58155c1e.zip
Fix the documentation of InvRef:get_lists() and clean up code (#12150)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 029c53616..161bdd249 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -6355,9 +6355,9 @@ An `InvRef` is a reference to an inventory.
* `set_width(listname, width)`: set width of list; currently used for crafting
* `get_stack(listname, i)`: get a copy of stack index `i` in list
* `set_stack(listname, i, stack)`: copy `stack` to index `i` in list
-* `get_list(listname)`: return full list
+* `get_list(listname)`: return full list (list of `ItemStack`s)
* `set_list(listname, list)`: set full list (size will not change)
-* `get_lists()`: returns list of inventory lists
+* `get_lists()`: returns table that maps listnames to inventory lists
* `set_lists(lists)`: sets inventory lists (size will not change)
* `add_item(listname, stack)`: add item somewhere in list, returns leftover
`ItemStack`.