mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add server/client annotations to settingtypes.txt and make use of them (#15756)
This commit is contained in:
parent
6724068659
commit
c30c94dfaa
12 changed files with 231 additions and 96 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "l_pause_menu.h"
|
||||
#include "gui/mainmenumanager.h"
|
||||
#include "lua_api/l_internal.h"
|
||||
#include "client/client.h"
|
||||
|
||||
|
||||
int ModApiPauseMenu::l_show_keys_menu(lua_State *L)
|
||||
|
@ -21,8 +22,16 @@ int ModApiPauseMenu::l_show_touchscreen_layout(lua_State *L)
|
|||
}
|
||||
|
||||
|
||||
int ModApiPauseMenu::l_is_internal_server(lua_State *L)
|
||||
{
|
||||
lua_pushboolean(L, getClient(L)->m_internal_server);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void ModApiPauseMenu::Initialize(lua_State *L, int top)
|
||||
{
|
||||
API_FCT(show_keys_menu);
|
||||
API_FCT(show_touchscreen_layout);
|
||||
API_FCT(is_internal_server);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ class ModApiPauseMenu: public ModApiBase
|
|||
private:
|
||||
static int l_show_keys_menu(lua_State *L);
|
||||
static int l_show_touchscreen_layout(lua_State *L);
|
||||
static int l_is_internal_server(lua_State *L);
|
||||
|
||||
public:
|
||||
static void Initialize(lua_State *L, int top);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue