Skip to content

Commit

Permalink
Core: check that location address is unique per player (#2429)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 authored Nov 15, 2023
1 parent 28a2039 commit 829c664
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ def precollect_hint(location):
assert location.item.code is not None, "item code None should be event, " \
"location.address should then also be None. Location: " \
f" {location}"
assert location.address not in locations_data[location.player], (
f"Locations with duplicate address. {location} and "
f"{locations_data[location.player][location.address]}")
locations_data[location.player][location.address] = \
location.item.code, location.item.player, location.item.flags
if location.name in world.worlds[location.player].options.start_location_hints:
Expand Down

0 comments on commit 829c664

Please sign in to comment.