added item.description() to itemlib, and update docs
This commit is contained in:
@@ -98,6 +98,13 @@ inventory.set_all_data(...)
|
||||
```
|
||||
for moving is inefficient, use inventory.move or inventory.move_range.
|
||||
```lua
|
||||
-- Get item caption
|
||||
inventory.get_caption(
|
||||
-- id of inventory
|
||||
invid: int,
|
||||
-- slot id
|
||||
slot: int
|
||||
)
|
||||
-- Set item caption
|
||||
inventory.set_caption(
|
||||
-- id of inventory
|
||||
@@ -107,6 +114,13 @@ inventory.set_caption(
|
||||
-- Item Caption
|
||||
caption: string
|
||||
)
|
||||
-- Get item description
|
||||
inventory.get_description(
|
||||
-- id of inventory
|
||||
invid: int,
|
||||
-- slot id
|
||||
slot: int
|
||||
)
|
||||
-- Set item description
|
||||
inventory.set_description(
|
||||
-- id of inventory
|
||||
|
||||
@@ -95,6 +95,13 @@ inventory.set_all_data(...)
|
||||
```
|
||||
для перемещения вляется неэффективным, используйте inventory.move или inventory.move_range.
|
||||
```lua
|
||||
-- Получает имя предмета в слоте
|
||||
inventory.get_caption(
|
||||
-- id инвентаря
|
||||
invid: int,
|
||||
-- индекс слота
|
||||
slot: int
|
||||
)
|
||||
-- Задает имя предмету в слоте
|
||||
inventory.set_caption(
|
||||
-- id инвентаря
|
||||
@@ -104,6 +111,13 @@ inventory.set_caption(
|
||||
-- Имя предмета
|
||||
caption: string
|
||||
)
|
||||
-- Получает описание предмета в слоте
|
||||
inventory.get_description(
|
||||
-- id инвентаря
|
||||
invid: int,
|
||||
-- индекс слота
|
||||
slot: int
|
||||
)
|
||||
-- Задает описание предмету в слоте
|
||||
inventory.set_description(
|
||||
-- id инвентаря
|
||||
|
||||
@@ -10,6 +10,9 @@ item.index(name: str) -> int
|
||||
-- Возвращает название предмета, отображаемое в интерфейсе.
|
||||
item.caption(itemid: int) -> str
|
||||
|
||||
-- Возвращает описание предмета, отображаемое в интерфейсе.
|
||||
item.description(itemid: int) -> str
|
||||
|
||||
-- Возвращает максимальный размер стопки для предмета.
|
||||
item.stack_size(itemid: int) -> int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user