conforming params to official minetestmapper

master
expertmm 2018-02-15 19:11:21 -05:00
parent ee9560b277
commit 36f6983799
3 changed files with 25 additions and 1 deletions

View File

@ -37,6 +37,8 @@ Use python to make minetest maps from worlds.
(2018-02-15)
* expertmm: clarified license notices in python files
* expertmm: (minetestmapper-numpy.py) changed minheight and maxheight to --min-y and --max-y to conform to official minetestmapper
* expertmm: (minetestmapper.py) for now, silently ignore drawalpha, noshading, min-y, max-y, backend, zoom, colors, scales for compatibility with official minetestmapper
* expertmm: (minetestmapper-numpy.py) for now silently ignore drawalpha, noshading, geometry, scales, colors, backend (and rename `pixelspernode` param to `zoom`) for compatibility with official minetestmapper
(2018-02-14)
* expertmm: (minetestmapper-numpy.py) fixed exception while showing exception (see "Could not finish writing r error since r was not initialized")--the original exception occurs for unknown reason
(2017-04-12)

View File

@ -193,13 +193,19 @@ def parse_args():
parser.add_argument('--drawscale',action='store_const', const = True, default=False, help = 'draw a scale on the border of the map')
parser.add_argument('--drawplayers',action='store_const', const = True, default = False, help = 'draw markers for players')
parser.add_argument('--draworigin',action='store_const', const = True, default = False, help = 'draw the position of the origin (0,0)')
parser.add_argument('--drawalpha',dest='drawalpha',action='store_const', const = 1, default = 0, help = 'accepted for compatibility but NOT YET IMPLEMENTED in this version')
parser.add_argument('--noshading',dest='noshading',action='store_const', const = 1, default = 0, help = 'accepted for compatibility but NOT YET IMPLEMENTED in this version')
parser.add_argument('--drawunderground',dest='drawunderground',action='store_const', const = 1, default = 0, help = 'draw underground areas overlaid on the map')
parser.add_argument('--drawunderground-standalone',dest='drawunderground',action='store_const', const = 2, help = 'draw underground areas as a standalone map')
parser.add_argument('--region', nargs=4, type = int, metavar = ('XMIN','XMAX','ZMIN','ZMAX'), default = (-2000,2000,-2000,2000),help = 'set the bounding x,z coordinates for the map (units are nodes, default = -2000 2000 -2000 2000)')
parser.add_argument('--max-y', type = int, metavar = ('YMAX'), default = 500, help = 'don\'t draw above height YMAX (default = 500)')
parser.add_argument('--min-y', type = int, metavar = ('YMIN'), default = -500, help = 'don\'t draw below height YMIN (defualt = -500)')
parser.add_argument('--pixelspernode', type = int, metavar = ('PPN'), default = 1, help = 'number of pixels per node (default = 1)')
parser.add_argument('--zoom', type = int, metavar = ('PPN'), default = 1, help = 'number of pixels per node (default = 1)')
parser.add_argument('--facing', type = str, choices = ('up','down','north','south','east','west'),default='down',help = 'direction to face when drawing (north, south, east or west will draw a cross-section)')
parser.add_argument('--geometry', type = str, default='',help = 'accepted for compatibility but NOT YET IMPLEMENTED in this version')
parser.add_argument('--scales', type = str, default='',help = 'accepted for compatibility but NOT YET IMPLEMENTED in this version')
parser.add_argument('--colors', type = str, default='colors.txt',help = 'accepted for compatibility but NOT YET IMPLEMENTED in this version')
parser.add_argument('--backend', type = str, choices = ('leveldb'),default='leveldb',help = 'accepted for compatibility but NOT YET IMPLEMENTED in this version')
parser.add_argument('--fog', type = float, metavar = ('FOGSTRENGTH'), default = 0.0, help = 'use fog strength of FOGSTRENGTH (0.0 by default, max of 1.0)')
parser.add_argument('world_dir',help='the path to the world you want to map')
parser.add_argument('output',nargs='?',default='map.png',help='the output filename')

View File

@ -205,6 +205,22 @@ for o, a in opts:
geometry_string = a
elif o == "--region":
region_string = a
elif o == "--drawalpha":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--noshading":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--min-y":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--max-y":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--backend":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--zoom":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--colors":
print("# ignored (NOT YET IMPLEMENTED) " + o)
elif o == "--scales":
print("# ignored (NOT YET IMPLEMENTED) " + o)
else:
assert False, "unhandled option"