[Game] Rename signal to createCardRequested per review

This commit is contained in:
BruebachL 2026-10-13 11:48:29 +02:00 • committed by GitHub
parent 16caae5e5a
commit 710dfabea2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 6 deletions

View file

@ -180,7 +180,7 @@ void PlayerEventHandler::eventCreateToken(const Event_CreateToken &event)
cardInfo.set_face_down(event.face_down());
cardInfo.set_x(event.x());
cardInfo.set_y(event.y());
emit zone->requestCreateCard(cardInfo, true);
emit zone->createCardRequested(cardInfo, true);
}
void PlayerEventHandler::eventSetCardAttr(const Event_SetCardAttr &event,

View file

@ -178,7 +178,7 @@ void PlayerLogic::processPlayerInfo(const ServerInfo_Player &info)
const int cardListSize = zoneInfo.card_list_size();
if (!cardListSize) {
for (int j = 0; j < zoneInfo.card_count(); ++j) {
emit zone->requestCreateCard(ServerInfo_Card(), false);
emit zone->createCardRequested(ServerInfo_Card(), false);
}
} else {
for (int j = 0; j < cardListSize; ++j) {
@ -191,7 +191,7 @@ void PlayerLogic::processPlayerInfo(const ServerInfo_Player &info)
cardInfo.set_x(-1);
cardInfo.set_y(-1);
}
emit zone->requestCreateCard(cardInfo, false);
emit zone->createCardRequested(cardInfo, false);
}
}
if (zoneInfo.has_always_reveal_top_card()) {

View file

@ -60,7 +60,7 @@ void CardZoneLogic::addCard(CardState *card, const bool reorganize, const int x,
cardInfo.set_face_down(card->getFaceDown());
cardInfo.set_x(x);
cardInfo.set_y(y);
emit viewLogic->requestCreateCard(cardInfo, reorganize);
emit viewLogic->createCardRequested(cardInfo, reorganize);
}
}

View file

@ -33,7 +33,7 @@ class CardZoneLogic : public QObject
signals:
void cardAdded(CardState *addedCard);
/** @brief Asks the graphics side to build the card item for @p cardInfo and add it to this zone. */
void requestCreateCard(const ServerInfo_Card &cardInfo, bool reorganize);
void createCardRequested(const ServerInfo_Card &cardInfo, bool reorganize);
void cardCountChanged();
void reorganizeCards();
void updateGraphics();

View file

@ -24,7 +24,7 @@ CardZone::CardZone(CardZoneLogic *_logic, QGraphicsItem *parent)
connect(logic, &CardZoneLogic::cardCountChanged, this, &CardZone::invalidateItems);
connect(logic, &CardZoneLogic::reorganizeCards, this, &CardZone::invalidateItems);
connect(logic, &CardZoneLogic::cardAdded, this, &CardZone::onCardAdded);
connect(logic, &CardZoneLogic::requestCreateCard, this, &CardZone::onCreateCardRequested);
connect(logic, &CardZoneLogic::createCardRequested, this, &CardZone::onCreateCardRequested);
connect(logic, &CardZoneLogic::setGraphicsVisibility, this, [this](bool v) { this->setVisible(v); });
connect(logic, &CardZoneLogic::updateGraphics, this, [this]() { update(); });
connect(logic, &CardZoneLogic::reorganizeCards, this, &CardZone::reorganizeCards);