Commit graph

6054 commits

Author SHA1 Message Date
BruebachL
cbfd286908
[Game][Player] Move dialog creation out of player_actions and into player_dialogs (#6946)
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
* [Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem

Took 4 minutes

Took 48 seconds

Took 2 minutes

* Drop early return.

Took 1 hour 13 minutes


Took 2 minutes

Took 1 minute

Took 24 seconds

* [Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem

Took 4 minutes

Took 58 seconds

* [Game][Menus] Make Menus accept PlayerGraphicsItem instead of PlayerLogic

Took 7 minutes

Took 4 minutes

Took 9 seconds

Took 2 minutes


Took 5 minutes

Took 58 seconds

* [Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem

Took 4 minutes

Took 2 minutes

* [Game][Menus] Make Menus accept PlayerGraphicsItem instead of PlayerLogic

Took 7 minutes


Took 1 minute

Took 57 seconds

* [Game][Player] Move dialog creation out of player_actions and into player_dialogs

Took 3 minutes

Took 1 second

* Fix typo.

Took 5 minutes

* Addressed comments.

Took 16 minutes

Took 11 seconds

* Reintroduce clearCardsToDelete check.

Took 3 minutes

* Capture cards before semaphore.

Took 1 minute

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-06-09 08:22:59 +02:00
BruebachL
487bb84b6f
[Game][Menus] Make Menus accept PlayerGraphicsItem instead of PlayerLogic (#6945)
* [Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem

Took 4 minutes

Took 58 seconds


Took 2 minutes

* [Game][Menus] Make Menus accept PlayerGraphicsItem instead of PlayerLogic

Took 7 minutes

Took 4 minutes

Took 9 seconds

Took 2 minutes


Took 5 minutes

Took 58 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-06-09 08:07:06 +02:00
BruebachL
9e03f82616
[Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem (#6944)
* [Game][Player] Split Player into PlayerLogic/PlayerGraphicsItem

Took 4 minutes

Took 48 seconds

* Drop early return.

Took 1 hour 13 minutes


Took 2 minutes

Took 1 minute

* Delete player view.

Took 37 seconds

* Restore card counter color in menu.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-06-09 08:05:39 +02:00
Christo
e674a39b87
Fix #6952: prevent deck loss when saving to a full disk (#6978)
* Fix #6952: prevent deck loss when saving to a full disk

DeckLoader::saveToFile() opened the target with QFile in WriteOnly mode,
which truncates the existing file to 0 bytes the moment it is opened. The
serializers (DeckList::saveToFile_Native/_Plain) always return true and the
result of flush() was ignored, so a write that failed part-way -- e.g.
because the disk was full -- left a 0-byte file behind yet was still
reported (and logged) as a successful save. The same truncate-then-write
pattern in updateLastLoadedTimestamp() could destroy a deck on load.

Switch both paths to QSaveFile, which writes to a temporary file and only
atomically replaces the target if commit() succeeds. On any write or flush
failure commit() returns false, the original deck is left untouched, and
the failure is logged instead of being reported as success.

* Use QSaveFile in convertToCockatriceFormat() too

convertToCockatriceFormat() had the same data-loss pattern: QFile WriteOnly
truncated the .cod, saveToFile_Native() always returns true, and the original
file was then removed unconditionally -- so a full disk during conversion wrote
a 0-byte .cod and then deleted the source deck.

Switch to QSaveFile (write + atomic commit), remove the original only after a
successful commit, and move the format check ahead of the file open so an
already-Cockatrice or unsupported deck never truncates or deletes anything.

Raised in review by ZeldaZach.
2026-06-09 07:54:01 +02:00
tooomm
1efc382c05
CI: Cleanup (#6959)
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
* Label & variables

* fix bracket

* other workflows

* fix trailing whitespace

* fixes
2026-06-08 19:37:50 +02:00
tooomm
dc152e89f7
CI: Print colored diff for lint check (#6975)
* print colored diff in gha

* use spaces
2026-06-08 19:19:28 +02:00
RickyRister
20cdcdb382
[ReplayManager] Refactor to send replayed events through signal (#6979)
* [ReplayManager] Refactor to send replayed events through signal

* remove blank

* pass by const auto ref
2026-06-07 19:39:31 -07:00
BruebachL
23da49ee5b
[Game] [Arrows] Use arrowData/registry and generate unique server-side ids (#6973)
* [Game] [Arrows] Track creatorId, use arrowData in arrowItem, use registry, generate unique arrow id's on server side and delete-on-exist inserts.

Took 2 minutes

Took 1 minute

* Fix emitting slot instead of signal.

Took 15 minutes

* Clear arrows locally in special circumstances i.e. teardown.

Took 28 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-06-07 21:11:02 +02:00
RickyRister
c14a008080
[TabDeckEditor] Refactor card database view into own class (#6967)
* rename method

* [TabDeckEditor] Refactor card database view into own class

* fix include guard

* directly get key signals for eventFilter

* fix includes
2026-06-05 10:20:46 -07:00
RickyRister
0da2ac4087
[TabDeckEditor] Refactor: pass nullable deck model into filter widget (#6969) 2026-06-05 09:21:28 -07:00
RickyRister
29cc622ce3
[TabDeckEditor] Refactor: Create shared CardDatabaseModel for tab (#6968) 2026-06-05 09:21:13 -07:00
RickyRister
86256602ff
[TabDeckEditor] Refactor to use signal instead of calling tab (#6965)
* [TabDeckEditor] Refactor to use signal instead of calling tab

* update docs

* fix cardInfoRequest
2026-06-03 10:41:55 -07:00
RickyRister
f37c418865
[TabDeckEditor] Refactor: Remove cardDatabase field from analysis interfaces (#6963)
* [TabDeckEditor] Refactor: Remove cardDatabase field from analysis interfaces

* update includes
2026-06-03 10:08:57 -07:00
RickyRister
46d3b820db
[TabDeckEditor] Refactor: pull up showPrintingSelector (#6964)
* [TabDeckEditor] Refactor: pull up showPrintingSelector

* trailing newline
2026-06-03 09:35:48 -07:00
RickyRister
e0cbb7f06c
[TabDeckEditor] Refactor: pass ExactCard in signal instead of widget (#6962)
* [TabDeckEditor] Refactor: pass ExactCard in signal instead of widget

* address comments
2026-06-02 21:22:06 -07:00
RickyRister
f52dc6dda8
[TabDeckEditor] Refactor: consolidate add/decrement card signals (#6961) 2026-06-02 20:13:39 -07:00
RickyRister
3fa377a11c
[TabDeckEditor] Refactor check ctrl to be on click (#6956) 2026-05-31 03:44:40 -07:00
RickyRister
c5372a9e92
[DeckEditor] Refactor: clean up addCardHelper (#6939)
* [DeckEditor] Refactor: clean up addCardHelper

* remove setSaveStatus
2026-05-31 03:14:21 -07:00
RickyRister
6de55e9096
[Game][Arrow] Correctly call clear all arrows for player (#6951) 2026-05-28 23:51:12 -07:00
RickyRister
43c3bf5966
[Game][Arrow] Refactor: Rename arrow methods in GameScene (#6949)
* [Game][Arrow] Rename methods in GameScene

* move stuff around and docs
2026-05-28 02:32:40 -07:00
RickyRister
c4f4cece01
[Game] Show counter color icons in game log (#6948) 2026-05-28 11:15:30 +02:00
RickyRister
0d7047a728
[Game] Show color icons in counters menu (#6947) 2026-05-28 11:05:26 +02:00
RickyRister
7f30728f87
[CardDatabaseModel] Pass CardInfoPtr by const ref (#6940) 2026-05-26 18:53:20 -07:00
RickyRister
1d5d3f2d38
Run formatter on all our files (#6942) 2026-05-26 15:11:38 -07:00
BruebachL
b3c89167c5
[Game][Arrows] Hook up to the state zone change properly. (#6937)
Took 17 minutes

Took 3 seconds

Took 2 minutes

Took 10 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-25 08:19:27 +02:00
BruebachL
90ab663212
[Server][Game][Arrows] Properly notify clients when deleting arrows on card move and transform into (#6936)
* [Server][Game][Arrows] Properly notify clients when deleting arrows on card move and transform into

Took 15 minutes

* Observe "not found" response

Took 18 minutes

Took 4 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-25 08:19:17 +02:00
BruebachL
98c00c55ed
[Game][Arrows] ArrowItem should not send deletion game commands by itself (#6932)
Took 13 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-23 02:20:41 +02:00
BruebachL
d2164c3f08
[Oracle] Change basic lands exception to regex to deal with snow basics. (#6931)
* [Oracle] Change basic lands exception to regex to deal with snow basics.

Took 45 minutes

* Update oracle/src/oracleimporter.cpp

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2026-05-22 22:36:53 +02:00
RickyRister
8004d4f2d4
[VDE] Disable filter dock widget (#6924) 2026-05-22 03:26:52 -07:00
BruebachL
8751f0605d
[Game][Arrows] Don't request deletion on inbound arrow deletion signal again but react to it locally (#6927)
* [Game][Arrows] Deleting arrows has no acknowledgement command so we have to delete locally as well.

Took 22 minutes

* Fix properly.

Took 15 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-22 10:25:13 +02:00
RickyRister
09d817770e
[Game] Refactor: move proliferate action code to PlayerActions (#6926) 2026-05-22 10:25:00 +02:00
DawnFire42
81a2712b92
Fix card stacking overflow when vertical zone has many cards (#6925)
Previously, minOffset (10px) was enforced unconditionally, causing card
  tops to overflow zone bounds when many cards were stacked. For example,
  50 cards in a 200px zone would place the last card's top at y=490.

  Now offsets compress below minOffset when necessary to keep all card
  tops visible. The constraint is guarded by !allowBottomOverflow to
  preserve future clipping zone semantics.
2026-05-21 22:56:24 -07:00
DawnFire42
8dca14933c
Centralize counter API with server-side bounds and no-op filtering (#6879)
* Refactor server counter API to own overflow protection and filter no-op events

  Counter modifications now clamp to int bounds server-side and return change
  status, allowing command handlers to skip network broadcasts when values
  don't actually change.

* Centralize MAX_COUNTERS_ON_CARD and enforce [0, 999] bounds on server

  - Move MAX_COUNTERS_ON_CARD to trice_limits.h
  - Server clamps values in setCounter() and incrementCounter()
  - Client uses clamped comparison to allow recovery from invalid states
  - Add tests for clamping behavior

* move incrementCount() implementation from header to cpp
2026-05-21 20:39:35 -07:00
tooomm
74102aa1ec
Update external c libs: SFMT & peglib (#6901) 2026-05-22 03:31:59 +02:00
ebbit1q
a9003be30f
update version to 3.1.0 for subsequent beta releases (#6921) 2026-05-22 01:35:01 +02:00
github-actions[bot]
6faa0d54e3
Update translation files (#6920)
Co-authored-by: github-actions <github-actions@github.com>
2026-05-21 19:14:58 -04:00
DawnFire42
33e0f8699b
Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
tooomm
03d54265fe
escape ampersand (#6900) 2026-05-21 22:02:09 +02:00
BruebachL
491d1c9187
[Game][Arrows] Split Arrows into ArrowData and ArrowItem (#6918)
* [Game][Arrows] Split Arrows into ArrowData and ArrowItem

Took 13 minutes

Took 5 seconds

Took 1 minute

Took 26 seconds

* Address comments.

Took 17 minutes

Took 9 seconds


Took 1 minute

* Change check.

Took 3 minutes

* Pass by const reference.

Took 10 minutes

* Remove extra method

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-21 20:31:14 +02:00
BruebachL
bddf9bd818
[Game][Counters] Split counters into AbstractCounter (graphics) and CounterState (logic) (#6917)
* [Counters] Split counters into graphics and logic states

Took 22 minutes

* Don't have widget hold pointer to state -> Copy what we need and subscribe to changes.

Took 12 minutes

Took 5 seconds

* Sync value too.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-21 20:16:28 +02:00
RickyRister
0549892092
[Settings] Regroup card layout settings (#6914) 2026-05-20 14:00:47 -07:00
RickyRister
10b9a65f17
[Server][Game] Make undo draw failure visible in chat (#6889)
* [Server][Game] Make undo draw failure visible in chat

* genericize the proto
2026-05-20 02:23:02 -07:00
BruebachL
5219cffa6b
[Player] Rename player to player logic (#6913)
Took 13 minutes

Took 6 seconds

Took 2 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-19 12:36:31 +02:00
RickyRister
71790d8e10
[Settings] Split printing settings into own group (#6906) 2026-05-19 03:34:42 -07:00
RickyRister
fe31a49f86
[Settings] Split appearance home tab settings into own group (#6905) 2026-05-19 03:33:25 -07:00
RickyRister
55c84ca860
[Settings] Clean up groupings in general settings (#6907) 2026-05-19 03:32:45 -07:00
ebbit1q
40b947c1e7
fix cards attaching/transforming to the wrong card across players (#6909)
* fix cards attaching/transforming to the wrong card across players

* move comment
2026-05-19 12:26:17 +02:00
ebbit1q
40cef0e436
fix resizing the visual card database loading more pages forever (#6884)
* fix resizing the vde loading more pages forever

* make near end of page const
2026-05-19 12:25:35 +02:00
BruebachL
9f1c225b7a
[Player] Stop reaching into graphics_item and emit signals instead for conceded and zoneId (#6912)
* [Player] Stop reaching into graphics_item and emit signals instead for conceded and zoneId

Took 7 minutes

Took 3 seconds

* Add sameValue check.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-19 12:22:40 +02:00
BruebachL
af2f888293
[Player] Pull handVisible out of player_info and let graphics_item just determine this on its own. (#6911)
Took 12 minutes


Took 15 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-05-19 12:10:19 +02:00