mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
The Witness: Move local_items code earlier #4696
This commit is contained in:
@@ -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()
|
||||
|
@@ -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] = {}
|
||||
|
||||
|
Reference in New Issue
Block a user