Skip to content

Commit 2a2f59a

Browse files
committed
mark items as progression if a mod needs them for a modded check
1 parent 9e06f7a commit 2a2f59a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

worlds/crystal_project/__init__.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ class CrystalProjectWorld(World):
103103
item_name_to_id[modded_home_point.name] = modded_home_point.code + home_point_item_index_offset
104104
item_name_groups.setdefault(MOD, set()).add(modded_home_point.name)
105105

106+
combined_modded_locations: List[ModLocationData] = modded_locations.copy()
107+
combined_modded_locations.extend(modded_shops)
108+
combined_modded_locations.extend(modded_bosses)
109+
106110
removed_locations = get_removed_locations(mod_info)
107111
removed_home_points = get_removed_home_points(mod_info)
108112

@@ -403,7 +407,10 @@ def create_regions(self) -> None:
403407
def create_item(self, name: str) -> Item:
404408
if name in item_table:
405409
data = item_table[name]
406-
return Item(name, data.classification, data.code, self.player)
410+
item = Item(name, data.classification, data.code, self.player)
411+
update_item_classification(item, [location.rule_condition for location in self.combined_modded_locations], self)
412+
413+
return item
407414
else:
408415
matches_mod = [item for (index, item) in enumerate(self.modded_items) if item.name == name]
409416
matches_mod_home_point = [item for (index, item) in enumerate(self.modded_home_points) if item.name == name]
@@ -679,18 +686,15 @@ def get_item_pool(self, excluded_items: Set[str]) -> List[Item]:
679686
pool.append(item)
680687

681688
if self.options.use_mods:
682-
combined_locations: List[ModLocationData] = self.modded_locations.copy()
683-
combined_locations.extend(self.modded_shops)
684-
685689
for modded_item in self.modded_items:
686-
update_item_classification(modded_item, [location.rule_condition for location in combined_locations], self)
690+
update_item_classification(modded_item, [location.rule_condition for location in self.combined_modded_locations], self)
687691
item = self.create_item(modded_item.name)
688692
pool.append(item)
689693

690694
if self.options.home_point_hustle != self.options.home_point_hustle.option_disabled:
691695
for modded_home_point in self.modded_home_points:
692696
item = self.create_item(modded_home_point.name)
693-
update_item_classification(item, [location.rule_condition for location in combined_locations], self)
697+
update_item_classification(item, [location.rule_condition for location in self.combined_modded_locations], self)
694698
pool.append(item)
695699

696700
if not self.options.level_gating.value == self.options.level_gating.option_none:

0 commit comments

Comments
 (0)