From 22db7bb3cddb0dc1a43feba4e7ef22c0be85a0ff Mon Sep 17 00:00:00 2001 From: Alex Jurkiewicz Date: Tue, 16 Nov 2010 10:15:26 +1100 Subject: [PATCH] clean up biome code --- chunk.py | 3 +-- template.html | 8 ++++---- textures.py | 8 -------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/chunk.py b/chunk.py index 85b4f08..4c360d2 100644 --- a/chunk.py +++ b/chunk.py @@ -475,7 +475,6 @@ class ChunkRenderer(object): For cave mode, all blocks that have any direct sunlight are not rendered, and blocks are drawn with a color tint depending on their depth.""" - blocks = self.blocks if cave: @@ -547,7 +546,7 @@ class ChunkRenderer(object): c = textures.foliagecolor[index] #i = textures.tintTexture(t,c) i = ImageOps.colorize(ImageOps.grayscale(t[0]), (0,0,0), c) - i.putalpha(t[1]) + i.putalpha(t[1]) t = (i, t[1]) diff --git a/template.html b/template.html index f346a33..b804ae2 100644 --- a/template.html +++ b/template.html @@ -136,7 +136,7 @@ var markersInit = false; function prepareSignMarker(marker, item) { - + var c = "

" + item.msg.replace(/\n/g,"
") + "

"; var infowindow = new google.maps.InfoWindow({ content: c @@ -149,7 +149,7 @@ google.maps.event.addListener(marker, 'click', function() { function initMarkers() { if (markersInit) { return; } - + markersInit = true; for (i in markerData) { @@ -157,7 +157,7 @@ google.maps.event.addListener(marker, 'click', function() { // a default: var iconURL = ''; - + if (item.type == 'spawn') { iconURL = 'http://google-maps-icons.googlecode.com/files/home.png';} if (item.type == 'sign') { iconURL = 'signpost_icon.png';} @@ -165,7 +165,7 @@ google.maps.event.addListener(marker, 'click', function() { var marker = new google.maps.Marker({ position: converted, map: map, - title: item.msg, + title: item.msg, icon: iconURL }); diff --git a/textures.py b/textures.py index 08408ed..aecc1dd 100644 --- a/textures.py +++ b/textures.py @@ -26,13 +26,6 @@ from PIL import Image, ImageEnhance, ImageOps import util import composite -sys.path.append("../python-gearman") - -from gearman.client import GearmanClient - -gmc = GearmanClient(["localhost"]) - - def _find_file(filename, mode="rb"): """Searches for the given file and returns an open handle to it. This searches the following locations in this order: @@ -581,7 +574,6 @@ def prepareBiomeData(worlddir, chunkX, chunkY): t.currentBiomeData = data return data - # This set holds block ids that require special pre-computing. These are typically # things that require ancillary data to render properly (i.e. ladder plus orientation)