about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apworld/__init__.py3
-rw-r--r--apworld/static_logic.py5
-rw-r--r--apworld/version.py1
-rw-r--r--data/metadata.txtpb6
-rw-r--r--proto/data.proto8
-rw-r--r--proto/human.proto2
-rw-r--r--tools/datapacker/main.cpp2
7 files changed, 18 insertions, 9 deletions
diff --git a/apworld/__init__.py b/apworld/__init__.py index 1af31c0..96f6804 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py
@@ -11,7 +11,6 @@ from .options import Lingo2Options
11from .player_logic import Lingo2PlayerLogic 11from .player_logic import Lingo2PlayerLogic
12from .regions import create_regions, shuffle_entrances, connect_ports_from_ut 12from .regions import create_regions, shuffle_entrances, connect_ports_from_ut
13from .static_logic import Lingo2StaticLogic 13from .static_logic import Lingo2StaticLogic
14from .version import APWORLD_VERSION
15from ..LauncherComponents import Component, Type, components, launch as launch_component, icon_paths 14from ..LauncherComponents import Component, Type, components, launch as launch_component, icon_paths
16 15
17 16
@@ -138,7 +137,7 @@ class Lingo2World(World):
138 137
139 slot_data: dict[str, object] = { 138 slot_data: dict[str, object] = {
140 **self.options.as_dict(*slot_options), 139 **self.options.as_dict(*slot_options),
141 "version": [self.static_logic.get_data_version(), APWORLD_VERSION], 140 "version": self.static_logic.get_data_version(),
142 } 141 }
143 142
144 if self.options.shuffle_worldports: 143 if self.options.shuffle_worldports:
diff --git a/apworld/static_logic.py b/apworld/static_logic.py index ef70b58..e59a47d 100644 --- a/apworld/static_logic.py +++ b/apworld/static_logic.py
@@ -166,5 +166,6 @@ class Lingo2StaticLogic:
166 else: 166 else:
167 return game_map.display_name 167 return game_map.display_name
168 168
169 def get_data_version(self) -> int: 169 def get_data_version(self) -> list[int]:
170 return self.objects.version 170 version = self.objects.version
171 return [version.major, version.minor, version.patch]
diff --git a/apworld/version.py b/apworld/version.py deleted file mode 100644 index ac799cd..0000000 --- a/apworld/version.py +++ /dev/null
@@ -1 +0,0 @@
1APWORLD_VERSION = 6
diff --git a/data/metadata.txtpb b/data/metadata.txtpb index b7ba807..c6e514b 100644 --- a/data/metadata.txtpb +++ b/data/metadata.txtpb
@@ -1,4 +1,8 @@
1version: 6 1version {
2 major: 7
3 minor: 0
4 patch: 0
5}
2# Filler item. 6# Filler item.
3special_names: "A Job Well Done" 7special_names: "A Job Well Done"
4# Symbol items. 8# Symbol items.
diff --git a/proto/data.proto b/proto/data.proto index 044e32c..808198e 100644 --- a/proto/data.proto +++ b/proto/data.proto
@@ -93,6 +93,12 @@ message Vec3d {
93 optional double z = 3; 93 optional double z = 3;
94} 94}
95 95
96message VersionNumber {
97 optional uint64 major = 1;
98 optional uint64 minor = 2;
99 optional uint64 patch = 3;
100}
101
96message ProxyIdentifier { 102message ProxyIdentifier {
97 optional uint64 panel = 1; 103 optional uint64 panel = 1;
98 optional string answer = 2; 104 optional string answer = 2;
@@ -275,7 +281,7 @@ message DoorGroup {
275} 281}
276 282
277message AllObjects { 283message AllObjects {
278 optional uint64 version = 15; 284 optional VersionNumber version = 15;
279 285
280 repeated Map maps = 7; 286 repeated Map maps = 7;
281 repeated Room rooms = 1; 287 repeated Room rooms = 1;
diff --git a/proto/human.proto b/proto/human.proto index cd05191..99c1fd7 100644 --- a/proto/human.proto +++ b/proto/human.proto
@@ -237,7 +237,7 @@ message HumanDoorGroups {
237 237
238message HumanGlobalMetadata { 238message HumanGlobalMetadata {
239 repeated string special_names = 1; 239 repeated string special_names = 1;
240 optional uint64 version = 2; 240 optional VersionNumber version = 2;
241} 241}
242 242
243message IdMappings { 243message IdMappings {
diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index 5254e5f..005361d 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp
@@ -627,7 +627,7 @@ class DataPacker {
627 } 627 }
628 628
629 auto h_metadata = ReadMessageFromFile<HumanGlobalMetadata>(path.string()); 629 auto h_metadata = ReadMessageFromFile<HumanGlobalMetadata>(path.string());
630 container_.all_objects().set_version(h_metadata.version()); 630 *container_.all_objects().mutable_version() = h_metadata.version();
631 } 631 }
632 632
633 void ProcessIdsFile(std::filesystem::path path) { 633 void ProcessIdsFile(std::filesystem::path path) {