diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-04-23 12:10:03 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-04-23 12:10:03 -0300 |
commit | 309e46d5367f717d6f8db98ad2df9c3c0bc9d64c (patch) | |
tree | 5e5df2b7774713a7478255c9aa115cd2570526ee | |
parent | 552d4af9e81dae06ba78ae6be5761fafc9af3dec (diff) | |
download | evol-tools-309e46d5367f717d6f8db98ad2df9c3c0bc9d64c.tar.gz evol-tools-309e46d5367f717d6f8db98ad2df9c3c0bc9d64c.tar.bz2 evol-tools-309e46d5367f717d6f8db98ad2df9c3c0bc9d64c.tar.xz evol-tools-309e46d5367f717d6f8db98ad2df9c3c0bc9d64c.zip |
Break CI if map width is too small and cause render bugs.
-rwxr-xr-x | hercules/tmx_converter.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py index 3ac33c7..e612303 100755 --- a/hercules/tmx_converter.py +++ b/hercules/tmx_converter.py @@ -201,6 +201,10 @@ class ContentHandler(xml.sax.ContentHandler): self.layers.add(attr[u'name'].lower()) self.layer_name = attr[u'name'].lower() self.state = State.LAYER + # Map width must be enough to fill the largest widescreen on market + if (self.width < 1920/TILESIZE): + print('Bad map width: %d (min. %d)' % (self.width, 1920/TILESIZE)) + raise Exception('Invalid map width: %d (min. %d)' % (self.width, 1920/TILESIZE)) elif self.state is State.LAYER: if name == u'layer': self.layers.add(attr[u'name'].lower()) |