forked from Mirrorlandia_minetest/minetest
Fix spaces generated by settings file generator
This commit is contained in:
parent
24a0f55c9c
commit
d9effbb179
@ -55,9 +55,13 @@ local function create_minetest_conf_example()
|
|||||||
end
|
end
|
||||||
if entry.comment ~= "" then
|
if entry.comment ~= "" then
|
||||||
for _, comment_line in ipairs(entry.comment:split("\n", true)) do
|
for _, comment_line in ipairs(entry.comment:split("\n", true)) do
|
||||||
|
if comment_line == "" then
|
||||||
|
insert(result, "#\n")
|
||||||
|
else
|
||||||
insert(result, "# " .. comment_line .. "\n")
|
insert(result, "# " .. comment_line .. "\n")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
insert(result, "# type: " .. entry.type)
|
insert(result, "# type: " .. entry.type)
|
||||||
if entry.min then
|
if entry.min then
|
||||||
insert(result, " min: " .. entry.min)
|
insert(result, " min: " .. entry.min)
|
||||||
@ -73,10 +77,14 @@ local function create_minetest_conf_example()
|
|||||||
end
|
end
|
||||||
insert(result, "\n")
|
insert(result, "\n")
|
||||||
if group_format == true then
|
if group_format == true then
|
||||||
|
local flags = entry.values[10]
|
||||||
|
if flags ~= "" then
|
||||||
|
flags = " "..flags
|
||||||
|
end
|
||||||
insert(result, sprintf(group_format_template, entry.name, entry.values[1],
|
insert(result, sprintf(group_format_template, entry.name, entry.values[1],
|
||||||
entry.values[2], entry.values[3], entry.values[4], entry.values[5],
|
entry.values[2], entry.values[3], entry.values[4], entry.values[5],
|
||||||
entry.values[6], entry.values[7], entry.values[8], entry.values[9],
|
entry.values[6], entry.values[7], entry.values[8], entry.values[9],
|
||||||
entry.values[10]))
|
flags))
|
||||||
else
|
else
|
||||||
local append
|
local append
|
||||||
if entry.default ~= "" then
|
if entry.default ~= "" then
|
||||||
@ -126,4 +134,3 @@ file = assert(io.open("src/settings_translation_file.cpp", "w"))
|
|||||||
--file = assert(io.open("settings_translation_file.cpp", "w"))
|
--file = assert(io.open("settings_translation_file.cpp", "w"))
|
||||||
file:write(create_translation_file())
|
file:write(create_translation_file())
|
||||||
file:close()
|
file:close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user