URL:
<http://gna.org/bugs/?22774>
Summary: Modify default behavior of [insert_tag] for empty
variables
Project: Battle for Wesnoth
Submitted by: tekelili
Submitted on: vie 10 oct 2014 14:27:15 UTC
Category: Feature Request
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.13
Operating System: any
_______________________________________________________
Details:
Currently there is some (imo) inconsistency in [inset_tag] when in key
"variable" is given an empty one. While for lot of tags this will lead to
(again imo) expected "do nothing behavior", in some tags like [object] or
[modify_unit] will lead to error messages for not defined keys. To solve this
issue, I created a macro, but I think would be nice become default behavior:
"inset tag if varible length greater than 0"
#define INSERT_IF_EXIST TAG VARIABLE
[if]
[variable]
name={VARIABLE}.length
greater_than=0
[/variable]
[then]
[insert_tag]
name={TAG}
variable={VARIABLE}
[/insert_tag]
[/then]
[/if]
#enddef
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?22774>
_______________________________________________
Mensaje enviado vía/por Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs