Added some more checks for bad ai parameter placement

This commit is contained in:
Iurii Chernyi 2009-04-02 15:44:41 +00:00
parent 589f3f77c2
commit 4ba3642690

View file

@ -950,6 +950,26 @@ def sanity_check(filename, lines):
if not in_ai:
print '"%s", line %d: caution outside [ai]' \
% (filename, i+1)
elif key == "recruitment_ignore_bad_movement" and value:
if not in_ai:
print '"%s", line %d: recruitment_ignore_bad_movement outside [ai]' \
% (filename, i+1)
elif key == "recruitment_ignore_bad_combat" and value:
if not in_ai:
print '"%s", line %d: recruitment_ignore_bad_combat outside [ai]' \
% (filename, i+1)
elif key == "recruitment_pattern" and value:
if not in_ai:
print '"%s", line %d: recruitment_pattern outside [ai]' \
% (filename, i+1)
elif key == "attack_depth" and value:
if not in_ai:
print '"%s", line %d: attack_depth outside [ai]' \
% (filename, i+1)
elif key == "grouping" and value:
if not in_ai:
print '"%s", line %d: grouping outside [ai]' \
% (filename, i+1)
except TypeError:
pass
# Interpret various magic comments