Don't complain that a [unit] misses a side key...

...if it's located in a [side] tag
This commit is contained in:
Alexander van Gessel 2011-02-19 19:13:11 +01:00
parent 1cb38145f8
commit f051dbedfd

View file

@ -544,7 +544,7 @@ def validate_on_pop(tagstack, closer, filename, lineno):
if closer == "terrain" and attributes.get("heals") in ("true", "false"):
print '"%s", line %d: heals attribute no longer takes a boolean' % \
(filename, lineno)
if closer == "unit" and attributes.get("id") is not None and attributes.get("type") is not None and attributes.get("side") is None:
if closer == "unit" and attributes.get("id") is not None and attributes.get("type") is not None and attributes.get("side") is None and not "side" in ancestors:
print '"%s", line %d: unit declaration without side attribute' % \
(filename, lineno)