Core: check that location address is unique per player (#2429)
This commit is contained in:
parent
28a20391ab
commit
829c664304
3
Main.py
3
Main.py
|
@ -354,6 +354,9 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
|
||||||
assert location.item.code is not None, "item code None should be event, " \
|
assert location.item.code is not None, "item code None should be event, " \
|
||||||
"location.address should then also be None. Location: " \
|
"location.address should then also be None. Location: " \
|
||||||
f" {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] = \
|
locations_data[location.player][location.address] = \
|
||||||
location.item.code, location.item.player, location.item.flags
|
location.item.code, location.item.player, location.item.flags
|
||||||
if location.name in world.worlds[location.player].options.start_location_hints:
|
if location.name in world.worlds[location.player].options.start_location_hints:
|
||||||
|
|
Loading…
Reference in New Issue