Commit graph

6 commits

Author SHA1 Message Date
DawnFire42
be5c989214
Resolve PlayerActions at call time instead of capturing at construction 2026-06-19 11:00:56 -04:00
DawnFire42
57fc10dc02
Fix command zone menu showing Minimize even when zone is already minimized 2026-06-19 11:00:56 -04:00
DawnFire42
be9b4137d7
Code cleanup
- Add missing isCommandZoneCounterBlocked check to cmdSetCounterActive
  - Revert accidental deck view layout change from b4057a86
  - Fix duplicate @param in playSelectedCardsImpl doc
  - Add null check for PlayerLogic in CommandZoneMenu constructor
  - Add index bounds check in CommandZone handleDropEvent
  - Add index bounds check in StackZone handleDropEvent
  - Add ownership comment for tax counter widget creation
  - Add command zone to zoneGraphicsItems map
  - Conditionally show command zone menu item based on server support
  - Remove layer-violating includes from player_logic.cpp
  - Fix tax counter increment (1 per cast, not 2)
  - Add getTaxCounterIfActive() helper to PlayerGraphicsItem
2026-06-19 11:00:55 -04:00
DawnFire42
07229c85bf
Fix Command Zone graphics/logic layers separation
1. CommandZoneMenu: Changed to take PlayerGraphicsItem* instead of
     PlayerLogic*, accessing logic via player->getLogic()

  2. Removed getCounterWidget() from PlayerLogic;
     method already exists correctly in PlayerGraphicsItem

  3. PlayerMenu: CommandZoneMenu, fixed signal
     connection to use player->getLogic() for commandZoneSupportChanged

  4. AbstractCounter: Connects to CounterState::activeChanged signal,
     removing direct graphics calls from PlayerEventHandler

  5. CommandZone: Explicit tax counter registration via registerTaxCounter()
     with auto-cleanup, replacing childItems()/dynamic_cast iteration

  Also fixed PlayerActions to query CounterState instead of AbstractCounter
  for proper layer separation.
2026-06-19 11:00:54 -04:00
Lukas Brübach
8447c73ec5
Adjust to rebase.
Took 28 minutes

Took 7 seconds

Took 2 minutes

Took 8 minutes

Took 13 seconds
2026-06-19 11:00:54 -04:00
DawnFire42
75d59e2d82
[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
2026-06-19 11:00:49 -04:00