1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Fix the documentation of InvRef:get_lists() and clean up code (#12150)

This commit is contained in:
DS 2022-03-29 18:06:16 +02:00 committed by GitHub
parent 0f25fa7af6
commit 8d387433b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 56 additions and 96 deletions

View file

@ -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`.