Add option to skip scanning for POIs in regions
Sometimes, people just use --genpoi for manual POIs. This option allows them to save some time by not handling entities.
This commit is contained in:
@@ -99,6 +99,8 @@ def main():
|
|||||||
"These scripts may accept different arguments than the ones listed above")
|
"These scripts may accept different arguments than the ones listed above")
|
||||||
exegroup.add_option("--genpoi", dest="genpoi", action="store_true",
|
exegroup.add_option("--genpoi", dest="genpoi", action="store_true",
|
||||||
help="Runs the genPOI script")
|
help="Runs the genPOI script")
|
||||||
|
exegroup.add_option("--skip-scan", dest="skipscan", action="store_true",
|
||||||
|
help="When running GenPOI, don't scan for entities")
|
||||||
|
|
||||||
parser.add_option_group(exegroup)
|
parser.add_option_group(exegroup)
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ def main():
|
|||||||
parser = OptionParser(usage=helptext)
|
parser = OptionParser(usage=helptext)
|
||||||
parser.add_option("--config", dest="config", action="store", help="Specify the config file to use.")
|
parser.add_option("--config", dest="config", action="store", help="Specify the config file to use.")
|
||||||
parser.add_option("--quiet", dest="quiet", action="count", help="Reduce logging output")
|
parser.add_option("--quiet", dest="quiet", action="count", help="Reduce logging output")
|
||||||
|
parser.add_option("--skip-scan", dest="skipscan", action="store_true", help="Skip scanning for entities when using GenPOI")
|
||||||
|
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
if not options.config:
|
if not options.config:
|
||||||
@@ -182,12 +183,14 @@ def main():
|
|||||||
l.append(to_append)
|
l.append(to_append)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
markers[rname] = [to_append]
|
markers[rname] = [to_append]
|
||||||
|
|
||||||
|
if not options.skipscan:
|
||||||
|
handleEntities(rset, os.path.join(destdir, rname), render, rname)
|
||||||
|
|
||||||
handleEntities(rset, os.path.join(destdir, rname), render, rname)
|
|
||||||
handlePlayers(rset, render, worldpath)
|
handlePlayers(rset, render, worldpath)
|
||||||
handleManual(rset, render['manualpois'])
|
handleManual(rset, render['manualpois'])
|
||||||
|
|
||||||
logging.info("Done scanning regions")
|
logging.info("Done handling POIs")
|
||||||
logging.info("Writing out javascript files")
|
logging.info("Writing out javascript files")
|
||||||
markerSetDict = dict()
|
markerSetDict = dict()
|
||||||
for (flter, rset) in markersets:
|
for (flter, rset) in markersets:
|
||||||
|
|||||||
Reference in New Issue
Block a user