mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 09:55:22 +02:00
In-game settings menu using separate Lua environment (#15614)
This commit is contained in:
@@ -30,8 +30,9 @@
|
||||
static inline int checkSettingSecurity(lua_State* L, const std::string &name)
|
||||
{
|
||||
#if CHECK_CLIENT_BUILD()
|
||||
// Main menu is allowed everything
|
||||
if (ModApiBase::getGuiEngine(L) != nullptr)
|
||||
// Main menu and pause menu are allowed everything
|
||||
auto context = ModApiBase::getScriptApiBase(L)->getType();
|
||||
if (context == ScriptingType::MainMenu || context == ScriptingType::PauseMenu)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user