mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix buttons not working for Lua-triggered formspecs
This commit is contained in:
parent
8b75736c6f
commit
0b1d09ff4f
8 changed files with 29 additions and 11 deletions
|
@ -4921,13 +4921,14 @@ static int l_create_detached_inventory_raw(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// create_detached_formspec_raw(name)
|
||||
// show_formspec(playername,formname,formspec)
|
||||
static int l_show_formspec(lua_State *L)
|
||||
{
|
||||
const char *playername = luaL_checkstring(L, 1);
|
||||
const char *formspec = luaL_checkstring(L, 2);
|
||||
const char *formname = luaL_checkstring(L, 2);
|
||||
const char *formspec = luaL_checkstring(L, 3);
|
||||
|
||||
if(get_server(L)->showFormspec(playername,formspec))
|
||||
if(get_server(L)->showFormspec(playername,formspec,formname))
|
||||
{
|
||||
lua_pushboolean(L, true);
|
||||
}else{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue