aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu/dlg_settings_advanced.lua
diff options
context:
space:
mode:
authorolive <oliversimmo@gmail.com>2022-04-24 20:09:11 +0100
committerGitHub <noreply@github.com>2022-04-24 21:09:11 +0200
commita13cf0e3ce1774f89e59a730aaadc5b997293f36 (patch)
tree5b20b119eb2166a07fe5195d1d28fff5b6925b0e /builtin/mainmenu/dlg_settings_advanced.lua
parent1c8614ac9ad591f8025712deae26b572cdede50d (diff)
downloadminetest-a13cf0e3ce1774f89e59a730aaadc5b997293f36.tar.gz
minetest-a13cf0e3ce1774f89e59a730aaadc5b997293f36.tar.bz2
minetest-a13cf0e3ce1774f89e59a730aaadc5b997293f36.zip
Use mod names/titles instead of technical names (#12192)
Diffstat (limited to 'builtin/mainmenu/dlg_settings_advanced.lua')
-rw-r--r--builtin/mainmenu/dlg_settings_advanced.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/mainmenu/dlg_settings_advanced.lua b/builtin/mainmenu/dlg_settings_advanced.lua
index 46c3f445c..320db7e40 100644
--- a/builtin/mainmenu/dlg_settings_advanced.lua
+++ b/builtin/mainmenu/dlg_settings_advanced.lua
@@ -395,6 +395,7 @@ local function parse_config_file(read_all, parse_mods)
table.insert(settings, {
name = mod.name,
+ readable_name = mod.title,
level = 1,
type = "category",
})
@@ -956,7 +957,7 @@ local function create_settings_formspec(tabview, _, tabdata)
local current_level = 0
for _, entry in ipairs(settings) do
local name
- if not core.settings:get_bool("main_menu_technical_settings") and entry.readable_name then
+ if not core.settings:get_bool("show_technical_names") and entry.readable_name then
name = fgettext_ne(entry.readable_name)
else
name = entry.name
@@ -997,7 +998,7 @@ local function create_settings_formspec(tabview, _, tabdata)
"button[10,4.9;2,1;btn_edit;" .. fgettext("Edit") .. "]" ..
"button[7,4.9;3,1;btn_restore;" .. fgettext("Restore Default") .. "]" ..
"checkbox[0,4.3;cb_tech_settings;" .. fgettext("Show technical names") .. ";"
- .. dump(core.settings:get_bool("main_menu_technical_settings")) .. "]"
+ .. dump(core.settings:get_bool("show_technical_names")) .. "]"
return formspec
end
@@ -1080,7 +1081,7 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
end
if fields["cb_tech_settings"] then
- core.settings:set("main_menu_technical_settings", fields["cb_tech_settings"])
+ core.settings:set("show_technical_names", fields["cb_tech_settings"])
core.settings:write()
core.update_formspec(this:get_formspec())
return true