Core: change Region caching to on_change from on-miss-strategy (#2366)
This commit is contained in:
@@ -585,27 +585,26 @@ class ALTTPWorld(World):
|
||||
|
||||
for player in checks_in_area:
|
||||
checks_in_area[player]["Total"] = 0
|
||||
|
||||
for location in multiworld.get_locations():
|
||||
if location.game == cls.game and type(location.address) is int:
|
||||
main_entrance = location.parent_region.get_connecting_entrance(is_main_entrance)
|
||||
if location.parent_region.dungeon:
|
||||
dungeonname = {'Inverted Agahnims Tower': 'Agahnims Tower',
|
||||
'Inverted Ganons Tower': 'Ganons Tower'} \
|
||||
.get(location.parent_region.dungeon.name, location.parent_region.dungeon.name)
|
||||
checks_in_area[location.player][dungeonname].append(location.address)
|
||||
elif location.parent_region.type == LTTPRegionType.LightWorld:
|
||||
checks_in_area[location.player]["Light World"].append(location.address)
|
||||
elif location.parent_region.type == LTTPRegionType.DarkWorld:
|
||||
checks_in_area[location.player]["Dark World"].append(location.address)
|
||||
elif main_entrance.parent_region.type == LTTPRegionType.LightWorld:
|
||||
checks_in_area[location.player]["Light World"].append(location.address)
|
||||
elif main_entrance.parent_region.type == LTTPRegionType.DarkWorld:
|
||||
checks_in_area[location.player]["Dark World"].append(location.address)
|
||||
else:
|
||||
assert False, "Unknown Location area."
|
||||
# TODO: remove Total as it's duplicated data and breaks consistent typing
|
||||
checks_in_area[location.player]["Total"] += 1
|
||||
for location in multiworld.get_locations(player):
|
||||
if location.game == cls.game and type(location.address) is int:
|
||||
main_entrance = location.parent_region.get_connecting_entrance(is_main_entrance)
|
||||
if location.parent_region.dungeon:
|
||||
dungeonname = {'Inverted Agahnims Tower': 'Agahnims Tower',
|
||||
'Inverted Ganons Tower': 'Ganons Tower'} \
|
||||
.get(location.parent_region.dungeon.name, location.parent_region.dungeon.name)
|
||||
checks_in_area[location.player][dungeonname].append(location.address)
|
||||
elif location.parent_region.type == LTTPRegionType.LightWorld:
|
||||
checks_in_area[location.player]["Light World"].append(location.address)
|
||||
elif location.parent_region.type == LTTPRegionType.DarkWorld:
|
||||
checks_in_area[location.player]["Dark World"].append(location.address)
|
||||
elif main_entrance.parent_region.type == LTTPRegionType.LightWorld:
|
||||
checks_in_area[location.player]["Light World"].append(location.address)
|
||||
elif main_entrance.parent_region.type == LTTPRegionType.DarkWorld:
|
||||
checks_in_area[location.player]["Dark World"].append(location.address)
|
||||
else:
|
||||
assert False, "Unknown Location area."
|
||||
# TODO: remove Total as it's duplicated data and breaks consistent typing
|
||||
checks_in_area[location.player]["Total"] += 1
|
||||
|
||||
multidata["checks_in_area"].update(checks_in_area)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user