summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-02 23:31:58 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-02 23:31:58 +0300
commit41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022 (patch)
tree9a1dd2dcb3f6734edaa98493f6052b6eda4802d0 /lang
parent4f4f81f276b80aae1c987ca023cecfd4bacd60b1 (diff)
downloadevol-tools-41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022.tar.gz
evol-tools-41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022.tar.bz2
evol-tools-41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022.tar.xz
evol-tools-41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022.zip
lang: add support for mob names in update lang script.
Diffstat (limited to 'lang')
-rwxr-xr-xlang/updatelang.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py
index 7c5fb71..2c0a803 100755
--- a/lang/updatelang.py
+++ b/lang/updatelang.py
@@ -346,9 +346,22 @@ def dumpTranslations():
print "\n"
+def loadMobNames(dir):
+ with open(dir + "/mob_db.txt", "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:
+ continue
+ addStr(parts[2].strip(), line, "mob_db.txt", cnt, True)
+
rootPath = "../../server-data/"
loadItemDb(rootPath + "db/re")
+loadMobNames(rootPath + "db/re")
collectScriptStrings(rootPath + "/npc", "npc")
collectMessages(rootPath + "/conf/messages.conf")
loadFiles(rootPath + "/langs")