Add a newline between objective sections

This is set up that there will be no newlines at the end of any section, unless you have
only a summary key, which no one would do. However, there will be a newline at the top of
the dialog if you don't have a win objective, but no one would do that either.

Note that because of newlines not showing up properly on Windows, this won't be viable
on that platform.
This commit is contained in:
Charles Dang 2015-03-21 20:55:38 +11:00
parent 958cb2d9c5
commit d8b36e5d08

View file

@ -152,17 +152,17 @@ local function generate_objectives(cfg)
objectives = objectives .. "<big>" .. win_string .. "</big>\n" .. win_objectives
end
if lose_objectives ~= "" then
objectives = objectives .. "<big>" .. lose_string .. "</big>\n" .. lose_objectives
objectives = objectives .. "\n" .. "<big>" .. lose_string .. "</big>\n" .. lose_objectives
end
if gold_carryover ~= "" then
objectives = objectives .. gold_carryover_string .. "\n" .. gold_carryover
objectives = objectives .. "\n" .. gold_carryover_string .. "\n" .. gold_carryover
end
if notes ~= "" then
objectives = objectives .. notes_string .. "\n" .. notes
objectives = objectives .. "\n" .. notes_string .. "\n" .. notes
end
local note = cfg.note
if note then
objectives = objectives .. note .. "\n"
objectives = objectives .. "\n" .. note
end
return string.sub(tostring(objectives), 1, -2)