Support bonus=<multiple> in [objectives][gold_carryover]
This commit is contained in:
parent
7bd355e942
commit
9ba7fd6d4a
1 changed files with 6 additions and 2 deletions
|
@ -111,12 +111,16 @@ function wml_actions.objectives.gold_carryover.generate(cfg, default_bullet)
|
|||
local gold_carryover = ""
|
||||
|
||||
if obj.bonus ~= nil then
|
||||
if obj.bonus then
|
||||
if obj.bonus == true then
|
||||
gold_carryover = color_prefix(r, g, b) .. gold_carryover_bullet
|
||||
.. "<small>" .. _"Early finish bonus." .. "</small></span>\n"
|
||||
else
|
||||
elseif obj.bonus == false then
|
||||
gold_carryover = color_prefix(r, g, b) .. gold_carryover_bullet
|
||||
.. "<small>" .. _"No early finish bonus." .. "</small></span>\n"
|
||||
elseif type(obj.bonus) == 'number' then
|
||||
local bonus_string = wesnoth.format(_"Early finish bonus ×$multiple.", {multiple = obj.bonus})
|
||||
gold_carryover = color_prefix(r, g, b) .. gold_carryover_bullet
|
||||
.. "<small>" .. bonus_string .. "</small></span>\n"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue