Add [remove_time_area] and allow [time_area] remove=yes to take an id list
[remove_time_area] is syntatic sugar but it's used to implement [time_area] remove=yes now, just like [remove_event]/[event].
This commit is contained in:
parent
8a04442ce2
commit
9d85887ed1
2 changed files with 13 additions and 3 deletions
|
@ -153,6 +153,9 @@ Version 1.13.1+dev:
|
|||
* Added a new [difficulty] tag for defining a campaign's difficulty level
|
||||
* Add new syntax for [option], similar to the new difficulty syntax
|
||||
* Add [test_condition] ActionWML that tells why a conditional failed (for debugging)
|
||||
* Add [remove_time_area] WML tag which takes a comma-separated list of time
|
||||
area ids, and make [time_area] id= accept a comma-separated list when
|
||||
using remove=yes as well.
|
||||
* Editor:
|
||||
* Added Category field and color sliders to the Edit Label panel.
|
||||
* Miscellaneous and bug fixes:
|
||||
|
|
|
@ -1407,14 +1407,21 @@ function wml_actions.remove_shroud(cfg)
|
|||
end
|
||||
|
||||
function wml_actions.time_area(cfg)
|
||||
local remove = cfg.remove
|
||||
if remove then
|
||||
wesnoth.remove_time_area(cfg.id)
|
||||
if cfg.remove then
|
||||
wml_actions.remove_time_area(cfg)
|
||||
else
|
||||
wesnoth.add_time_area(cfg)
|
||||
end
|
||||
end
|
||||
|
||||
function wml_actions.remove_time_area(cfg)
|
||||
local id = cfg.id or helper.wml_error("[remove_time_area] missing required id= key")
|
||||
|
||||
for w in utils.split(id) do
|
||||
wesnoth.remove_time_area(w)
|
||||
end
|
||||
end
|
||||
|
||||
function wml_actions.replace_schedule(cfg)
|
||||
wesnoth.replace_schedule(cfg)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue