Whitespace fixes
This commit is contained in:
parent
cdf04b8a45
commit
5b3d4449c1
|
@ -13,6 +13,7 @@ class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
|
|||
def _get_help_string(self, action):
|
||||
return textwrap.dedent(action.help)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument('--create_spoiler', help='Output a Spoiler File', action='store_true')
|
||||
|
|
1
Fill.py
1
Fill.py
|
@ -1,6 +1,7 @@
|
|||
import random
|
||||
import logging
|
||||
|
||||
|
||||
def distribute_items_cutoff(world, cutoffrate=0.33):
|
||||
# get list of locations to fill in
|
||||
fill_locations = world.get_unfilled_locations()
|
||||
|
|
1
Gui.py
1
Gui.py
|
@ -45,6 +45,7 @@ def guiMain(args=None):
|
|||
baseRomLabel = Label(romDialogFrame, text='Base Rom')
|
||||
romVar = StringVar()
|
||||
romEntry = Entry(romDialogFrame, textvariable=romVar)
|
||||
|
||||
def RomSelect():
|
||||
rom = filedialog.askopenfilename()
|
||||
romVar.set(rom)
|
||||
|
|
3
Main.py
3
Main.py
|
@ -41,7 +41,7 @@ def main(args, seed=None):
|
|||
|
||||
create_regions(world)
|
||||
|
||||
create_dungeons(world);
|
||||
create_dungeons(world)
|
||||
|
||||
logger.info('Shuffling the World about.')
|
||||
|
||||
|
@ -315,4 +315,3 @@ def create_playthrough(world):
|
|||
|
||||
# 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)])
|
||||
|
||||
|
|
6
Rom.py
6
Rom.py
|
@ -87,8 +87,10 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None):
|
|||
if location.parent_region.dungeon:
|
||||
dungeon = location.parent_region.dungeon
|
||||
if location.item.key and dungeon.is_dungeon_item(location.item):
|
||||
if location.item.type == "BigKey": itemid = 0x32
|
||||
if location.item.type == "SmallKey": itemid = 0x24
|
||||
if location.item.type == "BigKey":
|
||||
itemid = 0x32
|
||||
if location.item.type == "SmallKey":
|
||||
itemid = 0x24
|
||||
rom.write_byte(locationaddress, itemid)
|
||||
else:
|
||||
# crystals
|
||||
|
|
4
Rules.py
4
Rules.py
|
@ -20,8 +20,6 @@ def set_rules(world):
|
|||
else:
|
||||
raise NotImplementedError('Not implemented yet')
|
||||
|
||||
|
||||
|
||||
if world.goal == 'dungeons':
|
||||
# require all dungeons to beat ganon
|
||||
add_rule(world.get_location('Ganon'), lambda state: state.can_reach('Master Sword Pedestal', 'Location') and state.has('Beat Agahnim 1') and state.has('Beat Agahnim 2'))
|
||||
|
@ -56,6 +54,7 @@ def forbid_item(location, item):
|
|||
old_rule = location.item_rule
|
||||
location.item_rule = lambda i: i.name != item and old_rule(i)
|
||||
|
||||
|
||||
def item_in_locations(state, item, locations):
|
||||
for location in locations:
|
||||
loc = state.world.get_location(location)
|
||||
|
@ -209,7 +208,6 @@ def global_rules(world):
|
|||
for location in ['Desert Palace - Lanmolas', 'Desert Palace - Big Key Chest', 'Desert Palace - Compass Chest']:
|
||||
forbid_item(world.get_location(location), 'Small Key (Desert Palace)')
|
||||
|
||||
|
||||
set_rule(world.get_entrance('Tower of Hera Small Key Door'), lambda state: state.has('Small Key (Tower of Hera)'))
|
||||
set_rule(world.get_entrance('Tower of Hera Big Key Door'), lambda state: state.has('Big Key (Tower of Hera)'))
|
||||
set_rule(world.get_location('Tower of Hera - Big Chest'), lambda state: state.has('Big Key (Tower of Hera)'))
|
||||
|
|
Loading…
Reference in New Issue