Added [show_if] support to [objectives] [note]
This commit is contained in:
parent
6749288a11
commit
b52b619482
2 changed files with 10 additions and 6 deletions
|
@ -133,6 +133,7 @@ Version 1.11.0-svn:
|
|||
* Drained HP amounts can now be negative. Trigger this by setting
|
||||
a negative value in the [drain] or [heal_on_hit] weapon special.
|
||||
* Negative drain amounts will not take a unit below 1 health.
|
||||
* Added [show_if] support to [objectives] [note]
|
||||
* Miscellaneous and bug fixes:
|
||||
* Fix wrong preferences path suffix (1.1 instead of 1.10) on Linux and other
|
||||
platforms using XDG layout (no compiled-in preferences path override,
|
||||
|
|
|
@ -131,13 +131,16 @@ local function generate_objectives(cfg)
|
|||
end
|
||||
|
||||
for note in helper.child_range(cfg, "note") do
|
||||
local note_bullet = note.bullet or bullet
|
||||
local r = note.red or 255
|
||||
local g = note.green or 255
|
||||
local b = note.blue or 255
|
||||
local show_if = helper.get_child(note, "show_if")
|
||||
if not show_if or wesnoth.eval_conditional(show_if) then
|
||||
local note_bullet = note.bullet or bullet
|
||||
local r = note.red or 255
|
||||
local g = note.green or 255
|
||||
local b = note.blue or 255
|
||||
|
||||
if note.description then
|
||||
notes = notes .. color_prefix(r, g, b) .. note_bullet .. "<small>" .. note.description .. "</small></span>\n"
|
||||
if note.description then
|
||||
notes = notes .. color_prefix(r, g, b) .. note_bullet .. "<small>" .. note.description .. "</small></span>\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue