mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 00:40:24 +00:00
Change [explain] to [test_condition]
This commit is contained in:
parent
9724d98d44
commit
f8e897e8dd
@ -126,7 +126,7 @@ Version 1.13.1+dev:
|
||||
* Add new flow control tags: [break], [continue], [return]
|
||||
* Added a new [difficulty] tag for defining a campaign's difficulty level
|
||||
* Add new syntax for [option], similar to the new difficulty syntax
|
||||
* Add [explain] ActionWML that tells why a conditional failed (for debugging)
|
||||
* Add [test_condition] ActionWML that tells why a conditional failed (for debugging)
|
||||
* Editor:
|
||||
* Added Category field and color sliders to the Edit Label panel.
|
||||
* Miscellaneous and bug fixes:
|
||||
|
@ -505,7 +505,7 @@ function wml_actions.switch(cfg)
|
||||
end
|
||||
|
||||
-- This is mainly for use in unit test macros, but maybe it can be useful elsewhere too
|
||||
function wml_actions.explain(cfg)
|
||||
function wml_actions.test_condition(cfg)
|
||||
local logger = cfg.logger or "warning"
|
||||
|
||||
-- This function returns true if it managed to explain the failure
|
||||
|
@ -9,10 +9,10 @@
|
||||
[/endlevel]
|
||||
[/then]
|
||||
[else]
|
||||
[explain]
|
||||
[test_condition]
|
||||
result=no
|
||||
{X}
|
||||
[/explain]
|
||||
[/test_condition]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
linger_mode = yes
|
||||
@ -25,10 +25,10 @@
|
||||
[if]
|
||||
{X}
|
||||
[else]
|
||||
[explain]
|
||||
[test_condition]
|
||||
result=no
|
||||
{X}
|
||||
[/explain]
|
||||
[/test_condition]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
linger_mode = yes
|
||||
|
Loading…
x
Reference in New Issue
Block a user