summaryrefslogtreecommitdiff
path: root/src/settings.cpp
Commit message (Collapse)AuthorAge
* Enforce limits of settings that could cause buggy behaviour (#12450)SmallJoker2022-07-09
| | | Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
* Mainmenu game-related changes (#11887)sfan52022-01-09
| | | | | | | fixes: * Switching between games does not immediately hide creative mode / damage buttons if so specified * World creation menu has a game selection list even though the menu already provides a gamebar * Showing gameid in world list is unnecessary * Choice of mapgen parameters in menu persists between games (and was half-broken)
* Fix various code & correctness issues (#11815)sfan52021-12-05
|
* Remove a few unused functions reported by callcatcher (#11658)SmallJoker2021-10-12
|
* Make sure relevant std::stringstreams are set to binarysfan52021-09-11
|
* Fix inconsistent integer comparison warningsSmallJoker2021-08-17
|
* Fix /emergeblocks crashing in debug builds (#11461)Wuzzy2021-07-31
| | | The reason for the bug was an u16 overflow, thus failing the assert. This only happened in Debug build but not in Release builds.
* Rework Settings to support arbitrary hierarchies (#11352)sfan52021-06-23
|
* Reserve vectors before pushing and other code quality changes (#11161)sfan52021-04-05
|
* Settings: Purge getDefault, clean FontEngineSmallJoker2021-01-29
|
* Settings: Proper priority hierarchySmallJoker2021-01-29
| | | | | | | | | | | 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
* Prevent games from setting secure settings (#10460)rubenwardy2020-10-06
|
* Settings: Remove unused functionsSmallJoker2020-10-01
| | | | Make Settings-internal functions private
* Settings: Fix unittest memory leak, change input typesSmallJoker2020-09-22
|
* Settings: Fix crash on exit due to group double-freeSmallJoker2020-09-21
|
* Settings: Fix game minetest.conf flags overriding defaults (#9404)SmallJoker2020-02-17
| | | | | | The game minetest.conf flags directly overwrote the global minetest.conf default values, resulting in unwanted erased mapgen flags. * Fix set_mapgen_setting
* Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) ↵SmallJoker2020-01-25
| | | | | | | | | | | (#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>
* Settings: Prevent mutex deadlock in remove() (#7803)SmallJoker2019-09-18
|
* Settings: Disallow space characters entirelySmallJoker2019-06-10
| | | | | Lua API: > Setting names can't contain whitespace or any of ="{}#
* Advanced settings noiseparams: Remove '}' left in .confSmallJoker2019-01-19
| | | | | Previously, when editing noiseparams then restoring them to the default, the final '}' was not removed from minetest.conf.
* Remove settings properly (#7676)SmallJoker2018-09-30
|
* Fix issue Minetest crash when custom font path is not existMuhammad Rifqi Priyo Susanto2017-11-08
| | | | We try to use default fallback for both mono and main font when custom font path is not exist. This way, if Minetest is not corrupted, we could avoid crash.
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot2017-08-19
| | | | | | | | | | | * Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
* [CSM] Add flavour limits controlled by server (#5930)Loïc Blot2017-07-18
| | | | | | | | | | | | | | | | | | | | * [CSM] Add flavour limits controlled by server Server send flavour limits to client permitting to disable or limit some Lua calls * Add limits for reading nodedefs and itemdefs * flavour: Add lookup node limits * Merge get_node_or_nil into get_node. Sending fake node doesn't make sense in CSM, just return nil if node is not available for any reason * Add node range customization when noderange flavour is enabled (default 8 nodes) * Limit nodes range & disable chat message sending by default * Bump protocol version
* Some performance optimizations (#5424)Loïc Blot2017-03-22
| | | | | | | | | | | | | | | | | | | * Some performance optimizations This is globally removing some memory useless copy * use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it * pass some stack created strings to static const as they are not modified anywhere * Camera: return nametags per const ref instead of a list pointer, we only need to read it * INodeDefManager: getAll should be a result ref writer instead of a return copy * INodeDefManager: getAlias should return a const std::string ref * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop) * CNodeDefManager::updateAliases: prevent a idef getall copy * Profiler: constness * rollback_interface: create real_name later, and use const ref * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction, * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
| | | | | | | | | | | | This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
* Settings: Clean up settings changed callback codekwolekr2016-06-11
|
* Clean up StrfndShadowNinja2016-03-19
| | | | | | | | | | | Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
* Fix Settings::remove() always returning trueKahrl2016-01-19
|
* Change i++ to ++iDavid Jones2015-08-25
|
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Add mod securityShadowNinja2015-05-16
| | | | Due to compatibility concerns, this is temporarily disabled.
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
* Fix game minetest.conf default settingsest312015-03-18
| | | | This was a regression introduced by f6e4c5d9cf459e8278a76a2beaee59732e841458 .
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Settings fixes Make the GameGlobalShaderConstantSetter use the settings ↵gregorycu2015-01-25
| | | | callback (8% perf improvement in game loop) Ensure variable is set Ensure settings callback is threadsafe
* Revert "Make the GameGlobalShaderConstantSetter use the settings callback ↵Craig Robbins2015-01-25
| | | | | | (8% perf improvement in game loop)" This reverts commit a555e2d9b0ccee452996381a44677b8bec210036.
* Make the GameGlobalShaderConstantSetter use the settings callback (8% perf ↵gregorycu2015-01-23
| | | | | | improvement in game loop) Amend the settings callback to support userdata
* Settings: Fix invalid memory access when setting not found in working memkwolekr2014-12-12
|
* Settings: Fail on invalid sequence and throw exception for LuaSettingskwolekr2014-12-12
|
* Settings: Sanitize value for multiline terminator tokenskwolekr2014-12-11
|
* Add support for lacunarity in legacy NoiseParams string formatkwolekr2014-12-10
|
* Settings: Sanitize setting name everywhere, not just LuaSettingskwolekr2014-12-09
|
* Settings: Make setting entry group and values mutually exclusivekwolekr2014-12-09
| | | | | This greatly reduces the complexity of Settings code. Additionally, several memory leaks were fixed.
* Add flags and lacunarity as new noise parameterskwolekr2014-12-07
| | | | | | | Add 'absolute value' option to noise map functions Extend persistence modulation to 3D noise Extend 'eased' option to noise2d_perlin* functions Some noise.cpp formatting fixups
* Close settings files and save them correctlySmallJoker2014-12-06
|
* Settings: Various setting group fixes and enhancementskwolekr2014-12-04
| | | | | | | | - Remove blank setting values when setting has a group - Pair setting values with groups in file when possible - Preserve user-set whitespace in setting objects - Delete setting value when setting NoiseParams group - Delete overwritten groups outside of lock
* Settings: Fix getNoiseParamsFromValue()kwolekr2014-12-02
|
* Use setting groups for NoiseParamskwolekr2014-12-02
| | | | | | Add format example to minetest.conf.example Add Settings::setU16() Throw exception on attempted access of NULL settings groups
* Fix settings callback "call" lost on rebasesapier2014-12-01
|