mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
added docs
This commit is contained in:
parent
21364af7a3
commit
b4d41a59e4
2 changed files with 40 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
-- Проверяет наличие локального свойства по имени без копирования его значения.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue