Enable fast menu

Fast menu is an instant-open menu. It is an alternative to quickswap.
This commit is contained in:
Kevin Cathcart
2017-10-14 12:00:41 -04:00
parent a7d0e32f2d
commit 51a892e869
7 changed files with 31 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ from collections import OrderedDict
class World(object):
def __init__(self, shuffle, logic, mode, difficulty, goal, algorithm, place_dungeon_items, check_beatable_only, shuffle_ganon, quickswap):
def __init__(self, shuffle, logic, mode, difficulty, goal, algorithm, place_dungeon_items, check_beatable_only, shuffle_ganon, quickswap, fastmenu):
self.shuffle = shuffle
self.logic = logic
self.mode = mode
@@ -48,6 +48,7 @@ class World(object):
self.fix_gtower_exit = self.shuffle_ganon
self.can_access_trock_eyebridge = None
self.quickswap = quickswap
self.fastmenu = fastmenu
self.spoiler = Spoiler(self)
def get_region(self, regionname):
@@ -640,7 +641,8 @@ class Spoiler(object):
'difficulty': self.world.difficulty,
'completeable': not self.world.check_beatable_only,
'dungeonitems': self.world.place_dungeon_items,
'quickswap': self.world.quickswap}
'quickswap': self.world.quickswap,
'fastmenu': self.world.fastmenu}
def to_json(self):
self.parse_data()
@@ -663,7 +665,8 @@ class Spoiler(object):
outfile.write('Filling Algorithm: %s\n' % self.metadata['algorithm'])
outfile.write('All Locations Accessible: %s\n' % ('Yes' if self.metadata['completeable'] else 'No, some locations may be unreachable'))
outfile.write('Maps and Compasses in Dungeons: %s\n' % ('Yes' if self.metadata['dungeonitems'] else 'No'))
outfile.write('L\\R Quickswap enabled: %s' % ('Yes' if self.metadata['quickswap'] else 'No'))
outfile.write('L\\R Quickswap enabled: %s\n' % ('Yes' if self.metadata['quickswap'] else 'No'))
outfile.write('Fastmenu enabled: %s' % ('Yes' if self.metadata['fastmenu'] else 'No'))
if self.entrances:
outfile.write('\n\nEntrances:\n\n')
outfile.write('\n'.join(['%s %s %s' % (entry['entrance'], '<=>' if entry['direction'] == 'both' else '<=' if entry['direction'] == 'exit' else '=>', entry['exit']) for entry in self.entrances]))