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:
|
else:
|
||||||
tex = texcache[texopts_key]
|
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:
|
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
|
return 1
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
|||||||
@@ -57,10 +57,9 @@ def handlePlayers(rset, render, worldpath):
|
|||||||
# only handle this region set once
|
# only handle this region set once
|
||||||
if 'Players' in rset._pois:
|
if 'Players' in rset._pois:
|
||||||
return
|
return
|
||||||
dimension = {'overworld': 0,
|
dimension = {None: 0,
|
||||||
'nether': -1,
|
'DIM-1': -1,
|
||||||
'end': 1,
|
'DIM1': 1}[rset.get_type()]
|
||||||
'default': 0}[render['dimension']]
|
|
||||||
playerdir = os.path.join(worldpath, "players")
|
playerdir = os.path.join(worldpath, "players")
|
||||||
if os.path.isdir(playerdir):
|
if os.path.isdir(playerdir):
|
||||||
playerfiles = os.listdir(playerdir)
|
playerfiles = os.listdir(playerdir)
|
||||||
@@ -165,9 +164,9 @@ def main():
|
|||||||
else:
|
else:
|
||||||
w = worldcache[render['world']]
|
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:
|
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
|
return 1
|
||||||
|
|
||||||
for f in render['markers']:
|
for f in render['markers']:
|
||||||
|
|||||||
@@ -182,6 +182,8 @@ def validateStr(s):
|
|||||||
return str(s)
|
return str(s)
|
||||||
|
|
||||||
def validateDimension(d):
|
def validateDimension(d):
|
||||||
|
# returns (original, argument to get_type)
|
||||||
|
|
||||||
# these are provided as arguments to RegionSet.get_type()
|
# these are provided as arguments to RegionSet.get_type()
|
||||||
pretty_names = {
|
pretty_names = {
|
||||||
"nether": "DIM-1",
|
"nether": "DIM-1",
|
||||||
@@ -191,12 +193,9 @@ def validateDimension(d):
|
|||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return pretty_names[d]
|
return (d, pretty_names[d])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if d.startswith("DIM"):
|
return (d, d)
|
||||||
return d
|
|
||||||
|
|
||||||
raise ValidationException("%r is not a valid dimension" % d)
|
|
||||||
|
|
||||||
def validateOutputDir(d):
|
def validateOutputDir(d):
|
||||||
_, d = checkBadEscape(d)
|
_, d = checkBadEscape(d)
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ class TileSet(object):
|
|||||||
base = self.options.get('base'),
|
base = self.options.get('base'),
|
||||||
bgcolor = bgcolorformat(self.options.get('bgcolor')),
|
bgcolor = bgcolorformat(self.options.get('bgcolor')),
|
||||||
world = self.options.get('worldname_orig') +
|
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,
|
last_rendertime = self.max_chunk_mtime,
|
||||||
imgextension = self.imgextension,
|
imgextension = self.imgextension,
|
||||||
isOverlay = isOverlay,
|
isOverlay = isOverlay,
|
||||||
|
|||||||
Reference in New Issue
Block a user