diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-07 13:34:42 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-07 13:34:42 -0400 |
commit | e9d9da34e86a1e5f0de155bf9086d3e5ff6b2da0 (patch) | |
tree | 432e1177f11e7e2b5e0d6400fad977def7d31129 /proto | |
parent | 1eacf01378d4dff3aed73fffcc42e0352b93835e (diff) | |
download | lingo2-archipelago-e9d9da34e86a1e5f0de155bf9086d3e5ff6b2da0.tar.gz lingo2-archipelago-e9d9da34e86a1e5f0de155bf9086d3e5ff6b2da0.tar.bz2 lingo2-archipelago-e9d9da34e86a1e5f0de155bf9086d3e5ff6b2da0.zip |
Protobuf works! Parsing connections
Diffstat (limited to 'proto')
-rw-r--r-- | proto/CMakeLists.txt | 11 | ||||
-rw-r--r-- | proto/common.proto | 13 | ||||
-rw-r--r-- | proto/data.proto | 13 | ||||
-rw-r--r-- | proto/human.proto | 12 |
4 files changed, 36 insertions, 13 deletions
diff --git a/proto/CMakeLists.txt b/proto/CMakeLists.txt new file mode 100644 index 0000000..c5abd46 --- /dev/null +++ b/proto/CMakeLists.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | find_package(Protobuf REQUIRED) | ||
2 | |||
3 | add_library(protos) | ||
4 | |||
5 | protobuf_generate( | ||
6 | LANGUAGE cpp | ||
7 | TARGET protos | ||
8 | PROTOS human.proto data.proto common.proto | ||
9 | ) | ||
10 | |||
11 | target_link_libraries(protos PUBLIC protobuf::libprotobuf) | ||
diff --git a/proto/common.proto b/proto/common.proto new file mode 100644 index 0000000..eb1d6b5 --- /dev/null +++ b/proto/common.proto | |||
@@ -0,0 +1,13 @@ | |||
1 | edition = "2023"; | ||
2 | |||
3 | package com.fourisland.lingo2_archipelago; | ||
4 | |||
5 | message Proxy { | ||
6 | string answer = 1; | ||
7 | string path = 2; | ||
8 | } | ||
9 | |||
10 | message Letter { | ||
11 | string letter = 1; | ||
12 | bool double = 2; | ||
13 | } | ||
diff --git a/proto/data.proto b/proto/data.proto index 71c3aeb..b3b6e6b 100644 --- a/proto/data.proto +++ b/proto/data.proto | |||
@@ -1,5 +1,7 @@ | |||
1 | edition = "2023"; | 1 | edition = "2023"; |
2 | 2 | ||
3 | import "common.proto"; | ||
4 | |||
3 | package com.fourisland.lingo2_archipelago; | 5 | package com.fourisland.lingo2_archipelago; |
4 | 6 | ||
5 | message ProxyIdentifier { | 7 | message ProxyIdentifier { |
@@ -8,11 +10,9 @@ message ProxyIdentifier { | |||
8 | } | 10 | } |
9 | 11 | ||
10 | message Connection { | 12 | message Connection { |
11 | uint64 id = 7; | ||
12 | |||
13 | uint64 from_room = 1; | 13 | uint64 from_room = 1; |
14 | uint64 to_room = 2; | 14 | uint64 to_room = 2; |
15 | repeated uint64 required_door = 3; | 15 | uint64 required_door = 3; |
16 | 16 | ||
17 | oneof trigger { | 17 | oneof trigger { |
18 | uint64 port = 4; | 18 | uint64 port = 4; |
@@ -82,6 +82,7 @@ message Port { | |||
82 | 82 | ||
83 | message Room { | 83 | message Room { |
84 | uint64 id = 1; | 84 | uint64 id = 1; |
85 | uint64 map_id = 8; | ||
85 | string name = 2; | 86 | string name = 2; |
86 | string display_name = 3; | 87 | string display_name = 3; |
87 | 88 | ||
@@ -91,7 +92,13 @@ message Room { | |||
91 | repeated uint64 ports = 7; | 92 | repeated uint64 ports = 7; |
92 | } | 93 | } |
93 | 94 | ||
95 | message Map { | ||
96 | uint64 id = 1; | ||
97 | string name = 2; | ||
98 | } | ||
99 | |||
94 | message AllObjects { | 100 | message AllObjects { |
101 | repeated Map maps = 7; | ||
95 | repeated Room rooms = 1; | 102 | repeated Room rooms = 1; |
96 | repeated Door doors = 2; | 103 | repeated Door doors = 2; |
97 | repeated Panel panels = 3; | 104 | repeated Panel panels = 3; |
diff --git a/proto/human.proto b/proto/human.proto index 06c89cd..cdbb8b9 100644 --- a/proto/human.proto +++ b/proto/human.proto | |||
@@ -1,5 +1,7 @@ | |||
1 | edition = "2023"; | 1 | edition = "2023"; |
2 | 2 | ||
3 | import "common.proto"; | ||
4 | |||
3 | package com.fourisland.lingo2_archipelago; | 5 | package com.fourisland.lingo2_archipelago; |
4 | 6 | ||
5 | message RoomIdentifier { | 7 | message RoomIdentifier { |
@@ -93,11 +95,6 @@ message HumanDoors { | |||
93 | repeated HumanDoor doors = 1; | 95 | repeated HumanDoor doors = 1; |
94 | } | 96 | } |
95 | 97 | ||
96 | message Proxy { | ||
97 | string answer = 1; | ||
98 | string path = 2; | ||
99 | } | ||
100 | |||
101 | message HumanPanel { | 98 | message HumanPanel { |
102 | string name = 1; | 99 | string name = 1; |
103 | string path = 5; | 100 | string path = 5; |
@@ -125,11 +122,6 @@ message HumanPainting { | |||
125 | DoorIdentifier required_door = 5; | 122 | DoorIdentifier required_door = 5; |
126 | } | 123 | } |
127 | 124 | ||
128 | message Letter { | ||
129 | string letter = 1; | ||
130 | bool double = 2; | ||
131 | } | ||
132 | |||
133 | message HumanPort { | 125 | message HumanPort { |
134 | string name = 1; | 126 | string name = 1; |
135 | string path = 2; | 127 | string path = 2; |