This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
messages.proto
700 lines (572 loc) · 16.4 KB
/
messages.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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
package NT;
syntax = "proto3";
message Envelope {
oneof kind {
GameAction game_action = 0;
LobbyAction lobby_action = 50;
}
}
message GameAction {
oneof action {
ClientPlayerMove c_player_move = 0;
ServerPlayerMove s_player_move = 1;
ClientPlayerUpdate c_player_update = 2;
ServerPlayerUpdate s_player_update = 3;
ClientPlayerUpdateInventory c_player_update_inventory = 4;
ServerPlayerUpdateInventory s_player_update_inventory = 5;
ClientHostItemBank c_host_item_bank = 6;
ServerHostItemBank s_host_item_bank = 7;
ClientHostUserTake c_host_user_take = 8;
ServerHostUserTake s_host_user_take = 9;
ClientHostUserTakeGold c_host_user_take_gold = 10;
ServerHostUserTakeGold s_host_user_take_gold = 11;
ClientPlayerAddGold c_player_add_gold = 12;
ServerPlayerAddGold s_player_add_gold = 13;
ClientPlayerTakeGold c_player_take_gold = 14;
ServerPlayerTakeGold s_player_take_gold = 15;
ClientPlayerAddItem c_player_add_item = 16;
ServerPlayerAddItem s_player_add_item = 17;
ClientPlayerTakeItem c_player_take_item = 18;
ServerPlayerTakeItem s_player_take_item = 19;
ClientPlayerPickup c_player_pickup = 20;
ServerPlayerPickup s_player_pickup = 21;
ClientNemesisAbility c_nemesis_ability = 22;
ServerNemesisAbility s_nemesis_ability = 23;
ClientNemesisPickupItem c_nemesis_pickup_item = 24;
ServerNemesisPickupItem s_nemesis_pickup_item = 25;
ClientChat c_chat = 26;
ServerChat s_chat = 27;
ClientPlayerDeath c_player_death = 28;
ServerPlayerDeath s_player_death = 29;
ClientPlayerNewGamePlus c_player_new_game_plus = 30;
ServerPlayerNewGamePlus s_player_new_game_plus = 31;
ClientPlayerSecretHourglass c_player_secret_hourglass = 32;
ServerPlayerSecretHourglass S_player_secret_hourglass = 33;
ClientCustomModEvent c_custom_mod_event = 34;
ServerCustomModEvent s_custom_mod_event = 35;
ClientRespawnPenalty c_respawn_penalty = 36;
ServerRespawnPenalty s_respawn_penalty = 37;
ClientAngerySteve c_angery_steve = 38;
ServerAngerySteve s_angery_steve = 39;
ServerPlayerPos s_player_pos = 40;
}
}
message PlayerFrame {
optional float x = 1;
optional float y = 2;
optional float arm_r = 3;
optional float arm_scale_y = 4;
optional float scale_x = 5;
optional int32 anim = 6;
optional int32 held = 7;
}
message ServerPlayerPos {
required string user_id = 0;
required float x = 1;
required float y = 2;
}
message ClientPlayerMove {
repeated PlayerFrame frames = 1;
}
message ServerPlayerMove {
required string user_id = 0;
repeated PlayerFrame frames = 1;
}
message ClientPlayerUpdate {
optional float cur_hp = 1;
optional float max_hp = 2;
optional string location = 3;
optional bool sampo = 4;
}
message ServerPlayerUpdate {
required string user_id = 0;
optional float cur_hp = 1;
optional float max_hp = 2;
optional string location = 3;
optional bool sampo = 4;
}
message ClientPlayerUpdateInventory {
repeated InventoryWand wands = 0;
repeated InventoryItem items = 1;
repeated InventorySpell spells = 2;
message InventoryWand {
required uint32 index = 0;
required Wand wand = 1;
}
message InventoryItem {
required uint32 index = 0;
required Item item = 1;
}
message InventorySpell {
required uint32 index = 0;
required Spell spell = 1;
}
}
message ServerPlayerUpdateInventory {
required string user_id = 0;
repeated InventoryWand wands = 1;
repeated InventoryItem items = 2;
repeated InventorySpell spells = 3;
message InventoryWand {
required uint32 index = 0;
required Wand wand = 1;
}
message InventoryItem {
required uint32 index = 0;
required Item item = 1;
}
message InventorySpell {
required uint32 index = 0;
required Spell spell = 1;
}
}
message ClientHostItemBank {
repeated Wand wands = 1;
repeated Spell spells = 2;
repeated Item items = 3;
uint32 gold = 4;
repeated EntityItem objects = 5;
}
message ServerHostItemBank {
repeated Wand wands = 1;
repeated Spell spells = 2;
repeated Item items = 3;
uint32 gold = 4;
repeated EntityItem objects = 5;
}
message ClientHostUserTake {
required string user_id = 0;
required string id = 1;
required bool success = 2;
}
message ServerHostUserTake {
required string user_id = 0;
required string id = 1;
required bool success = 2;
}
message ClientHostUserTakeGold {
required string user_id = 0;
required uint32 amount = 1;
required bool success = 2;
}
message ServerHostUserTakeGold {
required string user_id = 0;
required uint32 amount = 1;
required bool success = 2;
}
message ClientPlayerAddGold {
required uint32 amount = 0;
}
message ServerPlayerAddGold {
required string user_id = 0;
required uint32 amount = 1;
}
message ClientPlayerTakeGold {
required uint32 amount = 0;
}
message ServerPlayerTakeGold {
required string user_id = 0;
required uint32 amount = 1;
}
message ClientPlayerAddItem {
oneof item {
Spells spells = 0;
Wands wands = 1;
Items flasks = 2;
Entities objects = 3;
}
message Spells {
repeated Spell list = 0;
}
message Wands {
repeated Wand list = 0;
}
message Items {
repeated Item list = 0;
}
message Entities {
repeated EntityItem list = 0;
}
}
message ServerPlayerAddItem {
required string user_id = 0;
oneof item {
Spells spells = 1;
Wands wands = 2;
Items flasks = 3;
Entities objects = 4;
}
message Spells {
repeated Spell list = 0;
}
message Wands {
repeated Wand list = 0;
}
message Items {
repeated Item list = 0;
}
message Entities {
repeated EntityItem list = 0;
}
}
message ClientPlayerTakeItem {
required string id = 0;
}
message ServerPlayerTakeItem {
required string user_id = 0;
required string id = 1;
}
message ClientChat {
required string message = 0;
}
message ServerChat {
required string id = 0;
required string user_id = 1;
required string name = 2;
required string message = 3;
}
message ClientPlayerPickup {
oneof kind {
HeartPickup heart = 0;
OrbPickup orb = 1;
}
message HeartPickup {
required bool hp_perk = 0;
}
message OrbPickup {
required uint32 id = 0;
}
}
message ServerPlayerPickup {
string user_id = 0;
oneof kind {
HeartPickup heart = 1;
OrbPickup orb = 2;
}
message HeartPickup {
required bool hp_perk = 0;
}
message OrbPickup {
required uint32 id = 0;
}
}
message ClientNemesisPickupItem {
required string game_id = 0;
}
message ServerNemesisPickupItem {
required string user_id = 0;
required string game_id = 1;
}
message ClientNemesisAbility {
required string game_id = 0;
}
message ServerNemesisAbility {
required string user_id = 0;
required string game_id = 1;
}
message ClientPlayerDeath {
required bool is_win = 0;
optional uint32 game_time = 1;
}
message ServerPlayerDeath {
required string user_id = 0;
required bool is_win = 1;
optional uint32 game_time = 2;
}
message ClientPlayerNewGamePlus {
required uint32 amount = 0;
}
message ServerPlayerNewGamePlus {
string user_id = 0;
required uint32 amount = 1;
}
message ClientPlayerSecretHourglass {
required string material = 1;
}
message ServerPlayerSecretHourglass {
required string user_id = 0;
required string material = 1;
}
message ClientCustomModEvent {
required string payload = 0;
}
message ServerCustomModEvent {
required string user_id = 0;
required string payload = 1;
}
message ClientRespawnPenalty {
required uint32 deaths = 0;
}
message ServerRespawnPenalty {
required string user_id = 0;
required uint32 deaths = 1;
}
message ClientAngerySteve {
required bool idk = 0;
}
message ServerAngerySteve {
required string user_id = 0;
}
message Wand {
required string id = 0;
WandStats stats = 1;
repeated Spell always_cast = 2;
repeated Spell deck = 3;
optional string sent_by = 4;
optional string contributed_by = 5;
message WandStats {
required string sprite = 0;
required bool named = 1;
required string ui_name = 2;
required float mana_max = 3;
required float mana_charge_speed = 4;
required int32 reload_time = 5;
required uint32 actions_per_round = 6;
required uint32 deck_capacity = 7;
required bool shuffle_deck_when_empty = 8;
required float spread_degrees = 9;
required float speed_multiplier = 10;
required int32 fire_rate_wait = 11;
required float tip_x = 12;
required float tip_y = 13;
required float grip_x = 14;
required float grip_y = 15;
}
}
message Spell {
required string id = 0;
required string game_id = 1;
optional string sent_by = 2;
optional string contributed_by = 3;
required int32 uses_remaining = 4;
}
message Item {
required string id = 0;
required Color color = 1;
repeated Material content = 2;
optional string sent_by = 3;
optional string contributed_by = 4;
required bool is_chest = 5;
message Color {
required float r = 0;
required float g = 1;
required float b = 2;
}
message Material {
required uint32 id = 0;
required uint32 amount = 1;
}
}
message EntityItem {
required string id = 0;
required string path = 1;
required string sprite = 2;
optional string sent_by = 3;
}
message LobbyAction {
oneof action {
ClientRoomCreate c_room_create = 0;
ServerRoomCreated s_room_created = 1;
ServerRoomCreateFailed s_room_create_failed = 2;
ClientRoomUpdate c_room_update = 3;
ServerRoomUpdated s_room_updated = 4;
ServerRoomUpdateFailed s_room_update_failed = 5;
ClientRoomFlagsUpdate c_room_flags_update = 6;
ServerRoomFlagsUpdated s_room_flags_updated = 7;
ServerRoomFlagsUpdateFailed s_room_flags_update_failed = 8;
ClientRoomDelete c_room_delete = 9;
ServerRoomDeleted s_room_deleted = 10;
ClientJoinRoom c_join_room = 11;
ServerJoinRoomSuccess s_join_room_success = 12;
ServerJoinRoomFailed s_join_room_failed = 13;
ServerUserJoinedRoom s_user_joined_room = 14;
ClientLeaveRoom c_leave_room = 15;
ServerUserLeftRoom s_user_left_room = 16;
ClientKickUser c_kick_user = 17;
ServerUserKicked s_user_kicked = 18;
ClientBanUser c_ban_user = 19;
ServerUserBanned s_user_banned = 20;
ClientReadyState c_ready_state = 21;
ServerUserReadyState s_user_ready_state = 22;
ClientStartRun c_start_run = 23;
ServerHostStart s_host_start = 24;
ClientRequestRoomList c_request_room_list = 26;
ServerRoomList s_room_list = 27;
ServerDisconnected s_disconnected = 30;
ServerRoomAddToList s_room_add_to_list = 31;
ClientRunOver c_run_over = 32;
}
}
message ClientRunOver {
optional bool idk = 1;
}
message ServerDisconnected {
string reason = 0;
}
message ClientRoomDelete {
required string id = 0;
}
message ServerRoomDeleted {
required string id = 0;
}
message ClientRoomCreate {
required string name = 0;
required uint32 gamemode = 1;
required uint32 max_users = 2;
optional string password = 3;
}
message ServerRoomCreated {
required string id = 0;
required string name = 1;
required uint32 gamemode = 2;
required uint32 max_users = 3;
optional string password = 4;
required bool locked = 5;
repeated User users = 6;
message User {
required string user_id = 0;
required string name = 1;
required bool ready = 2;
required bool owner = 3;
}
}
message ServerRoomCreateFailed {
string reason = 0;
}
message ClientRoomUpdate {
optional string name = 1;
optional uint32 gamemode = 2;
optional uint32 max_users = 3;
optional string password = 4;
optional bool locked = 5;
}
message ServerRoomUpdated {
optional string name = 1;
optional uint32 gamemode = 2;
optional uint32 max_users = 3;
optional string password = 4;
optional bool locked = 5;
}
message ServerRoomUpdateFailed{
string reason = 0;
}
message ClientRoomFlagsUpdate {
repeated GameFlag flags = 0;
message GameFlag {
required string flag = 0;
optional int32 int_val = 1;
optional string str_val = 2;
optional float float_val = 3;
optional bool bool_val = 4;
optional uint32 u_int_val = 5;
}
}
message ServerRoomFlagsUpdated {
repeated GameFlag flags = 0;
message GameFlag {
required string flag = 0;
optional int32 int_val = 1;
optional string str_val = 2;
optional float float_val = 3;
optional bool bool_val = 4;
optional uint32 u_int_val = 5;
}
}
message ServerRoomFlagsUpdateFailed {
string reason = 0;
}
message ClientJoinRoom {
required string id = 0;
optional string password = 1;
}
message ServerJoinRoomSuccess {
required string id = 0;
required string name = 1;
required uint32 gamemode = 2;
required uint32 max_users = 3;
optional string password = 4;
required bool locked = 5;
repeated User users = 6;
message User {
required string user_id = 0;
required string name = 1;
required bool ready = 2;
required bool owner = 3;
}
}
message ServerJoinRoomFailed {
string reason = 0;
}
message ServerUserJoinedRoom {
required string user_id = 1;
required string name = 2;
}
message ClientLeaveRoom {
required string user_id = 1; //should be empty msg
}
message ServerUserLeftRoom {
required string user_id = 1;
}
message ClientKickUser {
required string user_id = 1;
}
message ServerUserKicked {
required string user_id = 1;
}
message ClientBanUser {
required string user_id = 1;
}
message ServerUserBanned {
required string user_id = 1;
}
message ClientReadyState {
required bool ready = 0;
optional string seed = 1;
repeated string mods = 2;
optional string version = 3;
optional bool beta = 4;
}
message ServerUserReadyState {
required string user_id = 0;
required bool ready = 1;
optional string seed = 2;
repeated string mods = 3;
optional string version = 4;
optional bool beta = 5;
}
message ClientStartRun {
required bool forced = 0;
}
message ServerHostStart {
required bool forced = 0;
}
message ClientRequestRoomList {
required uint32 page = 0;
}
message ServerRoomList {
repeated Room rooms = 0;
optional uint32 pages = 1;
message Room {
required string id = 0;
required string name = 1;
required uint32 gamemode = 2;
required uint32 cur_users = 3;
required uint32 max_users = 4;
required bool protected = 5;
required string owner = 6;
required bool locked = 7;
}
}
message ServerRoomAddToList {
required Room room = 0;
message Room {
required string id = 0;
required string name = 1;
required uint32 gamemode = 2;
required uint32 cur_users = 3;
required uint32 max_users = 4;
required bool protected = 5;
required string owner = 6;
required bool locked = 7;
}
}