diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-16 16:39:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-16 16:39:39 +0300 |
commit | 2f38c3df091e91fc1ecbecc41b7afa3b2f81ba0c (patch) | |
tree | 6b66e187d681c5ebfb35b1a5ead8ec0299747c5c | |
parent | 097b28bbac511fbe6e7fb6a9ead29734c7c9c0d1 (diff) | |
download | evol-tools-2f38c3df091e91fc1ecbecc41b7afa3b2f81ba0c.tar.gz evol-tools-2f38c3df091e91fc1ecbecc41b7afa3b2f81ba0c.tar.bz2 evol-tools-2f38c3df091e91fc1ecbecc41b7afa3b2f81ba0c.tar.xz evol-tools-2f38c3df091e91fc1ecbecc41b7afa3b2f81ba0c.zip |
lang: add support for mob_db in conf format.
-rwxr-xr-x | lang/updatelang.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py index 2a5efb6..c05f2f6 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -347,16 +347,17 @@ def dumpTranslations(): def loadMobNames(dir): - with open(dir + "/mob_db.txt", "r") as r: + with open(dir + "/mob_db.conf", "r") as r: cnt = -1 for line in r: cnt = cnt + 1 if len(line) < 1 or line[0:2] == "//": continue - parts = itemsplit.split(line) - if len(parts) < 3: + line = line.strip() + idx = line.find("Name: \"") + if idx != 0 or line[len(line) - 1] != "\"": continue - addStr(parts[2].strip(), line, "mob_db.txt", cnt, True) + addStr(line[idx + 7: len(line) - 1], line, "mob_db.txt", cnt, True) rootPath = "../../server-data/" |