mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update block library docs & add block.get_picking_item(...)
This commit is contained in:
parent
c94c2697e7
commit
277155e3d1
2 changed files with 52 additions and 24 deletions
|
|
@ -300,6 +300,13 @@ static int l_get_rotation_profile(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_get_picking_item(lua::State* L) {
|
||||
if (auto def = require_block(L)) {
|
||||
return lua::pushinteger(L, def->rt.pickingItem);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const luaL_Reg blocklib [] = {
|
||||
{"index", lua::wrap<l_index>},
|
||||
{"name", lua::wrap<l_name>},
|
||||
|
|
@ -327,5 +334,6 @@ const luaL_Reg blocklib [] = {
|
|||
{"get_model", lua::wrap<l_get_model>},
|
||||
{"get_hitbox", lua::wrap<l_get_hitbox>},
|
||||
{"get_rotation_profile", lua::wrap<l_get_rotation_profile>},
|
||||
{"get_picking_item", lua::wrap<l_get_picking_item>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue