From 033d75b08ee79f7aa7b3e318d8842ddbdf6729a4 Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Fri, 12 Jul 2019 16:04:28 +0200 Subject: [PATCH] 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. --- overviewer_core/aux_files/genPOI.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/overviewer_core/aux_files/genPOI.py b/overviewer_core/aux_files/genPOI.py index 3841f04..c0b8742 100755 --- a/overviewer_core/aux_files/genPOI.py +++ b/overviewer_core/aux_files/genPOI.py @@ -504,6 +504,13 @@ def main(): logging.warn("Sorry, you requested dimension '%s' for the render '%s', but I couldn't " "find it.", render['dimension'][0], rname) 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 for f in render['markers']: @@ -512,7 +519,8 @@ def main(): + hex(hash(rname))[-4:]) # 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 group = dict(