mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add missing inventory function
This commit is contained in:
parent
46b4aab6dc
commit
8e719eace6
4 changed files with 46 additions and 3 deletions
|
|
@ -162,7 +162,19 @@ inventory.get_all_data(
|
|||
invid: int,
|
||||
-- slot index
|
||||
slot: int,
|
||||
) -> table
|
||||
) -> table | nil
|
||||
|
||||
-- Sets the values of all local item properties.
|
||||
inventory.set_all_data(
|
||||
-- inventory id
|
||||
invid: int,
|
||||
-- slot index
|
||||
slot: int,
|
||||
-- property:value table
|
||||
fields: table,
|
||||
-- clear other property values
|
||||
[optional] clear: boolean = false
|
||||
)
|
||||
```
|
||||
|
||||
```lua
|
||||
|
|
|
|||
|
|
@ -170,7 +170,19 @@ inventory.get_all_data(
|
|||
invid: int,
|
||||
-- индекс слота
|
||||
slot: int,
|
||||
) -> table
|
||||
) -> table | nil
|
||||
|
||||
-- Устанавливает значения локальных cвойств предмета.
|
||||
inventory.set_all_data(
|
||||
-- id инвентаря
|
||||
invid: int,
|
||||
-- индекс слота
|
||||
slot: int,
|
||||
-- таблица cвойство:значение
|
||||
fields: table,
|
||||
-- удалить остальные значения свойств
|
||||
[опционально] clear: boolean = false
|
||||
)
|
||||
```
|
||||
|
||||
```lua
|
||||
|
|
@ -222,4 +234,4 @@ inventory.use(
|
|||
-- индекс слота
|
||||
slot: int
|
||||
)
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue