From e1506935a12cdfe96767078e3179a59a9a67f38a Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 4 Aug 2018 23:36:49 -0400 Subject: [PATCH] Support bonus="string" in [objectives][gold_carryover] This will take the string as an explanation of a condition that needs to be satisfied to receive an early finish bonus. --- data/lua/wml/objectives.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/lua/wml/objectives.lua b/data/lua/wml/objectives.lua index dad3198daad..20d39226eae 100644 --- a/data/lua/wml/objectives.lua +++ b/data/lua/wml/objectives.lua @@ -121,6 +121,9 @@ function wml_actions.objectives.gold_carryover.generate(cfg, default_bullet) local bonus_string = wesnoth.format(_"Early finish bonus ×$multiple.", {multiple = obj.bonus}) gold_carryover = color_prefix(r, g, b) .. gold_carryover_bullet .. "" .. bonus_string .. "\n" + elseif type(obj.bonus) == 'string' or (type(obj.bonus) == 'userdata' and getmetatable(obj.bonus) == 'translatable string') then + gold_carryover = color_prefix(r, g, b) .. gold_carryover_bullet + .. "" .. _"Early finish bonus if:" .. " " .. obj.bonus .. "\n" end end