mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
In-game settings menu using separate Lua environment (#15614)
This commit is contained in:
parent
3cb07d5fb6
commit
eeb6cab4c4
48 changed files with 652 additions and 290 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue