mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-23 23:23:55 -07:00
Add the ability to define starting life total during game creation. (#5174)
* Have the server respect gameType info when setting up zones. * ServerPlayer::setupZones is now passed the room->getGameTypes(); * ServerPlayer::setupZones now checks if the GameType String includes "Commander" and then sets the life total to 40 instead. * Formatting. * Remove debug logging imports. * Move game option value declarations to dlg_create_game. * Lint. * Fix mocks. * Add a default for backwards compatibility. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
17e6bfaca6
commit
03aff83135
11 changed files with 56 additions and 9 deletions
|
|
@ -66,6 +66,7 @@ private:
|
|||
bool spectatorsNeedPassword;
|
||||
bool spectatorsCanTalk;
|
||||
bool spectatorsSeeEverything;
|
||||
int startingLifeTotal;
|
||||
int inactivityCounter;
|
||||
int startTimeOfThisGame, secondsElapsed;
|
||||
bool firstGameStarted;
|
||||
|
|
@ -105,6 +106,7 @@ public:
|
|||
bool _spectatorsNeedPassword,
|
||||
bool _spectatorsCanTalk,
|
||||
bool _spectatorsSeeEverything,
|
||||
int startingLifeTotal,
|
||||
Server_Room *parent);
|
||||
~Server_Game();
|
||||
Server_Room *getRoom() const
|
||||
|
|
@ -162,6 +164,10 @@ public:
|
|||
{
|
||||
return spectatorsSeeEverything;
|
||||
}
|
||||
int getStartingLifeTotal() const
|
||||
{
|
||||
return startingLifeTotal;
|
||||
}
|
||||
Response::ResponseCode
|
||||
checkJoin(ServerInfo_User *user, const QString &_password, bool spectator, bool overrideRestrictions, bool asJudge);
|
||||
bool containsUser(const QString &userName) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue