diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index 11fca3a5..09943f23 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -78,7 +78,10 @@ class World(metaclass=AutoWorldRegister): # maps item group names to sets of items. Example: "Weapons" -> {"Sword", "Bow"} item_name_groups: Dict[str, Set[str]] = {} - data_version = 1 # increment this every time something in your world's names/id mappings changes. + # increment this every time something in your world's names/id mappings changes. + # While this is set to 0 in *any* AutoWorld, the entire DataPackage is considered in testing mode and will be + # retrieved by clients on every connection. + data_version = 1 hint_blacklist: Set[str] = frozenset() # any names that should not be hintable diff --git a/worlds/__init__.py b/worlds/__init__.py index 0f2a1e28..ed48e32e 100644 --- a/worlds/__init__.py +++ b/worlds/__init__.py @@ -34,3 +34,7 @@ network_data_package = { "version": sum(world.data_version for world in AutoWorldRegister.world_types.values()), "games": games, } + +# Set entire datapackage to version 0 if any of them are set to 0 +if any(not world.data_version for world in AutoWorldRegister.world_types.values()): + network_data_package["version"] = 0