summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-03-15 09:09:45 -0300
committerJesusaves <cpntb1@ymail.com>2018-03-15 09:09:45 -0300
commite8713157fe1970cc213504284aaa641e7b57e9a9 (patch)
treea727145928feca382cd2fc8f099b7288aee6560e
parentd46ba86920891b75915ac82e0f680bb2369b8ed9 (diff)
downloadtools-e8713157fe1970cc213504284aaa641e7b57e9a9.tar.gz
tools-e8713157fe1970cc213504284aaa641e7b57e9a9.tar.bz2
tools-e8713157fe1970cc213504284aaa641e7b57e9a9.tar.xz
tools-e8713157fe1970cc213504284aaa641e7b57e9a9.zip
Parse monster files, and also ignore backup files
-rwxr-xr-xlang/updatelang.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py
index 41a6be0..3398e20 100755
--- a/lang/updatelang.py
+++ b/lang/updatelang.py
@@ -14,7 +14,7 @@ allStrings = set()
strComments = dict()
strre1 = re.compile("[\t +(]l[(][\"](?P<str>[^\"]+)[\"]")
strre3 = re.compile("[\t +(]getitemlink[(][\"](?P<str>[^\"]+)[\"][)]")
-strre2 = re.compile("^[^/](.+)([^\t]+)[\t](script|shop|trader|cashshop)[\t](?P<str>[^\t]+)[\t]([\w\d]+),")
+strre2 = re.compile("^[^/](.+)([^\t]+)[\t](script|shop|trader|cashshop|monster)[\t](?P<str>[^\t]+)[\t]([\w\d]+),")
strre4 = re.compile("[\t +(]lg[(][\"](?P<str>[^\"]+)[\"][)]")
strre5 = re.compile("[\t +(]getitemname[(][\"](?P<str>[^\"]+)[\"][)]")
strre6 = re.compile("[\t ]mesn[ ][\"](?P<str>[^\"]+)[\"]")
@@ -84,6 +84,8 @@ def collectScriptStrings(parentDir, relativeDir):
for file1 in files:
if file1[0] == ".":
continue
+ if file1[len(file1)-1] == "~":
+ continue
file2 = os.path.abspath(parentDir + os.path.sep + file1)
relativeDir2 = relativeDir + os.path.sep + file1
if not os.path.isfile(file2):