mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 04:16:43 -07:00
[Game][Arrows] Split Arrows into ArrowData and ArrowItem (#6918)
* [Game][Arrows] Split Arrows into ArrowData and ArrowItem Took 13 minutes Took 5 seconds Took 1 minute Took 26 seconds * Address comments. Took 17 minutes Took 9 seconds Took 1 minute * Change check. Took 3 minutes * Pass by const reference. Took 10 minutes * Remove extra method Took 2 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
bddf9bd818
commit
491d1c9187
15 changed files with 337 additions and 327 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#define PLAYER_H
|
||||
|
||||
#include "../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../board/arrow_data.h"
|
||||
#include "../interface/deck_loader/loaded_deck.h"
|
||||
#include "../zones/hand_zone_logic.h"
|
||||
#include "../zones/pile_zone_logic.h"
|
||||
|
|
@ -77,6 +78,9 @@ signals:
|
|||
void clearCustomZonesMenu();
|
||||
void addViewCustomZoneActionToCustomZoneMenu(QString zoneName);
|
||||
void resetTopCardMenuActions();
|
||||
void arrowCreateRequested(ArrowData data);
|
||||
void arrowDeleteRequested(int arrowId);
|
||||
void arrowsCleared(); // fires on clear() and processPlayerInfo
|
||||
|
||||
public slots:
|
||||
void setActive(bool _active);
|
||||
|
|
@ -205,17 +209,6 @@ public:
|
|||
*/
|
||||
CounterState *getLifeCounter() const;
|
||||
|
||||
ArrowItem *addArrow(const ServerInfo_Arrow &arrow);
|
||||
ArrowItem *addArrow(int arrowId, CardItem *startCard, ArrowTarget *targetItem, const QColor &color);
|
||||
void delArrow(int arrowId);
|
||||
void removeArrow(ArrowItem *arrow);
|
||||
void clearArrows();
|
||||
|
||||
const QMap<int, ArrowItem *> &getArrows() const
|
||||
{
|
||||
return arrows;
|
||||
}
|
||||
|
||||
void setConceded(bool _conceded);
|
||||
bool getConceded() const
|
||||
{
|
||||
|
|
@ -252,12 +245,9 @@ private:
|
|||
int zoneId;
|
||||
QMap<QString, CardZoneLogic *> zones;
|
||||
QMap<int, CounterState *> counters;
|
||||
QMap<int, ArrowItem *> arrows;
|
||||
|
||||
bool dialogSemaphore;
|
||||
QList<CardItem *> cardsToDelete;
|
||||
|
||||
// void eventConnectionStateChanged(const Event_ConnectionStateChanged &event);
|
||||
};
|
||||
|
||||
class AnnotationDialog : public QInputDialog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue