A little more polishing up
-Support for balanced algorithm -Handle output file naming for new parameters
This commit is contained in:
parent
ad047e6c9c
commit
a64fb33f4b
7
Main.py
7
Main.py
|
@ -80,6 +80,8 @@ def main(args, seed=None):
|
||||||
distribute_items_restrictive(world, 0)
|
distribute_items_restrictive(world, 0)
|
||||||
elif args.algorithm == 'vt26':
|
elif args.algorithm == 'vt26':
|
||||||
distribute_items_restrictive(world, random.randint(0, 15), shuffled_locations)
|
distribute_items_restrictive(world, random.randint(0, 15), shuffled_locations)
|
||||||
|
elif args.algorithm == 'balanced':
|
||||||
|
distribute_items_restrictive(world, random.randint(0, 15))
|
||||||
|
|
||||||
logger.info('Calculating playthrough.')
|
logger.info('Calculating playthrough.')
|
||||||
|
|
||||||
|
@ -92,7 +94,7 @@ def main(args, seed=None):
|
||||||
else:
|
else:
|
||||||
sprite = None
|
sprite = None
|
||||||
|
|
||||||
outfilebase = 'ER_%s_%s-%s-%s_%s-%s%s%s%s%s_%s' % (world.logic, world.difficulty, world.mode, world.goal, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-fastmenu" if world.fastmenu else "", "-quickswap" if world.quickswap else "", "-shuffleganon" if world.shuffle_ganon else "", world.seed)
|
outfilebase = 'ER_%s_%s-%s-%s%s_%s-%s%s%s%s%s%s_%s' % (world.logic, world.difficulty, world.mode, world.goal, "" if world.timer in ['none', 'display'] else "-" + world.timer, world.shuffle, world.algorithm, "-keysanity" if world.keysanity else "", "-progressives_" + world.progressive if world.progressive in ['off', 'random'] else "", "-fastmenu" if world.fastmenu else "", "-quickswap" if world.quickswap else "", "-shuffleganon" if world.shuffle_ganon else "", world.seed)
|
||||||
|
|
||||||
if not args.suppress_rom:
|
if not args.suppress_rom:
|
||||||
if args.jsonout:
|
if args.jsonout:
|
||||||
|
@ -154,7 +156,6 @@ def copy_world(world):
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def create_playthrough(world):
|
def create_playthrough(world):
|
||||||
# create a copy as we will modify it
|
# create a copy as we will modify it
|
||||||
old_world = world
|
old_world = world
|
||||||
|
@ -227,4 +228,4 @@ def create_playthrough(world):
|
||||||
old_world.required_locations = [location.name for sphere in collection_spheres for location in sphere]
|
old_world.required_locations = [location.name for sphere in collection_spheres for location in sphere]
|
||||||
|
|
||||||
# we can finally output our playthrough
|
# we can finally output our playthrough
|
||||||
old_world.spoiler.playthrough = OrderedDict([(str(i + 1), {str(location): str(location.item) for location in sphere}) for i, sphere in enumerate(collection_spheres)])
|
old_world.spoiler.playthrough = OrderedDict([(str(i + 1), {str(location): str(location.item) for location in sphere}) for i, sphere in enumerate(collection_spheres)])
|
Loading…
Reference in New Issue