From d8130533293712354dcf4d7368ebfb2239c104cb Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Tue, 1 Mar 2011 20:28:31 -0500 Subject: [PATCH] removed lingering traces of the hash system --- chunk.py | 17 ----------------- quadtree.py | 7 ++----- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/chunk.py b/chunk.py index fc3d5fa..4bd5b75 100644 --- a/chunk.py +++ b/chunk.py @@ -16,7 +16,6 @@ import numpy from PIL import Image, ImageDraw, ImageEnhance, ImageOps import os.path -import hashlib import logging import time import math @@ -406,22 +405,6 @@ class ChunkRenderer(object): return pseudo_data - def _hash_blockarray(self): - """Finds a hash of the block array""" - if hasattr(self, "_digest"): - return self._digest - h = hashlib.md5() - h.update(self.level['Blocks']) - - # If the render algorithm changes, change this line to re-generate all - # the chunks automatically: - h.update("1") - - digest = h.hexdigest() - # 6 digits ought to be plenty - self._digest = digest[:6] - return self._digest - def calculate_darkness(self, skylight, blocklight): """Takes a raw blocklight and skylight, and returns a value between 0.0 (fully lit) and 1.0 (fully black) that can be used as diff --git a/quadtree.py b/quadtree.py index a25d84f..caef4f8 100644 --- a/quadtree.py +++ b/quadtree.py @@ -17,7 +17,6 @@ import multiprocessing import itertools import os import os.path -import hashlib import functools import re import shutil @@ -251,8 +250,8 @@ class QuadtreeGen(object): newdir = "new" + str(dirnum) newdirpath = getpath(newdir) - files = [str(dirnum)+"."+self.imgformat, str(dirnum)+".hash", str(dirnum)] - newfiles = [str(newnum)+"."+self.imgformat, str(newnum)+".hash", str(newnum)] + files = [str(dirnum)+"."+self.imgformat, str(dirnum)] + newfiles = [str(newnum)+"."+self.imgformat, str(newnum)] os.mkdir(newdirpath) for f, newf in zip(files, newfiles): @@ -555,8 +554,6 @@ def render_worldtile(quadtree, chunks, colstart, colend, rowstart, rowend, path) If there are no chunks, this tile is not saved (if it already exists, it is deleted) - If the hash file already exists, it is checked against the hash of each chunk. - Standard tile size has colend-colstart=2 and rowend-rowstart=4 There is no return value