Skip to content

Commit

Permalink
pep8 and typing cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Aug 26, 2023
1 parent 05d6cf3 commit aa9640c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions worlds/kdl3/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def generate_rooms(world: "KDL3World", door_shuffle: bool, level_regions: typing
room_entry["animal_pointers"], room_entry["enemies"], room_entry["entity_load"],
room_entry["consumables"], room_entry["consumables_pointer"])
room.add_locations({location: world.location_name_to_id[location] if location in world.location_name_to_id else
None for location in room_entry["locations"] if not any([x in location for x in ["1-Up", "Maxim"]]) or
None for location in room_entry["locations"]
if not any([x in location for x in ["1-Up", "Maxim"]]) or
world.multiworld.consumables[world.player]}, KDL3Location)
rooms[room.name] = room
for location in room.locations:
Expand Down Expand Up @@ -89,8 +90,9 @@ def generate_rooms(world: "KDL3World", door_shuffle: bool, level_regions: typing
proper_stage = world.player_levels[level][stage]
level_regions[level].add_exits([first_rooms[proper_stage].name],
{first_rooms[proper_stage].name:
(lambda state: True) if world.multiworld.open_world[world.player] or
stage == 0 else lambda state, level=level, stage=stage: state.has(
(lambda state: True) if world.multiworld.open_world[world.player] or
stage == 0 else lambda state, level=level,
stage=stage: state.has(
f"{LocationName.level_names_inverse[level]} "
f"{f'{stage}'}"
f" - Stage Completion", world.player)})
Expand Down
2 changes: 1 addition & 1 deletion worlds/kdl3/Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def patch(self, target: str):


def patch_rom(multiworld: MultiWorld, player: int, rom: RomData, heart_stars_required: int,
boss_requirements: Dict[int, int], shuffled_levels: Dict[int, List[int]], bb_boss_enabled: Dict[int, int],
boss_requirements: Dict[int, int], shuffled_levels: Dict[int, List[int]], bb_boss_enabled: List[bool],
copy_abilities: Dict[str, str], slot_random: Random):
# increase BWRAM by 0x8000
rom.write_byte(0x7FD8, 0x06)
Expand Down

0 comments on commit aa9640c

Please sign in to comment.