Change things about resolution, address comments.

Took 45 minutes

Took 12 minutes
This commit is contained in:
Lukas Brübach 2026-08-17 21:37:50 +02:00
parent cb8fe8305e
commit 80d44da729
36 changed files with 393 additions and 413 deletions

View file

@ -46,6 +46,7 @@ set(PROTO_FILES
command_set_card_attr.proto
command_set_card_counter.proto
command_set_counter.proto
command_set_playmat.proto
command_set_sideboard_lock.proto
command_set_sideboard_plan.proto
command_shuffle.proto

View file

@ -0,0 +1,9 @@
syntax = "proto2";
import "game_commands.proto";
import "serverinfo_playerproperties.proto";
message Command_SetPlaymat {
extend GameCommand {
optional Command_SetPlaymat ext = 1035;
}
optional ServerInfo_PlayerProperties.PlaymatParams playmat_params = 1;
}

View file

@ -175,6 +175,11 @@ message GameCommand {
/// Server: Server_Player::cmdReverseTurn
/// Client: reflected via subsequent turn events
REVERSE_TURN = 1034;
/// Set the player's playmat independently of the deck.
/// Server: Server_Player::cmdSetPlaymat
/// Client: reflected via player properties changed event
SET_PLAYMAT = 1035;
}
extensions 100 to max;

View file

@ -2,6 +2,15 @@ syntax = "proto2";
import "serverinfo_user.proto";
message ServerInfo_PlayerProperties {
message PlaymatParams {
optional string card_name = 1;
optional string card_provider_id = 2;
optional double margin_pct_l = 3 [default = 0.07];
optional double margin_pct_r = 4 [default = 0.07];
optional double vertical_offset = 5 [default = 0.33];
optional double zoom = 6 [default = 1.0];
}
optional sint32 player_id = 1;
optional ServerInfo_User user_info = 2;
optional bool spectator = 3;
@ -11,10 +20,5 @@ message ServerInfo_PlayerProperties {
optional sint32 ping_seconds = 7;
optional bool sideboard_locked = 8;
optional bool judge = 9;
optional string playmat_card_name = 10;
optional string playmat_card_provider_id = 11;
optional double playmat_margin_pct_l = 12 [default = 0.07];
optional double playmat_margin_pct_r = 13 [default = 0.07];
optional double playmat_vertical_offset = 14 [default = 0.33];
optional double playmat_zoom = 15 [default = 1.0];
optional PlaymatParams playmat_params = 10;
}