add missing inventory function

This commit is contained in:
MihailRis 2026-07-19 22:43:50 +03:00
parent 46b4aab6dc
commit 8e719eace6
4 changed files with 46 additions and 3 deletions

View file

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

View file

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