From 7e22c72492bfb8224923b1d10dc99774c3aa4eed Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 9 Jul 2025 10:35:41 +0200 Subject: [PATCH] minetest.conf.example: Document short setting name as fallback (#16313) --- builtin/common/settings/generate_from_settingtypes.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/builtin/common/settings/generate_from_settingtypes.lua b/builtin/common/settings/generate_from_settingtypes.lua index 1c1535a17..8afad5696 100644 --- a/builtin/common/settings/generate_from_settingtypes.lua +++ b/builtin/common/settings/generate_from_settingtypes.lua @@ -44,15 +44,18 @@ local function create_minetest_conf_example(settings) insert(result, rep("#", entry.level)) insert(result, "# " .. entry.name .. "\n\n") end - else + else -- any `type` as listed in `settingtypes.txt` local group_format = false if entry.noise_params and entry.values then if entry.type == "noise_params_2d" or entry.type == "noise_params_3d" then group_format = true end end - if entry.comment ~= "" then - for _, comment_line in ipairs(entry.comment:split("\n", true)) do + + local comment = entry.comment ~= "" and entry.comment + or entry.readable_name -- fallback to the short description + if comment ~= "" then + for _, comment_line in ipairs(comment:split("\n", true)) do if comment_line == "" then insert(result, "#\n") else