0

fixed some things left over from configfile merge

This commit is contained in:
Aaron Griffith
2011-03-19 21:17:29 -04:00
parent ebc043b95c
commit 346ee004e8
3 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
from optparse import OptionParser from optparse import OptionParser
import sys import sys
import os.path
class OptionsResults(object): class OptionsResults(object):
pass pass
@@ -61,6 +62,7 @@ class ConfigOptionParser(object):
g['args'] = args g['args'] = args
try: try:
if os.path.exists(self.configFile):
execfile(self.configFile, g, l) execfile(self.configFile, g, l)
except NameError, ex: except NameError, ex:
import traceback import traceback

View File

@@ -58,7 +58,6 @@ def main():
parser.add_option("-p", "--processes", dest="procs", help="How many worker processes to start. Default %s" % cpus, default=cpus, action="store", type="int") parser.add_option("-p", "--processes", dest="procs", help="How many worker processes to start. Default %s" % cpus, default=cpus, action="store", type="int")
parser.add_option("-z", "--zoom", dest="zoom", help="Sets the zoom level manually instead of calculating it. This can be useful if you have outlier chunks that make your world too big. This value will make the highest zoom level contain (2**ZOOM)^2 tiles", action="store", type="int", configFileOnly=True) parser.add_option("-z", "--zoom", dest="zoom", help="Sets the zoom level manually instead of calculating it. This can be useful if you have outlier chunks that make your world too big. This value will make the highest zoom level contain (2**ZOOM)^2 tiles", action="store", type="int", configFileOnly=True)
parser.add_option("-d", "--delete", dest="delete", help="Clear all caches. Next time you render your world, it will have to start completely over again. This is probably not a good idea for large worlds. Use this if you change texture packs and want to re-render everything.", action="store_true", commandLineOnly=True) parser.add_option("-d", "--delete", dest="delete", help="Clear all caches. Next time you render your world, it will have to start completely over again. This is probably not a good idea for large worlds. Use this if you change texture packs and want to re-render everything.", action="store_true", commandLineOnly=True)
parser.add_option("--cachedir", dest="cachedir", help="Sets the directory where the Overviewer will save chunk images, which is an intermediate step before the tiles are generated. You must use the same directory each time to gain any benefit from the cache. If not set, this defaults to your world directory.")
parser.add_option("--chunklist", dest="chunklist", help="A file containing, on each line, a path to a chunkfile to update. Instead of scanning the world directory for chunks, it will just use this list. Normal caching rules still apply.") parser.add_option("--chunklist", dest="chunklist", help="A file containing, on each line, a path to a chunkfile to update. Instead of scanning the world directory for chunks, it will just use this list. Normal caching rules still apply.")
parser.add_option("--rendermode", dest="rendermode", help="Specifies the render type: normal (default), lighting, night, or spawn.", type="choice", choices=["normal", "lighting", "night", "spawn"], required=True, default="normal") parser.add_option("--rendermode", dest="rendermode", help="Specifies the render type: normal (default), lighting, night, or spawn.", type="choice", choices=["normal", "lighting", "night", "spawn"], required=True, default="normal")
parser.add_option("--imgformat", dest="imgformat", help="The image output format to use. Currently supported: png(default), jpg. NOTE: png will always be used as the intermediate image format.", configFileOnly=True ) parser.add_option("--imgformat", dest="imgformat", help="The image output format to use. Currently supported: png(default), jpg. NOTE: png will always be used as the intermediate image format.", configFileOnly=True )

View File

@@ -107,7 +107,7 @@ class QuadtreeGen(object):
self.lighting = rendermode in ("lighting", "night", "spawn") self.lighting = rendermode in ("lighting", "night", "spawn")
self.night = rendermode in ("night", "spawn") self.night = rendermode in ("night", "spawn")
self.spawn = spawn in ("spawn",) self.spawn = rendermode in ("spawn",)
# Make the destination dir # Make the destination dir
if not os.path.exists(destdir): if not os.path.exists(destdir):