AutoWorld: if any world data_version is set to 0, set it for the main datapackage
This commit is contained in:
parent
6a3d1fcaf4
commit
b07fc80f3f
|
@ -78,7 +78,10 @@ class World(metaclass=AutoWorldRegister):
|
||||||
# maps item group names to sets of items. Example: "Weapons" -> {"Sword", "Bow"}
|
# maps item group names to sets of items. Example: "Weapons" -> {"Sword", "Bow"}
|
||||||
item_name_groups: Dict[str, Set[str]] = {}
|
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
|
hint_blacklist: Set[str] = frozenset() # any names that should not be hintable
|
||||||
|
|
||||||
|
|
|
@ -34,3 +34,7 @@ network_data_package = {
|
||||||
"version": sum(world.data_version for world in AutoWorldRegister.world_types.values()),
|
"version": sum(world.data_version for world in AutoWorldRegister.world_types.values()),
|
||||||
"games": games,
|
"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
|
||||||
|
|
Loading…
Reference in New Issue