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:
parent
51a453ca7b
commit
7e22c72492
1 changed files with 6 additions and 3 deletions
|
@ -44,15 +44,18 @@ local function create_minetest_conf_example(settings)
|
||||||
insert(result, rep("#", entry.level))
|
insert(result, rep("#", entry.level))
|
||||||
insert(result, "# " .. entry.name .. "\n\n")
|
insert(result, "# " .. entry.name .. "\n\n")
|
||||||
end
|
end
|
||||||
else
|
else -- any `type` as listed in `settingtypes.txt`
|
||||||
local group_format = false
|
local group_format = false
|
||||||
if entry.noise_params and entry.values then
|
if entry.noise_params and entry.values then
|
||||||
if entry.type == "noise_params_2d" or entry.type == "noise_params_3d" then
|
if entry.type == "noise_params_2d" or entry.type == "noise_params_3d" then
|
||||||
group_format = true
|
group_format = true
|
||||||
end
|
end
|
||||||
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
|
if comment_line == "" then
|
||||||
insert(result, "#\n")
|
insert(result, "#\n")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue