Core: default data_version to 0 (#1668)

* Core: default data_version to 0

This allows new (ap-)worlds to function with old clients without having to define a version.

* Blasphemous: fix data_version
This commit is contained in:
black-sliver 2023-04-06 01:19:58 +02:00 committed by GitHub
parent a61a1f58c6
commit 815e7e6b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ class World(metaclass=AutoWorldRegister):
location_name_groups: ClassVar[Dict[str, Set[str]]] = {} location_name_groups: ClassVar[Dict[str, Set[str]]] = {}
"""maps location group names to sets of locations. Example: {"Sewer": {"Sewer Key Drop 1", "Sewer Key Drop 2"}}""" """maps location group names to sets of locations. Example: {"Sewer": {"Sewer Key Drop 1", "Sewer Key Drop 2"}}"""
data_version: ClassVar[int] = 1 data_version: ClassVar[int] = 0
""" """
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.

View File

@ -32,7 +32,7 @@ class BlasphemousWorld(World):
game: str = "Blasphemous" game: str = "Blasphemous"
web = BlasphemousWeb() web = BlasphemousWeb()
data_version: 1 data_version = 1
item_name_to_id = {item["name"]: (base_id + index) for index, item in enumerate(item_table)} item_name_to_id = {item["name"]: (base_id + index) for index, item in enumerate(item_table)}
location_name_to_id = {loc["name"]: (base_id + index) for index, loc in enumerate(location_table)} location_name_to_id = {loc["name"]: (base_id + index) for index, loc in enumerate(location_table)}