#include <l_settings.h>
Public Member Functions | |
| LuaSettings (Settings *settings, const std::string &filename) | |
| LuaSettings (const std::string &filename, bool write_allowed) | |
| ~LuaSettings () | |
Static Public Member Functions | |
| static void | create (lua_State *L, Settings *settings, const std::string &filename) |
| static int | create_object (lua_State *L) |
| static void | Register (lua_State *L) |
| Static Public Member Functions inherited from ModApiBase | |
| static ScriptApiBase * | getScriptApiBase (lua_State *L) |
| static Server * | getServer (lua_State *L) |
| static ServerInventoryManager * | getServerInventoryMgr (lua_State *L) |
| static EmergeThread * | getEmergeThread (lua_State *L) |
| static IGameDef * | getGameDef (lua_State *L) |
| static Environment * | getEnv (lua_State *L) |
| static std::string | getCurrentModPath (lua_State *L) |
| template<typename T> | |
| static T * | getScriptApi (lua_State *L) |
| static bool | registerFunction (lua_State *L, const char *name, lua_CFunction func, int top) |
| template<typename T> | |
| static void | registerClass (lua_State *L, const luaL_Reg *methods, const luaL_Reg *metamethods) |
| template<typename T> | |
| static T * | checkObject (lua_State *L, int narg) |
| static int | l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func) |
| A wrapper for deprecated functions. | |
Static Public Attributes | |
| static const char | className [] = "Settings" |
Static Private Member Functions | |
| static int | gc_object (lua_State *L) |
| static int | l_get (lua_State *L) |
| static int | l_get_bool (lua_State *L) |
| static int | l_get_np_group (lua_State *L) |
| static int | l_get_flags (lua_State *L) |
| static int | l_get_pos (lua_State *L) |
| static int | l_set (lua_State *L) |
| static int | l_set_bool (lua_State *L) |
| static int | l_set_np_group (lua_State *L) |
| static int | l_set_pos (lua_State *L) |
| static int | l_remove (lua_State *L) |
| static int | l_get_names (lua_State *L) |
| static int | l_has (lua_State *L) |
| static int | l_write (lua_State *L) |
| static int | l_to_table (lua_State *L) |
Private Attributes | |
| Settings * | m_settings = nullptr |
| std::string | m_filename |
| bool | m_is_own_settings = false |
| bool | m_write_allowed = true |
Static Private Attributes | |
| static const luaL_Reg | methods [] |
Additional Inherited Members | |
| Protected Member Functions inherited from LuaHelper | |
| template<> | |
| bool | readParam (lua_State *L, int index) |
| template<> | |
| s16 | readParam (lua_State *L, int index) |
| template<> | |
| int | readParam (lua_State *L, int index) |
| template<> | |
| float | readParam (lua_State *L, int index) |
| template<> | |
| v2s16 | readParam (lua_State *L, int index) |
| template<> | |
| v2f | readParam (lua_State *L, int index) |
| template<> | |
| v3f | readParam (lua_State *L, int index) |
| template<> | |
| std::string_view | readParam (lua_State *L, int index) |
| template<> | |
| std::string | readParam (lua_State *L, int index) |
| template<> | |
| std::string_view | readParam (lua_State *L, int index) |
| Read a string from Lua state L at index without copying it. | |
| Static Protected Member Functions inherited from LuaHelper | |
| template<typename T> | |
| static T | readParam (lua_State *L, int index) |
| Read a value using a template type T from Lua state L at index. | |
| template<typename T> | |
| static T | readParam (lua_State *L, int index, const T &default_value) |
| Read a value using a template type T from Lua state L at index. | |
| static bool | geti (lua_State *L, int table, int i) |
| Utility for list iteration. | |
| template<typename F> | |
| static void | for_ipairs (lua_State *L, int table, const F &f) |
| Iterate values t[1], t[2], ... of the given table in order. | |
| LuaSettings::LuaSettings | ( | Settings * | settings, |
| const std::string & | filename ) |
References m_filename, m_settings, and settings.
Referenced by create(), create_object(), gc_object(), l_get(), l_get_bool(), l_get_flags(), l_get_names(), l_get_np_group(), l_get_pos(), l_has(), l_remove(), l_set(), l_set_bool(), l_set_np_group(), l_set_pos(), l_to_table(), and l_write().
| LuaSettings::LuaSettings | ( | const std::string & | filename, |
| bool | write_allowed ) |
References m_filename, m_is_own_settings, m_settings, and m_write_allowed.
| LuaSettings::~LuaSettings | ( | ) |
References m_is_own_settings, and m_settings.
|
static |
References LuaSettings(), className, and settings.
Referenced by ModApiUtil::Initialize(), ModApiUtil::InitializeAsync(), and ModApiUtil::InitializeClient().
|
static |
References LuaSettings(), CHECK_SECURE_PATH_POSSIBLE_WRITE, className, and NO_MAP_LOCK_REQUIRED.
Referenced by Register().
|
staticprivate |
References LuaSettings().
Referenced by Register().
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::exists(), Settings::get(), m_settings, and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::exists(), Settings::getBool(), m_settings, NO_MAP_LOCK_REQUIRED, and LuaHelper::readParam().
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::getFlagDescFallback(), Settings::getFlagStrNoEx(), m_settings, NO_MAP_LOCK_REQUIRED, and table.
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::getNames(), m_settings, and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::exists(), Settings::getNoiseParams(), m_settings, NO_MAP_LOCK_REQUIRED, and push_noiseparams().
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::getV3FNoEx(), m_settings, NO_MAP_LOCK_REQUIRED, and push_v3f().
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), Settings::existsLocal(), m_settings, and NO_MAP_LOCK_REQUIRED.
|
staticprivate |
References LuaSettings(), CHECK_SETTING_SECURITY, ModApiBase::checkObject(), m_settings, NO_MAP_LOCK_REQUIRED, and Settings::remove().
|
staticprivate |
References LuaSettings(), CHECK_SETTING_SECURITY, ModApiBase::checkObject(), m_settings, NO_MAP_LOCK_REQUIRED, and Settings::set().
|
staticprivate |
References LuaSettings(), CHECK_SETTING_SECURITY, ModApiBase::checkObject(), m_settings, NO_MAP_LOCK_REQUIRED, LuaHelper::readParam(), and Settings::setBool().
|
staticprivate |
References LuaSettings(), CHECK_SETTING_SECURITY, ModApiBase::checkObject(), m_settings, NO_MAP_LOCK_REQUIRED, read_noiseparams(), and Settings::setNoiseParams().
|
staticprivate |
References LuaSettings(), CHECK_SETTING_SECURITY, check_v3f(), ModApiBase::checkObject(), m_settings, NO_MAP_LOCK_REQUIRED, and Settings::setV3F().
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), m_settings, NO_MAP_LOCK_REQUIRED, and push_settings_table().
|
staticprivate |
References LuaSettings(), ModApiBase::checkObject(), m_filename, m_settings, m_write_allowed, NO_MAP_LOCK_REQUIRED, and Settings::updateConfigFile().
|
static |
References className, create_object(), gc_object(), methods, and ModApiBase::registerClass().
Referenced by ServerScripting::InitializeAsync(), ClientScripting::InitializeModApi(), EmergeScripting::InitializeModApi(), ServerScripting::InitializeModApi(), PauseMenuScripting::initializeModApi(), and MainMenuScripting::registerLuaClasses().
|
static |
Referenced by create(), create_object(), and Register().
|
private |
Referenced by LuaSettings(), LuaSettings(), and l_write().
|
private |
Referenced by LuaSettings(), and ~LuaSettings().
|
private |
Referenced by LuaSettings(), LuaSettings(), ~LuaSettings(), l_get(), l_get_bool(), l_get_flags(), l_get_names(), l_get_np_group(), l_get_pos(), l_has(), l_remove(), l_set(), l_set_bool(), l_set_np_group(), l_set_pos(), l_to_table(), and l_write().
|
private |
Referenced by LuaSettings(), and l_write().
|
staticprivate |
Referenced by Register().