diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2022-07-09 22:32:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 22:32:08 +0200 |
commit | 051181fa6ee00d8379e8a7dc7442b58342d4352b (patch) | |
tree | 58ad84f05310024b311c533684defdbeb5ee3e84 /builtin | |
parent | 7c261118e06c630ea9ad00f20d7005b8edc108dd (diff) | |
download | minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.gz minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.bz2 minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.zip |
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/dlg_contentstore.lua | 2 | ||||
-rw-r--r-- | builtin/settingtypes.txt | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua index 11eaceac3..2152b8a39 100644 --- a/builtin/mainmenu/dlg_contentstore.lua +++ b/builtin/mainmenu/dlg_contentstore.lua @@ -191,7 +191,7 @@ end local function queue_download(package, reason) local max_concurrent_downloads = tonumber(core.settings:get("contentdb_max_concurrent_downloads")) - if number_downloading < max_concurrent_downloads then + if number_downloading < math.max(max_concurrent_downloads, 1) then start_install(package, reason) else table.insert(download_queue, { package = package, reason = reason }) diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 10438fe21..caa6e4db3 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -95,7 +95,7 @@ always_fly_fast (Always fly fast) bool true # The time in seconds it takes between repeated node placements when holding # the place button. -repeat_place_time (Place repetition interval) float 0.25 0.001 +repeat_place_time (Place repetition interval) float 0.25 0.25 2 # Automatically jump up single-node obstacles. autojump (Automatic jumping) bool false @@ -223,7 +223,7 @@ view_bobbing_amount (View bobbing factor) float 1.0 0.0 7.9 # Multiplier for fall bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. -fall_bobbing_amount (Fall bobbing factor) float 0.03 0.0 +fall_bobbing_amount (Fall bobbing factor) float 0.03 0.0 100.0 [**Camera] @@ -1877,7 +1877,7 @@ server_side_occlusion_culling (Server side occlusion culling) bool true # Reducing this value increases cave and dungeon density. # Altering this value is for special usage, leaving it unchanged is # recommended. -chunksize (Chunk size) int 5 1 5 +chunksize (Chunk size) int 5 1 10 # Dump the mapgen debug information. enable_mapgen_debug_info (Mapgen debug) bool false @@ -1926,7 +1926,7 @@ curl_file_download_timeout (cURL file download timeout) int 300000 100 214748364 screen_dpi (DPI) int 72 1 # Adjust the detected display density, used for scaling UI elements. -display_density_factor (Display Density Scaling Factor) float 1 +display_density_factor (Display Density Scaling Factor) float 1 0.5 5.0 # Windows systems only: Start Minetest with the command line window in the background. # Contains the same information as the file debug.txt (default name). |