0

Merge branch 'master' into dtt-merge

Conflicts:
	chunk.py
This commit is contained in:
Aaron Griffith
2011-03-06 18:05:28 -05:00
5 changed files with 231 additions and 227 deletions

13
gmap.py
View File

@@ -70,6 +70,13 @@ def main():
if not os.path.exists(worlddir):
# world given is either world number, or name
worlds = world.get_worlds()
# if there are no worlds found at all, exit now
if not worlds:
parser.print_help()
print "\nInvalid world path"
sys.exit(1)
try:
worldnum = int(worlddir)
worlddir = worlds[worldnum]['path']
@@ -79,13 +86,13 @@ def main():
worlddir = worlds[worlddir]['path']
except KeyError:
# it's not a number, name, or path
print "Invalid world name or path"
parser.print_help()
print "Invalid world name or path"
sys.exit(1)
except KeyError:
# it was an invalid number
print "Invalid world number"
parser.print_help()
print "Invalid world number"
sys.exit(1)
if len(args) != 2:
@@ -128,7 +135,7 @@ def main():
if not composite.extension_alpha_over:
logging.info("Notice: alpha_over extension not found; using default PIL paste()")
useBiomeData = os.path.exists(os.path.join(worlddir, 'EXTRACTEDBIOMES'))
useBiomeData = os.path.exists(os.path.join(worlddir, 'biomes'))
if not useBiomeData:
logging.info("Notice: Not using biome data for tinting")