goonserver/actions/actions.proto

44 lines
750 B
Protocol Buffer
Raw Normal View History

2024-10-10 10:15:52 +02:00
syntax = "proto3";
package actions;
2024-10-10 10:52:35 +02:00
option go_package = "gitea.boner.be/bdnugget/goonserver/actions";
2024-10-10 10:15:52 +02:00
message Action {
enum ActionType {
MOVE = 0;
2025-01-13 13:23:05 +01:00
CHAT = 1;
2024-10-10 10:15:52 +02:00
}
ActionType type = 1;
int32 x = 2;
int32 y = 3;
2024-10-10 11:42:36 +02:00
int32 player_id = 4;
2025-01-13 13:23:05 +01:00
string chat_message = 5;
2024-10-10 11:42:36 +02:00
}
message ActionBatch {
int32 player_id = 1;
repeated Action actions = 2;
int64 tick = 3;
2024-10-11 21:53:20 +02:00
}
message PlayerState {
2024-10-10 11:42:36 +02:00
int32 player_id = 1;
2024-10-11 21:53:20 +02:00
int32 x = 2;
int32 y = 3;
2024-10-10 10:15:52 +02:00
}
2025-01-13 13:23:05 +01:00
message ChatMessage {
int32 player_id = 1;
string content = 2;
int64 timestamp = 3;
}
message ServerMessage {
int32 player_id = 1;
repeated PlayerState players = 2;
int64 current_tick = 3;
2025-01-13 13:23:05 +01:00
repeated ChatMessage chat_messages = 4;
}