Author: esr
Date: Fri Feb 12 03:07:43 2010
New Revision: 41167

URL: http://svn.gna.org/viewcvs/wesnoth?rev=41167&view=rev
Log:
Improved macro type checking for terrain macros.

Modified:
    trunk/data/tools/wesnoth/wmltools.py

Modified: trunk/data/tools/wesnoth/wmltools.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wmltools.py?rev=41167&r1=41166&r2=41167&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Fri Feb 12 03:07:43 2010
@@ -157,8 +157,10 @@
         ftype = "range"
     elif f in ("ALIGN",):
         ftype = "alignment"
-    elif f in ("TERRAIN",):
+    elif f == "TERRAIN":
         ftype = "terrain_code"
+    elif f.startswith("ADJACENT") or f in ("TERRAIN_PATTERN"):
+        ftype = "terrain_pattern"
     elif f in ("NAME", "VAR", "IMAGESTEM", "ID", "FLAG") or 
f.endswith("_NAME") or f.endswith("_ID"):
         ftype = "name"
     elif f in ("ID_STRING", "NAME_STRING", "DESCRIPTION"):
@@ -242,6 +244,8 @@
         elif atype in ("shortname",) and ftype == "terrain_code":
             pass
         elif atype in ("numeric", "position", "span", "empty") and ftype == 
"alliance":
+            pass
+        elif atype in ("terrain_code", "shortname", "name") and ftype == 
"terrain_pattern":
             pass
         elif atype != ftype and ftype is not None and atype is not None:
             return False


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

Reply via email to