Skip to content

Commit

Permalink
KH2: Fix events in datapackage (#2576)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredWeakStrike authored Dec 8, 2023
1 parent 9351fb4 commit a9a6c72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions worlds/kh2/Regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,10 +1020,9 @@ def create_regions(self):
multiworld.regions += [create_region(multiworld, player, active_locations, region, locations) for region, locations in
KH2REGIONS.items()]
# fill the event locations with events
multiworld.worlds[player].item_name_to_id.update({event_name: None for event_name in Events_Table})
for location, item in event_location_to_item.items():
multiworld.get_location(location, player).place_locked_item(
multiworld.worlds[player].create_item(item))
multiworld.worlds[player].create_event_item(item))


def connect_regions(self):
Expand Down
6 changes: 5 additions & 1 deletion worlds/kh2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,15 @@ def create_item(self, name: str) -> Item:
item_classification = ItemClassification.useful
else:
item_classification = ItemClassification.filler

created_item = KH2Item(name, item_classification, self.item_name_to_id[name], self.player)

return created_item

def create_event_item(self, name: str) -> Item:
item_classification = ItemClassification.progression
created_item = KH2Item(name, item_classification, None, self.player)
return created_item

def create_items(self) -> None:
"""
Fills ItemPool and manages schmovement, random growth, visit locking and random starting visit locking.
Expand Down

0 comments on commit a9a6c72

Please sign in to comment.