added docs

This commit is contained in:
GHOST11111100 2025-07-26 16:59:58 +03:00
parent 21364af7a3
commit b4d41a59e4
2 changed files with 40 additions and 0 deletions

View File

@ -97,6 +97,26 @@ inventory.set(...)
inventory.set_all_data(...)
```
for moving is inefficient, use inventory.move or inventory.move_range.
```lua
-- Set item caption
inventory.set_caption(
-- id of inventory
invid: int,
-- slot id
slot: int,
-- Item Caption
caption: string
)
-- Set item description
inventory.set_description(
-- id of inventory
invid: int,
-- slot id
slot: int,
-- Item Description
description: string
)
```
```lua
-- Returns a copy of value of a local property of an item by name or nil.

View File

@ -94,6 +94,26 @@ inventory.set(...)
inventory.set_all_data(...)
```
для перемещения вляется неэффективным, используйте inventory.move или inventory.move_range.
```lua
-- Задает имя предмету в слоте
inventory.set_caption(
-- id инвентаря
invid: int,
-- индекс слота
slot: int,
-- Имя предмета
caption: string
)
-- Задает описание предмету в слоте
inventory.set_description(
-- id инвентаря
invid: int,
-- индекс слота
slot: int,
-- Описание предмета
description: string
)
```
```lua
-- Проверяет наличие локального свойства по имени без копирования его значения.