rename item.get_model_name and item.get_placing_block

This commit is contained in:
MihailRis
2024-10-31 21:53:56 +03:00
parent e217476e84
commit e0624b11d0
5 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -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}};