mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[Game] Add Command Zone support with commander tax tracking
- Add CommandZone and CommandZoneLogic for commander - Add CommanderTaxCounter - Add counter active state protocol (show/hide tax counters) - Add "Enable Command Zone" option in game creation dialogs - Add context menu actions for command zone operations Took 9 minutes Took 11 minutes
This commit is contained in:
parent
a5f43c08fa
commit
6ea68c3f58
71 changed files with 1519 additions and 52 deletions
|
|
@ -70,6 +70,11 @@ bool GameSettings::getRememberGameSettings() const
|
|||
return getValue("rememberGameSettings", "game", QString(), true).toBool();
|
||||
}
|
||||
|
||||
bool GameSettings::getEnableCommandZone() const
|
||||
{
|
||||
return getValue("enablecommandzone", "game").toBool();
|
||||
}
|
||||
|
||||
bool GameSettings::getLocalGameRememberSettings() const
|
||||
{
|
||||
return getValue("rememberSettings", "localgameoptions").toBool();
|
||||
|
|
@ -85,6 +90,11 @@ int GameSettings::getLocalGameStartingLifeTotal() const
|
|||
return getValue("startingLifeTotal", "localgameoptions", QString(), 20).toInt();
|
||||
}
|
||||
|
||||
bool GameSettings::getLocalGameEnableCommandZone() const
|
||||
{
|
||||
return getValue("enablecommandzone", "localgameoptions").toBool();
|
||||
}
|
||||
|
||||
void GameSettings::setGameDescription(const QString &_gameDescription)
|
||||
{
|
||||
setValue(_gameDescription, "gameDescription", "game");
|
||||
|
|
@ -150,6 +160,11 @@ void GameSettings::setRememberGameSettings(bool _rememberGameSettings)
|
|||
setValue(_rememberGameSettings, "rememberGameSettings", "game");
|
||||
}
|
||||
|
||||
void GameSettings::setEnableCommandZone(bool _enableCommandZone)
|
||||
{
|
||||
setValue(_enableCommandZone, "enablecommandzone", "game");
|
||||
}
|
||||
|
||||
void GameSettings::setLocalGameRememberSettings(bool value)
|
||||
{
|
||||
setValue(value, "rememberSettings", "localgameoptions");
|
||||
|
|
@ -164,3 +179,8 @@ void GameSettings::setLocalGameStartingLifeTotal(int value)
|
|||
{
|
||||
setValue(value, "startingLifeTotal", "localgameoptions");
|
||||
}
|
||||
|
||||
void GameSettings::setLocalGameEnableCommandZone(bool value)
|
||||
{
|
||||
setValue(value, "enablecommandzone", "localgameoptions");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@ public:
|
|||
[[nodiscard]] int getDefaultStartingLifeTotal() const override;
|
||||
[[nodiscard]] bool getShareDecklistsOnLoad() const override;
|
||||
[[nodiscard]] bool getRememberGameSettings() const override;
|
||||
[[nodiscard]] bool getEnableCommandZone() const override;
|
||||
[[nodiscard]] bool getLocalGameRememberSettings() const override;
|
||||
[[nodiscard]] int getLocalGameMaxPlayers() const override;
|
||||
[[nodiscard]] int getLocalGameStartingLifeTotal() const override;
|
||||
[[nodiscard]] bool getLocalGameEnableCommandZone() const override;
|
||||
|
||||
void setGameDescription(const QString &_gameDescription);
|
||||
void setMaxPlayers(int _maxPlayers);
|
||||
|
|
@ -41,9 +43,11 @@ public:
|
|||
void setDefaultStartingLifeTotal(int _defaultStartingLifeTotal);
|
||||
void setShareDecklistsOnLoad(bool _shareDecklistsOnLoad);
|
||||
void setRememberGameSettings(bool _rememberGameSettings);
|
||||
void setEnableCommandZone(bool _enableCommandZone);
|
||||
void setLocalGameRememberSettings(bool value);
|
||||
void setLocalGameMaxPlayers(int value);
|
||||
void setLocalGameStartingLifeTotal(int value);
|
||||
void setLocalGameEnableCommandZone(bool value);
|
||||
|
||||
public:
|
||||
explicit GameSettings(const QString &settingPath, QObject *parent = nullptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue