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()
|
self.determine_sufficient_progression()
|
||||||
|
|
||||||
if self.options.shuffle_lasers == "local":
|
for item_name, item_data in self.player_items.item_data.items():
|
||||||
self.options.local_items.value |= self.item_name_groups["Lasers"]
|
if item_data.local_only:
|
||||||
|
self.options.local_items.value.add(item_name)
|
||||||
|
|
||||||
if self.options.victory_condition == "panel_hunt":
|
if self.options.victory_condition == "panel_hunt":
|
||||||
total_panels = self.options.panel_hunt_total
|
total_panels = self.options.panel_hunt_total
|
||||||
@@ -323,8 +324,6 @@ class WitnessWorld(World):
|
|||||||
|
|
||||||
self.own_itempool += new_items
|
self.own_itempool += new_items
|
||||||
self.multiworld.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]:
|
def fill_slot_data(self) -> Dict[str, Any]:
|
||||||
already_hinted_locations = set()
|
already_hinted_locations = set()
|
||||||
|
@@ -65,7 +65,7 @@ class WitnessPlayerItems:
|
|||||||
or name in player_logic.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME
|
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():
|
for item_name, item_data in self.item_data.items():
|
||||||
if not isinstance(item_data.definition, DoorItemDefinition):
|
if not isinstance(item_data.definition, DoorItemDefinition):
|
||||||
continue
|
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):
|
if all(not self._logic.solvability_guaranteed(e_hex) for e_hex in item_data.definition.panel_id_hexes):
|
||||||
item_data.classification = ItemClassification.useful
|
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.
|
# Build the mandatory item list.
|
||||||
self._mandatory_items: Dict[str, int] = {}
|
self._mandatory_items: Dict[str, int] = {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user