mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Prevent a ton of local arrow from spamming a user's UI
Co-authored-by: alyssa.syharath@gmail.com
This commit is contained in:
parent
2303880b87
commit
5b55ff883a
2 changed files with 9 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ void PlayerArea::setPlayerZoneId(int _playerZoneId)
|
|||
}
|
||||
|
||||
Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, TabGame *_parent)
|
||||
: QObject(_parent), game(_parent), movingCardsUntil(false), shortcutsActive(false), lastTokenDestroy(true),
|
||||
: QObject(_parent), game(_parent), movingCardsUntil(false), isCreatingArrow(false), shortcutsActive(false), lastTokenDestroy(true),
|
||||
lastTokenTableRow(0), id(_id), active(false), local(_local), judge(_judge), mirrored(false), handVisible(false),
|
||||
conceded(false), zoneId(0), dialogSemaphore(false), deck(nullptr)
|
||||
{
|
||||
|
|
@ -1967,6 +1967,7 @@ void Player::eventRollDie(const Event_RollDie &event)
|
|||
|
||||
void Player::eventCreateArrow(const Event_CreateArrow &event)
|
||||
{
|
||||
isCreatingArrow = false;
|
||||
ArrowItem *arrow = addArrow(event.arrow_info());
|
||||
if (!arrow) {
|
||||
return;
|
||||
|
|
@ -3199,7 +3200,13 @@ void Player::actSetPT()
|
|||
|
||||
void Player::actDrawArrow()
|
||||
{
|
||||
if (isCreatingArrow) {
|
||||
return;
|
||||
}
|
||||
|
||||
isCreatingArrow = true;
|
||||
if (!game->getActiveCard()) {
|
||||
isCreatingArrow = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ private:
|
|||
QString previousMovingCardsUntilExpr = {};
|
||||
FilterString movingCardsUntilFilter;
|
||||
|
||||
bool isCreatingArrow;
|
||||
bool shortcutsActive;
|
||||
int defaultNumberTopCards = 1;
|
||||
int defaultNumberTopCardsToPlaceBelow = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue