mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Some Shop fixes:
Make sure that dark lake hylia shop in inverted retains the blue potion, while allowing shop slots on top (potion will always be the leftmost slot, ignoring "i"/"f"/"g") Cull Shop swap Candidates before generating weights, then keep track of updated sphere sizes during swaps. This significantly reduces the chance to run out of candidates, as large clumps of false candidates do not get included in the weight Shop fill is slower with this, as all candidates need to be swept once, instead of on-demand; but this seemed the best way to address the remaining issues.
This commit is contained in:
@@ -450,7 +450,7 @@ class World(object):
|
||||
def get_spheres(self):
|
||||
state = CollectionState(self)
|
||||
|
||||
locations = {location for location in self.get_locations()}
|
||||
locations = set(self.get_locations())
|
||||
|
||||
while locations:
|
||||
sphere = set()
|
||||
@@ -1138,6 +1138,11 @@ class Item(object):
|
||||
def __eq__(self, other):
|
||||
return self.name == other.name and self.player == other.player
|
||||
|
||||
def __lt__(self, other):
|
||||
if other.player != self.player:
|
||||
return other.player < self.player
|
||||
return self.name < other.name
|
||||
|
||||
def __hash__(self):
|
||||
return hash((self.name, self.player))
|
||||
|
||||
|
Reference in New Issue
Block a user