[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:
DawnFire42 2026-05-21 21:30:40 -04:00
parent a5f43c08fa
commit 6ea68c3f58
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
71 changed files with 1519 additions and 52 deletions

View file

@ -10,7 +10,13 @@ class CounterState : public QObject
{
Q_OBJECT
public:
CounterState(int id, const QString &name, const QColor &color, int radius, int value, QObject *parent = nullptr);
CounterState(int id,
const QString &name,
const QColor &color,
int radius,
int value,
bool active = true,
QObject *parent = nullptr);
static CounterState *fromProto(const ServerInfo_Counter &counter, QObject *parent = nullptr);
@ -34,11 +40,17 @@ public:
{
return value;
}
bool isActive() const
{
return active;
}
void setValue(int newValue);
void setActive(bool newActive);
signals:
void valueChanged(int oldValue, int newValue);
void activeChanged(bool newActive);
private:
int id;
@ -46,6 +58,7 @@ private:
QColor color;
int radius;
int value;
bool active;
};
#endif // COCKATRICE_COUNTER_STATE_H