mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
[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
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>
This commit is contained in:
parent
487bb84b6f
commit
cbfd286908
13 changed files with 664 additions and 231 deletions
|
|
@ -58,6 +58,31 @@ public:
|
|||
}
|
||||
|
||||
signals:
|
||||
void requestViewTopCardsDialog(int defaultNumberTopCards, int deckSize);
|
||||
void requestViewBottomCardsDialog(int defaultNumberBottomCards, int deckSize);
|
||||
void requestShuffleTopDialog(int defaultNumberTopCards, int maxCards);
|
||||
void requestShuffleBottomDialog(int defaultNumberBottomCards, int maxCards);
|
||||
void requestMulliganDialog(int startSize, int handSize, int deckSize);
|
||||
void requestDrawCardsDialog(int defaultNumberTopCards, int deckSize);
|
||||
void requestMoveTopCardsToDialog(int defaultNumberTopCards,
|
||||
int maxCards,
|
||||
const QString &targetZone,
|
||||
const QString &zoneDisplayName,
|
||||
bool faceDown);
|
||||
void requestMoveTopCardsUntilDialog(MoveTopCardsUntilOptions options);
|
||||
void requestMoveBottomCardsToDialog(int defaultNumberBottomCards,
|
||||
int maxCards,
|
||||
const QString &targetZone,
|
||||
const QString &zoneDisplayName,
|
||||
bool faceDown);
|
||||
void requestDrawBottomCardsDialog(int defaultNumberBottomCards, int maxCards);
|
||||
void requestRollDieDialog();
|
||||
void requestCreateTokenDialog(const QStringList &predefinedTokens);
|
||||
void requestCreateRelatedFromRelationDialog(const CardItem *sourceCard, const CardRelation *cardRelation);
|
||||
void requestMoveCardXCardsFromTopDialog(int defaultNumberTopCardsToPlaceBelow, int deckSize);
|
||||
void requestSetPTDialog(const QString &oldPT);
|
||||
void requestSetAnnotationDialog(const QString &oldAnnotation);
|
||||
void requestSetCardCounterDialog(int counterId, const QString &oldValueForDlg);
|
||||
void requestZoneViewToggle(const QString &zoneName, int numberCards, bool isReversed = false);
|
||||
void requestSortHand(const QList<CardList::SortOption> &options);
|
||||
void requestEnableAndSetCreateAnotherTokenAction(const QString &lastTokenName);
|
||||
|
|
@ -70,17 +95,30 @@ public slots:
|
|||
void playCardToTable(const CardItem *c, bool faceDown);
|
||||
|
||||
void actUntapAll();
|
||||
void actRollDie();
|
||||
void actRequestRollDieDialog();
|
||||
void actRollDie(int sides, int count);
|
||||
void actFlipCoin();
|
||||
void actCreateToken(const QStringList &predefinedTokens);
|
||||
void actRequestCreateTokenDialog(const QStringList &predefinedTokens);
|
||||
void actCreateToken(TokenInfo tokenToCreate);
|
||||
void actCreateAnotherToken();
|
||||
void actRequestCreateRelatedFromRelationDialog(const CardItem *sourceCard, const CardRelation *cardRelation);
|
||||
bool createRelatedFromRelation(const CardItem *sourceCard, const CardRelation *cardRelation, int variableCount);
|
||||
void onRelatedCardCreated(const CardItem *sourceCard, const CardRelation *cardRelation);
|
||||
void setLastRelatedCreationSucceeded(bool succeeded)
|
||||
{
|
||||
lastRelatedCreationSucceeded = succeeded;
|
||||
}
|
||||
void actShuffle();
|
||||
void actShuffleTop();
|
||||
void actShuffleBottom();
|
||||
void actRequestShuffleTopDialog();
|
||||
void actShuffleTop(int number);
|
||||
void actRequestShuffleBottomDialog();
|
||||
void actShuffleBottom(int number);
|
||||
void actDrawCard();
|
||||
void actDrawCards();
|
||||
void actRequestDrawCardsDialog();
|
||||
void actDrawCards(int number);
|
||||
void actUndoDraw();
|
||||
void actMulligan();
|
||||
void actRequestMulliganDialog();
|
||||
void actMulligan(int number);
|
||||
void actMulliganSameSize();
|
||||
void actMulliganMinusOne();
|
||||
void doMulligan(int number);
|
||||
|
|
@ -97,10 +135,14 @@ public slots:
|
|||
void actMoveTopCardsToGraveFaceDown();
|
||||
void actMoveTopCardsToExile();
|
||||
void actMoveTopCardsToExileFaceDown();
|
||||
void actMoveTopCardsUntil();
|
||||
void actRequestMoveTopCardsUntilDialog();
|
||||
void moveTopCardsUntil(const QString &expr, MoveTopCardsUntilOptions options);
|
||||
void actMoveTopCardToBottom();
|
||||
void actRequestMoveTopCardsToDialog(const QString &targetZone, const QString &zoneDisplayName, bool faceDown);
|
||||
void moveTopCardsTo(int number, const QString &targetZone, bool faceDown);
|
||||
void actDrawBottomCard();
|
||||
void actDrawBottomCards();
|
||||
void actRequestDrawBottomCardsDialog();
|
||||
void actDrawBottomCards(int number);
|
||||
void actMoveBottomCardToPlay();
|
||||
void actMoveBottomCardToPlayFaceDown();
|
||||
void actMoveBottomCardToGrave();
|
||||
|
|
@ -110,6 +152,8 @@ public slots:
|
|||
void actMoveBottomCardsToExile();
|
||||
void actMoveBottomCardsToExileFaceDown();
|
||||
void actMoveBottomCardToTop();
|
||||
void actRequestMoveBottomCardsToDialog(const QString &targetZone, const QString &zoneDisplayName, bool faceDown);
|
||||
void moveBottomCardsTo(int number, const QString &targetZone, bool faceDown);
|
||||
|
||||
void actSelectAll();
|
||||
void actSelectRow();
|
||||
|
|
@ -117,8 +161,10 @@ public slots:
|
|||
|
||||
void actViewLibrary();
|
||||
void actViewHand();
|
||||
void actViewTopCards();
|
||||
void actViewBottomCards();
|
||||
void actRequestViewTopCardsDialog();
|
||||
void actViewTopCards(int number);
|
||||
void actRequestViewBottomCardsDialog();
|
||||
void actViewBottomCards(int number);
|
||||
void actAlwaysRevealTopCard(bool alwaysRevealTopCard);
|
||||
void actAlwaysLookAtTopCard(bool alwaysRevealTopCard);
|
||||
void actViewGraveyard();
|
||||
|
|
@ -135,17 +181,20 @@ public slots:
|
|||
void actCreateRelatedCard();
|
||||
void actCreateAllRelatedCards();
|
||||
|
||||
void actMoveCardXCardsFromTop(QList<CardItem *> selectedCards);
|
||||
void actRequestMoveCardXCardsFromTopDialog();
|
||||
void actMoveCardXCardsFromTop(QList<CardItem *> selectedCards, int number);
|
||||
void actRemoveCardCounter(QList<CardItem *> selectedCards, int counterId);
|
||||
void actAddCardCounter(QList<CardItem *> selectedCards, int counterId);
|
||||
void actSetCardCounter(QList<CardItem *> selectedCards, int counterId);
|
||||
void actRequestSetCardCounterDialog(QList<CardItem *> selectedCards, int counterId);
|
||||
void actSetCardCounter(QList<CardItem *> selectedCards, int counterId, const QString &counterValue);
|
||||
void actIncrementAllCardCounters(QList<CardItem *> cardsToUpdate);
|
||||
void actAttach();
|
||||
void actUnattach(QList<CardItem *> selectedCards);
|
||||
void actDrawArrow();
|
||||
void actIncPT(QList<CardItem *> selectedCards, int deltaP, int deltaT);
|
||||
void actResetPT(QList<CardItem *> selectedCards);
|
||||
void actSetPT(QList<CardItem *> selectedCards);
|
||||
void actRequestSetPTDialog(QList<CardItem *> selectedCards);
|
||||
void actSetPT(QList<CardItem *> selectedCards, const QString &pt);
|
||||
void actIncP(QList<CardItem *> selectedCards);
|
||||
void actDecP(QList<CardItem *> selectedCards);
|
||||
void actIncT(QList<CardItem *> selectedCards);
|
||||
|
|
@ -157,7 +206,8 @@ public slots:
|
|||
|
||||
void actReduceLifeByPower(QList<CardItem *> selectedCards);
|
||||
|
||||
void actSetAnnotation(QList<CardItem *> selectedCards);
|
||||
void actRequestSetAnnotationDialog(QList<CardItem *> selectedCards);
|
||||
void actSetAnnotation(QList<CardItem *> selectedCards, const QString &annotation);
|
||||
void actReveal(QList<CardItem *> selectedCards, QAction *action);
|
||||
void actRevealHand(int revealToPlayerId);
|
||||
void actRevealRandomHandCard(int revealToPlayerId);
|
||||
|
|
@ -184,14 +234,12 @@ private:
|
|||
int movingCardsUntilCounter = 0;
|
||||
MoveTopCardsUntilOptions movingCardsUntilOptions;
|
||||
|
||||
void moveTopCardsTo(const QString &targetZone, const QString &zoneDisplayName, bool faceDown);
|
||||
void moveBottomCardsTo(const QString &targetZone, const QString &zoneDisplayName, bool faceDown);
|
||||
bool lastRelatedCreationSucceeded = false;
|
||||
|
||||
void createCard(const CardItem *sourceCard,
|
||||
const QString &dbCardName,
|
||||
CardRelationType attach = CardRelationType::DoesNotAttach,
|
||||
bool persistent = false);
|
||||
bool createRelatedFromRelation(const CardItem *sourceCard, const CardRelation *cardRelation);
|
||||
|
||||
void playSelectedCards(QList<CardItem *> selectedCards, bool faceDown = false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue