Cockatrice/libcockatrice_protocol/libcockatrice/protocol/pb/event_game_state_changed.proto
Lukas Brübach a2657847ad [Protocol] Add shuffle players option and player order command/event
Adds a 'Shuffle players at start' option to game creation plus a local
player id on the game state so clients can reconcile seat changes, and a
SET_PLAYER_ORDER command (1206) with a PLAYER_ORDER_CHANGED event (2023)
so the game host can set or randomize the seating order.

Took 6 minutes
2026-11-02 21:22:16 +01:00

32 lines
1.1 KiB
Protocol Buffer

syntax = "proto2";
import "game_event.proto";
import "serverinfo_player.proto";
// Signals that the game state has changed.
// If a field is present in this message, it will overwrite the client's game state.
// Also used to provide the entire game state when joining a game.
message Event_GameStateChanged {
extend GameEvent {
optional Event_GameStateChanged ext = 1005;
}
// the list of players. Players contain their zones which contain all cards in the game
repeated ServerInfo_Player player_list = 1;
// if the game has started
optional bool game_started = 2;
// the player who is currently holding the turn
optional sint32 active_player_id = 3;
// the current phase
optional sint32 active_phase = 4;
// the amount of seconds since the game started
optional uint32 seconds_elapsed = 5;
// the id of the player this event is addressed to. Used to re-identify the
// local player after seats have been shuffled. Only set for events sent to
// a specific participant, never for omniscient/replay events.
optional sint32 local_player_id = 6;
}