mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
feat: item models generation simple & remove core:item_models
This commit is contained in:
parent
7a5fe3b2b0
commit
fae372d19f
16 changed files with 136 additions and 63 deletions
|
|
@ -36,11 +36,11 @@ static int l_item_defs_count(lua::State* L) {
|
|||
static int l_item_get_icon(lua::State* L) {
|
||||
if (auto def = get_item_def(L, 1)) {
|
||||
switch (def->iconType) {
|
||||
case item_icon_type::none:
|
||||
case ItemIconType::NONE:
|
||||
return 0;
|
||||
case item_icon_type::sprite:
|
||||
case ItemIconType::SPRITE:
|
||||
return lua::pushstring(L, def->icon);
|
||||
case item_icon_type::block:
|
||||
case ItemIconType::BLOCK:
|
||||
return lua::pushstring(L, "block-previews:" + def->icon);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue