aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu/dlg_settings_advanced.lua
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2018-09-30 19:57:31 +0200
committerGitHub <noreply@github.com>2018-09-30 19:57:31 +0200
commita29bc8e8babd9320b629e67dee753a08d18799d3 (patch)
treee503c16f83bd954f2541566155980d6af84a156b /builtin/mainmenu/dlg_settings_advanced.lua
parent18a8fbf465b47c4780d63f34c960af7a52d0cf82 (diff)
downloadminetest-a29bc8e8babd9320b629e67dee753a08d18799d3.tar.gz
minetest-a29bc8e8babd9320b629e67dee753a08d18799d3.tar.bz2
minetest-a29bc8e8babd9320b629e67dee753a08d18799d3.zip
Remove settings properly (#7676)
Diffstat (limited to 'builtin/mainmenu/dlg_settings_advanced.lua')
-rw-r--r--builtin/mainmenu/dlg_settings_advanced.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua
index 2e6617aa7..cc8a6d5d0 100644
--- a/builtin/mainmenu/dlg_settings_advanced.lua
+++ b/builtin/mainmenu/dlg_settings_advanced.lua
@@ -977,12 +977,7 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
if fields["btn_restore"] then
local setting = settings[selected_setting]
if setting and setting.type ~= "category" then
- if setting.type == "noise_params_2d"
- or setting.type == "noise_params_3d" then
- core.settings:set_np_group(setting.name, setting.default_table)
- else
- core.settings:set(setting.name, setting.default)
- end
+ core.settings:remove(setting.name)
core.settings:write()
core.update_formspec(this:get_formspec())
end