forked from liamcottle/rustplus.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrustplus.proto
252 lines (204 loc) · 5 KB
/
rustplus.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
syntax = "proto2";
package rustplus;
// This took me a while to craft by hand 😴
message AppMessage {
optional AppResponse response = 1;
optional AppBroadcast broadcast = 2;
}
message AppRequest {
required uint32 seq = 1;
required uint64 playerId = 2;
required int32 playerToken = 3;
optional uint32 entityId = 4;
optional AppEmpty getInfo = 8;
optional AppEmpty getTime = 9;
optional AppEmpty getMap = 10;
optional AppEmpty getTeamInfo = 11;
optional AppSendMessage sendTeamMessage = 13;
optional AppEmpty getEntityInfo = 14;
optional AppSetEntityValue setEntityValue = 15;
optional AppEmpty checkSubscription = 16;
optional AppFlag setSubscription = 17;
optional AppEmpty getMapMarkers = 18;
optional AppCameraFrameRequest getCameraFrame = 19;
}
message AppSendMessage {
required string message = 1;
}
message AppSetEntityValue {
required bool value = 1;
}
message AppCameraFrameRequest {
required string identifier = 1;
required uint32 frame = 2;
}
message AppResponse {
required uint32 seq = 1;
optional AppSuccess success = 4;
optional AppError error = 5;
optional AppInfo info = 6;
optional AppTime time = 7;
optional AppMap map = 8;
optional AppTeamInfo teamInfo = 9;
optional AppTeamChat teamChat = 10;
optional AppEntityInfo entityInfo = 11;
optional AppFlag flag = 12;
optional AppMapMarkers mapMarkers = 13;
optional AppCameraFrame cameraFrame = 14;
}
message AppBroadcast {
optional AppTeamChanged teamChanged = 4;
optional AppTeamMessage teamMessage = 5;
optional AppEntityChanged entityChanged = 6;
}
message AppEmpty {
}
message AppSuccess {
}
message AppError {
required string error = 1;
}
message AppInfo {
required string name = 1;
required string headerImage = 2;
required string url = 3;
required string map = 4;
required uint32 mapSize = 5;
required uint32 wipeTime = 6;
required uint32 players = 7;
required uint32 maxPlayers = 8;
required uint32 queuedPlayers = 9;
optional uint32 seed = 10;
optional uint32 salt = 11;
}
message AppTime {
required float dayLengthMinutes = 1;
required float timeScale = 2;
required float sunrise = 3;
required float sunset = 4;
required float time = 5;
}
message AppMap {
required uint32 width = 1;
required uint32 height = 2;
required bytes jpgImage = 3;
required int32 oceanMargin = 4;
repeated AppMap.Monument monuments = 5;
optional string background = 6;
message Monument {
required string token = 1;
required float x = 2;
required float y = 3;
}
}
message AppTeamInfo {
required uint64 leaderSteamId = 1;
repeated AppTeamInfo.Member members = 2;
repeated AppTeamInfo.Note mapNotes = 3;
repeated AppTeamInfo.Note leaderMapNotes = 4;
message Member {
required uint64 steamId = 1;
required string name = 2;
required float x = 3;
required float y = 4;
required bool isOnline = 5;
required uint32 spawnTime = 6;
required bool isAlive = 7;
required uint32 deathTime = 8;
}
message Note {
required int32 type = 2;
required float x = 3;
required float y = 4;
}
}
message AppTeamChat {
repeated AppChatMessage messages = 1;
}
message AppChatMessage {
required uint64 steamId = 1;
required string name = 2;
required string message = 3;
required string color = 4;
required uint32 time = 5;
}
message AppEntityInfo {
required AppEntityType type = 1;
required AppEntityPayload payload = 3;
}
enum AppEntityType {
Switch = 1;
Alarm = 2;
StorageMonitor = 3;
}
message AppEntityPayload {
optional bool value = 1;
repeated AppEntityPayload.Item items = 2;
optional int32 capacity = 3;
optional bool hasProtection = 4;
optional uint32 protectionExpiry = 5;
message Item {
required int32 itemId = 1;
required int32 quantity = 2;
required bool itemIsBlueprint = 3;
}
}
message AppFlag {
required bool value = 1;
}
message AppMapMarkers {
repeated AppMarker markers = 1;
}
message Vector4 {
optional float x = 1;
optional float y = 2;
optional float z = 3;
optional float w = 4;
}
message AppMarker {
required uint32 id = 1;
required AppMarkerType type = 2;
required float x = 3;
required float y = 4;
optional uint64 steamId = 5;
optional float rotation = 6;
optional float radius = 7;
optional Vector4 color1 = 8;
optional Vector4 color2 = 9;
optional float alpha = 10;
optional string name = 11;
repeated AppMarker.SellOrder sellOrders = 13;
message SellOrder {
required int32 itemId = 1;
required int32 quantity = 2;
required int32 currencyId = 3;
required int32 costPerItem = 4;
required int32 amountInStock = 5;
required bool itemIsBlueprint = 6;
required bool currencyIsBlueprint = 7;
}
}
enum AppMarkerType {
Player = 1;
Explosion = 2;
VendingMachine = 3;
CH47 = 4;
CargoShip = 5;
Crate = 6;
GenericRadius = 7;
}
message AppCameraFrame {
required uint32 frame = 1;
required bytes jpgImage = 2;
}
message AppTeamChanged {
required uint64 playerId = 1;
required AppTeamInfo teamInfo = 2;
}
message AppTeamMessage {
required AppChatMessage message = 1;
}
message AppEntityChanged {
required uint32 entityId = 1;
required AppEntityPayload payload = 2;
}