mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
Merge current upstream into random-reveal review continuation
Preserve SET_PLAYER_ORDER alongside REVEAL_RANDOM_CARDS in the shared command enum; retain current upstream source and the reviewed PlayerActions routing.
This commit is contained in:
commit
e32bd364bd
443 changed files with 15635 additions and 11767 deletions
|
|
@ -66,6 +66,7 @@ set(PROTO_FILES
|
|||
command_set_card_attr.proto
|
||||
command_set_card_counter.proto
|
||||
command_set_counter.proto
|
||||
command_set_player_order.proto
|
||||
command_set_playmat.proto
|
||||
command_set_sideboard_lock.proto
|
||||
command_set_sideboard_plan.proto
|
||||
|
|
@ -110,6 +111,7 @@ set(PROTO_FILES
|
|||
event_list_rooms.proto
|
||||
event_move_card.proto
|
||||
event_notify_user.proto
|
||||
event_player_order_changed.proto
|
||||
event_player_properties_changed.proto
|
||||
event_remove_from_list.proto
|
||||
event_remove_messages.proto
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
syntax = "proto2";
|
||||
import "game_commands.proto";
|
||||
message Command_SetPlayerOrder {
|
||||
extend GameCommand {
|
||||
optional Command_SetPlayerOrder ext = 1206;
|
||||
}
|
||||
|
||||
// The desired seating order, expressed as player names. Only used when
|
||||
// randomize is false.
|
||||
repeated string player_names = 1;
|
||||
|
||||
// When set, the server shuffles the seating order instead of using
|
||||
// player_names.
|
||||
optional bool randomize = 2;
|
||||
}
|
||||
|
|
@ -24,4 +24,9 @@ message Event_GameStateChanged {
|
|||
|
||||
// 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
syntax = "proto2";
|
||||
import "game_event.proto";
|
||||
message Event_PlayerOrderChanged {
|
||||
extend GameEvent {
|
||||
optional Event_PlayerOrderChanged ext = 2023;
|
||||
}
|
||||
|
||||
// The new seating order, expressed as player names.
|
||||
repeated string player_names = 1;
|
||||
|
||||
// Whether the order was obtained by randomizing rather than set explicitly.
|
||||
optional bool randomized = 2;
|
||||
}
|
||||
|
|
@ -181,6 +181,11 @@ message GameCommand {
|
|||
/// Client: reflected via player properties changed event
|
||||
SET_PLAYMAT = 1035;
|
||||
|
||||
/// Set the seating (turn) order of the players.
|
||||
/// Server: Server_AbstractParticipant::cmdSetPlayerOrder
|
||||
/// Client: reflected via Event_PlayerOrderChanged
|
||||
SET_PLAYER_ORDER = 1206;
|
||||
|
||||
/// Reveal a distinct random sample without exposing identities to other recipients.
|
||||
/// Server: Server_AbstractPlayer::cmdRevealCards
|
||||
/// Client: PlayerEventHandler::eventRevealCards
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ message GameEvent {
|
|||
CHANGE_ZONE_PROPERTIES = 2020;
|
||||
REVERSE_TURN = 2021;
|
||||
GAME_LOG_NOTICE = 2022;
|
||||
PLAYER_ORDER_CHANGED = 2023;
|
||||
}
|
||||
optional sint32 player_id = 1 [default = -1];
|
||||
extensions 100 to max;
|
||||
|
|
|
|||
|
|
@ -87,14 +87,16 @@ message Command_ViewLogHistory {
|
|||
extend DeveloperCommand {
|
||||
optional Command_ViewLogHistory dev_ext = 1001;
|
||||
}
|
||||
optional string user_name = 1; // user that created message
|
||||
optional string ip_address = 2; // ip address of user that created message
|
||||
optional string game_name = 3; // client id of user that created the message
|
||||
optional string game_id = 4; // game number the message was sent to
|
||||
optional string message = 5; // raw message that was sent
|
||||
repeated string log_location = 6; // destination of message (ex: main room, game room, private chat)
|
||||
required uint32 date_range = 7; // the length of time (in minutes) to look back for
|
||||
optional uint32 maximum_results = 8; // the maximum number of query results
|
||||
optional string user_name = 1; // user that created message
|
||||
optional string ip_address = 2; // ip address of user that created message
|
||||
optional string game_name = 3; // client id of user that created the message
|
||||
optional string game_id = 4; // game number the message was sent to
|
||||
optional string message = 5; // raw message that was sent
|
||||
repeated string log_location = 6; // destination of message (ex: main room, game room, private chat)
|
||||
required uint32 date_range = 7; // the length of time (in minutes) to look back for
|
||||
optional uint32 maximum_results = 8; // the maximum number of query results (page size when paginating)
|
||||
optional uint32 offset = 9 [default = 0]; // rows to skip for pagination, ORDER BY log_time DESC
|
||||
optional string before_time = 10; // page those rows against this `log_time` snapshot (newest first page row)
|
||||
}
|
||||
|
||||
message Command_GrantReplayAccess {
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ message Response_ViewLogHistory {
|
|||
optional Response_ViewLogHistory ext = 1015;
|
||||
}
|
||||
repeated ServerInfo_ChatMessage log_message = 1;
|
||||
optional bool has_more = 2 [default = false]; // true when more rows exist past this page
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ message Command_CreateGame {
|
|||
|
||||
// share decklists with all players when selected
|
||||
optional bool share_decklists_on_load = 14;
|
||||
|
||||
// shuffle the player order (seats) before each game starts
|
||||
optional bool shuffle_players = 15;
|
||||
}
|
||||
|
||||
message Command_JoinGame {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ message ServerInfo_Game {
|
|||
// decklists are sent to all players when loaded
|
||||
optional bool share_decklists_on_load = 15;
|
||||
|
||||
// players are shuffled into new seats before each game starts
|
||||
optional bool shuffle_players = 16;
|
||||
|
||||
// the current player count
|
||||
optional uint32 player_count = 30;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue