Skip to content

Commit

Permalink
Stopped Dungeon items from remaking locations progressive.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crain-32 committed Mar 29, 2022
1 parent 9f0f08b commit ae6f2a7
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions logic/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def determine_chart_mappings(self, random_state):
self._replace_macro_item(f"Chart for Island {sector + 1}", Requirement(REQUIREMENT_HAS_ITEM, [chart]))

def determine_progression_locations(self):
self.location_entries = self.determine_progression_locations_from_list(self.location_entries)
self.location_entries = self.make_progression_locations_from_list(self.location_entries)

def determine_progression_locations_from_list(self, location_list: list[Location])-> list[Location]:
def make_progression_locations_from_list(self, location_list: list[Location])-> list[Location]:
return list(
map(
(lambda logical: logical.make_logical()),
Expand All @@ -139,6 +139,18 @@ def determine_progression_locations_from_list(self, location_list: list[Location
)
)

def determine_progression_locations_from_list(self, location_list: list[Location])-> list[Location]:
return list(
filter(
(lambda progressive:
World.location_category_cache(self._location_category_list(),
progressive.category_set)
),
location_list
)
)


def determine_race_mode_dungeons(self, random_state: Random):
if self.world_settings.race_mode:
shuffled_dungeons = dungeon_names.copy()
Expand Down Expand Up @@ -272,8 +284,7 @@ def load_parse_world(world_location: str, world_id: int) -> dict[str, Area]:
def _set_dungeon_non_progressive(self, dungeon_name: str) -> None:
location_entries = list()
for location in self.location_entries:
if dungeon_name in location.name:
location.logical = False
location.logical = not dungeon_name in location.name
location_entries.append(location)
self.location_entries = location_entries

Expand Down

0 comments on commit ae6f2a7

Please sign in to comment.