From fd0924a93bb9fd3062d804c947455f51248e15ce Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Mon, 21 Mar 2011 05:35:11 -0400 Subject: [PATCH] moved lighting check from world object to quadtree object, where it should be now --- chunk.py | 2 +- overviewer.py | 2 +- world.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/chunk.py b/chunk.py index 18d7eca..9a25195 100644 --- a/chunk.py +++ b/chunk.py @@ -550,7 +550,7 @@ class ChunkRenderer(object): if not img: img = Image.new("RGBA", (384, 1728), (38,92,255,0)) - if self.world.lighting: + if self.quadtree.lighting: c_overviewer.render_loop_lighting(self, img, xoff, yoff, blockData_expanded) else: c_overviewer.render_loop(self, img, xoff, yoff, blockData_expanded) diff --git a/overviewer.py b/overviewer.py index d5d17c0..4be9d92 100755 --- a/overviewer.py +++ b/overviewer.py @@ -157,7 +157,7 @@ def main(): logging.info("Notice: Not using biome data for tinting") # First do world-level preprocessing - w = world.World(worlddir, useBiomeData=useBiomeData, lighting=options.lighting) + w = world.World(worlddir, useBiomeData=useBiomeData) w.go(options.procs) # create the quadtrees diff --git a/world.py b/world.py index 97fed17..ce869cb 100644 --- a/world.py +++ b/world.py @@ -67,10 +67,9 @@ class World(object): mincol = maxcol = minrow = maxrow = 0 - def __init__(self, worlddir, useBiomeData=False,regionlist=None, lighting=False): + def __init__(self, worlddir, useBiomeData=False,regionlist=None): self.worlddir = worlddir self.useBiomeData = useBiomeData - self.lighting = lighting #find region files, or load the region list #this also caches all the region file header info