mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-27 00:14:40 -07:00
Formatting.
This commit is contained in:
parent
c2926037fc
commit
766f02149b
8 changed files with 21 additions and 17 deletions
|
|
@ -505,8 +505,8 @@ private:
|
|||
parseSequenceString("Alt+U"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aDoesntUntapOnce", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Skip Untapping (One Turn)"),
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
parseSequenceString(""),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
{"Player/aFlip", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Turn Card Over"),
|
||||
parseSequenceString("Alt+F"),
|
||||
ShortcutGroup::Playing_Area)},
|
||||
|
|
|
|||
|
|
@ -91,12 +91,12 @@ void CardState::setDoesntUntap(bool _doesntUntap)
|
|||
|
||||
void CardState::setDoesntUntapOnce(bool _doesntUntapOnce)
|
||||
{
|
||||
if (doesntUntapOnce == _doesntUntapOnce) {
|
||||
return;
|
||||
}
|
||||
doesntUntapOnce = _doesntUntapOnce;
|
||||
emit doesntUntapOnceChanged(_doesntUntapOnce);
|
||||
emit stateChanged();
|
||||
if (doesntUntapOnce == _doesntUntapOnce) {
|
||||
return;
|
||||
}
|
||||
doesntUntapOnce = _doesntUntapOnce;
|
||||
emit doesntUntapOnceChanged(_doesntUntapOnce);
|
||||
emit stateChanged();
|
||||
}
|
||||
|
||||
void CardState::setDestroyOnZoneChange(bool _destroyOnZoneChange)
|
||||
|
|
|
|||
|
|
@ -199,15 +199,16 @@ void PlayerEventHandler::setCardAttrHelper(const GameEventContext &context,
|
|||
switch (attribute) {
|
||||
case AttrTapped: {
|
||||
bool tapped = avalue == "1";
|
||||
if (!(!tapped && card->getDoesntUntap() && allCards) && !(!tapped && card->getDoesntUntapOnce() && allCards)) {
|
||||
if (!(!tapped && card->getDoesntUntap() && allCards) &&
|
||||
!(!tapped && card->getDoesntUntapOnce() && allCards)) {
|
||||
if (!allCards) {
|
||||
emit logSetTapped(player, card, tapped);
|
||||
}
|
||||
bool canAnimate = !options.testFlag(SKIP_TAP_ANIMATION) && !moveCardContext;
|
||||
card->setTapped(tapped, canAnimate);
|
||||
} else if (!tapped && card->getDoesntUntapOnce() && allCards) {
|
||||
card->setDoesntUntapOnce(false);
|
||||
}
|
||||
card->setDoesntUntapOnce(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AttrAttacking: {
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ void CardItem::resetState(bool keepAnnotations)
|
|||
attachedCards.clear();
|
||||
setTapped(false, false);
|
||||
setDoesntUntap(false);
|
||||
setDoesntUntapOnce(false);
|
||||
setDoesntUntapOnce(false);
|
||||
if (scene()) {
|
||||
static_cast<GameScene *>(scene())->unregisterAnimationItem(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -848,7 +848,8 @@ void MessageLogWidget::connectToPlayerEventHandler(PlayerEventHandler *playerEve
|
|||
connect(playerEventHandler, &PlayerEventHandler::logSetCardCounter, this, &MessageLogWidget::logSetCardCounter);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logSetTapped, this, &MessageLogWidget::logSetTapped);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logSetDoesntUntap, this, &MessageLogWidget::logSetDoesntUntap);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logSetDoesntUntapOnce, this, &MessageLogWidget::logSetDoesntUntapOnce);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logSetDoesntUntapOnce, this,
|
||||
&MessageLogWidget::logSetDoesntUntapOnce);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logSetPT, this, &MessageLogWidget::logSetPT);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logSetAnnotation, this, &MessageLogWidget::logSetAnnotation);
|
||||
connect(playerEventHandler, &PlayerEventHandler::logMoveCard, this, &MessageLogWidget::logMoveCard);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ CardMenu::CardMenu(PlayerGraphicsItem *_player, const CardItem *_card, bool _sho
|
|||
// Actions using invoke (type dispatch, need selection)
|
||||
aTap = makeAction(this, invoke(cmTap));
|
||||
aDoesntUntap = makeAction(this, invoke(cmDoesntUntap), /*checkable=*/true, card && card->getDoesntUntap());
|
||||
aDoesntUntapOnce = makeAction(this, invoke(cmDoesntUntapOnce), /*checkable=*/true, card && card->getDoesntUntapOnce());
|
||||
aDoesntUntapOnce =
|
||||
makeAction(this, invoke(cmDoesntUntapOnce), /*checkable=*/true, card && card->getDoesntUntapOnce());
|
||||
aFlip = makeAction(this, invoke(cmFlip));
|
||||
aPeek = makeAction(this, invoke(cmPeek));
|
||||
aClone = makeAction(this, invoke(cmClone));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue