Core: make early_items internal only (#1177)

Co-authored-by: beauxq <beauxq@yahoo.com>
This commit is contained in:
espeon65536
2022-11-16 10:32:33 -06:00
committed by GitHub
parent 4d79920fa6
commit edd1fff4b7
10 changed files with 61 additions and 76 deletions

View File

@@ -127,7 +127,7 @@ class SMWorld(World):
self.multiworld.local_items[self.player].value.add('No Energy')
if (self.variaRando.args.morphPlacement == "early"):
self.multiworld.local_items[self.player].value.add('Morph')
self.multiworld.local_early_items[self.player]['Morph Ball'] = 1
self.remote_items = self.multiworld.remote_items[self.player]
@@ -658,21 +658,6 @@ class SMWorld(World):
return "Nothing"
def pre_fill(self):
if (self.variaRando.args.morphPlacement == "early") and next((item for item in self.multiworld.itempool if item.player == self.player and item.name == "Morph Ball"), False):
viable = []
for location in self.multiworld.get_locations():
if location.player == self.player \
and location.item is None \
and location.can_reach(self.multiworld.state):
viable.append(location)
self.multiworld.random.shuffle(viable)
key = self.multiworld.create_item("Morph Ball", self.player)
loc = viable.pop()
loc.place_locked_item(key)
self.multiworld.itempool[:] = [item for item in self.multiworld.itempool if
item.player != self.player or
item.name != "Morph Ball"]
if len(self.NothingPool) > 0:
nonChozoLoc = []
chozoLoc = []