Merge remote-tracking branch 'origin/DoorDevUnstable' into DoorDevUnstable

# Conflicts:
#	RELEASENOTES.md
This commit is contained in:
aerinon
2023-04-05 15:56:17 -06:00
3 changed files with 28 additions and 7 deletions

View File

@@ -322,6 +322,11 @@ def connect_simple_door(world, exit_name, region_name, player):
d.dest = region d.dest = region
def connect_simple_door_to_region(exit_door, region):
exit_door.entrance.connect(region)
exit_door.dest = region
def connect_door_only(world, exit_name, region, player): def connect_door_only(world, exit_name, region, player):
d = world.check_for_door(exit_name, player) d = world.check_for_door(exit_name, player)
if d is not None: if d is not None:
@@ -354,6 +359,12 @@ def connect_two_way(world, entrancename, exitname, player):
x.dest = y x.dest = y
if y is not None: if y is not None:
y.dest = x y.dest = x
if x.dependents:
for dep in x.dependents:
connect_simple_door_to_region(dep, ext.parent_region)
if y.dependents:
for dep in y.dependents:
connect_simple_door_to_region(dep, entrance.parent_region)
def connect_one_way(world, entrancename, exitname, player): def connect_one_way(world, entrancename, exitname, player):
@@ -373,6 +384,9 @@ def connect_one_way(world, entrancename, exitname, player):
y = world.check_for_door(exitname, player) y = world.check_for_door(exitname, player)
if x is not None: if x is not None:
x.dest = y x.dest = y
if x.dependents:
for dep in x.dependents:
connect_simple_door_to_region(dep, ext.parent_region)
def unmark_ugly_smalls(world, player): def unmark_ugly_smalls(world, player):
for d in ['Eastern Hint Tile Blocked Path SE', 'Eastern Darkness S', 'Thieves Hallway SE', 'Mire Left Bridge S', for d in ['Eastern Hint Tile Blocked Path SE', 'Eastern Darkness S', 'Thieves Hallway SE', 'Mire Left Bridge S',

View File

@@ -1561,13 +1561,18 @@ def validate_key_layout_sub_loop(key_layout, state, checked_states, flat_proposa
def invalid_self_locking_key(key_layout, state, prev_state, prev_avail, world, player): def invalid_self_locking_key(key_layout, state, prev_state, prev_avail, world, player):
if prev_state is None or state.used_smalls == prev_state.used_smalls: if prev_state is None or state.used_smalls == prev_state.used_smalls:
return False return False
new_bk_doors = set(state.big_doors).difference(set(prev_state.big_doors)) if state.found_forced_bk() and not prev_state.found_forced_bk():
state_copy = state.copy() return False
while len(new_bk_doors) > 0: if state.big_key_opened:
for door in new_bk_doors: new_bk_doors = set(state.big_doors).difference(set(prev_state.big_doors))
open_a_door(door.door, state_copy, key_layout.flat_prop, world, player) state_copy = state.copy()
new_bk_doors = set(state_copy.big_doors).difference(set(prev_state.big_doors)) while len(new_bk_doors) > 0:
expand_key_state(state_copy, key_layout.flat_prop, world, player) for door in new_bk_doors:
open_a_door(door.door, state_copy, key_layout.flat_prop, world, player)
new_bk_doors = set(state_copy.big_doors).difference(set(prev_state.big_doors))
expand_key_state(state_copy, key_layout.flat_prop, world, player)
else:
state_copy = state
new_locations = set(state_copy.found_locations).difference(set(prev_state.found_locations)) new_locations = set(state_copy.found_locations).difference(set(prev_state.found_locations))
important_found = False important_found = False
for loc in new_locations: for loc in new_locations:

View File

@@ -110,6 +110,8 @@ These are now independent of retro mode and have three options: None, Random, an
# Bug Fixes and Notes # Bug Fixes and Notes
* 1.2.0.14u * 1.2.0.14u
* Small fix for key logic validation (got rid of a false negative)
* Customized doors in ice cross work properly now
* GUI reorganization * GUI reorganization
* Auto option for pyramid open (trinity or ER + crystals goal) * Auto option for pyramid open (trinity or ER + crystals goal)
* World model refactor (combining inverted and normal world models) * World model refactor (combining inverted and normal world models)