Commit graph

6588 commits

Author SHA1 Message Date
Christian Daniel Jensen
070c455b16
Merge pull request #3 from Continuum-Universes-Studio/feature/continuumatrice-zone-bands
Continuumatrice: Limbo, Refuge and Oblivion card piles
2026-11-02 02:04:54 -07:00
Christian Daniel Jensen
f4c78264b8 Document Limbo Refuge Oblivion pile behavior, icon overrides, and testing 2026-11-02 02:00:33 -07:00
Christian Daniel Jensen
dd9aca8668 Add fallback oblivion pile SVG icon 2026-11-02 01:58:35 -07:00
Christian Daniel Jensen
453ef05334 Add fallback refuge pile SVG icon 2026-11-02 01:58:31 -07:00
Christian Daniel Jensen
09e6b54869 Add fallback limbo pile SVG icon 2026-11-02 01:58:29 -07:00
Christian Daniel Jensen
71398ac33c Continuumatrice: adjust extra pile geometry and add built-in icon resources 2026-11-02 01:58:27 -07:00
Christian Daniel Jensen
dbb044771b Continuumatrice: adjust extra pile geometry and add built-in icon resources 2026-11-02 01:57:32 -07:00
Christian Daniel Jensen
3df441195d Continuumatrice: adjust extra pile geometry and add built-in icon resources 2026-11-02 01:57:29 -07:00
Christian Daniel Jensen
21f574ca7c Continuumatrice: render interactive public piles with themed icons 2026-11-02 01:56:37 -07:00
Christian Daniel Jensen
f964b6b24f Continuumatrice: render interactive public piles with themed icons 2026-11-02 01:56:35 -07:00
Christian Daniel Jensen
2afbd86ad1 Continuumatrice: render interactive public piles with themed icons 2026-11-02 01:56:32 -07:00
Christian Daniel Jensen
f9f0901f09 Continuumatrice: render interactive public piles with themed icons 2026-11-02 01:56:29 -07:00
Christian Daniel Jensen
29dd239cd2 Continuumatrice: render interactive public piles with themed icons 2026-11-02 01:56:27 -07:00
Christian Daniel Jensen
d6070c5c96 Continuumatrice: render interactive public piles with themed icons 2026-11-02 01:55:24 -07:00
Christian Daniel Jensen
f87b4eeeac Continuumatrice: add Limbo Refuge Oblivion support to card_menu.cpp 2026-11-02 01:52:40 -07:00
Christian Daniel Jensen
abf9750333 Continuumatrice: add Limbo Refuge Oblivion support to move_menu.cpp 2026-11-02 01:52:26 -07:00
Christian Daniel Jensen
384a3dc036 Continuumatrice: add Limbo Refuge Oblivion support to move_menu.h 2026-11-02 01:52:24 -07:00
Christian Daniel Jensen
1670137064 Continuumatrice: add Limbo Refuge Oblivion support to player_actions.cpp 2026-11-02 01:52:21 -07:00
Christian Daniel Jensen
e23b5eb27e Continuumatrice: add Limbo Refuge Oblivion support to card_menu_action_type.h 2026-11-02 01:52:07 -07:00
Christian Daniel Jensen
2d467955fc Continuumatrice: add Limbo Refuge Oblivion support to server_player.cpp 2026-11-02 01:52:05 -07:00
Christian Daniel Jensen
61faf612a1 Continuumatrice: add Limbo Refuge Oblivion support to player_logic.h 2026-11-02 01:52:02 -07:00
Christian Daniel Jensen
034b7189e3 Continuumatrice: add Limbo Refuge Oblivion support to player_logic.cpp 2026-11-02 01:51:50 -07:00
Christian Daniel Jensen
5ccfbf7a23 Continuumatrice: add Limbo Refuge Oblivion support to zone_names.h 2026-11-02 01:51:48 -07:00
Christian Daniel Jensen
826da7ede2 Document isolated profile and XML4 card/art workflow 2026-11-02 01:41:08 -07:00
Christian Daniel Jensen
f54dcc3e54 Isolate Continuumatrice single-instance socket from Cockatrice 2026-11-02 01:41:05 -07:00
Christian Daniel Jensen
2dab3d0f40 Give Continuumatrice its own Qt profile and data/cache namespace 2026-11-02 01:41:03 -07:00
Christian Daniel Jensen
8bc8317c57 Clarify visual battlefield orientation and card metadata 2026-11-02 01:30:36 -07:00
Christian Daniel Jensen
4a201aa5b6 Document Continuumatrice table row indices 2026-11-02 01:30:34 -07:00
Christian Daniel Jensen
d11db291e1 Align tablerow placement with Front Support Command order 2026-11-02 01:30:32 -07:00
Christian Daniel Jensen
4e2229be98 Orient Front and Command labels toward the opponent 2026-11-02 01:30:30 -07:00
Christian Daniel Jensen
bd9fd6e91b
Merge pull request #2 from Continuum-Universes-Studio/feature/continuumatrice-zone-bands
Fix QFileInfo instance method call in battlefield font loader
2026-11-02 01:02:43 -07:00
Christian Daniel Jensen
5d871dcf28 Fix QFileInfo instance method call in battlefield font loader 2026-11-02 00:58:27 -07:00
Christian Daniel Jensen
3d3a414473
Merge branch 'Cockatrice:master' into master 2026-11-02 00:46:03 -07:00
sentry[bot]
8b0c980e85
[Client] Guard dragged card ghost from painting or dropping deleted cards (#7688)
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
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 24.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 cover (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (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 26 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Desktop / Prune caches (push) Waiting to run
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
* [Client] Guard dragged card ghost from painting or dropping deleted cards

* [Game] Revert handling for cards destroyed mid-drag

Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>

* [DeckView] Access pointer through QPointer in DeckViewCardDragItem

---------

Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: zeldazach <7460172+zeldazach@users.noreply.github.com>
2026-11-02 08:39:07 +01:00
RickyRister
62e590d300
[ServerGame] Refactor out spectator/judge bools into RoleInfo (#7761) 2026-11-02 00:37:05 -07:00
BruebachL
a1a8a59f4a
[VisualDatabase] Draw the card grid with a model/view (#7701)
* [VisualDatabase] Draw the card grid with a model/view instead of a widget per card

The visual card database built one CardInfoPictureWithTextOverlayWidget per
card, 100 per page, and tore them down on every search, resize and scroll
page. It also looked each card up again by name from the model row, kept a
shadow QList<ExactCard>, and carried paging state plus a 5 s timer that only
existed to defer the first page.

Replace that with a real view on a flattened model:

- CardDatabaseDisplayModel gains CardInfoRole and cardInfoAt(), so a view can
  get the CardInfoPtr behind a proxy row without a name round trip.
- New CardDatabaseVisualDisplayModel (libcockatrice_models) flattens the
  filtered and sorted proxy into one entry per displayed card picture: the
  preferred printing normally, every printing of the selected sets while set
  filters are active. Proxy changes rebuild it on a 30 ms coalescing timer.
- New CardDatabaseVisualView (QListView IconMode) paints only visible rows
  through the new CardPictureDelegate, keeps the old interaction contract
  (left/right/middle press -> cardClicked, hover -> cardHovered, Ctrl+wheel
  resize, no selection, no focus stealing, scroll to top on a new result) and
  repaints when CardPictureLoader reports an async image.
- CardSizeWidget::enableCtrlScrollResize() also watches scroll-area viewports,
  which is what makes Ctrl+wheel work over a QListView.
- VisualDatabaseDisplayWidget drops the paging, the shadow list, the dead
  members and the 5 s timer.

Behaviour-preserving: no gameplay change, no new user-facing strings.

* [VisualDatabase] Fix the card grid wheel step

QListView hands the delegate's item height to the scroll bar as its single step under ScrollPerPixel, so QAbstractSlider moved wheelScrollLines() whole card rows per notch. Handle the wheel in the view instead: one line is an eighth of the grid cell, so a notch moves about a third of a card row at any card size and still follows the OS line count.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 08:35:58 +01:00
Christian Daniel Jensen
ccab482668
Merge pull request #1 from Continuum-Universes-Studio/feature/continuumatrice-zone-bands
Continuumatrice: colored Front / Support / Command battlefield
2026-11-02 00:21:11 -07:00
Christian Daniel Jensen
3f779c3bc1 Document battlefield colors and Continuumorphous font setup 2026-11-01 23:52:50 -07:00
Christian Daniel Jensen
61659a566a Paint Front Support Command zone bands with optional theme colors and font 2026-11-01 23:52:47 -07:00
Christian Daniel Jensen
62b7088807 Reserve row label space and add battlefield zone appearance state 2026-11-01 23:52:42 -07:00
BruebachL
94e6281d87
[Logs] Browse room history without filters with paginated infinite scroll (#7531)
* [Logs] Browse room history without filters with paginated infinite scroll

* [Logs] Continue pagination when switching log tabs

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:36:49 +01:00
BruebachL
3cf8bdb00e
[Tests] Add a headless game logic regression suite (#7702)
* [Tests] Add headless game logic regression suite

Cover CardState, CardZoneLogic and the Command_MoveCard protobufs PlayerActions emits, against libcockatrice_game with a recording AbstractClient and no graphics. The old game_smoke_test cases are migrated into the new suite.

* [Tests] Cover game event application through GameEventHandler

Feeds GameEventContainers through the real dispatcher and asserts the resulting zone and card state: move (including face down), the set-card-attr attributes plus the all-cards and does-not-untap branches, card counters, attach/detach, zone reveal properties, and drawing named cards from the deck.

* [Tests] Replay a synthetic game state through the dispatcher

Builds a GameReplay in code, feeds its containers through the same GameEventHandler path the client uses, and asserts the materialized players, zones, cards and attachments plus event ordering for move, attributes and counters. A small headless zone view stands in for the graphics side where processPlayerInfo asks for card items.

* [Tests] Cover card flip, destroy, token and turn events

Adds the remaining state-mutating event handlers: flip (face down keeps the ref, face up adopts the printing), destroy (removes the card and un-attaches its attached cards), create token (database P/T unless provided or face down) and player properties changed under the concede/unconcede contexts, plus active player and phase.

* [Tests] Cover player lifecycle and counter events

Adds the player-level events that mutate session state: leave removes the player from the manager, kicked emits gameClosed, game closed flips the closed flag and clears the started flag, host changed moves the host role to another player, and create/set/delete update the player counters with unknown ids ignored.

* [Tests] Drive the zone view request through addCard

The test emitted createCardRequested itself and then asserted it was emitted. Registering a ZoneViewZoneLogic on the zone and adding a card exercises the real prepareAddCard -> signal path, so the assertion now fails if addCard stops asking the graphics side to build the card.

* [Tests] Skip the card database when listing tests

gtest_discover_tests runs the binary with --gtest_list_tests during the build. That process built the card database and replaced its default path provider, leaving allocations that the sanitizer leg's default LeakSanitizer check reports at exit, so discovery failed on Ubuntu 26.04. No test runs in list mode, so return before the database setup.

* [Tests] Fix fixture comment nit

Wraps the RecordingClient::sent member name in backticks in the comment.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:35:41 +01:00
BruebachL
5134e72eb4
[Settings] Store server profiles with QSettings arrays (#7629)
The server list used hand-numbered saveName%1/server%1 keys and an O(n)
shift loop to delete entries. Store the profiles with beginReadArray and
beginWriteArray instead, and migrate the legacy keys once in the
constructor so existing profiles and saved passwords survive.

SettingsManager::batchWrite no longer disables atomic sync, so a batch is
still written through QSettings' atomic save. Add tests for add, update,
remove, password updates and the legacy migration.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:30:29 +01:00
BruebachL
b37c8b828f
[Utility] Budget scrypt's XY array in the derivation memory limit (#7712)
deriveKey passes maxmem = 128nr + 128rp + 4096 to EVP_PBE_scrypt, but scrypt
also allocates XY at 256r bytes. costParamsAreSane accepts r up to 32, so any
server asking for r >= 17 made derivation fail and the client report a login
abort it could never recover from. Cover the XY array and add a regression test
at the accepted-range boundary.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:29:15 +01:00
BruebachL
719863e43d
[CI] Lint only .sh files in the shell formatting pass (#7715)
The changed-file matcher reused the `*.sh` glob as a regular expression,
where the leading `*` applies to the `(^|/)` group instead of the file
name. Every path ending in "sh" matched, so NSIS include files (.nsh) were
handed to shellcheck and failed the format leg.

Match the suffix explicitly and keep the glob for the find(1) branch.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:29:05 +01:00
BruebachL
d021f20d14
[Version] Bump to 3.2.0 (#7762)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:28:14 +01:00
BruebachL
ce543896f5
[Tests] Use QtTest for model contracts and signal spies (#7630)
Qt6::Test was linked into every test but never used. Add a small RAII
QAbstractItemModelTester helper and apply it to the deck list model, the card
database model and display proxy, and the sets model. Add QSignalSpy coverage
for the card-added and download-settings signals, and assert explicitly that a
card row is a leaf with no child columns (the tester does not check that).

The contract checker immediately found four model bugs, fixed here:
- DeckListModel allowed children below non-zero columns.
- CardDatabaseModel reported every card as a child of every card row.
- CardDatabaseModel reported six columns for a valid (leaf) card index.
- CardDatabaseDisplayModel claimed more rows were fetchable while rowCount
  already exposed them all, so fetchMore() inserted duplicates.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:27:43 +01:00
BruebachL
429eb2a1fd
[Servatrice] Use compile-time checked connections (#7631)
* [Servatrice] Use compile-time checked connections

Replace the remaining SIGNAL/SLOT string connects in servatrice.cpp,
smtpclient.cpp, serversocketinterface.cpp and isl_interface.cpp with
pointer-to-member or lambda connects, and convert the string invokeMethod
calls to the functor overload.

QxtSmtp has overloaded signals, so those need qOverload. Slots inherited as
protected members and the QWebSocket error connection owned by the ISL fix
are left on lambdas/strings as appropriate; the vendored qxtsmtp.cpp is
untouched.

* Fix remaining review threads on the connection syntax

- Connect the IslInterface signals straight to the inherited Server slots
  instead of forwarding lambdas.
- Capture servatrice explicitly in the queued admin lambdas so they do not
  read this->servatrice after teardown.
- Move the websocket newConnection connect out of the per-pool loop.
- Terminate the logging category and restore pendingKey's indentation.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:13:21 +01:00
BruebachL
a74dfeef6e
[Build] Configure AUTOMOC, AUTOUIC and AUTORCC once (#7637)
The root already set CMAKE_AUTOMOC; add CMAKE_AUTOUIC and CMAKE_AUTORCC
next to it and drop the per-directory copies from 18 CMakeLists files.
These variables are inherited by the subdirectories, so the duplicates
never changed anything.

qt_standard_project_setup is not used: besides the AUTO* variables it
sets CMAKE_RUNTIME_OUTPUT_DIRECTORY on Windows, which breaks the
install(DIRECTORY "$<TARGET_FILE_DIR:...>") copies and the per-app
symbol paths, and appends to CMAKE_INSTALL_RPATH on Linux.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-11-02 07:06:47 +01:00
BruebachL
5fe7f186d3
[CI] Make the hdiutil retry wrapper report failure (#7643)
* [CI] Make the hdiutil retry wrapper report failure

CPack reads the wrapper's exit status to decide whether the disk image was
created, so a zero exit turns a failed hdiutil into a later "Problem copying
the package" error that hides hdiutil's own message.

- Propagate hdiutil's real status instead of collapsing every failure to 1.
- Name the failing subcommand (create/attach/detach/convert) so the message
  says which CPack step gave up.
- Count attempts rather than failures in the retry line.

* Update .ci/compile.sh

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2026-11-02 07:01:55 +01:00