mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 18:59:45 +00:00
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.
This commit is contained in:
parent
9ba7fd6d4a
commit
e1506935a1
@ -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
|
||||
.. "<small>" .. bonus_string .. "</small></span>\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
|
||||
.. "<small>" .. _"Early finish bonus if:" .. " " .. obj.bonus .. "</small></span>\n"
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user