diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2013-06-09 20:38:38 +0200 |
---|---|---|
committer | Jessica Tölke <jtoelke@mail.upb.de> | 2013-06-09 20:38:38 +0200 |
commit | 7f4410f9d5dce2884368a4b1d01139abd2e65fd5 (patch) | |
tree | e4f6cd0f6ed40b1852fa5ce28a5d78be982b0a73 /tools/tmx_converter.py | |
parent | 8ac35610a416d3937ccf4b3b74a61622382e8162 (diff) | |
parent | fa2ffc29c1ef2c33ff0a9c1baf7026a4d9ffe0b6 (diff) | |
download | serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.tar.gz serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.tar.bz2 serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.tar.xz serverdata-7f4410f9d5dce2884368a4b1d01139abd2e65fd5.zip |
Merge remote-tracking branch 'origin/master' into waric
Conflicts:
world/map/db/item_db.txt
Diffstat (limited to 'tools/tmx_converter.py')
-rwxr-xr-x | tools/tmx_converter.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/tmx_converter.py b/tools/tmx_converter.py index 17773dc6..94cf0b2c 100755 --- a/tools/tmx_converter.py +++ b/tools/tmx_converter.py @@ -328,11 +328,13 @@ def main(argv): mob_names[int(k)] = v.strip() npc_master = [] + map_basenames = [] for arg in os.listdir(tmx_dir): base, ext = posixpath.splitext(arg) if ext == '.tmx': + map_basenames.append(base) tmx = posixpath.join(tmx_dir, arg) wlk = posixpath.join(wlk_dir, base + '.wlk') this_map_npc_dir = posixpath.join(npc_dir, base) @@ -344,6 +346,9 @@ def main(argv): xml.sax.parse(tmx, ContentHandler(wlk, this_map_npc_dir, mobs, warps, imports)) npc_master.append('import: %s\n' % posixpath.join(SERVER_NPCS, base, NPC_IMPORTS)) + with open(posixpath.join(wlk_dir, 'resnametable.txt'), 'w') as resname: + for base in sorted(map_basenames): + resname.write('%s.gat#%s.wlk#\n' % (base, base)) with open(posixpath.join(npc_dir, NPC_MASTER_IMPORTS), 'w') as out: out.write('// %s\n\n' % MESSAGE) npc_master.sort() |