Skip to content

Commit

Permalink
Add a newline between objective sections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vultraz committed Mar 21, 2015
1 parent 958cb2d commit d8b36e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/lua/wml/objectives.lua
Expand Up @@ -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)
Expand Down

0 comments on commit d8b36e5

Please sign in to comment.