mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-28 05:33:46 -08:00
Add option to share decklists on load. (#6029)
* Add option to share decklists on load. Took 1 hour 58 minutes Took 9 minutes Took 39 minutes * Lint. Took 14 minutes Took 2 minutes * Stuffs Took 39 minutes Took 4 seconds Took 43 minutes * Process local player first. Took 45 minutes * Consider if the setting is set on the game info first. Took 4 minutes * Save an indent level. Took 43 seconds * Don't commit logging config. Took 3 minutes * Remove a debug print. Took 10 seconds Took 7 seconds * Add another optional guard. Took 5 minutes * Hide the tab bar if only one (own deck) is visible. Took 9 minutes * Rename setting label for clarity Took 2 minutes * Capitalization. Took 3 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
@@ -818,6 +818,8 @@ Server_ProtocolHandler::cmdCreateGame(const Command_CreateGame &cmd, Server_Room
|
||||
QString description = nameFromStdString(cmd.description());
|
||||
int startingLifeTotal = cmd.has_starting_life_total() ? cmd.starting_life_total() : 20;
|
||||
|
||||
bool shareDecklistsOnLoad = cmd.has_share_decklists_on_load() ? cmd.share_decklists_on_load() : false;
|
||||
|
||||
const int gameId = databaseInterface->getNextGameId();
|
||||
if (gameId == -1) {
|
||||
return Response::RespInternalError;
|
||||
@@ -828,7 +830,7 @@ Server_ProtocolHandler::cmdCreateGame(const Command_CreateGame &cmd, Server_Room
|
||||
Server_Game *game = new Server_Game(
|
||||
copyUserInfo(false), gameId, description, QString::fromStdString(cmd.password()), cmd.max_players(), gameTypes,
|
||||
cmd.only_buddies(), onlyRegisteredUsers, cmd.spectators_allowed(), cmd.spectators_need_password(),
|
||||
cmd.spectators_can_talk(), cmd.spectators_see_everything(), startingLifeTotal, room);
|
||||
cmd.spectators_can_talk(), cmd.spectators_see_everything(), startingLifeTotal, shareDecklistsOnLoad, room);
|
||||
|
||||
game->addPlayer(this, rc, asSpectator, asJudge, false);
|
||||
room->addGame(game);
|
||||
|
||||
Reference in New Issue
Block a user