summaryrefslogtreecommitdiff
path: root/tmx_converter.py
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-03-31 17:57:06 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-03-31 17:57:06 -0700
commite5fa14b2254bb1565c44bf07a2c4c2c8bb05b4fd (patch)
tree61868b634fc187e12549919e45d032aa16b3d1cc /tmx_converter.py
parent78875e3c896656458d000c1987b1b0856fdb2bbe (diff)
downloadtools-e5fa14b2254bb1565c44bf07a2c4c2c8bb05b4fd.tar.gz
tools-e5fa14b2254bb1565c44bf07a2c4c2c8bb05b4fd.tar.bz2
tools-e5fa14b2254bb1565c44bf07a2c4c2c8bb05b4fd.tar.xz
tools-e5fa14b2254bb1565c44bf07a2c4c2c8bb05b4fd.zip
Silence new warnings in generated mob scripts
Diffstat (limited to 'tmx_converter.py')
-rwxr-xr-xtmx_converter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tmx_converter.py b/tmx_converter.py
index 379a4f3..dbfedf8 100755
--- a/tmx_converter.py
+++ b/tmx_converter.py
@@ -301,10 +301,10 @@ 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' % (self.base, self.base))
+ self.mobs.write('\n\n%s.gat,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('On%d:\n set @mobID, %d;\n callfunc "MobPoints";\n end;\n\n' % (mob_id, mob_id))
- self.mobs.write(' end;\n}\n')
+ 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)