hud.open_block 4th overlay mode argument

This commit is contained in:
MihailRis
2024-02-22 11:01:14 +03:00
parent 6b17e33b76
commit cae0ceb8a3
3 changed files with 27 additions and 17 deletions
+2 -1
View File
@@ -40,6 +40,7 @@ int l_hud_open_block(lua_State* L) {
lua::luaint x = lua_tointeger(L, 1);
lua::luaint y = lua_tointeger(L, 2);
lua::luaint z = lua_tointeger(L, 3);
bool playerInventory = !lua_toboolean(L, 4);
voxel* vox = scripting::level->chunks->get(x, y, z);
if (vox == nullptr) {
@@ -55,7 +56,7 @@ int l_hud_open_block(lua_State* L) {
auto id = scripting::blocks->createBlockInventory(x, y, z);
scripting::hud->openInventory(
glm::ivec3(x, y, z), layout, scripting::level->inventories->get(id)
glm::ivec3(x, y, z), layout, scripting::level->inventories->get(id), playerInventory
);
lua_pushinteger(L, id);