diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-04-23 12:33:09 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-04-23 12:33:09 -0300 |
commit | cb73c414b222702a8a68237d296991397bf80663 (patch) | |
tree | 961097043d1068a4bc36033546da187a7708a1b3 | |
parent | 140eea91129c42c14c603a741799868204fa04ae (diff) | |
download | evol-tools-cb73c414b222702a8a68237d296991397bf80663.tar.gz evol-tools-cb73c414b222702a8a68237d296991397bf80663.tar.bz2 evol-tools-cb73c414b222702a8a68237d296991397bf80663.tar.xz evol-tools-cb73c414b222702a8a68237d296991397bf80663.zip |
The one who should be breaking is not tmx_converter but testxml
-rwxr-xr-x | hercules/tmx_converter.py | 4 | ||||
-rwxr-xr-x | testxml/testxml.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/hercules/tmx_converter.py b/hercules/tmx_converter.py index 5efe117..611abee 100755 --- a/hercules/tmx_converter.py +++ b/hercules/tmx_converter.py @@ -204,8 +204,8 @@ class ContentHandler(xml.sax.ContentHandler): self.state = State.LAYER # Map width must be enough to fill the largest widescreen on market if (self.width < WIDESCREEN/TILESIZE): - print('Bad map width: %d (min. %d)' % (self.width, WIDESCREEN/TILESIZE)) - raise Exception('Invalid map width: %d (min. %d)' % (self.width, WIDESCREEN/TILESIZE)) + print('\n\nERROR: invalid map width: %d (min. %d)' % (self.width, WIDESCREEN/TILESIZE)) + #raise SyntaxError('width') elif self.state is State.LAYER: if name == u'layer': self.layers.add(attr[u'name'].lower()) diff --git a/testxml/testxml.py b/testxml/testxml.py index 6d16094..83723ab 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -44,6 +44,7 @@ warnings = 0 errDict = set() safeDye = False borderSize = 14 +widescreenSize = 1920/32 colorsList = set() showAll = False silent = False @@ -1403,6 +1404,8 @@ def testMap(mapName, file, path): if mapHeight < borderSize * 2 + 1: if silent == False or file.find("maps/test") != 0: showMsgFile(file, "map height to small: " + str(mapHeight), False) + if mapWidth < widescreenSize: + showMsgFile(file, "error: map width below widescreen minimum: " + str(mapHeight), True) if len(dom.getElementsByTagName("properties")) < 1: showMsgFile(file, "missing map properties", True) |