mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add entities.def_solid
This commit is contained in:
parent
bed71ea607
commit
2d1e783a64
1 changed files with 8 additions and 0 deletions
|
|
@ -50,6 +50,13 @@ static int l_def_hitbox(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_def_solid(lua::State* L) {
|
||||
if (auto def = require_entity_def(L)) {
|
||||
return lua::pushboolean(L, def->solid);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_defs_count(lua::State* L) {
|
||||
return lua::pushinteger(L, indices->entities.count());
|
||||
}
|
||||
|
|
@ -373,6 +380,7 @@ const luaL_Reg entitylib[] = {
|
|||
{"def_index", lua::wrap<l_def_index>},
|
||||
{"def_name", lua::wrap<l_def_name>},
|
||||
{"def_hitbox", lua::wrap<l_def_hitbox>},
|
||||
{"def_solid", lua::wrap<l_def_solid>},
|
||||
{"get_def", lua::wrap<l_get_def>},
|
||||
{"defs_count", lua::wrap<l_defs_count>},
|
||||
{"spawn", lua::wrap<l_spawn>},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue