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:
@@ -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,6 +519,7 @@ def main():
|
|||||||
+ hex(hash(rname))[-4:])
|
+ hex(hash(rname))[-4:])
|
||||||
|
|
||||||
# add it to the list of filters
|
# add it to the list of filters
|
||||||
|
for rset in rsets:
|
||||||
filters.add((name, f['name'], f['filterFunction'], rset, worldpath, rname))
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user