summary refs log tree commit diff stats
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/CMakeLists.txt2
-rw-r--r--proto/common.proto38
-rw-r--r--proto/data.proto173
-rw-r--r--proto/human.proto112
4 files changed, 160 insertions, 165 deletions
diff --git a/proto/CMakeLists.txt b/proto/CMakeLists.txt index c5abd46..95687d7 100644 --- a/proto/CMakeLists.txt +++ b/proto/CMakeLists.txt
@@ -5,7 +5,7 @@ add_library(protos)
5protobuf_generate( 5protobuf_generate(
6 LANGUAGE cpp 6 LANGUAGE cpp
7 TARGET protos 7 TARGET protos
8 PROTOS human.proto data.proto common.proto 8 PROTOS human.proto data.proto
9) 9)
10 10
11target_link_libraries(protos PUBLIC protobuf::libprotobuf) 11target_link_libraries(protos PUBLIC protobuf::libprotobuf)
diff --git a/proto/common.proto b/proto/common.proto deleted file mode 100644 index e37f670..0000000 --- a/proto/common.proto +++ /dev/null
@@ -1,38 +0,0 @@
1edition = "2023";
2
3package com.fourisland.lingo2_archipelago;
4
5message Proxy {
6 string answer = 1;
7 string path = 2;
8}
9
10enum DoorType {
11 DOOR_TYPE_UNKNOWN = 0;
12
13 // This door is a location unless panelsanity is on, and it is an item as long as door shuffle is on.
14 STANDARD = 1;
15
16 // This door is never an item or a location.
17 EVENT = 2;
18
19 // This door is never a location, and is an item as long as door shuffle is on.
20 ITEM_ONLY = 3;
21
22 // This door is never a location, and is an item as long as control center color shuffle is on.
23 CONTROL_CENTER_COLOR = 4;
24
25 // This door is never an item, and is a location as long as panelsanity is not on.
26 LOCATION_ONLY = 5;
27}
28
29enum AxisDirection {
30 AXIS_DIRECTION_UNKNOWN = 0;
31
32 X_PLUS = 1;
33 X_MINUS = 2;
34 Y_PLUS = 3;
35 Y_MINUS = 4;
36 Z_PLUS = 5;
37 Z_MINUS = 6;
38}
diff --git a/proto/data.proto b/proto/data.proto index b590454..f60d54f 100644 --- a/proto/data.proto +++ b/proto/data.proto
@@ -1,23 +1,56 @@
1edition = "2023"; 1syntax = "proto2";
2
3import "common.proto";
4 2
5package com.fourisland.lingo2_archipelago; 3package com.fourisland.lingo2_archipelago;
6 4
5message Proxy {
6 optional string answer = 1;
7 optional string path = 2;
8}
9
10enum DoorType {
11 DOOR_TYPE_UNKNOWN = 0;
12
13 // This door is a location unless panelsanity is on, and it is an item as long as door shuffle is on.
14 STANDARD = 1;
15
16 // This door is never an item or a location.
17 EVENT = 2;
18
19 // This door is never a location, and is an item as long as door shuffle is on.
20 ITEM_ONLY = 3;
21
22 // This door is never a location, and is an item as long as control center color shuffle is on.
23 CONTROL_CENTER_COLOR = 4;
24
25 // This door is never an item, and is a location as long as panelsanity is not on.
26 LOCATION_ONLY = 5;
27}
28
29enum AxisDirection {
30 AXIS_DIRECTION_UNKNOWN = 0;
31
32 X_PLUS = 1;
33 X_MINUS = 2;
34 Y_PLUS = 3;
35 Y_MINUS = 4;
36 Z_PLUS = 5;
37 Z_MINUS = 6;
38}
39
7message ProxyIdentifier { 40message ProxyIdentifier {
8 uint64 panel = 1; 41 optional uint64 panel = 1;
9 string answer = 2; 42 optional string answer = 2;
10} 43}
11 44
12message KeyholderAnswer { 45message KeyholderAnswer {
13 uint64 keyholder = 1; 46 optional uint64 keyholder = 1;
14 string key = 2; 47 optional string key = 2;
15} 48}
16 49
17message Connection { 50message Connection {
18 uint64 from_room = 1; 51 optional uint64 from_room = 1;
19 uint64 to_room = 2; 52 optional uint64 to_room = 2;
20 uint64 required_door = 3; 53 optional uint64 required_door = 3;
21 54
22 oneof trigger { 55 oneof trigger {
23 uint64 port = 4; 56 uint64 port = 4;
@@ -27,105 +60,105 @@ message Connection {
27} 60}
28 61
29message Door { 62message Door {
30 uint64 id = 1; 63 optional uint64 id = 1;
31 uint64 ap_id = 11; 64 optional uint64 ap_id = 11;
32 uint64 map_id = 9; 65 optional uint64 map_id = 9;
33 uint64 room_id = 10; 66 optional uint64 room_id = 10;
34 string name = 2; 67 optional string name = 2;
35 68
36 repeated string receivers = 3; 69 repeated string receivers = 3;
37 repeated uint64 move_paintings = 4; 70 repeated uint64 move_paintings = 4;
38 71
39 repeated ProxyIdentifier panels = 5; 72 repeated ProxyIdentifier panels = 5;
40 uint64 complete_at = 12; 73 optional uint64 complete_at = 12;
41 74
42 string control_center_color = 6; 75 optional string control_center_color = 6;
43 repeated string switches = 7; 76 repeated string switches = 7;
44 repeated KeyholderAnswer keyholders = 13; 77 repeated KeyholderAnswer keyholders = 13;
45 repeated uint64 rooms = 14; 78 repeated uint64 rooms = 14;
46 79
47 DoorType type = 8; 80 optional DoorType type = 8;
48} 81}
49 82
50message Panel { 83message PanelData {
51 uint64 id = 1; 84 optional uint64 id = 1;
52 uint64 ap_id = 10; 85 optional uint64 ap_id = 10;
53 uint64 room_id = 2; 86 optional uint64 room_id = 2;
54 string name = 3; 87 optional string name = 3;
55 88
56 string path = 4; 89 optional string path = 4;
57 string clue = 5; 90 optional string clue = 5;
58 string answer = 6; 91 optional string answer = 6;
59 repeated string symbols = 7; 92 repeated string symbols = 7;
60 93
61 repeated Proxy proxies = 8; 94 repeated Proxy proxies = 8;
62 95
63 uint64 required_door = 9; 96 optional uint64 required_door = 9;
64 uint64 required_room = 11; 97 optional uint64 required_room = 11;
65} 98}
66 99
67message Painting { 100message Painting {
68 uint64 id = 1; 101 optional uint64 id = 1;
69 uint64 room_id = 2; 102 optional uint64 room_id = 2;
70 string name = 9; 103 optional string name = 9;
71 104
72 string path = 10; 105 optional string path = 10;
73 string display_name = 4; 106 optional string display_name = 4;
74 107
75 string orientation = 3; 108 optional string orientation = 3;
76 bool move = 6; 109 optional bool move = 6;
77 bool enter_only = 7; 110 optional bool enter_only = 7;
78 AxisDirection gravity = 8 [default = Y_MINUS]; 111 optional AxisDirection gravity = 8;
79 bool exit_only = 11; 112 optional bool exit_only = 11;
80 113
81 uint64 required_door = 5; 114 optional uint64 required_door = 5;
82} 115}
83 116
84message Port { 117message Port {
85 uint64 id = 1; 118 optional uint64 id = 1;
86 uint64 room_id = 2; 119 optional uint64 room_id = 2;
87 string name = 3; 120 optional string name = 3;
88 121
89 string path = 4; 122 optional string path = 4;
90 string orientation = 5; 123 optional string orientation = 5;
91 AxisDirection gravity = 7 [default = Y_MINUS]; 124 optional AxisDirection gravity = 7;
92 125
93 uint64 required_door = 6; 126 optional uint64 required_door = 6;
94} 127}
95 128
96message Keyholder { 129message Keyholder {
97 uint64 id = 1; 130 optional uint64 id = 1;
98 uint64 room_id = 2; 131 optional uint64 room_id = 2;
99 132
100 string name = 3; 133 optional string name = 3;
101 string path = 4; 134 optional string path = 4;
102} 135}
103 136
104message Letter { 137message Letter {
105 uint64 id = 3; 138 optional uint64 id = 3;
106 uint64 ap_id = 5; 139 optional uint64 ap_id = 5;
107 uint64 room_id = 4; 140 optional uint64 room_id = 4;
108 141
109 string key = 1; 142 optional string key = 1;
110 bool double = 2; 143 optional bool level2 = 2;
111 144
112 string path = 6; 145 optional string path = 6;
113} 146}
114 147
115message Mastery { 148message Mastery {
116 uint64 id = 1; 149 optional uint64 id = 1;
117 uint64 ap_id = 2; 150 optional uint64 ap_id = 2;
118 uint64 room_id = 3; 151 optional uint64 room_id = 3;
119 152
120 string name = 4; 153 optional string name = 4;
121 string path = 5; 154 optional string path = 5;
122} 155}
123 156
124message Room { 157message Room {
125 uint64 id = 1; 158 optional uint64 id = 1;
126 uint64 map_id = 8; 159 optional uint64 map_id = 8;
127 string name = 2; 160 optional string name = 2;
128 string display_name = 3; 161 optional string display_name = 3;
129 162
130 repeated uint64 panels = 4; 163 repeated uint64 panels = 4;
131 repeated uint64 paintings = 5; 164 repeated uint64 paintings = 5;
@@ -137,15 +170,15 @@ message Room {
137} 170}
138 171
139message Map { 172message Map {
140 uint64 id = 1; 173 optional uint64 id = 1;
141 string name = 2; 174 optional string name = 2;
142} 175}
143 176
144message AllObjects { 177message AllObjects {
145 repeated Map maps = 7; 178 repeated Map maps = 7;
146 repeated Room rooms = 1; 179 repeated Room rooms = 1;
147 repeated Door doors = 2; 180 repeated Door doors = 2;
148 repeated Panel panels = 3; 181 repeated PanelData panels = 3;
149 repeated Painting paintings = 4; 182 repeated Painting paintings = 4;
150 repeated Port ports = 5; 183 repeated Port ports = 5;
151 repeated Keyholder keyholders = 11; 184 repeated Keyholder keyholders = 11;
diff --git a/proto/human.proto b/proto/human.proto index 858c88f..b420cb4 100644 --- a/proto/human.proto +++ b/proto/human.proto
@@ -1,43 +1,43 @@
1edition = "2023"; 1syntax = "proto2";
2 2
3import "common.proto"; 3import "data.proto";
4 4
5package com.fourisland.lingo2_archipelago; 5package com.fourisland.lingo2_archipelago;
6 6
7message RoomIdentifier { 7message RoomIdentifier {
8 string map = 1; 8 optional string map = 1;
9 string name = 2; 9 optional string name = 2;
10} 10}
11 11
12message DoorIdentifier { 12message DoorIdentifier {
13 string map = 1; 13 optional string map = 1;
14 string name = 2; 14 optional string name = 2;
15} 15}
16 16
17message PortIdentifier { 17message PortIdentifier {
18 string map = 1; 18 optional string map = 1;
19 string room = 2; 19 optional string room = 2;
20 string name = 3; 20 optional string name = 3;
21} 21}
22 22
23message PaintingIdentifier { 23message PaintingIdentifier {
24 string map = 1; 24 optional string map = 1;
25 string room = 2; 25 optional string room = 2;
26 string name = 3; 26 optional string name = 3;
27} 27}
28 28
29message PanelIdentifier { 29message PanelIdentifier {
30 string map = 1; 30 optional string map = 1;
31 string room = 2; 31 optional string room = 2;
32 string name = 3; 32 optional string name = 3;
33 string answer = 4; 33 optional string answer = 4;
34} 34}
35 35
36message KeyholderIdentifier { 36message KeyholderIdentifier {
37 string map = 1; 37 optional string map = 1;
38 string room = 2; 38 optional string room = 2;
39 string name = 3; 39 optional string name = 3;
40 string key = 4; 40 optional string key = 4;
41} 41}
42 42
43message HumanConnection { 43message HumanConnection {
@@ -60,8 +60,8 @@ message HumanConnection {
60 string to_room = 6; 60 string to_room = 6;
61 } 61 }
62 62
63 bool oneway = 3; 63 optional bool oneway = 3;
64 DoorIdentifier door = 4; 64 optional DoorIdentifier door = 4;
65} 65}
66 66
67message HumanConnections { 67message HumanConnections {
@@ -69,7 +69,7 @@ message HumanConnections {
69} 69}
70 70
71message HumanDoor { 71message HumanDoor {
72 string name = 1; 72 optional string name = 1;
73 73
74 repeated string receivers = 2; 74 repeated string receivers = 2;
75 repeated PaintingIdentifier move_paintings = 8; 75 repeated PaintingIdentifier move_paintings = 8;
@@ -79,15 +79,15 @@ message HumanDoor {
79 79
80 // If set, the number of panels from the above set that need to be solved. 80 // If set, the number of panels from the above set that need to be solved.
81 // Warning: this is a messy kind of OR logic! Consider if there's another way. 81 // Warning: this is a messy kind of OR logic! Consider if there's another way.
82 uint64 complete_at = 9; 82 optional uint64 complete_at = 9;
83 83
84 string control_center_color = 6; 84 optional string control_center_color = 6;
85 repeated string switches = 7; 85 repeated string switches = 7;
86 repeated KeyholderIdentifier keyholders = 10; 86 repeated KeyholderIdentifier keyholders = 10;
87 repeated RoomIdentifier rooms = 11; 87 repeated RoomIdentifier rooms = 11;
88 88
89 DoorType type = 4; 89 optional DoorType type = 4;
90 string location_room = 5; 90 optional string location_room = 5;
91} 91}
92 92
93message HumanDoors { 93message HumanDoors {
@@ -95,64 +95,64 @@ message HumanDoors {
95} 95}
96 96
97message HumanPanel { 97message HumanPanel {
98 string name = 1; 98 optional string name = 1;
99 string path = 5; 99 optional string path = 5;
100 100
101 string clue = 2; 101 optional string clue = 2;
102 string answer = 3; 102 optional string answer = 3;
103 repeated string symbols = 4; 103 repeated string symbols = 4;
104 104
105 repeated Proxy proxies = 6; 105 repeated Proxy proxies = 6;
106 106
107 DoorIdentifier required_door = 7; 107 optional DoorIdentifier required_door = 7;
108 RoomIdentifier required_room = 8; 108 optional RoomIdentifier required_room = 8;
109} 109}
110 110
111message HumanPainting { 111message HumanPainting {
112 string name = 1; 112 optional string name = 1;
113 string path = 2; 113 optional string path = 2;
114 114
115 string display_name = 4; 115 optional string display_name = 4;
116 116
117 string orientation = 3; 117 optional string orientation = 3;
118 bool move = 6; 118 optional bool move = 6;
119 bool enter_only = 7; 119 optional bool enter_only = 7;
120 AxisDirection gravity = 8 [default = Y_MINUS]; 120 optional AxisDirection gravity = 8 [default = Y_MINUS];
121 bool exit_only = 9; 121 optional bool exit_only = 9;
122 122
123 DoorIdentifier required_door = 5; 123 optional DoorIdentifier required_door = 5;
124} 124}
125 125
126message HumanPort { 126message HumanPort {
127 string name = 1; 127 optional string name = 1;
128 string path = 2; 128 optional string path = 2;
129 129
130 string orientation = 3; 130 optional string orientation = 3;
131 AxisDirection gravity = 5 [default = Y_MINUS]; 131 optional AxisDirection gravity = 5 [default = Y_MINUS];
132 132
133 DoorIdentifier required_door = 4; 133 optional DoorIdentifier required_door = 4;
134} 134}
135 135
136message HumanKeyholder { 136message HumanKeyholder {
137 string name = 1; 137 optional string name = 1;
138 string path = 2; 138 optional string path = 2;
139} 139}
140 140
141message HumanLetter { 141message HumanLetter {
142 string key = 1; 142 optional string key = 1;
143 bool double = 2; 143 optional bool level2 = 2;
144 144
145 string path = 3; 145 optional string path = 3;
146} 146}
147 147
148message HumanMastery { 148message HumanMastery {
149 string name = 1; 149 optional string name = 1;
150 string path = 2; 150 optional string path = 2;
151} 151}
152 152
153message HumanRoom { 153message HumanRoom {
154 string name = 1; 154 optional string name = 1;
155 string display_name = 2; 155 optional string display_name = 2;
156 156
157 repeated HumanPanel panels = 3; 157 repeated HumanPanel panels = 3;
158 repeated HumanPainting paintings = 4; 158 repeated HumanPainting paintings = 4;