def shouldspawn(): from autospawner.spawner import Spawner spawner = Spawner() doit = spawner.shouldSpawn() click.echo("%s" % (doit, )) if not doit: sys.exit(-1)
def respawn(): from autospawner.spawner import Spawner spawner = Spawner() if not spawner.shouldSpawn(): click.echo('Not appropriate to spawn at this time') sys.exit(-1) shard = spawner.getShard() room = spawner.getRoom(shard) position = spawner.getPosition(room, shard) click.echo("%s %s %s,%s" % (shard, room, position['x'], position['y']))