Commit graph

3876 commits

Author SHA1 Message Date
DawnFire42
5f2094bc49
Merge f5e49a571e into 48776cfeba 2026-08-12 16:15:53 -04:00
BruebachL
48776cfeba
[Game] Generic Animation Interface (#7098)
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
* Introduce generic IAnimatedItem interface for scene animations

GameScene's shared 10ms animation timer previously only knew about
CardItems (cardsToAnimate). Generalize it so any scene item can tick on
the shared timer instead of owning its own QTimer:

- New IAnimatedItem interface with a single animationEvent() tick.
- GameScene tracks animated items in a QHash keyed by QObject and
  auto-unregisters items when they are destroyed, so an item deleted
  mid-animation (concede, removePlayer, deleteLater) can never leave a
  dangling pointer in the set.
- GameScene::~GameScene disconnects incoming connections before the
  animation timer is deleted; all timer stops are null-guarded so
  destruction ordering no longer matters.
- AbstractCardItem implements IAnimatedItem with a no-op tick so the
  existing tap-animation registration path keeps working; CardItem
  overrides it with the real rotate animation.

Took 5 minutes

* Add Enable/Disable all animations buttons to settings

The animation settings group gets two push buttons that toggle every
per-effect animation checkbox at once. The base branch carries the
buttons and the shared slots; per-effect toggles (life counter,
battlefield, arrow draw) are added by the feature branches on top.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-12 20:36:33 +02:00
BruebachL
ce2c31424c
[Chat] Scroll chat view to bottom when loading chat history (#7079)
* [Chat] Scroll chat view to bottom when loading chat history (#2725)

Took 4 minutes


Took 38 seconds

* Harden scrolling to bottom

Took 11 minutes

* Implement stick-to-bottom flag

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-12 15:52:49 +02:00
BruebachL
ef3929356b
[Server/Client] Fix open_decklists not showing for already-loaded decks on join (#7097)
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
Took 6 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-12 12:17:03 +02:00
BruebachL
83fd65b34b
[CardSearch] Add card completion popups to chats and search fields (#7089)
* Add card completion popups to chats and search fields

Completes @mention and [[card]] in chat, and card names in the deck
editor, EDHREC, Archidekt, card art rules, and user card settings
searches. Pops up a styled list with mana pips and a card image
preview, flipping the list order when the popup opens above the text
field.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-11 18:50:30 +02:00
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