Commit graph

3871 commits

Author SHA1 Message Date
DawnFire42
f5e49a571e
Refactor tax counters into cast counts with separate ID space and user activated create/delete 2026-08-10 23:20:03 -04:00
DawnFire42
4354191918
Generalize tax counters to 5 sequential slots with server-enforced ordering 2026-08-10 20:04:51 -04:00
DawnFire42
876a14758e
Connect tax counter state signals to menu 2026-08-10 19:35:59 -04:00
DawnFire42
314b56d176
Use ID checks instead of name checks for tax counter validation in player actions 2026-08-10 19:27:03 -04:00
DawnFire42
4d972f4df5
Create command zone conditionally based on game setting 2026-08-10 18:53:40 -04:00
DawnFire42
cf9a4e9a02
Remove explicit z-value from command zone like other zones 2026-08-10 18:33:34 -04:00
DawnFire42
1f5df5b0e1
Remove unnecessary View command zone action 2026-08-10 18:33:33 -04:00
DawnFire42
4aa430abd0
Option to remove commander tax disappear when partner tax in use 2026-08-10 18:33:32 -04:00
DawnFire42
1e2c7737d0
Remove explicit ArrowCursor from CommanderTaxCounter for consistent UX 2026-08-10 18:33:32 -04:00
DawnFire42
c8ed9835bd
extract getOverlayColor() to AbstractCounter for shared fill+hover styling and Use server-provided color and radius for tax counters 2026-08-10 18:33:31 -04:00
DawnFire42
eeae205f51
Removed unintended stack zone minimum clamping 2026-08-10 18:33:31 -04:00
DawnFire42
529a1f94c4
Remove redundant rearrangeCounters call from rearrangeZones to eliminate re-entrancy 2026-08-10 18:33:31 -04:00
DawnFire42
36c4c5aa51
Parent MoveMenu to CardMenu to fix memory leak on menu rebuild 2026-08-10 18:33:30 -04:00
DawnFire42
e881c3f437
Replace direct emit of PlayerLogic signal with requestRearrangeCounters slot call 2026-08-10 18:33:30 -04:00
DawnFire42
7b135fe10c
Add active guard to counter mousePressEvent 2026-08-10 18:33:29 -04:00
DawnFire42
e889e2dff5
Route tax counters by reserved ID instead of name to mirror other counters and avoid issues 2026-08-10 18:33:29 -04:00
DawnFire42
b688405af3
Removed unnecessary check to prevent cards from moving to the same position 2026-08-10 18:33:29 -04:00
DawnFire42
f28ceca1de
Unified fix to allow cards to be dropped correctly in vertical stacked zones without requiring cross-zone special case 2026-08-10 18:33:28 -04:00
DawnFire42
bb2afaadd1
Command zone fixed arrow from owner of the zone 2026-08-10 18:33:28 -04:00
DawnFire42
d0df70e68f
Fix stale documentation and align doc comments with CONTRIBUTING guidelines 2026-08-10 18:33:27 -04:00
DawnFire42
1ba839ca20
Add command zone visibility and filtering to game lobby 2026-08-10 18:33:27 -04:00
DawnFire42
127d8a5f5a
convert commandzone theme assets to JPG like the other zones 2026-08-10 18:32:35 -04:00
DawnFire42
7f4abbdee0
Use guarded qFuzzyCompare idiom in CommandZone to match StackZone 2026-08-10 18:32:35 -04:00
DawnFire42
3f2bac9b57
Add name validation to tax counter actions to guard against ID collision with old servers 2026-08-10 18:32:34 -04:00
DawnFire42
08ec0cc5ee
Remove inactive counters submenus from the player counters menu 2026-08-10 18:32:34 -04:00
DawnFire42
0df638f231
adjust to rebase 2026-08-10 18:32:33 -04:00
DawnFire42
02f1a2091c
Move command zone checkbox to its own row in game creation dialog 2026-08-10 18:32:33 -04:00
DawnFire42
7a092677c7
Optimize setMinimumHeight to skip geometry updates when effective height unchanged 2026-08-10 18:32:32 -04:00
DawnFire42
d42b7c8003
Fix command zone tax counter position after counter re-sync 2026-08-10 18:32:32 -04:00
DawnFire42
aed13a242d
Gate commander tax increment on server-accepted move 2026-08-10 18:32:31 -04:00
DawnFire42
e4d50cf731
Fix use-after-free in CommandZone teardown by disconnecting signals before member destruction 2026-08-10 18:32:31 -04:00
DawnFire42
e84d2fb3a1
added missing shortcut registration 2026-08-10 18:32:30 -04:00
DawnFire42
31b157009c
removed stale include 2026-08-10 18:32:29 -04:00
DawnFire42
c56cbd2b52
Added command zone test 2026-08-10 18:32:29 -04:00
DawnFire42
5d2f9eb68f
Added shortcuts registration with empty default 2026-08-10 18:32:28 -04:00
DawnFire42
ae5d8d37c3
rebase fix 2026-08-10 18:32:28 -04:00
DawnFire42
209306440e
Wire command zone menu, harden counter command handling, and expand tests
- Connect aMoveToCommandZone to cmMoveToCommandZone; the menu item was
    added, shown, and shortcut-bound but never wired, so it did nothing
  - Extract evaluateModifyCounter() and route cmdIncCounter/cmdSetCounter
    through it, replacing isCommandZoneCounterBlocked; reject inc/set on
    an inactive tax counter so a hidden counter cannot accumulate value
  - Reject reserved tax counter names in cmdCreateCounter to prevent a
    client from spoofing a system tax counter via a user-created counter
  - Route AbstractCounter::valueChanged through the virtual setValue() so
    CommanderTaxCounter clamps and refreshes its tooltip on value changes
  - Deduplicate actPlayAndIncreaseTax/actPlayAndIncreasePartnerTax into a
    single playAndIncreaseTax(counterId) helper
  - Move MINIMUM_STACKING_HEIGHT from CommandZone to the PlayerGraphicsItem
    layout code, its only consumer
  - Remove unused AbstractCounter forward declaration from player_logic.h
  - Add EvaluateModifyCounter tests and PartnerTax cases for
    evaluateSetCounterActive
  - Pin the FirstUserId floor in new_counter_id_test using ids 3 and 5 so
    a naive "highest id + 1" regression fails the test
