# The way to do a full render is deleting all files from the folder self.chunkymap_data_path such as /var/www/html/minetest/chunkymapdata (or chunkymap in current directory on Windows)
# The way to do a full render is deleting all files from the folder self.chunkymap_data_path such as /var/www/html/minetest/chunkymapdata (or chunkymap in current directory on Windows)
@ -139,6 +140,8 @@ class MTChunks:
maxheight=50
maxheight=50
minheight=-25
minheight=-25
pixelspernode=1
pixelspernode=1
refresh_map_enable=None
refresh_players_enable=None
#ALSO save to YAML:
#ALSO save to YAML:
#total_generated_count = 0
#total_generated_count = 0
#endregion values to save to YAML
#endregion values to save to YAML
@ -146,6 +149,8 @@ class MTChunks:
world_blacklist=None
world_blacklist=None
def__init__(self):#formerly checkpaths() in global scope
def__init__(self):#formerly checkpaths() in global scope
self.refresh_map_enable=True
self.refresh_players_enable=True
self.chunks={}
self.chunks={}
self.username="owner"
self.username="owner"
self.website_root="/var/www/html/minetest"
self.website_root="/var/www/html/minetest"
@ -517,6 +522,7 @@ class MTChunks:
defcheck_players(self):
defcheck_players(self):
# NOT NEEDED: if os.path.isfile(self.mtmn_path) and os.path.isfile(self.colors_path):
print("failed since this folder must contain colors.txt and minetestmapper-numpy.py")
print("failed since this folder must contain colors.txt and minetestmapper-numpy.py")
defmain():
defrun(self):
#args = parse_args()
ifself.refresh_players_enable:
mtchunks=MTChunks()
self.check_players()
mtchunks.run()
ifself.refresh_map_enable:
self.check_map()
if__name__=='__main__':
if__name__=='__main__':
main()
parser=argparse.ArgumentParser(description='A mapper for minetest')
parser.add_argument('--skip-map',type=bool,metavar=('skip_map'),default=False,help='draw map tiles and save YAML files for chunkymap.php to use')
#parser.add_argument('--skip-map',action='store_const', const = True, default = False, help = 'Do not draw map tiles (which would save PNG and YAML files for chunkymap.php to use)')
parser.add_argument('--skip-players',type=bool,metavar=('skip_players'),default=False,help='update player YAML files for chunkymap.php to use')
#parser.add_argument('--skip-players',action='store_const', const = True, default = False, help = 'Do not update players (which would save YAML files for chunkymap.php to use)')
#parser = argparse.ArgumentParser(description='Process some integers.')