Skip to content

Commit

Permalink
TUNIC: Use push_precollected for start_with_sword (ArchipelagoMW#2857)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScipioWright authored Feb 23, 2024
1 parent 96163c6 commit 6bf4a94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions worlds/tunic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ def generate_early(self) -> None:
self.options.hexagon_quest.value = passthrough["hexagon_quest"]
self.options.entrance_rando.value = passthrough["entrance_rando"]

if self.options.start_with_sword and "Sword" not in self.options.start_inventory:
self.options.start_inventory.value["Sword"] = 1

def create_item(self, name: str) -> TunicItem:
item_data = item_table[name]
return TunicItem(name, item_data.classification, self.item_name_to_id[name], self.player)
Expand All @@ -94,6 +91,9 @@ def create_items(self) -> None:
items_to_create["Fool Trap"] += items_to_create[money_fool]
items_to_create[money_fool] = 0

if self.options.start_with_sword:
self.multiworld.push_precollected(self.create_item("Sword"))

if sword_progression:
items_to_create["Stick"] = 0
items_to_create["Sword"] = 0
Expand Down

0 comments on commit 6bf4a94

Please sign in to comment.