TUNIC: Use push_precollected for start_with_sword (#2857)

This commit is contained in:
Scipio Wright 2024-02-23 13:41:59 -05:00 committed by GitHub
parent 96163c6408
commit 6bf4a94537
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -73,9 +73,6 @@ class TunicWorld(World):
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)
@ -94,6 +91,9 @@ class TunicWorld(World):
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