mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: better error message for exclusion failure
This commit is contained in:
@@ -29,7 +29,7 @@ def exclusion_rules(world, player: int, exclude_locations: typing.Set[str]):
|
|||||||
location.excluded = True
|
location.excluded = True
|
||||||
except KeyError as e: # failed to find the given location. Check if it's a legitimate location
|
except KeyError as e: # failed to find the given location. Check if it's a legitimate location
|
||||||
if loc_name not in world.worlds[player].location_name_to_id:
|
if loc_name not in world.worlds[player].location_name_to_id:
|
||||||
raise Exception(f"Could not find location {loc_name} in player {player}'s world.") from e
|
raise Exception(f"Unable to exclude location {loc_name} in player {player}'s world.") from e
|
||||||
|
|
||||||
def set_rule(spot, rule: CollectionRule):
|
def set_rule(spot, rule: CollectionRule):
|
||||||
spot.access_rule = rule
|
spot.access_rule = rule
|
||||||
|
|||||||
Reference in New Issue
Block a user