Author: crab
Date: Thu Apr  2 17:07:59 2009
New Revision: 34391

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34391&view=rev
Log:
Added check for ai parameters outside [ai] to wmllint

Modified:
    trunk/data/tools/wmllint

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=34391&r1=34390&r2=34391&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Thu Apr  2 17:07:59 2009
@@ -926,6 +926,30 @@
                               % (filename, i+1, value)
                 except ValueError:
                     pass       # Ignore ill-formed integer literals
+            elif key == "number_of_possible_recruits_to_force_recruit" and 
value:
+                if not in_ai:
+                    print '"%s", line %d: 
number_of_possible_recruits_to_force_recruit outside [ai]' \
+                              % (filename, i+1)
+            elif key == "villages_per_scout" and value:
+                if not in_ai:
+                    print '"%s", line %d: villages_per_scout outside [ai]' \
+                              % (filename, i+1)
+            elif key == "leader_value" and value:
+                if not in_ai:
+                    print '"%s", line %d: leader_value outside [ai]' \
+                              % (filename, i+1)
+            elif key == "village_value" and value:
+                if not in_ai:
+                    print '"%s", line %d: village_value outside [ai]' \
+                              % (filename, i+1)
+            elif key == "aggression" and value:
+                if not in_ai:
+                    print '"%s", line %d: aggression outside [ai]' \
+                              % (filename, i+1)
+            elif key == "caution" and value:
+                if not in_ai:
+                    print '"%s", line %d: caution outside [ai]' \
+                              % (filename, i+1)
         except TypeError:
             pass
     # Interpret various magic comments


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to