Merged in DR v1.4.8

This commit is contained in:
codemann8
2025-01-15 22:26:04 -06:00
23 changed files with 158 additions and 103 deletions

View File

@@ -814,7 +814,13 @@ def key_wasted(new_door, old_door, old_counter, new_counter, key_layout, world,
def find_next_counter(new_door, old_counter, key_layout, prize_flag=None):
proposed_doors = {**old_counter.open_doors, **dict.fromkeys([new_door, new_door.dest])}
prop_doors = next((item_or_tuple for item_or_tuple in key_layout.proposal
if new_door == item_or_tuple or (isinstance(item_or_tuple, tuple) and new_door in item_or_tuple)), None)
if prop_doors:
prop_doors = list(prop_doors) if isinstance(prop_doors, tuple) else [prop_doors]
proposed_doors = {**old_counter.open_doors, **dict.fromkeys(prop_doors)}
else:
proposed_doors = {**old_counter.open_doors}
bk_open = old_counter.big_key_opened or new_door.bigKey
prize_flag = prize_flag if prize_flag else old_counter.prize_doors_opened
return find_counter(proposed_doors, bk_open, key_layout, prize_flag)