0

removed lingering traces of the hash system

This commit is contained in:
Aaron Griffith
2011-03-01 20:28:31 -05:00
parent 4293851fcc
commit d813053329
2 changed files with 2 additions and 22 deletions

View File

@@ -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

View File

@@ -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