aboutsummaryrefslogtreecommitdiff
path: root/src/settings.cpp
AgeCommit message (Collapse)Author
2018-09-30Remove settings properly (#7676)SmallJoker
2017-11-08Fix issue Minetest crash when custom font path is not existMuhammad Rifqi Priyo Susanto
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.
2017-08-19Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)Loïc Blot
* 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
2017-07-18[CSM] Add flavour limits controlled by server (#5930)Loïc Blot
* [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
2017-03-22Some performance optimizations (#5424)Loïc Blot
* 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
2016-10-05Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot
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
2016-06-11Settings: Clean up settings changed callback codekwolekr
2016-03-19Clean up StrfndShadowNinja
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.
2016-01-19Fix Settings::remove() always returning trueKahrl
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* 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.
2015-05-16Add mod securityShadowNinja
Due to compatibility concerns, this is temporarily disabled.
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
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
2015-03-18Fix game minetest.conf default settingsest31
This was a regression introduced by f6e4c5d9cf459e8278a76a2beaee59732e841458 .
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-01-25Settings fixes Make the GameGlobalShaderConstantSetter use the settings ↵gregorycu
callback (8% perf improvement in game loop) Ensure variable is set Ensure settings callback is threadsafe
2015-01-25Revert "Make the GameGlobalShaderConstantSetter use the settings callback ↵Craig Robbins
(8% perf improvement in game loop)" This reverts commit a555e2d9b0ccee452996381a44677b8bec210036.
2015-01-23Make the GameGlobalShaderConstantSetter use the settings callback (8% perf ↵gregorycu
improvement in game loop) Amend the settings callback to support userdata
2014-12-12Settings: Fix invalid memory access when setting not found in working memkwolekr
2014-12-12Settings: Fail on invalid sequence and throw exception for LuaSettingskwolekr
2014-12-11Settings: Sanitize value for multiline terminator tokenskwolekr
2014-12-10Add support for lacunarity in legacy NoiseParams string formatkwolekr
2014-12-09Settings: Sanitize setting name everywhere, not just LuaSettingskwolekr
2014-12-09Settings: Make setting entry group and values mutually exclusivekwolekr
This greatly reduces the complexity of Settings code. Additionally, several memory leaks were fixed.
2014-12-07Add flags and lacunarity as new noise parameterskwolekr
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
2014-12-06Close settings files and save them correctlySmallJoker
2014-12-04Settings: Various setting group fixes and enhancementskwolekr
- 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
2014-12-02Settings: Fix getNoiseParamsFromValue()kwolekr
2014-12-02Use setting groups for NoiseParamskwolekr
Add format example to minetest.conf.example Add Settings::setU16() Throw exception on attempted access of NULL settings groups
2014-12-01Fix settings callback "call" lost on rebasesapier
2014-12-01Fix buildCraig Robbins
Note: this does not fix the warnings generated by clang
2014-11-30LuaSettings: Sanitize setting name stringskwolekr
2014-11-30settings: Add setting groups and multiline entrieskwolekr
2014-11-30Implement proper font handlingsapier
2014-11-08Stop inserting empty lines at end of minetest.conf file each time it is ↵Craig Robbins
rewritten See: https://github.com/minetest/minetest/issues/1790
2014-09-22Fix command line parsingKahrl
Broken by 6bc4cad0eddd7a7cf593ca1471599e2d75727379, e.g. minetest --worldname world would be parsed as minetest --worldname --worldname
2014-09-21Split settings into seperate source and header filesShadowNinja
This also cleans up settings a bit