Browse Source

working on fixing decachunk generation

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
51e0e2b456
  1. 7
      chunkymap-regen.py
  2. 5
      install-chunkymap-on-windows.py

7
chunkymap-regen.py

@ -391,6 +391,7 @@ class MTChunks:
chunks = None chunks = None
decachunks = None decachunks = None
rendered_this_session_count = None rendered_this_session_count = None
#force_rerender_decachunks_enable = None
#region values for subprocess arguments: #region values for subprocess arguments:
pixelspernode = 1 pixelspernode = 1
@ -434,6 +435,7 @@ class MTChunks:
min_indent = None min_indent = None
def __init__(self): #formerly checkpaths() in global scope def __init__(self): #formerly checkpaths() in global scope
#self.force_rerender_decachunks_enable = True
self.min_indent = " " self.min_indent = " "
self.decachunks = {} self.decachunks = {}
self.rendered_this_session_count = 0 self.rendered_this_session_count = 0
@ -1563,8 +1565,9 @@ class MTChunks:
prev_len = len(self.todo_positions) prev_len = len(self.todo_positions)
self._check_map_pseudorecursion_branchfrom(chunky_x, chunky_z) self._check_map_pseudorecursion_branchfrom(chunky_x, chunky_z)
#must check_decachunk_containing_chunk AFTER _check_map_pseudorecursion_branchfrom so check_decachunk_containing_chunk can see if there are more to do before rendering superchunk #must check_decachunk_containing_chunk AFTER _check_map_pseudorecursion_branchfrom so check_decachunk_containing_chunk can see if there are more to do before rendering superchunk
if self.rendered_this_session_count>prev_rendered_this_session_count: #always check since already checks queue and doesn't render decachunk on last rendered chunk, but instead on last queued chunk in decachunk
self.check_decachunk_containing_chunk(chunky_x, chunky_z) #if self.rendered_this_session_count>prev_rendered_this_session_count or self.force_rerender_decachunks_enable:
self.check_decachunk_containing_chunk(chunky_x, chunky_z)
if self.verbose_enable: if self.verbose_enable:
print(min_indent+"["+str(self.todo_index)+"] branching from "+str((chunky_x, chunky_z))+" (added "+str(len(self.todo_positions)-prev_len)+")") print(min_indent+"["+str(self.todo_index)+"] branching from "+str((chunky_x, chunky_z))+" (added "+str(len(self.todo_positions)-prev_len)+")")
else: else:

5
install-chunkymap-on-windows.py

@ -23,8 +23,9 @@ def web_get(url, file_name):
myopener.retrieve(url, file_name) myopener.retrieve(url, file_name)
#as per http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python #as per http://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python but FAILS (404 Error) since user agent is not recognized, and setting user agent string does not fix it. use web_get above instead.
def web_get_BADUSERAGENT(url, file_name): def web_get_BADUSERAGENT(url, file_name):
print("This function probably will not work since settings user agent doesn't work with urllib2 request object (user agent is not recognized, and 404 error is usually the result). Try web_get instead.")
file_name = None file_name = None
try: try:
#url = "http://download.thinkbroadband.com/10MB.zip" #url = "http://download.thinkbroadband.com/10MB.zip"
@ -207,4 +208,4 @@ if python_folder_name.lower()[:7]!="python3":
else: else:
raw_input("Cannot detect a site-packages folder in python installation of current python executable "+sys.executable+" so installation cannot continue. Press enter to exit.") raw_input("Cannot detect a site-packages folder in python installation of current python executable "+sys.executable+" so installation cannot continue. Press enter to exit.")
else: else:
raw_input("This installer does not know the correct wheels for python 3 (detected at "+python_folder_path+"). Please run this script with python 2 instead. Please see README.md for manual installation, but download python 3 wheels instead of the example wheels listed in README.md. Press enter to exit.") raw_input("This installer does not know the correct wheels for python 3 (detected at "+python_folder_path+"). Please run this script with python 2 instead. Please see README.md for manual installation, but download and install Python 3 wheels instead of the example wheels listed in README.md. Press enter to exit.")

Loading…
Cancel
Save