mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
rename item.get_model_name and item.get_placing_block
This commit is contained in:
parent
e217476e84
commit
e0624b11d0
5 changed files with 10 additions and 10 deletions
|
|
@ -54,14 +54,14 @@ static int l_caption(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_get_placing_block(lua::State* L) {
|
||||
static int l_placing_block(lua::State* L) {
|
||||
if (auto def = get_item_def(L, 1)) {
|
||||
return lua::pushinteger(L, def->rt.placingBlock);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_get_model_name(lua::State* L) {
|
||||
static int l_model_name(lua::State* L) {
|
||||
if (auto def = get_item_def(L, 1)) {
|
||||
return lua::pushstring(L, def->modelName);
|
||||
}
|
||||
|
|
@ -75,6 +75,6 @@ const luaL_Reg itemlib[] = {
|
|||
{"defs_count", lua::wrap<l_defs_count>},
|
||||
{"icon", lua::wrap<l_get_icon>},
|
||||
{"caption", lua::wrap<l_caption>},
|
||||
{"get_placing_block", lua::wrap<l_get_placing_block>},
|
||||
{"get_model_name", lua::wrap<l_get_model_name>},
|
||||
{"placing_block", lua::wrap<l_placing_block>},
|
||||
{"model_name", lua::wrap<l_model_name>},
|
||||
{NULL, NULL}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue