Debian Codegraph @

src/proto/msg.proto

raw
1 syntax = "proto3";
2
3 // Message returned to client when scanning a game server's listen port
4 message NServerInfo {
5 int32 ProtocolVersion = 1;
6 uint32 ENetPort = 2;
7 string Hostname = 3;
8 int32 GameMode = 4;
9 string CampaignName = 5;
10 int32 MissionNumber = 6;
11 int32 NumPlayers = 7;
12 int32 MaxPlayers = 8;
13 }
14
15 message NClientId {
16 uint32 Id = 1;
17 // This client's players will use UID from this number
18 uint32 FirstPlayerUID = 2;
19 }
20
21 message NCampaignDef {
22 string Path = 1;
23 int32 GameMode = 2;
24 uint32 Mission = 3;
25 }
26
27 message NColor {
28 int32 RGBA = 1;
29 }
30
31 message NCharColors {
32 NColor Skin = 1;
33 NColor Arms = 2;
34 NColor Body = 3;
35 NColor Legs = 4;
36 NColor Hair = 5;
37 NColor Feet = 6;
38 NColor Facehair = 7;
39 NColor Hat = 8;
40 NColor Glasses = 9;
41 }
42
43 message NPlayerStats {
44 int32 Score = 1;
45 uint32 Kills = 2;
46 uint32 Suicides = 3;
47 uint32 Friendlies = 4;
48 uint32 TimeTicks = 5;
49 }
50
51 message NWeaponUsage {
52 string Weapon = 1;
53 uint32 Shots = 2;
54 uint32 Hits = 3;
55 }
56
57 message NPlayerData {
58 string Name = 1;
59 string CharacterClass = 2;
60 string Hair = 3;
61 string Facehair = 4;
62 string Hat = 5;
63 string Glasses = 6;
64 NCharColors Colors = 7;
65 repeated string Weapons = 8;
66 uint32 Lives = 9;
67 NPlayerStats Stats = 10;
68 NPlayerStats Totals = 11;
69 uint32 MaxHealth = 12;
70 uint32 LastMission = 13;
71 uint32 UID = 14;
72 repeated NAmmo Ammo = 15;
73 uint32 HP = 16;
74 uint32 ExcessHealth = 17;
75 repeated NWeaponUsage WeaponUsages = 18;
76 }
77
78 message NPlayerRemove {
79 uint32 UID = 1;
80 }
81
82 message NConfig {
83 string Name = 1;
84 string Value = 2;
85 }
86
87 message NTileSet {
88 NVec2i Pos = 1;
89 string ClassName = 2;
90 string DoorClassName = 3;
91 string DoorClass2Name = 4;
92 int32 RunLength = 5;
93 }
94
95 message NThingDamage {
96 uint32 UID = 1;
97 int32 Kind = 2;
98 int32 SourceActorUID = 3;
99 int32 Power = 4;
100 NVec2 Vel = 5;
101 float Mass = 6;
102 uint32 Flags = 7;
103 int32 Special = 8;
104 int32 SpecialTicks = 9;
105 string SourceWeaponClassName = 10;
106 }
107
108 message NMapObjectAdd {
109 uint32 UID = 1;
110 string MapObjectClass = 2;
111 NVec2 Pos = 3;
112 uint32 ThingFlags = 4;
113 int32 Health = 5;
114 NColor Mask = 6;
115 }
116
117 message NMapObjectRemove {
118 uint32 UID = 1;
119 int32 ActorUID = 2;
120 uint32 Flags = 3;
121 }
122
123 message NScore {
124 uint32 PlayerUID = 1;
125 int32 Score = 2;
126 }
127
128 message NSound {
129 string Sound = 1;
130 NVec2 Pos = 2;
131 uint32 Distance = 3;
132 }
133
134 message NVec2i {
135 int32 x = 1;
136 int32 y = 2;
137 }
138
139 message NVec2 {
140 float x = 1;
141 float y = 2;
142 }
143
144 message NGameBegin {
145 int32 MissionTime = 1;
146 }
147
148 message NActorAdd {
149 uint32 UID = 1;
150 int32 PilotUID = 2;
151 int32 VehicleUID = 3;
152 uint32 CharId = 4;
153 int32 Direction = 5;
154 int32 Health = 6;
155 int32 PlayerUID = 7;
156 uint32 ThingFlags = 8;
157 NVec2 Pos = 9;
158 repeated NAmmo Ammo = 10;
159 }
160
161 message NActorMove {
162 uint32 UID = 1;
163 NVec2 Pos = 2;
164 NVec2 MoveVel = 3;
165 }
166
167 message NActorState {
168 uint32 UID = 1;
169 int32 State = 2;
170 }
171
172 message NActorDir {
173 uint32 UID = 1;
174 int32 Dir = 2;
175 }
176
177 message NActorSlide {
178 uint32 UID = 1;
179 NVec2 Vel = 2;
180 }
181
182 message NActorImpulse {
183 uint32 UID = 1;
184 NVec2 Vel = 2;
185 NVec2 Pos = 3;
186 }
187
188 message NActorSwitchGun {
189 uint32 UID = 1;
190 uint32 GunIdx = 2;
191 }
192
193 message NActorPickupAll {
194 uint32 UID = 1;
195 bool PickupAll = 2;
196 }
197
198 message NActorReplaceGun {
199 uint32 UID = 1;
200 // Index of gun in actor to replace
201 uint32 GunIdx = 2;
202 string Gun = 3;
203 }
204
205 message NActorHeal {
206 uint32 UID = 1;
207 int32 PlayerUID = 2;
208 int32 Amount = 3;
209 bool IsRandomSpawned = 4;
210 bool ExceedMax = 5;
211 }
212
213 message NAmmo {
214 uint32 Id = 1;
215 uint32 Amount = 2;
216 }
217
218 message NActorAddAmmo {
219 uint32 UID = 1;
220 int32 PlayerUID = 2;
221 NAmmo Ammo = 3;
222 bool IsRandomSpawned = 4;
223 }
224
225 message NActorUseAmmo {
226 uint32 UID = 1;
227 int32 PlayerUID = 2;
228 NAmmo Ammo = 3;
229 }
230
231 message NActorDie {
232 int32 UID = 1;
233 }
234
235 message NPlayerAddLives {
236 int32 UID = 1;
237 uint32 Lives = 2;
238 }
239
240 message NActorMelee {
241 uint32 UID = 1;
242 string BulletClass = 2;
243 int32 HitType = 3;
244 int32 TargetKind = 4;
245 uint32 TargetUID = 5;
246 }
247
248 message NActorPilot {
249 uint32 UID = 1;
250 int32 VehicleUID = 2;
251 bool On = 3;
252 }
253
254 message NAddPickup {
255 uint32 UID = 1;
256 string PickupClass = 2;
257 bool IsRandomSpawned = 3;
258 int32 SpawnerUID = 4;
259 uint32 ThingFlags = 5;
260 NVec2 Pos = 6;
261 }
262
263 message NRemovePickup {
264 uint32 UID = 1;
265 int32 SpawnerUID = 2;
266 }
267
268 message NBulletBounce {
269 uint32 UID = 1;
270 int32 HitType = 2;
271 bool Spark = 3;
272 NVec2 BouncePos = 4;
273 NVec2 Pos = 5;
274 NVec2 Vel = 6;
275 bool HitSound = 7;
276 bool WallMark = 8;
277 }
278
279 message NRemoveBullet {
280 uint32 UID = 1;
281 }
282
283 message NGunReload {
284 int32 PlayerUID = 1;
285 string Gun = 2;
286 NVec2 Pos = 3;
287 int32 Direction = 4;
288 }
289
290 message NGunFire {
291 int32 ActorUID = 1;
292 string Gun = 2;
293 NVec2 MuzzlePos = 3;
294 int32 Z = 4;
295 float Angle = 5;
296 bool Sound = 6;
297 uint32 Flags = 7;
298 // Whether the shot was from a real player-gun, or a derived gun e.g. explode
299 bool IsGun = 8;
300 }
301
302 message NGunState {
303 uint32 ActorUID = 1;
304 int32 Barrel = 2;
305 int32 State = 3;
306 }
307
308 message NAddBullet {
309 uint32 UID = 1;
310 string BulletClass = 2;
311 NVec2 MuzzlePos = 3;
312 int32 MuzzleHeight = 4;
313 float Angle = 5;
314 int32 Elevation = 6;
315 uint32 Flags = 7;
316 int32 ActorUID = 8;
317 string Gun = 9;
318 }
319
320 message NTrigger {
321 uint32 ID = 1;
322 NVec2i Tile = 2;
323 }
324
325 message NExploreTiles {
326 // RLE explore tiles
327 message Run {
328 NVec2i Tile = 1;
329 int32 Run = 2;
330 }
331 repeated Run Runs = 1;
332 }
333
334 message NRescueCharacter {
335 uint32 UID = 1;
336 }
337
338 message NObjectiveUpdate {
339 uint32 ObjectiveId = 1;
340 int32 Count = 2;
341 }
342
343 message NAddKeys {
344 uint32 KeyFlags = 1;
345 NVec2 Pos = 2;
346 }
347
348 message NDoorToggle {
349 bool IsOpen = 1;
350 NVec2i Pos = 2;
351 }
352
353 message NMissionComplete {
354 bool ShowMsg = 1;
355 }
356
357 message NMissionEnd {
358 int32 Delay = 1;
359 bool IsQuit = 2;
360 string Msg = 3;
361 uint32 Mission = 4;
362 }