Browse Source

removed some comments for easier merging

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
51f96e2330
  1. 6
      chunkymap-regen.py
  2. 11
      minetestmapper.py

6
chunkymap-regen.py

@ -625,14 +625,14 @@ class MTChunks:
geometry_value_string = str(x_min)+":"+str(z_min)+"+"+str(int(x_max)-int(x_min)+1)+"+"+str(int(z_max)-int(z_min)+1) # +1 since max-min is exclusive and width must be inclusive for minetestmapper.py
cmd_suffix = ""
cmd_suffix = " > \""+genresult_path+"\""
output_type_string = "minetestmapper-numpy"
self.mapper_id = "minetestmapper-numpy"
cmd_string = self.python_exe_path + " \""+self.mtmn_path + "\" --region " + str(x_min) + " " + str(x_max) + " " + str(z_min) + " " + str(z_max) + " --maxheight "+str(self.maxheight)+" --minheight "+str(self.minheight)+" --pixelspernode "+str(self.pixelspernode)+" \""+self.world_path+"\" \""+tmp_png_path+"\"" + cmd_suffix
if self.os_name!="windows": #since windows client doesn't normally have minetest-mapper
if self.mapper_id=="minetestmapper-region": #if self.os_name!="windows": #since windows client doesn't normally have minetest-mapper
# Since minetestmapper-numpy has trouble with leveldb:
# such as sudo minetest-mapper --input "/home/owner/.minetest/worlds/FCAGameAWorld" --geometry -32:-32+64+64 --output /var/www/html/minetest/try1.png
# where geometry option is like --geometry x:y+w+h
# output_type_string = "minetest-mapper"
# mapper_id = "minetest-mapper"
# NOTE: minetest-mapper is part of the minetest-data package, which can be installed alongside the git version of minetestserver
# BUT *buntu Trusty version of it does NOT have geometry option
# cmd_string = "/usr/games/minetest-mapper --input \""+self.world_path+"\" --draworigin --geometry "+geometry_value_string+" --output \""+tmp_png_path+"\""+cmd_suffix

11
minetestmapper.py

@ -4,7 +4,7 @@
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the DWFYWT
# and/or modify it under the terms of the DWTFYWT
# Public License, Version 2, as published by Sam Hocevar. See
# COPYING for more details.
@ -165,10 +165,7 @@ drawunderground = False
geometry_string = None
region_string = None
#for o, a in opts:
opt_index = 0
while opt_index <len(opts):
o, a = opts[opt_index]
for o, a in opts:
if o in ("-h", "--help"):
usage()
sys.exit()
@ -197,10 +194,8 @@ while opt_index <len(opts):
geometry_string = a
elif o == "--region":
region_string = a
#region_string = xmin_string+" "+xmax_string+" "+zmin_string+" "+zmax_string
else:
assert False, "unhandled option"
opt_index += 1
nonchunky_xmin=-1500
nonchunky_xmax=1500
nonchunky_zmin=-1500
@ -388,7 +383,7 @@ if os.path.exists(path + "sectors"):
zlist.append(z)
if len(xlist) == 0 or len(zlist) == 0:
print("At this chunk data does not exist.")
print("At this chunk, data does not exist.")
sys.exit(1)
# Get rid of doubles

Loading…
Cancel
Save