Implement excluded locations

This commit is contained in:
espeon65536
2021-07-14 08:24:34 -05:00
committed by Fabian Dill
parent 54b3a57f46
commit 7493b7f35e
3 changed files with 17 additions and 1 deletions

View File

@@ -9,6 +9,12 @@ def locality_rules(world, player):
forbid_items_for_player(location, world.non_local_items[player], player)
def exclusion_rules(world, player: int, excluded_locations: set):
for loc_name in excluded_locations:
location = world.get_location(loc_name, player)
add_item_rule(location, lambda i: not (i.advancement or i.smallkey or i.bigkey))
def set_rule(spot, rule):
spot.access_rule = rule