diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-02 23:31:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-02 23:31:58 +0300 |
commit | 41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022 (patch) | |
tree | 9a1dd2dcb3f6734edaa98493f6052b6eda4802d0 /lang | |
parent | 4f4f81f276b80aae1c987ca023cecfd4bacd60b1 (diff) | |
download | evol-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-x | lang/updatelang.py | 13 |
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") |