aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_settings.cpp
AgeCommit message (Collapse)Author
2022-05-29Protect a few more settings from being set from modssfan5
Of those settings main_menu_script has concrete security impact, the rest are added out of abundance of caution.
2021-05-30script: Replace calls to depreated luaL_openlibsfan5
2021-03-04Protect mg_name and mg_flags from being set by Lua (#11010)sfan5
2021-03-01Settings: Push groups in to_table as wellSmallJoker
2021-01-29Settings: Proper priority hierarchySmallJoker
Remove old defaults system Introduce priority-based fallback list Use new functions for map_meta special functions Change groups to use end tags Unittest changes: * Adapt unittest to the new code * Compare Settings objects
2020-01-25Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) ↵SmallJoker
(#9284) Unified flags handling in C++ and Lua Settings API -> Reading only, for now. Writing can be implemented later, if needed. API function to read the currently active flags -> was impossible from Lua Co-authored-by: Wuzzy <wuzzy2@mail.ru>
2018-06-30Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot
* Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value
2017-12-17Allow 'default' parameter in 'settings:get_bool' functionJordan Irwin
Default value is used when the setting key is not found in the config file. If default value is not set, 'nil' is returned. #6188
2017-10-23Improvements/fixes for noise parameter input in advanced settingsMuhammad Rifqi Priyo Susanto
Formspec input for each individual noise parameter and flag. Allow noise flags to be set in advanced settings, previously only settable in minetest.conf. Standardise 'group format' for noise parameters set in minetest.conf, as only these support noise flags. However the older 'single line' format is still accepted to support existing minetest.conf files. Therefore auto-generate minetest.conf.example with noise parameters in 'group format'. Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or 'noise_params_3D', the dimension number is displayed in the advanced settings edit page.
2017-08-19Code modernization: subfolders (#6283)Loïc Blot
* Code modernization: subfolders Modernize various code on subfolders client, network, script, threading, unittests, util * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Make connection.cpp readable in a pointed place + typo
2017-06-19C++11 cleanup on constructors (#6000)Vincent Glize
* C++11 cleanup on constructors dir script
2017-05-06Use a settings object for the main settingsShadowNinja
This unifies the settings APIs. This also unifies the sync and async registration APIs, since the async registration API did not support adding non-functions to the API table.
2017-04-08Replace luaL_reg with luaL_Reg as recent LuaJIT dropped the Lua 5.0 compat ↵Loïc Blot
(#5541) We are bundling Lua5.1 which has same macro
2016-12-21Fix warning reported by clang (possible bug in Settings lua api)sfan5
2016-12-20Mod security: Allow read-only access to all mod pathsShadowNinja
2015-05-16Add mod securityShadowNinja
Due to compatibility concerns, this is temporarily disabled.
2014-12-12Settings: Fail on invalid sequence and throw exception for LuaSettingskwolekr
2014-12-09Settings: Sanitize setting name everywhere, not just LuaSettingskwolekr
2014-11-30LuaSettings: Sanitize setting name stringskwolekr
2013-09-10Add Settings interface for LuaPilzAdam