mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update entities library semantics
This commit is contained in:
parent
d1696eea12
commit
d285ffb2f7
5 changed files with 55 additions and 9 deletions
|
|
@ -21,7 +21,7 @@ static Block* require_block(lua::State* L) {
|
|||
return indices->blocks.get(id);
|
||||
}
|
||||
|
||||
static int l_name(lua::State* L) {
|
||||
static int l_get_def(lua::State* L) {
|
||||
if (auto def = require_block(L)) {
|
||||
return lua::pushstring(L, def->name);
|
||||
}
|
||||
|
|
@ -382,7 +382,7 @@ static int l_raycast(lua::State* L) {
|
|||
|
||||
const luaL_Reg blocklib [] = {
|
||||
{"index", lua::wrap<l_index>},
|
||||
{"name", lua::wrap<l_name>},
|
||||
{"name", lua::wrap<l_get_def>},
|
||||
{"material", lua::wrap<l_material>},
|
||||
{"caption", lua::wrap<l_caption>},
|
||||
{"defs_count", lua::wrap<l_count>},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue