From 829c664304e17b52439cb290f3a82fc50d973206 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 15 Nov 2023 20:50:00 +0100 Subject: [PATCH] Core: check that location address is unique per player (#2429) --- Main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Main.py b/Main.py index 7b42a89d12be..568bf0208f78 100644 --- a/Main.py +++ b/Main.py @@ -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: