add item.caption(...) function & move item library docs to libitem.md
This commit is contained in:
@@ -10,7 +10,7 @@ block.index(name: str) -> int
|
||||
-- Returns the id of the block material.
|
||||
block.material(blockid: int) -> str
|
||||
|
||||
-- Returns the block name displayed in the UI.
|
||||
-- Returns the block display name.
|
||||
block.caption(blockid: int) -> str
|
||||
|
||||
-- Returns integer ID by block position
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# *item* library
|
||||
|
||||
```lua
|
||||
-- Returns item string ID (name) by index
|
||||
item.name(itemid: int) -> str
|
||||
|
||||
-- Returns item integer ID (index) by name
|
||||
item.index(name: str) -> int
|
||||
|
||||
-- Returns the item display name.
|
||||
block.caption(blockid: int) -> str
|
||||
|
||||
-- Returns max stack size for the item
|
||||
item.stack_size(itemid: int) -> int
|
||||
|
||||
-- Returns count of available item IDs.
|
||||
item.defs_count() -> int
|
||||
|
||||
-- Returns item icon name to use in 'src' property of an image element
|
||||
item.icon(itemid: int) -> str
|
||||
```
|
||||
Reference in New Issue
Block a user