0

genPOI: respect crop option

Use CroppedRegionSets to generate markers, which should only affect
handleEntities. I have not yet checked whether this generates
dupicate players and manualpois for maps with multiple crop zones,
but that's a fire to put out for another day.

Fixes #1574.
This commit is contained in:
Nicolas F
2019-07-12 16:04:28 +02:00
parent aeeaadd5bb
commit 033d75b08e

View File

@@ -504,6 +504,13 @@ def main():
logging.warn("Sorry, you requested dimension '%s' for the render '%s', but I couldn't " logging.warn("Sorry, you requested dimension '%s' for the render '%s', but I couldn't "
"find it.", render['dimension'][0], rname) "find it.", render['dimension'][0], rname)
continue continue
# List of regionsets that should be handled
rsets = []
if "crop" in render:
for zone in render['crop']:
rsets.append(world.CroppedRegionSet(rset, *zone))
else:
rsets.append(rset)
# find filters for this render # find filters for this render
for f in render['markers']: for f in render['markers']:
@@ -512,7 +519,8 @@ def main():
+ hex(hash(rname))[-4:]) + hex(hash(rname))[-4:])
# add it to the list of filters # add it to the list of filters
filters.add((name, f['name'], f['filterFunction'], rset, worldpath, rname)) for rset in rsets:
filters.add((name, f['name'], f['filterFunction'], rset, worldpath, rname))
# add an entry in the menu to show markers found by this filter # add an entry in the menu to show markers found by this filter
group = dict( group = dict(