2026-08-10 18:32:27 -04:00
DawnFire42
0117047a18
Sync command zone visibility on construction and reflow stack on height change
- Sync command zone visibility in the PlayerGraphicsItem constructor in case processPlayerInfo runs before the signal is connected.
    - Emit CommandZone::effectiveHeightChanged() when a minimized zone's height changes so the stack zone repositions.
2026-08-10 18:32:26 -04:00
DawnFire42
68a5953c4f
Hide 'increase tax' play actions on multi-card selection 2026-08-10 18:32:26 -04:00
DawnFire42
f0f255f4d6
Reconcile tax counter visibility ownership and harden tax log formatting
- Make AbstractCounter::setActive() the sole owner of counter visibility; document the contract.
  - Drop the redundant setVisible() from CommandZone::rearrangeTaxCounters(); it now only lays out by isActive().
  - Format tax log lines with a single atomic 4-arg arg() instead of mixing string and int overloads.
2026-08-10 18:32:26 -04:00
DawnFire42
6746d97a51
Prefix shadowed CounterState constructor args with underscores 2026-08-10 18:32:25 -04:00
DawnFire42
5e84b5edf6
Harden command zone tax counter handling and more clean up
- Initialize commandZoneGraphicsItem to nullptr so the pervasive null
    checks have defined behavior before initializeZones() runs
  - Remove unused getTaxCounterWidgets()
  - Enforce the "reset tax to 0 before deactivating" invariant server-side
    in cmdSetCounterActive, not just in the UI
  - Hide tax increment/decrement menu actions at their bounds (0 and
    MAX_COUNTER_VALUE) to avoid sending no-op commands
  - Drop redundant/inconsistent toggle labels from CommandZoneMenu::
    retranslateUi(); updateTaxCounterActionStates() owns them
  - Add default=-1 to Event_SetCounterActive.counter_id for parity with
    Command_SetCounterActive
2026-08-10 18:32:24 -04:00
DawnFire42
dcf86d4fba
Resolve PlayerActions at call time instead of capturing at construction 2026-08-10 18:32:23 -04:00
DawnFire42
c9dbda57b2
Fix command zone menu showing Minimize even when zone is already minimized 2026-08-10 18:32:23 -04:00
DawnFire42
d662b679f7
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-08-10 18:32:22 -04:00
DawnFire42
15c1d47a0b
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-08-10 18:32:21 -04:00
Lukas Brübach
0b7a323adf
Adjust to rebase.
Took 28 minutes

Took 7 seconds

Took 2 minutes

Took 8 minutes

Took 13 seconds
2026-08-10 18:32:21 -04:00
DawnFire42
6ea68c3f58
[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-08-10 18:32:17 -04:00
DawnFire42
a5f43c08fa
Fix share decklists checkbox to reflect actual game setting in game info dialog (#7094)
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run
2026-08-10 23:31:58 +02:00
BruebachL
bfdb9b0f1d
[UserList] Bulk load to prevent hang on connect, fix multi-monitor positioning (#7087)
* [UserList] Bulk load to prevent hang on connect, fix multi-monitor positioning

Took 48 minutes

* Extract slot to method

Took 10 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-10 22:11:14 +02:00