Witness: Fix 2 generation crashes (#2043)

* Fix for error in get_early_items when removing plandoed items.

* Fix Early Caves

* Remove unnecessary list() call

* Update worlds/witness/items.py

Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>

---------

Co-authored-by: blastron <blastron@mac.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
This commit is contained in:
NewSoupVi
2023-07-28 09:39:56 +02:00
committed by GitHub
parent a99a407c41
commit cf37a69e53
3 changed files with 15 additions and 14 deletions

View File

@@ -157,7 +157,7 @@ class WitnessPlayerLogic:
if StaticWitnessLogic.all_items[item_name].category in [ItemCategory.DOOR, ItemCategory.LASER]:
panel_hexes = cast(DoorItemDefinition, StaticWitnessLogic.all_items[item_name]).panel_id_hexes
for panel_hex in panel_hexes:
if panel_hex in self.DOOR_ITEMS_BY_ID:
if panel_hex in self.DOOR_ITEMS_BY_ID and item_name in self.DOOR_ITEMS_BY_ID[panel_hex]:
self.DOOR_ITEMS_BY_ID[panel_hex].remove(item_name)
if adj_type == "Starting Inventory":