diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index 3bf3661b..80ef996a 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -156,8 +156,9 @@ class WitnessWorld(World): self.determine_sufficient_progression() - if self.options.shuffle_lasers == "local": - self.options.local_items.value |= self.item_name_groups["Lasers"] + for item_name, item_data in self.player_items.item_data.items(): + if item_data.local_only: + self.options.local_items.value.add(item_name) if self.options.victory_condition == "panel_hunt": total_panels = self.options.panel_hunt_total @@ -323,8 +324,6 @@ class WitnessWorld(World): self.own_itempool += new_items self.multiworld.itempool += new_items - if self.player_items.item_data[item_name].local_only: - self.options.local_items.value.add(item_name) def fill_slot_data(self) -> Dict[str, Any]: already_hinted_locations = set() diff --git a/worlds/witness/player_items.py b/worlds/witness/player_items.py index b98c59e9..7b71e3c1 100644 --- a/worlds/witness/player_items.py +++ b/worlds/witness/player_items.py @@ -65,7 +65,7 @@ class WitnessPlayerItems: or name in player_logic.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME } - # Downgrade door items + # Downgrade door items and make lasers local if local lasers is on for item_name, item_data in self.item_data.items(): if not isinstance(item_data.definition, DoorItemDefinition): continue @@ -73,6 +73,9 @@ class WitnessPlayerItems: if all(not self._logic.solvability_guaranteed(e_hex) for e_hex in item_data.definition.panel_id_hexes): item_data.classification = ItemClassification.useful + if item_data.definition.category == ItemCategory.LASER and self._world.options.shuffle_lasers == "local": + item_data.local_only = True + # Build the mandatory item list. self._mandatory_items: Dict[str, int] = {}