mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
Add server/client annotations to settingtypes.txt and make use of them (#15756)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user