From 72a94e1e4f92272d1fc36ae588fd9a12bb7f4a08 Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 24 Feb 2020 08:53:03 -0700 Subject: [PATCH] Vanilla fixes for 100% locations --- DoorShuffle.py | 2 +- KeyDoorShuffle.py | 10 +++++----- Main.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DoorShuffle.py b/DoorShuffle.py index 658b5e6b..4e8a475a 100644 --- a/DoorShuffle.py +++ b/DoorShuffle.py @@ -160,7 +160,7 @@ def vanilla_key_logic(world, player): world.key_logic[player][builder.name] = key_layout.key_logic log_key_logic(builder.name, key_layout.key_logic) last_key = None - if world.shuffle[player] == 'vanilla': + if world.shuffle[player] == 'vanilla' and world.accessibility[player] == 'items': validate_vanilla_key_logic(world, player) diff --git a/KeyDoorShuffle.py b/KeyDoorShuffle.py index 24b7dbb7..9c3d07eb 100644 --- a/KeyDoorShuffle.py +++ b/KeyDoorShuffle.py @@ -147,7 +147,7 @@ def analyze_dungeon(key_layout, world, player): key_layout.key_counters = create_key_counters(key_layout, world, player) key_logic = key_layout.key_logic - find_bk_locked_sections(key_layout, world) + find_bk_locked_sections(key_layout, world, player) key_logic.bk_chests.update(find_big_chest_locations(key_layout.all_chest_locations)) if world.retro[player] and world.mode[player] != 'standard': return @@ -304,14 +304,14 @@ def queue_sorter_2(queue_item): return 1 if door.bigKey else 0 -def find_bk_locked_sections(key_layout, world): +def find_bk_locked_sections(key_layout, world, player): if key_layout.big_key_special: return key_counters = key_layout.key_counters key_logic = key_layout.key_logic bk_key_not_required = set() - big_chest_allowed_big_key = world.accessibility != 'locations' + big_chest_allowed_big_key = world.accessibility[player] != 'locations' for counter in key_counters.values(): key_layout.all_chest_locations.update(counter.free_locations) key_layout.all_locations.update(counter.free_locations) @@ -1450,8 +1450,8 @@ def validate_key_placement(key_layout, world, player): if not can_progress: missing_locations = set(max_counter.free_locations.keys()).difference(found_locations) missing_items = [l for l in missing_locations if l.item is None or (l.item.name != smallkey_name and l.item != dungeon.big_key) or "- Boss" in l.name] - #missing_key_only = set(max_counter.key_only_locations.keys()).difference(counter.key_only_locations.keys()) # do freestanding keys matter for locations? - if len(missing_items) > 0: #world.accessibility[player]=='locations' and (len(missing_locations)>0 or len(missing_key_only) > 0): + # missing_key_only = set(max_counter.key_only_locations.keys()).difference(counter.key_only_locations.keys()) # do freestanding keys matter for locations? + if len(missing_items) > 0: # world.accessibility[player]=='locations' and (len(missing_locations)>0 or len(missing_key_only) > 0): logging.getLogger('').error("Keylock - can't open locations: ") for i in missing_locations: logging.getLogger('').error(i) diff --git a/Main.py b/Main.py index 179a02d4..e45f3764 100644 --- a/Main.py +++ b/Main.py @@ -24,7 +24,7 @@ from Fill import distribute_items_cutoff, distribute_items_staleness, distribute from ItemList import generate_itempool, difficulties, fill_prizes from Utils import output_path, parse_player_names -__version__ = '0.0.17pre' +__version__ = '0.0.17.1p' def main(args, seed=None):