summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtmx_converter.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tmx_converter.py b/tmx_converter.py
index 7649555..9f9da39 100755
--- a/tmx_converter.py
+++ b/tmx_converter.py
@@ -52,7 +52,7 @@ other_warp_fields = (
TILESIZE = 32
SEPARATOR = '|'
-MESSAGE = 'This file is generated automatically. All manually changes will be removed when running the Converter.'
+MESSAGE = 'This file is generated automatically. All manually added changes will be removed when running the Converter.'
CLIENT_MAPS = 'maps'
SERVER_WLK = 'data'
SERVER_NPCS = 'npc'
@@ -258,7 +258,7 @@ class ContentHandler(xml.sax.ContentHandler):
self.mob_ids.add(mob_id)
self.mobs.write(
SEPARATOR.join([
- '%s.gat,%d,%d,%d,%d' % (self.base, obj.x, obj.y, obj.w, obj.h),
+ '%s,%d,%d,%d,%d' % (self.base, obj.x, obj.y, obj.w, obj.h),
'monster',
obj.name,
'%d,%d,%dms,%dms,Mob%s::On%d\n' % (mob_id, obj.max_beings, obj.ea_spawn, obj.ea_death, self.base, mob_id),
@@ -270,10 +270,10 @@ class ContentHandler(xml.sax.ContentHandler):
print('Warning: warp name truncated: %r -> %r' % (obj.name, obj_name))
self.warps.write(
SEPARATOR.join([
- '%s.gat,%d,%d' % (self.base, obj.x, obj.y),
+ '%s,%d,%d' % (self.base, obj.x, obj.y),
'warp',
obj_name,
- '%d,%d,%s.gat,%d,%d\n' % (obj.w, obj.h, obj.dest_map, obj.dest_tile_x, obj.dest_tile_y),
+ '%d,%d,%s,%d,%d\n' % (obj.w, obj.h, obj.dest_map, obj.dest_tile_x, obj.dest_tile_y),
])
)
@@ -293,13 +293,13 @@ class ContentHandler(xml.sax.ContentHandler):
self.state = State.FINAL
def endDocument(self):
- self.mobs.write('\n\n%s.gat,0,0,0|script|Mob%s|-1\n{\n end;\n' % (self.base, self.base))
+ self.mobs.write('\n\n%s,0,0,0|script|Mob%s|-1\n{\n end;\n' % (self.base, self.base))
for mob_id in sorted(self.mob_ids):
self.mobs.write('\nOn%d:\n set @mobID, %d;\n callfunc "MobPoints";\n end;\n' % (mob_id, mob_id))
self.mobs.write('}\n')
self.imports.write('// Map %s: %s\n' % (self.base, self.name))
self.imports.write('// %s\n' % MESSAGE)
- self.imports.write('map: %s.gat\n' % self.base)
+ self.imports.write('map: %s\n' % self.base)
npcs = os.listdir(self.npc_dir)
npcs.sort()
@@ -353,7 +353,7 @@ def main(argv):
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))
+ resname.write('%s#%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()