From 72ec5469fa2b89c025b8acc4eefee1da118abfc1 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Mon, 13 Dec 2010 22:04:52 +1000 Subject: [PATCH] Fix order and naming of parameters --- chunk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chunk.py b/chunk.py index 49b109c..f6042bf 100644 --- a/chunk.py +++ b/chunk.py @@ -134,12 +134,12 @@ def check_cache(chunkfile, oldimg): if os.path.getmtime(chunkfile) <= os.path.getmtime(oldimg[1]): return self.oldimg_path -def render_and_save(chunkfile, cachedir, worldobj, cached, cave=False, queue=None): +def render_and_save(chunkfile, cachedir, worldobj, oldimg, cave=False, queue=None): """Used as the entry point for the multiprocessing workers (since processes can't target bound methods) or to easily render and save one chunk Returns the image file location""" - a = ChunkRenderer(chunkfile, cachedir, worldobj, cached, queue) + a = ChunkRenderer(chunkfile, cachedir, worldobj, oldimg, queue) try: return a.render_and_save(cave) except ChunkCorrupt: @@ -162,7 +162,7 @@ class ChunkCorrupt(Exception): pass class ChunkRenderer(object): - def __init__(self, chunkfile, cachedir, oldimg, worldobj, queue): + def __init__(self, chunkfile, cachedir, worldobj, oldimg, queue): """Make a new chunk renderer for the given chunkfile. chunkfile should be a full path to the .dat file to process cachedir is a directory to save the resulting chunk images to