wmllint: warn about no side key in [set/(dis)allow_recruit],[store_gold]
Those who are updating from old UMC may otherwise be caught unawares by the change from defaulting to side 1 when the side key is missing, to all sides. Later we will have an option to turn off this warning.
This commit is contained in:
parent
e3adf001a8
commit
1a794a2d1e
1 changed files with 3 additions and 0 deletions
|
@ -659,6 +659,9 @@ def validate_on_pop(tagstack, closer, filename, lineno):
|
|||
if attributes.get("unit_gender") is not None:
|
||||
print '"%s", line %d: use [effect][filter]gender= instead of [effect]unit_gender=' % \
|
||||
(filename, lineno)
|
||||
if closer in ["set_recruit", "allow_recruit", "disallow_recruit", "store_gold"] and "side" not in attributes:
|
||||
print '"%s", line %d: %s without "side" attribute is now applied to all sides' % \
|
||||
(filename, lineno, closer)
|
||||
|
||||
def within(tag):
|
||||
"Did the specified tag lead one of our enclosing contexts?"
|
||||
|
|
Loading…
Add table
Reference in a new issue