mail[Wesnoth-commits] r24377 - /trunk/data/tools/wesnoth/wmltools.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on March 06, 2008 - 20:47:
Author: esr
Date: Thu Mar  6 20:35:23 2008
New Revision: 24377

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24377&view=rev
Log:
Consistency-check mask files as well as map files.

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=24377&r1=24376&r2=24377&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wmltools.py (original)
+++ trunk/data/tools/wesnoth/wmltools.py Thu Mar  6 20:35:23 2008
@@ -5,7 +5,7 @@
 
 import sys, os, re, sre_constants, md5, glob
 
-resource_extensions = ("png", "jpg", "ogg", "wav", "map")
+resource_extensions = ("png", "jpg", "ogg", "wav", "map", "mask")
 image_reference = r"[A-Za-z0-9{}.][A-Za-z0-9_/+{}.-]*\.(png|jpg)(?=(~.*)?)"
 
 class Forest:
@@ -419,7 +419,7 @@
                     for match in re.finditer(CrossRef.file_reference, line):
                         name = match.group(0)
                         # Catches maps that look like macro names.
-                        if name.endswith(".map") and name[0] == '{':
+                        if (name.endswith(".map") or name.endswith(".mask")) 
and name[0] == '{':
                             name = name[1:]
                         key = None
                         # If name is already in our resource list, it's easy.




Related Messages


Powered by MHonArc, Updated Fri Mar 07 10:22:11 2008