Commit graph

3 commits

Author SHA1 Message Date
DawnFire42
240ca7029f
Refine command zone counters and unify counter clamp arithmetic
- Route value updates through the virtual setValue() so
      CommanderTaxCounter's tooltip tracks the live value instead of
      freezing at its initial value
    - Reject deletion of reserved tax counters in cmdDelCounter; they are
      server-managed and must persist for the game
    - Register aMoveToCommandZone and aViewCommandZone as bindable
      shortcuts, matching their sibling move/view zone actions
    - Extract overflow-safe clamped addition into addClamped(), shared by
      Server_Card and Server_Counter instead of duplicated
    - Update stale comments: the clip-container note (now used by
      CommandZone) and CommandZone's layout docs (defer to
      SelectZone::layoutCardsVertically)
2026-06-19 11:00:58 -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
Renamed from cockatrice/src/game/zones/command_zone.h (Browse further)