Skip to content

Commit

Permalink
move item creation back to a (more complex) oneliner
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Mar 5, 2024
1 parent 5cd0ee4 commit 9f5ebd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions worlds/hk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,21 +252,21 @@ def _add(item_name: str, location_name: str, randomized: bool):
if item_name in junk_replace:
item_name = self.get_filler_item_name()

item = self.create_item(item_name) if not vanilla or location_name == "Start" else self.create_event(item_name)

if location_name == "Start":
if item_name in randomized_starting_items:
if item_name == "Focus":
self.create_location("Focus")
unfilled_locations += 1
pool.append(self.create_item(item_name))
pool.append(item)
else:
self.multiworld.push_precollected(self.create_item(item_name))
self.multiworld.push_precollected(item)
return

if vanilla:
item = self.create_event(item_name)
location = self.create_vanilla_location(location_name, item)
else:
item = self.create_item(item_name)
pool.append(item)
if location_name in multi_locations: # Create shop locations later.
return
Expand Down

0 comments on commit 9f5ebd8

Please sign in to comment.