mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 23:12:14 -07:00
zoneId is a dynamic gameplay property and thus belongs in player.cpp
Took 11 minutes Took 19 seconds
This commit is contained in:
parent
270bdefd87
commit
aaf3c1e3b2
11 changed files with 31 additions and 32 deletions
|
|
@ -32,7 +32,7 @@
|
|||
Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, Game *_parent)
|
||||
: QObject(_parent), game(_parent), playerInfo(new PlayerInfo(info, _id, _local, _judge)),
|
||||
playerEventHandler(new PlayerEventHandler(this)), playerActions(new PlayerActions(this)), active(false),
|
||||
conceded(false), deck(nullptr), dialogSemaphore(false)
|
||||
conceded(false), deck(nullptr), zoneId(0), dialogSemaphore(false)
|
||||
{
|
||||
initializeZones();
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, G
|
|||
connect(this, &Player::deckChanged, playerMenu, &PlayerMenu::enableOpenInDeckEditorAction);
|
||||
connect(this, &Player::deckChanged, playerMenu, &PlayerMenu::populatePredefinedTokensMenu);
|
||||
|
||||
// connect(this, &Player::openDeckEditor, game, &TabGame::openDeckEditor);
|
||||
connect(this, &Player::openDeckEditor, game->getTab(), &TabGame::openDeckEditor);
|
||||
}
|
||||
|
||||
void Player::initializeZones()
|
||||
|
|
@ -109,6 +109,12 @@ void Player::setConceded(bool _conceded)
|
|||
}
|
||||
}
|
||||
|
||||
void Player::setZoneId(int _zoneId)
|
||||
{
|
||||
zoneId = _zoneId;
|
||||
graphicsItem->getPlayerArea()->setPlayerZoneId(zoneId);
|
||||
}
|
||||
|
||||
void Player::processPlayerInfo(const ServerInfo_Player &info)
|
||||
{
|
||||
static QSet<QString> builtinZones{/* PileZones */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue