mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
add item.caption(...) function & move item library docs to libitem.md
This commit is contained in:
parent
57e397e692
commit
4dfa235f12
6 changed files with 54 additions and 65 deletions
|
|
@ -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
|
||||
|
|
|
|||
21
doc/en/scripting/builtins/libitem.md
Normal file
21
doc/en/scripting/builtins/libitem.md
Normal file
|
|
@ -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
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue