Skip to content

Commit

Permalink
Merge branch 'precompleted-already-hinted' into dev-fenhl
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl committed Apr 12, 2024
2 parents 424b79f + 2726981 commit f36b190
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ def distribute_items_restrictive(worlds: list[World], fill_locations: Optional[l
if location.world.empty_dungeons[HintArea.at(location).dungeon_name].empty]
for location in empty_locations:
fill_locations.remove(location)
location.world.hint_type_overrides['sometimes'].append(location.name)
location.world.hint_type_overrides['random'].append(location.name)

# Non-empty dungeon items may be present in restitempool but yet we
# don't want to place them in an empty dungeon
Expand Down
13 changes: 11 additions & 2 deletions Hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,8 @@ def get_random_location_hint(spoiler: Spoiler, world: World, checked: set[str])
and not location.locked
and location.name not in world.hint_exclusions
and location.name not in world.hint_type_overrides['item']
and location.item.name not in world.item_hint_type_overrides['item'],
and location.item.name not in world.item_hint_type_overrides['item']
and (location.world.settings.empty_dungeons_mode == 'none' or not location.world.empty_dungeons[HintArea.at(location).dungeon_name].empty),
world.get_filled_locations()))
if not locations:
return None
Expand All @@ -1219,8 +1220,16 @@ def get_random_location_hint(spoiler: Spoiler, world: World, checked: set[str])


def get_specific_hint(spoiler: Spoiler, world: World, checked: set[str], hint_type: str) -> HintReturn:
def is_valid_hint(hint: Hint) -> bool:
location = world.get_location(hint.name)
if not is_not_checked([world.get_location(hint.name)], checked):
return False
if location.world.settings.empty_dungeons_mode != 'none' and location.world.empty_dungeons[HintArea.at(location).dungeon_name].empty:
return False
return True

hint_group = get_hint_group(hint_type, world)
hint_group = list(filter(lambda hint: is_not_checked([world.get_location(hint.name)], checked), hint_group))
hint_group = list(filter(is_valid_hint, hint_group))
if not hint_group:
return None

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Differences between `dev-fenhl` and [`Dev-R`](https://github.com/Roman971/OoT-Ra
* The Lens of Truth can be in a foolish area if Treasure Chest Game keys are shuffled and all relevant “lensless” tricks are enabled.
* Bug fixes:
* The heart piece in Gerudo Fortress now behaves correctly when already at 20 hearts, and is considered in glitched logic (part of [#2179](https://github.com/OoTRandomizer/OoT-Randomizer/pull/2179))
* Sometimes hints no longer hint locations in precompleted dungeons ([#2097](https://github.com/OoTRandomizer/OoT-Randomizer/pull/2097))

Differences between [`Dev-R`](https://github.com/Roman971/OoT-Randomizer) and [`Dev`](https://github.com/OoTRandomizer/OoT-Randomizer):

Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__version__ = '8.1.16'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 5
supplementary_version = 6

# Pick a unique identifier byte for your fork if you are intending to have a long-lasting branch.
# This will be 0x00 for main releases and 0x01 for main dev.
Expand Down

0 comments on commit f36b190

Please sign in to comment.