1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

minetest.conf.example: Document short setting name as fallback (#16313)

This commit is contained in:
SmallJoker 2025-07-09 10:35:41 +02:00 committed by GitHub
parent 51a453ca7b
commit 7e22c72492
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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