Skip the playthrough when run from the gui, if the spoiler isn't being created.
This commit is contained in:
1
Gui.py
1
Gui.py
@@ -459,6 +459,7 @@ def guiMain(args=None):
|
||||
guiargs.heartcolor = heartcolorVar.get()
|
||||
guiargs.fastmenu = fastMenuVar.get()
|
||||
guiargs.create_spoiler = bool(createSpoilerVar.get())
|
||||
guiargs.skip_playthrough = not bool(createSpoilerVar.get())
|
||||
guiargs.suppress_rom = bool(suppressRomVar.get())
|
||||
guiargs.openpyramid = bool(openpyramidVar.get())
|
||||
guiargs.mapshuffle = bool(mapshuffleVar.get())
|
||||
|
||||
8
Main.py
8
Main.py
@@ -209,6 +209,10 @@ def main(args, seed=None):
|
||||
if args.create_spoiler and not args.jsonout:
|
||||
world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase))
|
||||
|
||||
# if we only check for beatable, we can do this sanity check first before writing down spheres
|
||||
if not world.can_beat_game():
|
||||
raise RuntimeError('Cannot beat game. Something went terribly wrong here!')
|
||||
|
||||
if not args.skip_playthrough:
|
||||
logger.info('Calculating playthrough.')
|
||||
create_playthrough(world)
|
||||
@@ -350,10 +354,6 @@ def create_playthrough(world):
|
||||
old_world = world
|
||||
world = copy_world(world)
|
||||
|
||||
# if we only check for beatable, we can do this sanity check first before writing down spheres
|
||||
if not world.can_beat_game():
|
||||
raise RuntimeError('Cannot beat game. Something went terribly wrong here!')
|
||||
|
||||
# get locations containing progress items
|
||||
prog_locations = [location for location in world.get_filled_locations() if location.item.advancement]
|
||||
state_cache = [None]
|
||||
|
||||
Reference in New Issue
Block a user