mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
minetest.conf.example: Document short setting name as fallback (#16313)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user