OoT: add protection on starting inventory to be only giveable items
This commit is contained in:
parent
f8030393c8
commit
340725d395
|
@ -24,6 +24,7 @@ from .N64Patch import create_patch_file
|
|||
from .Cosmetics import patch_cosmetics
|
||||
from .Hints import hint_dist_keys, get_hint_area, buildWorldGossipHints
|
||||
from .HintList import getRequiredHints
|
||||
from .SaveContext import SaveContext
|
||||
|
||||
from Utils import get_options, output_path
|
||||
from BaseClasses import MultiWorld, CollectionState, RegionType
|
||||
|
@ -471,13 +472,16 @@ class OOTWorld(World):
|
|||
self.remove_from_start_inventory.remove(item.name)
|
||||
removed_items.append(item.name)
|
||||
else:
|
||||
self.starting_items[item.name] += 1
|
||||
if item.type == 'Song':
|
||||
self.starting_songs = True
|
||||
# Call the junk fill and get a replacement
|
||||
if item in self.itempool:
|
||||
self.itempool.remove(item)
|
||||
self.itempool.append(self.create_item(*get_junk_item(pool=junk_pool)))
|
||||
if item.name not in SaveContext.giveable_items:
|
||||
raise Exception(f"Invalid OoT starting item: {item.name}")
|
||||
else:
|
||||
self.starting_items[item.name] += 1
|
||||
if item.type == 'Song':
|
||||
self.starting_songs = True
|
||||
# Call the junk fill and get a replacement
|
||||
if item in self.itempool:
|
||||
self.itempool.remove(item)
|
||||
self.itempool.append(self.create_item(*get_junk_item(pool=junk_pool)))
|
||||
if self.start_with_consumables:
|
||||
self.starting_items['Deku Sticks'] = 30
|
||||
self.starting_items['Deku Nuts'] = 40
|
||||
|
@ -718,7 +722,6 @@ class OOTWorld(World):
|
|||
impa = self.world.get_location("Song from Impa", self.player)
|
||||
if self.skip_child_zelda:
|
||||
if impa.item is None:
|
||||
from .SaveContext import SaveContext
|
||||
item_to_place = self.world.random.choice(list(item for item in self.world.itempool if
|
||||
item.player == self.player and item.name in SaveContext.giveable_items))
|
||||
impa.place_locked_item(item_to_place)
|
||||
|
|
Loading…
Reference in New Issue