From 41cf1ec75522dbc8e34d3ce308b6f6ec82ed1022 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 May 2015 23:31:58 +0300 Subject: lang: add support for mob names in update lang script. --- lang/updatelang.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lang') 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") -- cgit v1.2.3-70-g09d2