0

genPOI: add option --skip-players

If one simply wants to add some manual POIs, no player files have to be
parsed.
This commit is contained in:
MasterofJOKers
2014-07-30 20:55:12 +02:00
parent 0b3f91e752
commit 61339b1c42
2 changed files with 8 additions and 1 deletions

View File

@@ -104,6 +104,8 @@ def main():
help="Runs the genPOI script") help="Runs the genPOI script")
exegroup.add_option("--skip-scan", dest="skipscan", action="store_true", exegroup.add_option("--skip-scan", dest="skipscan", action="store_true",
help="When running GenPOI, don't scan for entities") help="When running GenPOI, don't scan for entities")
exegroup.add_option("--skip-players", dest="skipplayers", action="store_true",
help="When running GenPOI, don't get player data")
parser.add_option_group(exegroup) parser.add_option_group(exegroup)

View File

@@ -224,6 +224,7 @@ def main():
parser.add_option("-c", "--config", dest="config", action="store", help="Specify the config file to use.") parser.add_option("-c", "--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") parser.add_option("--skip-scan", dest="skipscan", action="store_true", help="Skip scanning for entities when using GenPOI")
parser.add_option("--skip-players", dest="skipplayers", action="store_true", help="Skip getting player data when using GenPOI")
options, args = parser.parse_args() options, args = parser.parse_args()
if not options.config: if not options.config:
@@ -288,7 +289,11 @@ def main():
if not options.skipscan: if not options.skipscan:
handleEntities(rset, os.path.join(destdir, rname), render, rname, config) handleEntities(rset, os.path.join(destdir, rname), render, rname, config)
handlePlayers(rset, render, worldpath) if options.skipplayers:
rset._pois['Players'] = []
else:
handlePlayers(rset, render, worldpath)
handleManual(rset, render['manualpois']) handleManual(rset, render['manualpois'])
logging.info("Done handling POIs") logging.info("Done handling POIs")