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
|
||||
|
@ -470,6 +471,9 @@ class OOTWorld(World):
|
|||
if item.name in self.remove_from_start_inventory:
|
||||
self.remove_from_start_inventory.remove(item.name)
|
||||
removed_items.append(item.name)
|
||||
else:
|
||||
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':
|
||||
|
@ -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