updated tileset.py and genPOI.py and a few other stragglers
This commit is contained in:
@@ -400,9 +400,9 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
|
||||
else:
|
||||
tex = texcache[texopts_key]
|
||||
|
||||
rset = w.get_regionset(render['dimension'])
|
||||
rset = w.get_regionset(render['dimension'][1])
|
||||
if rset == None: # indicates no such dimension was found:
|
||||
logging.error("Sorry, you requested dimension '%s' for %s, but I couldn't find it", render['dimension'], render_name)
|
||||
logging.error("Sorry, you requested dimension '%s' for %s, but I couldn't find it", render['dimension'][0], render_name)
|
||||
return 1
|
||||
|
||||
#################
|
||||
|
||||
@@ -57,10 +57,9 @@ def handlePlayers(rset, render, worldpath):
|
||||
# only handle this region set once
|
||||
if 'Players' in rset._pois:
|
||||
return
|
||||
dimension = {'overworld': 0,
|
||||
'nether': -1,
|
||||
'end': 1,
|
||||
'default': 0}[render['dimension']]
|
||||
dimension = {None: 0,
|
||||
'DIM-1': -1,
|
||||
'DIM1': 1}[rset.get_type()]
|
||||
playerdir = os.path.join(worldpath, "players")
|
||||
if os.path.isdir(playerdir):
|
||||
playerfiles = os.listdir(playerdir)
|
||||
@@ -165,9 +164,9 @@ def main():
|
||||
else:
|
||||
w = worldcache[render['world']]
|
||||
|
||||
rset = w.get_regionset(render['dimension'])
|
||||
rset = w.get_regionset(render['dimension'][1])
|
||||
if rset == None: # indicates no such dimension was found:
|
||||
logging.error("Sorry, you requested dimension '%s' for %s, but I couldn't find it", render['dimension'], render_name)
|
||||
logging.error("Sorry, you requested dimension '%s' for %s, but I couldn't find it", render['dimension'][0], render_name)
|
||||
return 1
|
||||
|
||||
for f in render['markers']:
|
||||
|
||||
@@ -182,6 +182,8 @@ def validateStr(s):
|
||||
return str(s)
|
||||
|
||||
def validateDimension(d):
|
||||
# returns (original, argument to get_type)
|
||||
|
||||
# these are provided as arguments to RegionSet.get_type()
|
||||
pretty_names = {
|
||||
"nether": "DIM-1",
|
||||
@@ -191,12 +193,9 @@ def validateDimension(d):
|
||||
}
|
||||
|
||||
try:
|
||||
return pretty_names[d]
|
||||
return (d, pretty_names[d])
|
||||
except KeyError:
|
||||
if d.startswith("DIM"):
|
||||
return d
|
||||
|
||||
raise ValidationException("%r is not a valid dimension" % d)
|
||||
return (d, d)
|
||||
|
||||
def validateOutputDir(d):
|
||||
_, d = checkBadEscape(d)
|
||||
|
||||
@@ -524,7 +524,7 @@ class TileSet(object):
|
||||
base = self.options.get('base'),
|
||||
bgcolor = bgcolorformat(self.options.get('bgcolor')),
|
||||
world = self.options.get('worldname_orig') +
|
||||
(" - " + self.options.get('dimension') if self.options.get('dimension') != 'default' else ''),
|
||||
(" - " + self.options.get('dimension')[0] if self.options.get('dimension')[1] != 0 else ''),
|
||||
last_rendertime = self.max_chunk_mtime,
|
||||
imgextension = self.imgextension,
|
||||
isOverlay = isOverlay,
|
||||
|
||||
Reference in New Issue
Block a user