mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Support creating face-down tokens (#5800)
* add new fields to proto * update token dlg * send facedown in command * update server to get it to work * disable certain edits when face down * update client event processing * log face-down token creation * Don't support colors on face-down tokens The other client doesn't know about the color, so it causes a desync * Update wording Co-authored-by: Basile Clement <Elarnon@users.noreply.github.com> * Allow annotations on face-down tokens --------- Co-authored-by: Basile Clement <Elarnon@users.noreply.github.com>
This commit is contained in:
parent
e3465be8c1
commit
bb8213deb5
10 changed files with 97 additions and 19 deletions
|
|
@ -214,12 +214,16 @@ void MessageLogWidget::logCreateArrow(Player *player,
|
|||
}
|
||||
}
|
||||
|
||||
void MessageLogWidget::logCreateToken(Player *player, QString cardName, QString pt)
|
||||
void MessageLogWidget::logCreateToken(Player *player, QString cardName, QString pt, bool faceDown)
|
||||
{
|
||||
appendHtmlServerMessage(tr("%1 creates token: %2%3.")
|
||||
.arg(sanitizeHtml(player->getName()))
|
||||
.arg(cardLink(std::move(cardName)))
|
||||
.arg(pt.isEmpty() ? QString() : QString(" (%1)").arg(sanitizeHtml(pt))));
|
||||
if (faceDown) {
|
||||
appendHtmlServerMessage(tr("%1 creates a face down token.").arg(sanitizeHtml(player->getName())));
|
||||
} else {
|
||||
appendHtmlServerMessage(tr("%1 creates token: %2%3.")
|
||||
.arg(sanitizeHtml(player->getName()))
|
||||
.arg(cardLink(std::move(cardName)))
|
||||
.arg(pt.isEmpty() ? QString() : QString(" (%1)").arg(sanitizeHtml(pt))));
|
||||
}
|
||||
}
|
||||
|
||||
void MessageLogWidget::logDeckSelect(Player *player, QString deckHash, int sideboardSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue