[Game] Playmats (#7101)

* [Game] Playmats

Took 19 seconds

Took 1 minute

* [Playmats] Add fixed override and configurable fallbacks to settings.

Took 29 minutes

Took 43 seconds

* Add main to test.

Took 1 minute

Took 29 seconds

* Move settings to own group

Took 11 minutes

* Some attempts to refresh macOS compositor

Took 2 minutes

* Try something else

Took 17 minutes

* Don't manipulate live list

Took 11 minutes

* Change things about resolution, address comments.

Took 45 minutes

Took 12 minutes

* Comments.

Took 14 minutes

Took 8 seconds

* Re-order settings menu location

Took 2 minutes

* Rename PlaymatResolution to Info and add enums

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-08-21 10:40:49 +02:00 committed by GitHub
parent 74a454552a
commit 9eafd90a91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 1931 additions and 28 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,4 +20,5 @@ message ServerInfo_PlayerProperties {
optional sint32 ping_seconds = 7;
optional bool sideboard_locked = 8;
optional bool judge = 9;
optional PlaymatParams playmat_params = 10;
}