mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: change Region caching to on_change from on-miss-strategy (#2366)
This commit is contained in:
@@ -219,7 +219,7 @@ def create_regions_from_ladxr(player, multiworld, logic):
|
||||
|
||||
r = LinksAwakeningRegion(
|
||||
name=name, ladxr_region=l, hint="", player=player, world=multiworld)
|
||||
r.locations = [LinksAwakeningLocation(player, r, i) for i in l.items]
|
||||
r.locations += [LinksAwakeningLocation(player, r, i) for i in l.items]
|
||||
regions[l] = r
|
||||
|
||||
for ladxr_location in logic.location_list:
|
||||
|
||||
@@ -231,9 +231,7 @@ class LinksAwakeningWorld(World):
|
||||
# Find instrument, lock
|
||||
# TODO: we should be able to pinpoint the region we want, save a lookup table please
|
||||
found = False
|
||||
for r in self.multiworld.get_regions():
|
||||
if r.player != self.player:
|
||||
continue
|
||||
for r in self.multiworld.get_regions(self.player):
|
||||
if r.dungeon_index != item.item_data.dungeon_index:
|
||||
continue
|
||||
for loc in r.locations:
|
||||
@@ -269,10 +267,7 @@ class LinksAwakeningWorld(World):
|
||||
event_location.place_locked_item(self.create_event("Can Play Trendy Game"))
|
||||
|
||||
self.dungeon_locations_by_dungeon = [[], [], [], [], [], [], [], [], []]
|
||||
for r in self.multiworld.get_regions():
|
||||
if r.player != self.player:
|
||||
continue
|
||||
|
||||
for r in self.multiworld.get_regions(self.player):
|
||||
# Set aside dungeon locations
|
||||
if r.dungeon_index:
|
||||
self.dungeon_locations_by_dungeon[r.dungeon_index - 1] += r.locations
|
||||
|
||||
Reference in New Issue
Block a user