Blatant hack to pass [side] declarations that are all macros,
...as in Dead Water.
This commit is contained in:
parent
3d40a2f8a7
commit
2d66434504
1 changed files with 4 additions and 2 deletions
|
@ -490,8 +490,10 @@ def validate_on_pop(tagstack, closer, filename, lineno):
|
|||
if verbose >= 3:
|
||||
print '"%s", line %d: closing %s I see %s with %s' % (filename, lineno, closer, tag, attributes)
|
||||
# Detect a malformation that will cause the game to barf while attempting
|
||||
# to deserialize an empty unit.
|
||||
if "scenario" in ancestors and closer == "side" and "type" not in attributes and ("no_leader" not in attributes or attributes["no_leader"] != "yes") and "multiplayer" not in ancestors:
|
||||
# to deserialize an empty unit. The final "and attributes" ias a blatant
|
||||
# hack; some compaigns like to generate entire side declarations with
|
||||
# macros.
|
||||
if "scenario" in ancestors and closer == "side" and "type" not in attributes and ("no_leader" not in attributes or attributes["no_leader"] != "yes") and "multiplayer" not in ancestors and attributes:
|
||||
print '"%s", line %d: [side] without type attribute' % (filename, lineno)
|
||||
# This assumes that conversion will always happen in units/ files.
|
||||
if "units" not in filename and closer == "unit" and "race" in attributes:
|
||||
|
|
Loading…
Add table
Reference in a new issue