mirror of
https://github.com/minetest/minetest.git
synced 2024-11-26 09:33:45 +01:00
Docs: Explain how to create and remove inventory lists (#14927)
This commit is contained in:
parent
e236ad8348
commit
c7642c3c6c
@ -3659,6 +3659,9 @@ Player Inventory lists
|
|||||||
* Is not created automatically, use `InvRef:set_size`
|
* Is not created automatically, use `InvRef:set_size`
|
||||||
* Is only used to enhance the empty hand's tool capabilities
|
* Is only used to enhance the empty hand's tool capabilities
|
||||||
|
|
||||||
|
Custom lists can be added and deleted with `InvRef:set_size(name, size)` like
|
||||||
|
any other inventory.
|
||||||
|
|
||||||
ItemStack transaction order
|
ItemStack transaction order
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
@ -7493,6 +7496,8 @@ An `InvRef` is a reference to an inventory.
|
|||||||
* `is_empty(listname)`: return `true` if list is empty
|
* `is_empty(listname)`: return `true` if list is empty
|
||||||
* `get_size(listname)`: get size of a list
|
* `get_size(listname)`: get size of a list
|
||||||
* `set_size(listname, size)`: set size of a list
|
* `set_size(listname, size)`: set size of a list
|
||||||
|
* If `listname` is not known, a new list will be created
|
||||||
|
* Setting `size` to 0 deletes a list
|
||||||
* returns `false` on error (e.g. invalid `listname` or `size`)
|
* returns `false` on error (e.g. invalid `listname` or `size`)
|
||||||
* `get_width(listname)`: get width of a list
|
* `get_width(listname)`: get width of a list
|
||||||
* `set_width(listname, width)`: set width of list; currently used for crafting
|
* `set_width(listname, width)`: set width of list; currently used for crafting
|
||||||
|
Loading…
Reference in New Issue
Block a user