示例#1
0
def shouldspawn():
    from autospawner.spawner import Spawner
    spawner = Spawner()
    doit = spawner.shouldSpawn()
    click.echo("%s" % (doit, ))
    if not doit:
        sys.exit(-1)
示例#2
0
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']))