Fix setting secure settings

This commit is contained in:
grorp 2025-01-02 00:24:14 +01:00
parent e28ea24418
commit 37e38dad7f

View File

@ -30,9 +30,9 @@
static inline int checkSettingSecurity(lua_State* L, const std::string &name)
{
#if CHECK_CLIENT_BUILD()
// Main menu is allowed everything
// TODO: also permit pause menu
if (ModApiBase::getGuiEngine(L) != nullptr)
// Main menu and pause menu are allowed everything
if (ModApiBase::getGuiEngine(L) ||
ModApiBase::getScriptApiBase(L)->getType() == ScriptingType::PauseMenu)
return 0;
#endif