From 2d536f3c8d6436e6d39cd1fee22d331d37d00d20 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Tue, 1 Mar 2016 15:23:58 -0500 Subject: [PATCH] turned smart recursion back on --- .../chunk_x-4z5_mapper_result.txt | 10 ------- chunkymap-regen.py | 17 ++++++----- minetestmapper TEST.bat | 6 ---- minetestmapper.py | 18 ++++++++---- minetestmapperTEST chunk_x0z0.bat | 28 +++++++++++++++++++ 5 files changed, 51 insertions(+), 28 deletions(-) delete mode 100644 chunkymap-genresults/chunk_x-4z5_mapper_result.txt delete mode 100644 minetestmapper TEST.bat create mode 100644 minetestmapperTEST chunk_x0z0.bat diff --git a/chunkymap-genresults/chunk_x-4z5_mapper_result.txt b/chunkymap-genresults/chunk_x-4z5_mapper_result.txt deleted file mode 100644 index 7ad5495..0000000 --- a/chunkymap-genresults/chunk_x-4z5_mapper_result.txt +++ /dev/null @@ -1,10 +0,0 @@ -Result image (w=16 h=16) will be written to C:\Users\jgustafson\Documents\GitHub\minetest-chunkymap\chunk_x-4z5.png -Unknown node names: default:grass_1 flowers:mushroom_fertile_red air -Unknown node ids: 0x0 0x1 0x9 0x7 -Drawing image -Saving to: C:\Users\jgustafson\Documents\GitHub\minetest-chunkymap\chunk_x-4z5.png -('PNG Region: ', [-64, -64, 80, 80]) -('pngMinX: ', '-64') -('pngMaxZ: ', '80') -('Pixels PerNode: ', 1) -('border: ', 0) diff --git a/chunkymap-regen.py b/chunkymap-regen.py index 54d06d6..0b4bc40 100644 --- a/chunkymap-regen.py +++ b/chunkymap-regen.py @@ -643,6 +643,7 @@ class MTChunks: if os.path.isfile(region_capable_script_path): script_path = region_capable_script_path #cmd_suffix=" > entire-mtmresult.txt" + expertmm_region_string = cmd_string="sudo python "+script_path+" --input \""+self.world_path+"\" --geometry "+geometry_value_string+" --output \""+tmp_png_path+"\""+cmd_suffix #sudo python /home/owner/minetest/util/minetestmapper.py --input "/home/owner/.minetest/worlds/FCAGameAWorld" --output /var/www/html/minetest/chunkymapdata/entire.png > entire-mtmresult.txt #sudo python /home/owner/minetest/util/chunkymap/minetestmapper.py --input "/home/owner/.minetest/worlds/FCAGameAWorld" --geometry 0:0+16+16 --output /var/www/html/minetest/chunkymapdata/chunk_x0z0.png > /home/owner/minetest/util/chunkymap-genresults/chunk_x0z0_mapper_result.txt @@ -810,10 +811,10 @@ class MTChunks: #print("DIDN'T MOVE: "+str(player_name)) players_didntmove_count += 1 player_count += 1 - if not self.verbose_enable: - print("PLAYERS:") - print(" saved: "+str(player_written_count)+" (moved:"+str(players_moved_count)+"; new:"+str(players_saved_count)+")") - print(" didn't move: "+str(players_didntmove_count)) + #if not self.verbose_enable: + print("PLAYERS:") + print(" saved: "+str(player_written_count)+" (moved:"+str(players_moved_count)+"; new:"+str(players_saved_count)+")") + print(" didn't move: "+str(players_didntmove_count)) def is_player_at_luid(self, chunk_luid): result = False @@ -980,6 +981,7 @@ class MTChunks: def check_map_pseudorecursion_start(self): if self.todo_index<0: + print("PROCESSING MAP DATA (BRANCH PATTERN)") if os.path.isfile(self.mtmn_path) and os.path.isfile(self.colors_path): self.rendered_count = 0 self.todo_positions.clear() @@ -1140,7 +1142,7 @@ class MTChunks: #if str(self.world_name) != str(self.mapvars["world_name"]): # is_different_world = True # print("FULL RENDER since chosen world name '"+self.world_name+"' does not match previously rendered world name '"+self.mapvars["world_name"]+"'") - print("PROCESSING MAP DATA") + print("PROCESSING MAP DATA (SQUARE)") while this_iteration_generates_count > 0: this_iteration_generates_count = 0 self.read_then_remove_signals() @@ -1226,7 +1228,7 @@ class MTChunks: if type(signals[this_key]) is bool: self.verbose_enable = signals[this_key] else: - print("ERROR: expected bool for "+this_key) + print("ERROR: expected true or false after colon for "+this_key) else: print("ERROR: unknown signal '"+this_key+"'") @@ -1268,7 +1270,8 @@ class MTChunks: #if self.last_map_refresh_second is not None: #print ("waited "+str(best_timer()-self.last_map_refresh_second)+"s for map update") self.last_map_refresh_second = best_timer() - self.check_map_inefficient_squarepattern() + self.check_map_pseudorecursion_start() + #self.check_map_inefficient_squarepattern() else: print("waiting before doing map update") else: diff --git a/minetestmapper TEST.bat b/minetestmapper TEST.bat deleted file mode 100644 index c466fe4..0000000 --- a/minetestmapper TEST.bat +++ /dev/null @@ -1,6 +0,0 @@ -REM C:\Python27\python minetestmapper.py --input "C:\games\Minetest\worlds\try7amber" --region 0 64 0 64 --output "try7amber.png" -C:\Python27\python minetestmapper.py --input "C:\games\Minetest\worlds\try7amber" --geometry 0:0+16+16 --output "chunk_x0z0.png" > chunk_x0z0-genresult.txt -REM C:\Python27\python minetestmapper.py --input "C:\games\Minetest\worlds\try7amber" --geometry -100:-100+16+16 --output "chunk_x-100z-100.png" > chunk_x-100z-100-genresult.txt - - -pause diff --git a/minetestmapper.py b/minetestmapper.py index df526f7..2eff53d 100644 --- a/minetestmapper.py +++ b/minetestmapper.py @@ -165,7 +165,10 @@ drawunderground = False geometry_string = None region_string = None -for o, a in opts: +#for o, a in opts: +opt_index = 0 +while opt_index "%TARGET_GENRESULT_PATH%" +REM C:\Python27\python minetestmapper.py --input "C:\games\Minetest\worlds\try7amber" --geometry %CHUNKYMAP_CHUNK_XMIN%:%CHUNKYMAP_CHUNK_ZMIN%+%CHUNKYMAP_CHUNK_WIDTH%+%CHUNKYMAP_CHUNK_HEIGHT% --output "%TARGET_IMAGE_PATH%" > "%TARGET_GENRESULT_PATH%" + +REM REM C:\Python27\python minetestmapper.py --input "C:\games\Minetest\worlds\try7amber" --geometry -100:-100+16+16 --output "%TARGET_IMAGE_PATH%" > "%TARGET_GENRESULT_PATH%" + +start notepad "%TARGET_GENRESULT_PATH%" +start "chunkymapimage" "%TARGET_IMAGE_PATH%" + +echo To delete the test output, +pause +del "%TARGET_GENRESULT_PATH%" +del "%TARGET_IMAGE_PATH%"