diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-06-25 19:42:27 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-06-25 19:42:27 -0300 |
commit | 565421444bac945e029fac07697761528db42817 (patch) | |
tree | 1642b0b9ad1dcbdf9d3c89535b388e78b501c312 /misc | |
parent | 763a74a71b66eb779529f795e64341077d571fa0 (diff) | |
download | tools-565421444bac945e029fac07697761528db42817.tar.gz tools-565421444bac945e029fac07697761528db42817.tar.bz2 tools-565421444bac945e029fac07697761528db42817.tar.xz tools-565421444bac945e029fac07697761528db42817.zip |
Make Heights and Collision layers invisible by default
This is a good tool, I'll be using it :3
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/maze.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/misc/maze.py b/misc/maze.py index 081e1c5..9a2c2d7 100755 --- a/misc/maze.py +++ b/misc/maze.py @@ -96,13 +96,17 @@ def MakeMaze(maze): yc+=3 return TRUEMAZE -def BuildLayer(LayerName, w, h, LayerData): +def BuildLayer(LayerName, w, h, LayerData, invisible=False): + if invisible: + inv=' visible="0"' + else: + inv="" return(""" - <layer name="%s" width="%d" height="%d"> + <layer name="%s" width="%d" height="%d"%s> <data encoding="csv"> %s </data> - </layer>""" % (LayerName, w, (h+1)*3, LayerData)) + </layer>""" % (LayerName, w, (h+1)*3, inv, LayerData)) # Begin print "Begin!" @@ -147,12 +151,14 @@ while MazeID < MaxMazes: # Build set layer f.write(BuildLayer("set", width, y, MAZEDATA)) - # Build the other layers + # Build the other tile layers f.write(BuildLayer("Ground", width, y, MAZEMPTY)) f.write(BuildLayer("Fringe", width, y, MAZEMPTY)) f.write(BuildLayer("Over", width, y, MAZEMPTY)) - f.write(BuildLayer("Collision", width, y, MAZEMPTY)) - f.write(BuildLayer("Heights", width, y, MAZEMPTY)) + + # Build the other invisible layers + f.write(BuildLayer("Collision", width, y, MAZEMPTY, True)) + f.write(BuildLayer("Heights", width, y, MAZEMPTY, True)) # Close the mapfile f.write(""" <objectgroup name="Objects"/> |