From fddcbb82964dedfbd08daa77a1444a422cad12c8 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 26 Aug 2015 23:26:39 +0200 Subject: [PATCH 1/7] Lazy loading of card database view => faster startup times --- cockatrice/src/carddatabase.cpp | 46 ++++++++++++++++++---------- cockatrice/src/carddatabase.h | 24 +++++++-------- cockatrice/src/carddatabasemodel.cpp | 42 ++++++++++++++++--------- cockatrice/src/carddatabasemodel.h | 5 +++ cockatrice/src/dlg_edit_tokens.cpp | 2 +- cockatrice/src/main.cpp | 13 +++++--- cockatrice/src/tab_deck_editor.cpp | 3 +- oracle/src/oracleimporter.cpp | 2 +- 8 files changed, 84 insertions(+), 53 deletions(-) diff --git a/cockatrice/src/carddatabase.cpp b/cockatrice/src/carddatabase.cpp index 41a4976ee..ae4bbab8f 100644 --- a/cockatrice/src/carddatabase.cpp +++ b/cockatrice/src/carddatabase.cpp @@ -157,8 +157,7 @@ void SetList::guessSortKeys() } } -CardInfo::CardInfo(CardDatabase *_db, - const QString &_name, +CardInfo::CardInfo(const QString &_name, bool _isToken, const QString &_manacost, const QString &_cmc, @@ -176,8 +175,7 @@ CardInfo::CardInfo(CardDatabase *_db, const QStringMap &_customPicURLs, MuidMap _muIds ) - : db(_db), - name(_name), + : name(_name), isToken(_isToken), sets(_sets), manacost(_manacost), @@ -188,6 +186,7 @@ CardInfo::CardInfo(CardDatabase *_db, colors(_colors), relatedCards(_relatedCards), reverseRelatedCards(_reverseRelatedCards), + setsNames(), upsideDownArt(_upsideDownArt), loyalty(_loyalty), customPicURLs(_customPicURLs), @@ -200,6 +199,8 @@ CardInfo::CardInfo(CardDatabase *_db, for (int i = 0; i < sets.size(); i++) sets[i]->append(this); + + refreshCachedSetNames(); } CardInfo::~CardInfo() @@ -249,6 +250,21 @@ void CardInfo::addToSet(CardSet *set) { set->append(this); sets << set; + + refreshCachedSetNames(); +} + +void CardInfo::refreshCachedSetNames() +{ + // update the cached list of set names + QStringList setList; + for (int i = 0; i < sets.size(); i++) + { + if(sets[i]->getEnabled()) + setList << sets[i]->getShortName(); + } + setsNames = setList.join(", "); + } QString CardInfo::simplifyName(const QString &name) { @@ -330,10 +346,7 @@ CardDatabase::CardDatabase(QObject *parent) connect(settingsCache, SIGNAL(cardDatabasePathChanged()), this, SLOT(loadCardDatabase())); connect(settingsCache, SIGNAL(tokenDatabasePathChanged()), this, SLOT(loadTokenDatabase())); - loadCardDatabase(); - loadTokenDatabase(); - - noCard = new CardInfo(this); + noCard = new CardInfo(); } CardDatabase::~CardDatabase() @@ -506,7 +519,7 @@ void CardDatabase::loadCardsFromXml(QXmlStreamReader &xml, bool tokens) } if (isToken == tokens) { - addCard(new CardInfo(this, name, isToken, manacost, cmc, type, pt, text, colors, relatedCards, reverseRelatedCards, upsideDown, loyalty, cipt, tableRow, sets, customPicURLs, muids)); + addCard(new CardInfo(name, isToken, manacost, cmc, type, pt, text, colors, relatedCards, reverseRelatedCards, upsideDown, loyalty, cipt, tableRow, sets, customPicURLs, muids)); } } } @@ -517,7 +530,7 @@ CardInfo *CardDatabase::getCardFromMap(CardNameMap &cardMap, const QString &card return cardMap.value(cardName); if (createIfNotFound) { - CardInfo *newCard = new CardInfo(this, cardName, true); + CardInfo *newCard = new CardInfo(cardName, true); newCard->addToSet(getSet(CardDatabase::TOKENS_SETNAME)); cardMap.insert(cardName, newCard); return newCard; @@ -619,23 +632,22 @@ LoadStatus CardDatabase::loadCardDatabase(const QString &path, bool tokens) emit cardListChanged(); } - if (!tokens) { + if (!tokens) loadStatus = tempLoadStatus; - qDebug() << "loadCardDatabase(): Path = " << path << " Status = " << loadStatus; - } + qDebug() << "loadCardDatabase(): Path =" << path << "Tokens =" << tokens << "Status =" << loadStatus; return tempLoadStatus; } -void CardDatabase::loadCardDatabase() +LoadStatus CardDatabase::loadCardDatabase() { - loadCardDatabase(settingsCache->getCardDatabasePath(), false); + return loadCardDatabase(settingsCache->getCardDatabasePath(), false); } -void CardDatabase::loadTokenDatabase() +LoadStatus CardDatabase::loadTokenDatabase() { - loadCardDatabase(settingsCache->getTokenDatabasePath(), true); + return loadCardDatabase(settingsCache->getTokenDatabasePath(), true); } void CardDatabase::loadCustomCardDatabases(const QString &path) diff --git a/cockatrice/src/carddatabase.h b/cockatrice/src/carddatabase.h index 1cb8544a2..fdcfa7df5 100644 --- a/cockatrice/src/carddatabase.h +++ b/cockatrice/src/carddatabase.h @@ -60,8 +60,6 @@ public: class CardInfo : public QObject { Q_OBJECT private: - CardDatabase *db; - QString name; /* @@ -84,6 +82,7 @@ private: QStringList reverseRelatedCards; // the cards thare are reverse-related to me QStringList reverseRelatedCardsToMe; + QString setsNames; bool upsideDownArt; int loyalty; QStringMap customPicURLs; @@ -92,9 +91,9 @@ private: int tableRow; QString pixmapCacheKey; + void refreshCachedSetNames(); public: - CardInfo(CardDatabase *_db, - const QString &_name = QString(), + CardInfo(const QString &_name = QString(), bool _isToken = false, const QString &_manacost = QString(), const QString &_cmc = QString(), @@ -113,14 +112,15 @@ public: MuidMap muids = MuidMap() ); ~CardInfo(); - const QString &getName() const { return name; } + inline const QString &getName() const { return name; } + inline const QString &getSetsNames() const { return setsNames; } const QString &getSimpleName() const { return simpleName; } bool getIsToken() const { return isToken; } const SetList &getSets() const { return sets; } - const QString &getManaCost() const { return manacost; } - const QString &getCmc() const { return cmc; } - const QString &getCardType() const { return cardtype; } - const QString &getPowTough() const { return powtough; } + inline const QString &getManaCost() const { return manacost; } + inline const QString &getCmc() const { return cmc; } + inline const QString &getCardType() const { return cardtype; } + inline const QString &getPowTough() const { return powtough; } const QString &getText() const { return text; } const QString &getPixmapCacheKey() const { return pixmapCacheKey; } const int &getLoyalty() const { return loyalty; } @@ -229,12 +229,12 @@ public: bool hasDetectedFirstRun(); void refreshCachedReverseRelatedCards(); public slots: - LoadStatus loadCardDatabase(const QString &path, bool tokens = false); + LoadStatus loadCardDatabase(); + LoadStatus loadTokenDatabase(); void loadCustomCardDatabases(const QString &path); void emitCardListChanged(); private slots: - void loadCardDatabase(); - void loadTokenDatabase(); + LoadStatus loadCardDatabase(const QString &path, bool tokens = false); signals: void cardListChanged(); void cardAdded(CardInfo *card); diff --git a/cockatrice/src/carddatabasemodel.cpp b/cockatrice/src/carddatabasemodel.cpp index 94939b8b2..9b8a89bcc 100644 --- a/cockatrice/src/carddatabasemodel.cpp +++ b/cockatrice/src/carddatabasemodel.cpp @@ -28,26 +28,16 @@ int CardDatabaseModel::columnCount(const QModelIndex &/*parent*/) const QVariant CardDatabaseModel::data(const QModelIndex &index, int role) const { - if (!index.isValid()) - return QVariant(); - if ((index.row() >= cardList.size()) || (index.column() >= CARDDBMODEL_COLUMNS)) - return QVariant(); - if (role != Qt::DisplayRole && role != SortRole) + if (!index.isValid() || + index.row() >= cardList.size() || + index.column() >= CARDDBMODEL_COLUMNS || + (role != Qt::DisplayRole && role != SortRole)) return QVariant(); CardInfo *card = cardList.at(index.row()); switch (index.column()){ case NameColumn: return card->getName(); - case SetListColumn: { - QStringList setList; - const QList &sets = card->getSets(); - for (int i = 0; i < sets.size(); i++) - { - if(sets[i]->getEnabled()) - setList << sets[i]->getShortName(); - } - return setList.join(", "); - } + case SetListColumn: return card->getSetsNames(); case ManaCostColumn: return role == SortRole ? QString("%1%2").arg(card->getCmc(), 4, QChar('0')).arg(card->getManaCost()) : card->getManaCost(); @@ -139,8 +129,30 @@ CardDatabaseDisplayModel::CardDatabaseDisplayModel(QObject *parent) filterTree = NULL; setFilterCaseSensitivity(Qt::CaseInsensitive); setSortCaseSensitivity(Qt::CaseInsensitive); + + loadedRowCount = 0; } +bool CardDatabaseDisplayModel::canFetchMore(const QModelIndex & index) const +{ + return loadedRowCount < sourceModel()->rowCount(index); +} + +void CardDatabaseDisplayModel::fetchMore(const QModelIndex & index) +{ + int remainder = sourceModel()->rowCount(index) - loadedRowCount; + int itemsToFetch = qMin(100, remainder); + + beginInsertRows(QModelIndex(), loadedRowCount, loadedRowCount+itemsToFetch-1); + + loadedRowCount += itemsToFetch; + endInsertRows(); +} + +int CardDatabaseDisplayModel::rowCount(const QModelIndex &parent) const +{ + return qMin(QSortFilterProxyModel::rowCount(parent), loadedRowCount); +} bool CardDatabaseDisplayModel::lessThan(const QModelIndex &left, const QModelIndex &right) const { diff --git a/cockatrice/src/carddatabasemodel.h b/cockatrice/src/carddatabasemodel.h index 35ec45a98..ba8620256 100644 --- a/cockatrice/src/carddatabasemodel.h +++ b/cockatrice/src/carddatabasemodel.h @@ -42,6 +42,7 @@ private: QString searchTerm; QSet cardNameSet, cardTypes, cardColors; FilterTree *filterTree; + int loadedRowCount; public: CardDatabaseDisplayModel(QObject *parent = 0); void setFilterTree(FilterTree *filterTree); @@ -54,9 +55,13 @@ public: void setCardTypes(const QSet &_cardTypes) { cardTypes = _cardTypes; invalidate(); } void setCardColors(const QSet &_cardColors) { cardColors = _cardColors; invalidate(); } void clearFilterAll(); + int rowCount(const QModelIndex &parent = QModelIndex()) const; protected: bool lessThan(const QModelIndex &left, const QModelIndex &right) const; bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + + bool canFetchMore(const QModelIndex &parent) const; + void fetchMore(const QModelIndex &parent); private slots: void filterTreeChanged(); }; diff --git a/cockatrice/src/dlg_edit_tokens.cpp b/cockatrice/src/dlg_edit_tokens.cpp index 92725866c..8cf88ee9e 100644 --- a/cockatrice/src/dlg_edit_tokens.cpp +++ b/cockatrice/src/dlg_edit_tokens.cpp @@ -145,7 +145,7 @@ void DlgEditTokens::actAddToken() if (name.isEmpty()) return; - CardInfo *card = new CardInfo(cardDatabaseModel->getDatabase(), name, true); + CardInfo *card = new CardInfo(name, true); card->addToSet(cardDatabaseModel->getDatabase()->getSet(CardDatabase::TOKENS_SETNAME)); card->setCardType("Token"); cardDatabaseModel->getDatabase()->addCard(card); diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index 10d01bfc4..6d1066f10 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -163,12 +163,15 @@ int main(int argc, char *argv[]) #else const QString dataDir = QStandardPaths::standardLocations(QStandardPaths::DataLocation).first(); #endif - - if (!db->getLoadSuccess()) - if (!db->loadCardDatabase(dataDir + "/cards.xml")) - settingsCache->setCardDatabasePath(dataDir + "/cards.xml"); - if (settingsCache->getTokenDatabasePath().isEmpty()) + + if (settingsCache->getCardDatabasePath().isEmpty() || + db->loadCardDatabase() != Ok) + settingsCache->setCardDatabasePath(dataDir + "/cards.xml"); + + if (settingsCache->getTokenDatabasePath().isEmpty() || + db->loadTokenDatabase() != Ok) settingsCache->setTokenDatabasePath(dataDir + "/tokens.xml"); + if (!QDir(settingsCache->getDeckPath()).exists() || settingsCache->getDeckPath().isEmpty()) { QDir().mkpath(dataDir + "/decks"); settingsCache->setDeckPath(dataDir + "/decks"); diff --git a/cockatrice/src/tab_deck_editor.cpp b/cockatrice/src/tab_deck_editor.cpp index 1e27434bd..771111a28 100644 --- a/cockatrice/src/tab_deck_editor.cpp +++ b/cockatrice/src/tab_deck_editor.cpp @@ -367,17 +367,16 @@ void TabDeckEditor::createCentralFrame() databaseDisplayModel = new CardDatabaseDisplayModel(this); databaseDisplayModel->setSourceModel(databaseModel); databaseDisplayModel->setFilterKeyColumn(0); - databaseDisplayModel->sort(0, Qt::AscendingOrder); databaseView = new QTreeView(); databaseView->setObjectName("databaseView"); databaseView->setFocusProxy(searchEdit); - databaseView->setModel(databaseDisplayModel); databaseView->setUniformRowHeights(true); databaseView->setRootIsDecorated(false); databaseView->setAlternatingRowColors(true); databaseView->setSortingEnabled(true); databaseView->sortByColumn(0, Qt::AscendingOrder); + databaseView->setModel(databaseDisplayModel); databaseView->resizeColumnToContents(0); connect(databaseView->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(updateCardInfoLeft(const QModelIndex &, const QModelIndex &))); connect(databaseView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actAddCard())); diff --git a/oracle/src/oracleimporter.cpp b/oracle/src/oracleimporter.cpp index 7659f4651..f4f8e8705 100644 --- a/oracle/src/oracleimporter.cpp +++ b/oracle/src/oracleimporter.cpp @@ -96,7 +96,7 @@ CardInfo *OracleImporter::addCard(const QString &setName, bool cipt = cardText.contains("Hideaway") || (cardText.contains(cardName + " enters the battlefield tapped") && !cardText.contains(cardName + " enters the battlefield tapped unless")); // insert the card and its properties - card = new CardInfo(this, cardName, isToken, cardCost, cmc, cardType, cardPT, cardText, colors, relatedCards, reverseRelatedCards, upsideDown, cardLoyalty, cipt); + card = new CardInfo(cardName, isToken, cardCost, cmc, cardType, cardPT, cardText, colors, relatedCards, reverseRelatedCards, upsideDown, cardLoyalty, cipt); int tableRow = 1; QString mainCardType = card->getMainCardType(); if ((mainCardType == "Land") || mArtifact) From c415d4d70e9fe3d59a4b70a64053da274fe77451 Mon Sep 17 00:00:00 2001 From: tooomm Date: Mon, 11 Jan 2016 00:17:08 +0100 Subject: [PATCH 2/7] Updated ToC with 'Downloads' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f889fe4b7..4bdabbc10 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ --- -**Table of Contents**    [Cockatrice](#cockatrice) | [Get Involved] (#get-involved-) | [Community](#community-resources) | [Translation](#translation-status-) | [Building](#building--) | [Running](#running) | [License](#license-) +**Table of Contents**    [Cockatrice](#cockatrice) | [Downloads](#downloads) | [Get Involved] (#get-involved-) | [Community](#community-resources) | [Translation](#translation-status-) | [Building](#building--) | [Running](#running) | [License](#license-) --- From 3605cc55b7d788491198a2aec4baab70242e6b25 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 13 Jan 2016 00:17:02 +0100 Subject: [PATCH 3/7] fix replay progress bar --- cockatrice/src/replay_timeline_widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/replay_timeline_widget.cpp b/cockatrice/src/replay_timeline_widget.cpp index fb3efc1dc..e07763583 100644 --- a/cockatrice/src/replay_timeline_widget.cpp +++ b/cockatrice/src/replay_timeline_widget.cpp @@ -58,7 +58,8 @@ void ReplayTimelineWidget::paintEvent(QPaintEvent * /* event */) painter.fillPath(path, Qt::black); const QColor barColor = QColor::fromHsv(120, 255, 255, 100); - painter.fillRect(0, 0, (width() - 1) * currentTime / maxTime, height() - 1, barColor); + quint64 w = (quint64)(width() - 1) * (quint64) currentTime / maxTime; + painter.fillRect(0, 0, w, height() - 1, barColor); } QSize ReplayTimelineWidget::sizeHint() const From 0734b81e6ea94d46256ba9ca81abc8ab23a2c5a4 Mon Sep 17 00:00:00 2001 From: Gavin Bisesi Date: Thu, 14 Jan 2016 08:08:25 -0500 Subject: [PATCH 4/7] Remove 'syntax = proto2' from .proto files. That marker is only recognized by pb3-compatible compilers, meaning that tools which are otherwise compatible with our files break on them. Notably, this includes hprotoc (for haskell). --- common/pb/admin_commands.proto | 1 - common/pb/card_attributes.proto | 1 - common/pb/color.proto | 3 +-- common/pb/command_attach_card.proto | 1 - common/pb/command_change_zone_properties.proto | 1 - common/pb/command_concede.proto | 1 - common/pb/command_create_arrow.proto | 1 - common/pb/command_create_counter.proto | 1 - common/pb/command_create_token.proto | 1 - common/pb/command_deck_del.proto | 1 - common/pb/command_deck_del_dir.proto | 1 - common/pb/command_deck_download.proto | 1 - common/pb/command_deck_list.proto | 1 - common/pb/command_deck_new_dir.proto | 3 +-- common/pb/command_deck_select.proto | 1 - common/pb/command_deck_upload.proto | 1 - common/pb/command_del_counter.proto | 1 - common/pb/command_delete_arrow.proto | 1 - common/pb/command_draw_cards.proto | 1 - common/pb/command_dump_zone.proto | 1 - common/pb/command_flip_card.proto | 1 - common/pb/command_game_say.proto | 1 - common/pb/command_inc_card_counter.proto | 1 - common/pb/command_inc_counter.proto | 1 - common/pb/command_kick_from_game.proto | 1 - common/pb/command_leave_game.proto | 1 - common/pb/command_move_card.proto | 1 - common/pb/command_mulligan.proto | 1 - common/pb/command_next_turn.proto | 1 - common/pb/command_ready_start.proto | 1 - common/pb/command_replay_delete_match.proto | 1 - common/pb/command_replay_download.proto | 1 - common/pb/command_replay_list.proto | 1 - common/pb/command_replay_modify_match.proto | 1 - common/pb/command_reveal_cards.proto | 1 - common/pb/command_roll_die.proto | 1 - common/pb/command_set_active_phase.proto | 1 - common/pb/command_set_card_attr.proto | 1 - common/pb/command_set_card_counter.proto | 1 - common/pb/command_set_counter.proto | 1 - common/pb/command_set_sideboard_lock.proto | 1 - common/pb/command_set_sideboard_plan.proto | 1 - common/pb/command_shuffle.proto | 1 - common/pb/command_stop_dump_zone.proto | 1 - common/pb/command_undo_draw.proto | 1 - common/pb/commands.proto | 1 - common/pb/context_concede.proto | 1 - common/pb/context_connection_state_changed.proto | 1 - common/pb/context_deck_select.proto | 1 - common/pb/context_move_card.proto | 1 - common/pb/context_mulligan.proto | 1 - common/pb/context_ping_changed.proto | 1 - common/pb/context_ready_start.proto | 1 - common/pb/context_set_sideboard_lock.proto | 1 - common/pb/context_undo_draw.proto | 1 - common/pb/event_add_to_list.proto | 1 - common/pb/event_attach_card.proto | 1 - common/pb/event_change_zone_properties.proto | 1 - common/pb/event_connection_closed.proto | 1 - common/pb/event_create_arrow.proto | 1 - common/pb/event_create_counter.proto | 1 - common/pb/event_create_token.proto | 1 - common/pb/event_del_counter.proto | 1 - common/pb/event_delete_arrow.proto | 1 - common/pb/event_destroy_card.proto | 1 - common/pb/event_draw_cards.proto | 1 - common/pb/event_dump_zone.proto | 1 - common/pb/event_flip_card.proto | 1 - common/pb/event_game_closed.proto | 1 - common/pb/event_game_host_changed.proto | 1 - common/pb/event_game_joined.proto | 1 - common/pb/event_game_say.proto | 1 - common/pb/event_game_state_changed.proto | 1 - common/pb/event_join.proto | 1 - common/pb/event_join_room.proto | 1 - common/pb/event_kicked.proto | 1 - common/pb/event_leave.proto | 1 - common/pb/event_leave_room.proto | 1 - common/pb/event_list_games.proto | 1 - common/pb/event_list_rooms.proto | 1 - common/pb/event_move_card.proto | 1 - common/pb/event_notify_user.proto | 1 - common/pb/event_player_properties_changed.proto | 1 - common/pb/event_remove_from_list.proto | 1 - common/pb/event_replay_added.proto | 1 - common/pb/event_reveal_cards.proto | 1 - common/pb/event_roll_die.proto | 1 - common/pb/event_room_say.proto | 1 - common/pb/event_server_complete_list.proto | 1 - common/pb/event_server_identification.proto | 1 - common/pb/event_server_message.proto | 1 - common/pb/event_server_shutdown.proto | 1 - common/pb/event_set_active_phase.proto | 1 - common/pb/event_set_active_player.proto | 1 - common/pb/event_set_card_attr.proto | 1 - common/pb/event_set_card_counter.proto | 1 - common/pb/event_set_counter.proto | 1 - common/pb/event_shuffle.proto | 1 - common/pb/event_stop_dump_zone.proto | 1 - common/pb/event_user_joined.proto | 1 - common/pb/event_user_left.proto | 1 - common/pb/event_user_message.proto | 1 - common/pb/game_commands.proto | 1 - common/pb/game_event.proto | 1 - common/pb/game_event_container.proto | 1 - common/pb/game_event_context.proto | 1 - common/pb/game_replay.proto | 1 - common/pb/isl_message.proto | 1 - common/pb/moderator_commands.proto | 3 +-- common/pb/move_card_to_zone.proto | 1 - common/pb/response.proto | 1 - common/pb/response_activate.proto | 3 +-- common/pb/response_adjust_mod.proto | 1 - common/pb/response_ban_history.proto | 1 - common/pb/response_deck_download.proto | 1 - common/pb/response_deck_list.proto | 1 - common/pb/response_deck_upload.proto | 1 - common/pb/response_dump_zone.proto | 1 - common/pb/response_get_games_of_user.proto | 1 - common/pb/response_get_user_info.proto | 1 - common/pb/response_join_room.proto | 1 - common/pb/response_list_users.proto | 1 - common/pb/response_login.proto | 1 - common/pb/response_register.proto | 3 +-- common/pb/response_replay_download.proto | 1 - common/pb/response_replay_list.proto | 1 - common/pb/response_viewlog_history.proto | 1 - common/pb/response_warn_history.proto | 1 - common/pb/response_warn_list.proto | 1 - common/pb/room_commands.proto | 1 - common/pb/room_event.proto | 1 - common/pb/server_message.proto | 1 - common/pb/serverinfo_arrow.proto | 1 - common/pb/serverinfo_ban.proto | 1 - common/pb/serverinfo_card.proto | 1 - common/pb/serverinfo_cardcounter.proto | 1 - common/pb/serverinfo_chat_message.proto | 1 - common/pb/serverinfo_counter.proto | 1 - common/pb/serverinfo_deckstorage.proto | 1 - common/pb/serverinfo_game.proto | 1 - common/pb/serverinfo_gametype.proto | 1 - common/pb/serverinfo_player.proto | 1 - common/pb/serverinfo_playerping.proto | 1 - common/pb/serverinfo_playerproperties.proto | 1 - common/pb/serverinfo_replay.proto | 1 - common/pb/serverinfo_replay_match.proto | 1 - common/pb/serverinfo_room.proto | 1 - common/pb/serverinfo_user.proto | 1 - common/pb/serverinfo_warning.proto | 1 - common/pb/serverinfo_zone.proto | 1 - common/pb/session_commands.proto | 1 - common/pb/session_event.proto | 1 - 152 files changed, 5 insertions(+), 157 deletions(-) diff --git a/common/pb/admin_commands.proto b/common/pb/admin_commands.proto index 9d5e54149..b9caae25f 100644 --- a/common/pb/admin_commands.proto +++ b/common/pb/admin_commands.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message AdminCommand { enum AdminCommandType { UPDATE_SERVER_MESSAGE = 1000; diff --git a/common/pb/card_attributes.proto b/common/pb/card_attributes.proto index ac23ca0d3..ecd309424 100644 --- a/common/pb/card_attributes.proto +++ b/common/pb/card_attributes.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; enum CardAttribute { AttrTapped = 1; AttrAttacking = 2; diff --git a/common/pb/color.proto b/common/pb/color.proto index d932ba761..0bfabe7c1 100644 --- a/common/pb/color.proto +++ b/common/pb/color.proto @@ -1,7 +1,6 @@ -syntax = "proto2"; message color { optional uint32 r = 1; optional uint32 g = 2; optional uint32 b = 3; optional uint32 a = 4; -} \ No newline at end of file +} diff --git a/common/pb/command_attach_card.proto b/common/pb/command_attach_card.proto index 654e57c5f..b6052b078 100644 --- a/common/pb/command_attach_card.proto +++ b/common/pb/command_attach_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_AttachCard { extend GameCommand { diff --git a/common/pb/command_change_zone_properties.proto b/common/pb/command_change_zone_properties.proto index f89e36aaa..8db604b60 100644 --- a/common/pb/command_change_zone_properties.proto +++ b/common/pb/command_change_zone_properties.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_ChangeZoneProperties { diff --git a/common/pb/command_concede.proto b/common/pb/command_concede.proto index 5ac742352..05740546e 100644 --- a/common/pb/command_concede.proto +++ b/common/pb/command_concede.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_Concede { extend GameCommand { diff --git a/common/pb/command_create_arrow.proto b/common/pb/command_create_arrow.proto index 550480313..067bcab3c 100644 --- a/common/pb/command_create_arrow.proto +++ b/common/pb/command_create_arrow.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; import "color.proto"; diff --git a/common/pb/command_create_counter.proto b/common/pb/command_create_counter.proto index d60fbdc21..99d63a1f2 100644 --- a/common/pb/command_create_counter.proto +++ b/common/pb/command_create_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; import "color.proto"; diff --git a/common/pb/command_create_token.proto b/common/pb/command_create_token.proto index 9fc61b70e..f3da81509 100644 --- a/common/pb/command_create_token.proto +++ b/common/pb/command_create_token.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_CreateToken { extend GameCommand { diff --git a/common/pb/command_deck_del.proto b/common/pb/command_deck_del.proto index a231ca087..de9daaa7d 100644 --- a/common/pb/command_deck_del.proto +++ b/common/pb/command_deck_del.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_DeckDel { diff --git a/common/pb/command_deck_del_dir.proto b/common/pb/command_deck_del_dir.proto index 3364cac42..28eb75f6d 100644 --- a/common/pb/command_deck_del_dir.proto +++ b/common/pb/command_deck_del_dir.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_DeckDelDir { diff --git a/common/pb/command_deck_download.proto b/common/pb/command_deck_download.proto index 19dda1528..355182639 100644 --- a/common/pb/command_deck_download.proto +++ b/common/pb/command_deck_download.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_DeckDownload { diff --git a/common/pb/command_deck_list.proto b/common/pb/command_deck_list.proto index 43f1b0e01..069a775b2 100644 --- a/common/pb/command_deck_list.proto +++ b/common/pb/command_deck_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_DeckList { diff --git a/common/pb/command_deck_new_dir.proto b/common/pb/command_deck_new_dir.proto index ecb3b1065..010767d74 100644 --- a/common/pb/command_deck_new_dir.proto +++ b/common/pb/command_deck_new_dir.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_DeckNewDir { @@ -8,4 +7,4 @@ message Command_DeckNewDir { optional string path = 1; optional string dir_name = 2; } - \ No newline at end of file + diff --git a/common/pb/command_deck_select.proto b/common/pb/command_deck_select.proto index d79bf37e4..574bb3983 100644 --- a/common/pb/command_deck_select.proto +++ b/common/pb/command_deck_select.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_DeckSelect { extend GameCommand { diff --git a/common/pb/command_deck_upload.proto b/common/pb/command_deck_upload.proto index 0f250c5f0..b0c2eee25 100644 --- a/common/pb/command_deck_upload.proto +++ b/common/pb/command_deck_upload.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_DeckUpload { diff --git a/common/pb/command_del_counter.proto b/common/pb/command_del_counter.proto index 8d2689a21..fad289489 100644 --- a/common/pb/command_del_counter.proto +++ b/common/pb/command_del_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_DelCounter { extend GameCommand { diff --git a/common/pb/command_delete_arrow.proto b/common/pb/command_delete_arrow.proto index ba204989b..0e86d32cc 100644 --- a/common/pb/command_delete_arrow.proto +++ b/common/pb/command_delete_arrow.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_DeleteArrow { extend GameCommand { diff --git a/common/pb/command_draw_cards.proto b/common/pb/command_draw_cards.proto index 6851ac00c..22777f9fa 100644 --- a/common/pb/command_draw_cards.proto +++ b/common/pb/command_draw_cards.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_DrawCards { extend GameCommand { diff --git a/common/pb/command_dump_zone.proto b/common/pb/command_dump_zone.proto index 07bfe1950..342d4197f 100644 --- a/common/pb/command_dump_zone.proto +++ b/common/pb/command_dump_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_DumpZone { extend GameCommand { diff --git a/common/pb/command_flip_card.proto b/common/pb/command_flip_card.proto index d825c64f3..324cda01c 100644 --- a/common/pb/command_flip_card.proto +++ b/common/pb/command_flip_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_FlipCard { extend GameCommand { diff --git a/common/pb/command_game_say.proto b/common/pb/command_game_say.proto index 6aa47e0e2..d9b5166e2 100644 --- a/common/pb/command_game_say.proto +++ b/common/pb/command_game_say.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_GameSay { extend GameCommand { diff --git a/common/pb/command_inc_card_counter.proto b/common/pb/command_inc_card_counter.proto index 8676fc89d..b6945d0ae 100644 --- a/common/pb/command_inc_card_counter.proto +++ b/common/pb/command_inc_card_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_IncCardCounter { extend GameCommand { diff --git a/common/pb/command_inc_counter.proto b/common/pb/command_inc_counter.proto index d99521b7e..52f2a7b5d 100644 --- a/common/pb/command_inc_counter.proto +++ b/common/pb/command_inc_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_IncCounter { extend GameCommand { diff --git a/common/pb/command_kick_from_game.proto b/common/pb/command_kick_from_game.proto index e95037c71..9683a2665 100644 --- a/common/pb/command_kick_from_game.proto +++ b/common/pb/command_kick_from_game.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_KickFromGame { extend GameCommand { diff --git a/common/pb/command_leave_game.proto b/common/pb/command_leave_game.proto index afa1e6c4e..2a916c515 100644 --- a/common/pb/command_leave_game.proto +++ b/common/pb/command_leave_game.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_LeaveGame { extend GameCommand { diff --git a/common/pb/command_move_card.proto b/common/pb/command_move_card.proto index ad3f7c573..aaa9e9c3d 100644 --- a/common/pb/command_move_card.proto +++ b/common/pb/command_move_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message CardToMove { optional sint32 card_id = 1 [default = -1]; diff --git a/common/pb/command_mulligan.proto b/common/pb/command_mulligan.proto index f0ffb87cc..0fa9adf9d 100644 --- a/common/pb/command_mulligan.proto +++ b/common/pb/command_mulligan.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_Mulligan { extend GameCommand { diff --git a/common/pb/command_next_turn.proto b/common/pb/command_next_turn.proto index 802d63cfc..6c87d2c33 100644 --- a/common/pb/command_next_turn.proto +++ b/common/pb/command_next_turn.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_NextTurn { extend GameCommand { diff --git a/common/pb/command_ready_start.proto b/common/pb/command_ready_start.proto index 1d7d203c2..ffa5cc794 100644 --- a/common/pb/command_ready_start.proto +++ b/common/pb/command_ready_start.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_ReadyStart { extend GameCommand { diff --git a/common/pb/command_replay_delete_match.proto b/common/pb/command_replay_delete_match.proto index 33d6d44b0..f85cf2e3c 100644 --- a/common/pb/command_replay_delete_match.proto +++ b/common/pb/command_replay_delete_match.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_ReplayDeleteMatch { diff --git a/common/pb/command_replay_download.proto b/common/pb/command_replay_download.proto index 17724e5bb..d8638f92c 100644 --- a/common/pb/command_replay_download.proto +++ b/common/pb/command_replay_download.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_ReplayDownload { diff --git a/common/pb/command_replay_list.proto b/common/pb/command_replay_list.proto index 8fbcdc5a4..2869c88d6 100644 --- a/common/pb/command_replay_list.proto +++ b/common/pb/command_replay_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_ReplayList { diff --git a/common/pb/command_replay_modify_match.proto b/common/pb/command_replay_modify_match.proto index 6b342f44a..1b4cb84f9 100644 --- a/common/pb/command_replay_modify_match.proto +++ b/common/pb/command_replay_modify_match.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; message Command_ReplayModifyMatch { diff --git a/common/pb/command_reveal_cards.proto b/common/pb/command_reveal_cards.proto index 5c4024bac..f94d61ac2 100644 --- a/common/pb/command_reveal_cards.proto +++ b/common/pb/command_reveal_cards.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_RevealCards { extend GameCommand { diff --git a/common/pb/command_roll_die.proto b/common/pb/command_roll_die.proto index bdcc7b51c..cdceb5261 100644 --- a/common/pb/command_roll_die.proto +++ b/common/pb/command_roll_die.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_RollDie { extend GameCommand { diff --git a/common/pb/command_set_active_phase.proto b/common/pb/command_set_active_phase.proto index ded7d8197..e54e5b38d 100644 --- a/common/pb/command_set_active_phase.proto +++ b/common/pb/command_set_active_phase.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_SetActivePhase { extend GameCommand { diff --git a/common/pb/command_set_card_attr.proto b/common/pb/command_set_card_attr.proto index 1e1d8664a..144cb858d 100644 --- a/common/pb/command_set_card_attr.proto +++ b/common/pb/command_set_card_attr.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; import "card_attributes.proto"; diff --git a/common/pb/command_set_card_counter.proto b/common/pb/command_set_card_counter.proto index 5fa9c3ee3..d56714045 100644 --- a/common/pb/command_set_card_counter.proto +++ b/common/pb/command_set_card_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_SetCardCounter { extend GameCommand { diff --git a/common/pb/command_set_counter.proto b/common/pb/command_set_counter.proto index 33cae56a5..0ddf45b11 100644 --- a/common/pb/command_set_counter.proto +++ b/common/pb/command_set_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_SetCounter { extend GameCommand { diff --git a/common/pb/command_set_sideboard_lock.proto b/common/pb/command_set_sideboard_lock.proto index 5aa6a64ba..815e92b37 100644 --- a/common/pb/command_set_sideboard_lock.proto +++ b/common/pb/command_set_sideboard_lock.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_SetSideboardLock { extend GameCommand { diff --git a/common/pb/command_set_sideboard_plan.proto b/common/pb/command_set_sideboard_plan.proto index 7ed0d10cb..250fb9dac 100644 --- a/common/pb/command_set_sideboard_plan.proto +++ b/common/pb/command_set_sideboard_plan.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; import "move_card_to_zone.proto"; diff --git a/common/pb/command_shuffle.proto b/common/pb/command_shuffle.proto index e2e1d5ec6..d0eff7c81 100644 --- a/common/pb/command_shuffle.proto +++ b/common/pb/command_shuffle.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_Shuffle { extend GameCommand { diff --git a/common/pb/command_stop_dump_zone.proto b/common/pb/command_stop_dump_zone.proto index 1896c9dcb..af5123a2e 100644 --- a/common/pb/command_stop_dump_zone.proto +++ b/common/pb/command_stop_dump_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_StopDumpZone { extend GameCommand { diff --git a/common/pb/command_undo_draw.proto b/common/pb/command_undo_draw.proto index 094289333..111ff67aa 100644 --- a/common/pb/command_undo_draw.proto +++ b/common/pb/command_undo_draw.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_commands.proto"; message Command_UndoDraw { extend GameCommand { diff --git a/common/pb/commands.proto b/common/pb/commands.proto index b417550a3..3076c002d 100644 --- a/common/pb/commands.proto +++ b/common/pb/commands.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_commands.proto"; import "game_commands.proto"; import "room_commands.proto"; diff --git a/common/pb/context_concede.proto b/common/pb/context_concede.proto index 7b82aa316..981804475 100644 --- a/common/pb/context_concede.proto +++ b/common/pb/context_concede.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_Concede { diff --git a/common/pb/context_connection_state_changed.proto b/common/pb/context_connection_state_changed.proto index c87f8beda..45d0a43de 100644 --- a/common/pb/context_connection_state_changed.proto +++ b/common/pb/context_connection_state_changed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_ConnectionStateChanged { diff --git a/common/pb/context_deck_select.proto b/common/pb/context_deck_select.proto index dbd4ce16e..f36c8b6c2 100644 --- a/common/pb/context_deck_select.proto +++ b/common/pb/context_deck_select.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_DeckSelect { diff --git a/common/pb/context_move_card.proto b/common/pb/context_move_card.proto index 49bcb77cd..9a030e481 100644 --- a/common/pb/context_move_card.proto +++ b/common/pb/context_move_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_MoveCard { diff --git a/common/pb/context_mulligan.proto b/common/pb/context_mulligan.proto index edcaf9003..fd59e6dac 100644 --- a/common/pb/context_mulligan.proto +++ b/common/pb/context_mulligan.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_Mulligan { diff --git a/common/pb/context_ping_changed.proto b/common/pb/context_ping_changed.proto index e8f1b0bdb..918c30a28 100644 --- a/common/pb/context_ping_changed.proto +++ b/common/pb/context_ping_changed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_PingChanged { diff --git a/common/pb/context_ready_start.proto b/common/pb/context_ready_start.proto index 7a4e60899..67285307d 100644 --- a/common/pb/context_ready_start.proto +++ b/common/pb/context_ready_start.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_ReadyStart { diff --git a/common/pb/context_set_sideboard_lock.proto b/common/pb/context_set_sideboard_lock.proto index a9a36f8b2..8124005cf 100644 --- a/common/pb/context_set_sideboard_lock.proto +++ b/common/pb/context_set_sideboard_lock.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_SetSideboardLock { diff --git a/common/pb/context_undo_draw.proto b/common/pb/context_undo_draw.proto index 8b934079f..340339e80 100644 --- a/common/pb/context_undo_draw.proto +++ b/common/pb/context_undo_draw.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event_context.proto"; message Context_UndoDraw { diff --git a/common/pb/event_add_to_list.proto b/common/pb/event_add_to_list.proto index 4a1072e81..3d13cc98b 100644 --- a/common/pb/event_add_to_list.proto +++ b/common/pb/event_add_to_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; import "serverinfo_user.proto"; diff --git a/common/pb/event_attach_card.proto b/common/pb/event_attach_card.proto index a71610f9f..72191debe 100644 --- a/common/pb/event_attach_card.proto +++ b/common/pb/event_attach_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_AttachCard { diff --git a/common/pb/event_change_zone_properties.proto b/common/pb/event_change_zone_properties.proto index 0f1deb6d9..7aabce096 100644 --- a/common/pb/event_change_zone_properties.proto +++ b/common/pb/event_change_zone_properties.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_ChangeZoneProperties { diff --git a/common/pb/event_connection_closed.proto b/common/pb/event_connection_closed.proto index 03018b800..564f15a89 100644 --- a/common/pb/event_connection_closed.proto +++ b/common/pb/event_connection_closed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_ConnectionClosed { diff --git a/common/pb/event_create_arrow.proto b/common/pb/event_create_arrow.proto index 820d3cea9..81a1250c3 100644 --- a/common/pb/event_create_arrow.proto +++ b/common/pb/event_create_arrow.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_arrow.proto"; diff --git a/common/pb/event_create_counter.proto b/common/pb/event_create_counter.proto index 5dfca01e1..4142a1e47 100644 --- a/common/pb/event_create_counter.proto +++ b/common/pb/event_create_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_counter.proto"; diff --git a/common/pb/event_create_token.proto b/common/pb/event_create_token.proto index 42c32eff8..8bb7fd154 100644 --- a/common/pb/event_create_token.proto +++ b/common/pb/event_create_token.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_CreateToken { diff --git a/common/pb/event_del_counter.proto b/common/pb/event_del_counter.proto index c693fc869..0785d0915 100644 --- a/common/pb/event_del_counter.proto +++ b/common/pb/event_del_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_DelCounter { diff --git a/common/pb/event_delete_arrow.proto b/common/pb/event_delete_arrow.proto index bd165c97f..b7767521d 100644 --- a/common/pb/event_delete_arrow.proto +++ b/common/pb/event_delete_arrow.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_DeleteArrow { diff --git a/common/pb/event_destroy_card.proto b/common/pb/event_destroy_card.proto index 8bef22421..d31321f64 100644 --- a/common/pb/event_destroy_card.proto +++ b/common/pb/event_destroy_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_DestroyCard { diff --git a/common/pb/event_draw_cards.proto b/common/pb/event_draw_cards.proto index cea343a12..3b76263a7 100644 --- a/common/pb/event_draw_cards.proto +++ b/common/pb/event_draw_cards.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_card.proto"; diff --git a/common/pb/event_dump_zone.proto b/common/pb/event_dump_zone.proto index f3dc08522..5179dc4b1 100644 --- a/common/pb/event_dump_zone.proto +++ b/common/pb/event_dump_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_DumpZone { diff --git a/common/pb/event_flip_card.proto b/common/pb/event_flip_card.proto index 08a5d8c6d..128c2e7fa 100644 --- a/common/pb/event_flip_card.proto +++ b/common/pb/event_flip_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_FlipCard { diff --git a/common/pb/event_game_closed.proto b/common/pb/event_game_closed.proto index e400926c1..f3a10da0a 100644 --- a/common/pb/event_game_closed.proto +++ b/common/pb/event_game_closed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_GameClosed { diff --git a/common/pb/event_game_host_changed.proto b/common/pb/event_game_host_changed.proto index 50e3f968f..397c1fb04 100644 --- a/common/pb/event_game_host_changed.proto +++ b/common/pb/event_game_host_changed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_GameHostChanged { diff --git a/common/pb/event_game_joined.proto b/common/pb/event_game_joined.proto index eaf2894c7..5e52b5a4b 100644 --- a/common/pb/event_game_joined.proto +++ b/common/pb/event_game_joined.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; import "serverinfo_game.proto"; import "serverinfo_gametype.proto"; diff --git a/common/pb/event_game_say.proto b/common/pb/event_game_say.proto index 8aa42eca1..27385a08d 100644 --- a/common/pb/event_game_say.proto +++ b/common/pb/event_game_say.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_GameSay { diff --git a/common/pb/event_game_state_changed.proto b/common/pb/event_game_state_changed.proto index 092d45de1..abbbd1eaa 100644 --- a/common/pb/event_game_state_changed.proto +++ b/common/pb/event_game_state_changed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_player.proto"; diff --git a/common/pb/event_join.proto b/common/pb/event_join.proto index 1c91dc099..ae9a9fa57 100644 --- a/common/pb/event_join.proto +++ b/common/pb/event_join.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_playerproperties.proto"; diff --git a/common/pb/event_join_room.proto b/common/pb/event_join_room.proto index e575edc41..852614c8a 100644 --- a/common/pb/event_join_room.proto +++ b/common/pb/event_join_room.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "room_event.proto"; import "serverinfo_user.proto"; diff --git a/common/pb/event_kicked.proto b/common/pb/event_kicked.proto index 02036cee7..39bb6de36 100644 --- a/common/pb/event_kicked.proto +++ b/common/pb/event_kicked.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_Kicked { diff --git a/common/pb/event_leave.proto b/common/pb/event_leave.proto index c4a3740f3..480c8f886 100644 --- a/common/pb/event_leave.proto +++ b/common/pb/event_leave.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_Leave { diff --git a/common/pb/event_leave_room.proto b/common/pb/event_leave_room.proto index 98dafe2d4..d894b5939 100644 --- a/common/pb/event_leave_room.proto +++ b/common/pb/event_leave_room.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "room_event.proto"; message Event_LeaveRoom { diff --git a/common/pb/event_list_games.proto b/common/pb/event_list_games.proto index b69c7b5c9..e613a7933 100644 --- a/common/pb/event_list_games.proto +++ b/common/pb/event_list_games.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "room_event.proto"; import "serverinfo_game.proto"; diff --git a/common/pb/event_list_rooms.proto b/common/pb/event_list_rooms.proto index e72d2ba19..05ddd4ed0 100644 --- a/common/pb/event_list_rooms.proto +++ b/common/pb/event_list_rooms.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; import "serverinfo_room.proto"; diff --git a/common/pb/event_move_card.proto b/common/pb/event_move_card.proto index f6d309f36..0d010d942 100644 --- a/common/pb/event_move_card.proto +++ b/common/pb/event_move_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_MoveCard { diff --git a/common/pb/event_notify_user.proto b/common/pb/event_notify_user.proto index d909259e3..de1641672 100644 --- a/common/pb/event_notify_user.proto +++ b/common/pb/event_notify_user.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_NotifyUser { diff --git a/common/pb/event_player_properties_changed.proto b/common/pb/event_player_properties_changed.proto index c0feaf532..a597d5a19 100644 --- a/common/pb/event_player_properties_changed.proto +++ b/common/pb/event_player_properties_changed.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_playerproperties.proto"; diff --git a/common/pb/event_remove_from_list.proto b/common/pb/event_remove_from_list.proto index 81bb64ede..1b7de4acd 100644 --- a/common/pb/event_remove_from_list.proto +++ b/common/pb/event_remove_from_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_RemoveFromList { diff --git a/common/pb/event_replay_added.proto b/common/pb/event_replay_added.proto index 2efb5f37a..5fcb80712 100644 --- a/common/pb/event_replay_added.proto +++ b/common/pb/event_replay_added.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; import "serverinfo_replay_match.proto"; diff --git a/common/pb/event_reveal_cards.proto b/common/pb/event_reveal_cards.proto index f6742c696..03a42638b 100644 --- a/common/pb/event_reveal_cards.proto +++ b/common/pb/event_reveal_cards.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "serverinfo_card.proto"; diff --git a/common/pb/event_roll_die.proto b/common/pb/event_roll_die.proto index 4d99f2be5..697bbb536 100644 --- a/common/pb/event_roll_die.proto +++ b/common/pb/event_roll_die.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_RollDie { diff --git a/common/pb/event_room_say.proto b/common/pb/event_room_say.proto index 122f0f454..32f6f6442 100644 --- a/common/pb/event_room_say.proto +++ b/common/pb/event_room_say.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "room_event.proto"; message Event_RoomSay { diff --git a/common/pb/event_server_complete_list.proto b/common/pb/event_server_complete_list.proto index 8adba1fd7..cf0984342 100644 --- a/common/pb/event_server_complete_list.proto +++ b/common/pb/event_server_complete_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; import "serverinfo_user.proto"; import "serverinfo_room.proto"; diff --git a/common/pb/event_server_identification.proto b/common/pb/event_server_identification.proto index 6548043ec..da6f37943 100644 --- a/common/pb/event_server_identification.proto +++ b/common/pb/event_server_identification.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_ServerIdentification { diff --git a/common/pb/event_server_message.proto b/common/pb/event_server_message.proto index a47d4eb7d..04e3881b0 100644 --- a/common/pb/event_server_message.proto +++ b/common/pb/event_server_message.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_ServerMessage { diff --git a/common/pb/event_server_shutdown.proto b/common/pb/event_server_shutdown.proto index 879ec1ea4..3618804d8 100644 --- a/common/pb/event_server_shutdown.proto +++ b/common/pb/event_server_shutdown.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_ServerShutdown { diff --git a/common/pb/event_set_active_phase.proto b/common/pb/event_set_active_phase.proto index a19dd4b98..5c6507a69 100644 --- a/common/pb/event_set_active_phase.proto +++ b/common/pb/event_set_active_phase.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_SetActivePhase { diff --git a/common/pb/event_set_active_player.proto b/common/pb/event_set_active_player.proto index 7962ac15e..b4b794111 100644 --- a/common/pb/event_set_active_player.proto +++ b/common/pb/event_set_active_player.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_SetActivePlayer { diff --git a/common/pb/event_set_card_attr.proto b/common/pb/event_set_card_attr.proto index aa902fdd4..217c13ae0 100644 --- a/common/pb/event_set_card_attr.proto +++ b/common/pb/event_set_card_attr.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "card_attributes.proto"; diff --git a/common/pb/event_set_card_counter.proto b/common/pb/event_set_card_counter.proto index e04262715..f959ca1df 100644 --- a/common/pb/event_set_card_counter.proto +++ b/common/pb/event_set_card_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_SetCardCounter { diff --git a/common/pb/event_set_counter.proto b/common/pb/event_set_counter.proto index 55541a027..bbc19ba99 100644 --- a/common/pb/event_set_counter.proto +++ b/common/pb/event_set_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_SetCounter { diff --git a/common/pb/event_shuffle.proto b/common/pb/event_shuffle.proto index c1fc1afb8..1a7b59250 100644 --- a/common/pb/event_shuffle.proto +++ b/common/pb/event_shuffle.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_Shuffle { diff --git a/common/pb/event_stop_dump_zone.proto b/common/pb/event_stop_dump_zone.proto index 3e8f16936..2abe3ea25 100644 --- a/common/pb/event_stop_dump_zone.proto +++ b/common/pb/event_stop_dump_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; message Event_StopDumpZone { diff --git a/common/pb/event_user_joined.proto b/common/pb/event_user_joined.proto index 15ae93c3f..f5c7021ce 100644 --- a/common/pb/event_user_joined.proto +++ b/common/pb/event_user_joined.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; import "serverinfo_user.proto"; diff --git a/common/pb/event_user_left.proto b/common/pb/event_user_left.proto index c857640df..5c06cc9e3 100644 --- a/common/pb/event_user_left.proto +++ b/common/pb/event_user_left.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_UserLeft { diff --git a/common/pb/event_user_message.proto b/common/pb/event_user_message.proto index 9cf6003d9..bec6080ec 100644 --- a/common/pb/event_user_message.proto +++ b/common/pb/event_user_message.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "session_event.proto"; message Event_UserMessage { diff --git a/common/pb/game_commands.proto b/common/pb/game_commands.proto index 47d15441d..3846be165 100644 --- a/common/pb/game_commands.proto +++ b/common/pb/game_commands.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message GameCommand { enum GameCommandType { KICK_FROM_GAME = 1000; diff --git a/common/pb/game_event.proto b/common/pb/game_event.proto index 09fbe93be..a71d160a4 100644 --- a/common/pb/game_event.proto +++ b/common/pb/game_event.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message GameEvent { enum GameEventType { JOIN = 1000; diff --git a/common/pb/game_event_container.proto b/common/pb/game_event_container.proto index fd4ca4301..d99bc0798 100644 --- a/common/pb/game_event_container.proto +++ b/common/pb/game_event_container.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "game_event.proto"; import "game_event_context.proto"; diff --git a/common/pb/game_event_context.proto b/common/pb/game_event_context.proto index 98d5047b7..82e8e635e 100644 --- a/common/pb/game_event_context.proto +++ b/common/pb/game_event_context.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message GameEventContext { enum ContextType { READY_START = 1000; diff --git a/common/pb/game_replay.proto b/common/pb/game_replay.proto index e8a0aa0bc..907bbade7 100644 --- a/common/pb/game_replay.proto +++ b/common/pb/game_replay.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_game.proto"; import "game_event_container.proto"; diff --git a/common/pb/isl_message.proto b/common/pb/isl_message.proto index 125205334..c9e91552a 100644 --- a/common/pb/isl_message.proto +++ b/common/pb/isl_message.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "session_event.proto"; import "commands.proto"; diff --git a/common/pb/moderator_commands.proto b/common/pb/moderator_commands.proto index e2cf306c3..820dfd0a6 100644 --- a/common/pb/moderator_commands.proto +++ b/common/pb/moderator_commands.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ModeratorCommand { enum ModeratorCommandType { BAN_FROM_SERVER = 1000; @@ -69,4 +68,4 @@ message Command_ViewLogHistory { required uint32 date_range = 7; // the length of time (in minutes) to look back for optional uint32 maximum_results = 8; // the maximum number of query results -} \ No newline at end of file +} diff --git a/common/pb/move_card_to_zone.proto b/common/pb/move_card_to_zone.proto index 10ce87c3e..8ab75c41a 100644 --- a/common/pb/move_card_to_zone.proto +++ b/common/pb/move_card_to_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message MoveCard_ToZone { optional string card_name = 1; optional string start_zone = 2; diff --git a/common/pb/response.proto b/common/pb/response.proto index 5f53f8e3c..0c0581739 100644 --- a/common/pb/response.proto +++ b/common/pb/response.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message Response { enum ResponseCode { RespNotConnected = -1; diff --git a/common/pb/response_activate.proto b/common/pb/response_activate.proto index db4ddbc6c..68268b225 100644 --- a/common/pb/response_activate.proto +++ b/common/pb/response_activate.proto @@ -1,8 +1,7 @@ -syntax = "proto2"; import "response.proto"; message Response_Activate { extend Response { optional Response_Activate ext = 1010; } -} \ No newline at end of file +} diff --git a/common/pb/response_adjust_mod.proto b/common/pb/response_adjust_mod.proto index c91493f8f..f996113d2 100644 --- a/common/pb/response_adjust_mod.proto +++ b/common/pb/response_adjust_mod.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; message Response_AdjustMod{ diff --git a/common/pb/response_ban_history.proto b/common/pb/response_ban_history.proto index de587d6d9..0cff75d24 100644 --- a/common/pb/response_ban_history.proto +++ b/common/pb/response_ban_history.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_ban.proto"; diff --git a/common/pb/response_deck_download.proto b/common/pb/response_deck_download.proto index f1839a9e2..7c39cd4a9 100644 --- a/common/pb/response_deck_download.proto +++ b/common/pb/response_deck_download.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; message Response_DeckDownload { diff --git a/common/pb/response_deck_list.proto b/common/pb/response_deck_list.proto index bc516a25c..8982566e7 100644 --- a/common/pb/response_deck_list.proto +++ b/common/pb/response_deck_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_deckstorage.proto"; diff --git a/common/pb/response_deck_upload.proto b/common/pb/response_deck_upload.proto index 3648d8777..defb759ee 100644 --- a/common/pb/response_deck_upload.proto +++ b/common/pb/response_deck_upload.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_deckstorage.proto"; diff --git a/common/pb/response_dump_zone.proto b/common/pb/response_dump_zone.proto index e37288dfb..1bf1de362 100644 --- a/common/pb/response_dump_zone.proto +++ b/common/pb/response_dump_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_zone.proto"; diff --git a/common/pb/response_get_games_of_user.proto b/common/pb/response_get_games_of_user.proto index f179bcc62..daeef56e8 100644 --- a/common/pb/response_get_games_of_user.proto +++ b/common/pb/response_get_games_of_user.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_game.proto"; import "serverinfo_room.proto"; diff --git a/common/pb/response_get_user_info.proto b/common/pb/response_get_user_info.proto index fbfaaf217..e08901167 100644 --- a/common/pb/response_get_user_info.proto +++ b/common/pb/response_get_user_info.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_user.proto"; diff --git a/common/pb/response_join_room.proto b/common/pb/response_join_room.proto index 7023c648d..a2a85354a 100644 --- a/common/pb/response_join_room.proto +++ b/common/pb/response_join_room.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_room.proto"; diff --git a/common/pb/response_list_users.proto b/common/pb/response_list_users.proto index 825ae6f7f..a48c965f0 100644 --- a/common/pb/response_list_users.proto +++ b/common/pb/response_list_users.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_user.proto"; diff --git a/common/pb/response_login.proto b/common/pb/response_login.proto index 673eaa46f..876896f13 100644 --- a/common/pb/response_login.proto +++ b/common/pb/response_login.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_user.proto"; diff --git a/common/pb/response_register.proto b/common/pb/response_register.proto index b5360f14d..62fbaeeae 100644 --- a/common/pb/response_register.proto +++ b/common/pb/response_register.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; message Response_Register { @@ -7,4 +6,4 @@ message Response_Register { } optional string denied_reason_str = 1; optional uint64 denied_end_time = 2; -} \ No newline at end of file +} diff --git a/common/pb/response_replay_download.proto b/common/pb/response_replay_download.proto index d263f8d9b..e1ecaeea9 100644 --- a/common/pb/response_replay_download.proto +++ b/common/pb/response_replay_download.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; message Response_ReplayDownload { diff --git a/common/pb/response_replay_list.proto b/common/pb/response_replay_list.proto index 68e7d41bc..ac065c04c 100644 --- a/common/pb/response_replay_list.proto +++ b/common/pb/response_replay_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_replay_match.proto"; diff --git a/common/pb/response_viewlog_history.proto b/common/pb/response_viewlog_history.proto index 2572d7d22..94157dfad 100644 --- a/common/pb/response_viewlog_history.proto +++ b/common/pb/response_viewlog_history.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_chat_message.proto"; diff --git a/common/pb/response_warn_history.proto b/common/pb/response_warn_history.proto index a43180f3b..609d16925 100644 --- a/common/pb/response_warn_history.proto +++ b/common/pb/response_warn_history.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "serverinfo_warning.proto"; diff --git a/common/pb/response_warn_list.proto b/common/pb/response_warn_list.proto index 8d893103b..2c8c46efc 100644 --- a/common/pb/response_warn_list.proto +++ b/common/pb/response_warn_list.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; message Response_WarnList{ diff --git a/common/pb/room_commands.proto b/common/pb/room_commands.proto index d68728102..cb4051c93 100644 --- a/common/pb/room_commands.proto +++ b/common/pb/room_commands.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message RoomCommand { enum RoomCommandType { LEAVE_ROOM = 1000; diff --git a/common/pb/room_event.proto b/common/pb/room_event.proto index b0cb37021..6774d6e97 100644 --- a/common/pb/room_event.proto +++ b/common/pb/room_event.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message RoomEvent { enum RoomEventType { LEAVE_ROOM = 1000; diff --git a/common/pb/server_message.proto b/common/pb/server_message.proto index a9330ab3c..a0a54ae2c 100644 --- a/common/pb/server_message.proto +++ b/common/pb/server_message.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "response.proto"; import "session_event.proto"; import "game_event_container.proto"; diff --git a/common/pb/serverinfo_arrow.proto b/common/pb/serverinfo_arrow.proto index cd99bd798..72afbb66a 100644 --- a/common/pb/serverinfo_arrow.proto +++ b/common/pb/serverinfo_arrow.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "color.proto"; message ServerInfo_Arrow { diff --git a/common/pb/serverinfo_ban.proto b/common/pb/serverinfo_ban.proto index 2ad7ffd4d..5c5d7ba2f 100644 --- a/common/pb/serverinfo_ban.proto +++ b/common/pb/serverinfo_ban.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; /* * Historical ban information stored in the ban table */ diff --git a/common/pb/serverinfo_card.proto b/common/pb/serverinfo_card.proto index 4d9a585cd..cf3bd3716 100644 --- a/common/pb/serverinfo_card.proto +++ b/common/pb/serverinfo_card.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_cardcounter.proto"; message ServerInfo_Card { diff --git a/common/pb/serverinfo_cardcounter.proto b/common/pb/serverinfo_cardcounter.proto index d1799a65b..16bd81349 100644 --- a/common/pb/serverinfo_cardcounter.proto +++ b/common/pb/serverinfo_cardcounter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ServerInfo_CardCounter { optional sint32 id = 1; optional sint32 value = 2; diff --git a/common/pb/serverinfo_chat_message.proto b/common/pb/serverinfo_chat_message.proto index 27d4386e5..393630f30 100644 --- a/common/pb/serverinfo_chat_message.proto +++ b/common/pb/serverinfo_chat_message.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; /* * Chat communication of a user to a target. * Targets can be users or rooms. diff --git a/common/pb/serverinfo_counter.proto b/common/pb/serverinfo_counter.proto index 849e3b4e9..0c948acdd 100644 --- a/common/pb/serverinfo_counter.proto +++ b/common/pb/serverinfo_counter.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "color.proto"; message ServerInfo_Counter { diff --git a/common/pb/serverinfo_deckstorage.proto b/common/pb/serverinfo_deckstorage.proto index 16e3f28e3..4709ee921 100644 --- a/common/pb/serverinfo_deckstorage.proto +++ b/common/pb/serverinfo_deckstorage.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ServerInfo_DeckStorage_File { optional uint32 creation_time = 1; } diff --git a/common/pb/serverinfo_game.proto b/common/pb/serverinfo_game.proto index 8ba29eeeb..d91779afc 100644 --- a/common/pb/serverinfo_game.proto +++ b/common/pb/serverinfo_game.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_user.proto"; message ServerInfo_Game { diff --git a/common/pb/serverinfo_gametype.proto b/common/pb/serverinfo_gametype.proto index a135b89b6..1ce21a9ce 100644 --- a/common/pb/serverinfo_gametype.proto +++ b/common/pb/serverinfo_gametype.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ServerInfo_GameType { optional sint32 game_type_id = 1; optional string description = 2; diff --git a/common/pb/serverinfo_player.proto b/common/pb/serverinfo_player.proto index 69cd4498a..957117823 100644 --- a/common/pb/serverinfo_player.proto +++ b/common/pb/serverinfo_player.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_zone.proto"; import "serverinfo_counter.proto"; import "serverinfo_arrow.proto"; diff --git a/common/pb/serverinfo_playerping.proto b/common/pb/serverinfo_playerping.proto index cb27e0e9b..41a02959e 100644 --- a/common/pb/serverinfo_playerping.proto +++ b/common/pb/serverinfo_playerping.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ServerInfo_PlayerPing { optional sint32 player_id = 1; optional sint32 ping_time = 2; diff --git a/common/pb/serverinfo_playerproperties.proto b/common/pb/serverinfo_playerproperties.proto index 96f3644a2..d15bd0e3c 100644 --- a/common/pb/serverinfo_playerproperties.proto +++ b/common/pb/serverinfo_playerproperties.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_user.proto"; message ServerInfo_PlayerProperties { diff --git a/common/pb/serverinfo_replay.proto b/common/pb/serverinfo_replay.proto index 4b15db18a..d9e208571 100644 --- a/common/pb/serverinfo_replay.proto +++ b/common/pb/serverinfo_replay.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ServerInfo_Replay { optional sint32 replay_id = 1 [default = -1]; optional string replay_name = 2; diff --git a/common/pb/serverinfo_replay_match.proto b/common/pb/serverinfo_replay_match.proto index 05abeb945..06a3ebd51 100644 --- a/common/pb/serverinfo_replay_match.proto +++ b/common/pb/serverinfo_replay_match.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_replay.proto"; message ServerInfo_ReplayMatch { diff --git a/common/pb/serverinfo_room.proto b/common/pb/serverinfo_room.proto index 571bc6f70..255fdf2e9 100644 --- a/common/pb/serverinfo_room.proto +++ b/common/pb/serverinfo_room.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_game.proto"; import "serverinfo_user.proto"; import "serverinfo_gametype.proto"; diff --git a/common/pb/serverinfo_user.proto b/common/pb/serverinfo_user.proto index f935bbfcb..71e5849ed 100644 --- a/common/pb/serverinfo_user.proto +++ b/common/pb/serverinfo_user.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message ServerInfo_User { enum UserLevelFlag { IsNothing = 0; diff --git a/common/pb/serverinfo_warning.proto b/common/pb/serverinfo_warning.proto index f2efed576..18518dd44 100644 --- a/common/pb/serverinfo_warning.proto +++ b/common/pb/serverinfo_warning.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; /* * Historical warning information stored in the warnings table */ diff --git a/common/pb/serverinfo_zone.proto b/common/pb/serverinfo_zone.proto index d359613c4..a1786b949 100644 --- a/common/pb/serverinfo_zone.proto +++ b/common/pb/serverinfo_zone.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_card.proto"; message ServerInfo_Zone { diff --git a/common/pb/session_commands.proto b/common/pb/session_commands.proto index afd85a393..689de9bdb 100644 --- a/common/pb/session_commands.proto +++ b/common/pb/session_commands.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; import "serverinfo_user.proto"; message SessionCommand { diff --git a/common/pb/session_event.proto b/common/pb/session_event.proto index 3cce332c0..101ae218e 100644 --- a/common/pb/session_event.proto +++ b/common/pb/session_event.proto @@ -1,4 +1,3 @@ -syntax = "proto2"; message SessionEvent { enum SessionEventType { SERVER_IDENTIFICATION = 500; From e337775d72f55f18a37a359744c1224b9a51d874 Mon Sep 17 00:00:00 2001 From: tooomm Date: Mon, 11 Jan 2016 19:19:56 +0100 Subject: [PATCH 5/7] Update README.md - added small 'new user guide' at top - reworked 'downloads' part - changed layout of 'translation' part - removed server list in favor of gh pages link (server list can be found there) - switched to https everywhere (zlib not supported yet --> added hint) --- README.md | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4bdabbc10..b898a7569 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ --- +
+If you're getting started ⇢ [view our webpage](https://cockatrice.github.io/)
+If you're trying to get support or suggest changes ⇢ [file an issue](https://github.com/Cockatrice/Cockatrice/issues/new) +

+ + # Cockatrice Cockatrice is an open-source multiplatform software for playing card games, @@ -13,12 +19,15 @@ such as Magic: The Gathering, over a network. It is fully client-server based to prevent any kind of cheating, though it supports single-player games without a network interface as well. Both client and server are written in Qt, supporting both Qt4 and Qt5.
-# Downloads -We offer a download for both the last stable version (recommended for users) and the last development version. The development version contains the last implemented features, but can be unstable and unsuitable for gaming. -Downloads are hosted on [BinTray](https://bintray.com/). -- Latest stable version download: [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice/_latestVersion) -- Latest development (unstable) version download: [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice-git/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice-git/_latestVersion) +# Downloads + +We offer a download for all full releases and the latest development version (recommended). Full releases are checkpoints with major feature or UI enhancements between them, but are infrequently updated. The development version contains the most recently added features and bugfixes, but can be more unstable. Downloads for development versions are updated automatically with every change. +Downloads are hosted on [BinTray](https://bintray.com/cockatrice/Cockatrice). + +- Latest development version (recommended): [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice-git/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice-git/_latestVersion#files) +- Latest full release: [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice/_latestVersion#files) + # Get Involved [![Gitter chat](https://badges.gitter.im/Cockatrice/Cockatrice.png)](https://gitter.im/Cockatrice/Cockatrice) @@ -26,21 +35,20 @@ Chat with the Cockatrice developers on Gitter. Come here to talk about the appli # Community Resources +- [Cockatrice Official Site](https://cockatrice.github.io) - [Cockatrice Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki) -- [reddit r/Cockatrice](http://reddit.com/r/cockatrice) -- [Woogerworks](http://www.woogerworks.com) / [Chickatrice] (http://www.chickatrice.net/) / [Poixen](http://www.poixen.com/) (incomplete Serverlist)
+- [reddit r/Cockatrice](https://reddit.com/r/cockatrice) # Translation Status [![Cockatrice on Transiflex](https://ds0k0en9abmn1.cloudfront.net/static/charts/images/tx-logo-micro.646b0065fce6.png)](https://www.transifex.com/projects/p/cockatrice/) -Cockatrice uses Transifex for translations. You can help us bring Cockatrice/Oracle to your language or edit single wordings by clicking on the associated charts below.
-Our [project page](https://www.transifex.com/projects/p/cockatrice/) offers a detailed overview for contributors. +Cockatrice uses Transifex for translations. You can help us bring Cockatrice and Oracle to your language or just edit single wordings right from within your browser by simply visiting our [Transifex project page](https://www.transifex.com/projects/p/cockatrice/).
-Language statistics for `Cockatrice` *(on the left)* and `Oracle` *(on the right)*: +| Cockatrice | Oracle | +|:-:|:-:| +| [![Cockatrice Translation Status](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/) | [![Oracle Translation Status](https://www.transifex.com/projects/p/cockatrice/resource/oracle/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/) | -[![Cockatrice translations](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/)      [![Oracle translations](https://www.transifex.com/projects/p/cockatrice/resource/oracle/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/resource/oracle/) - -Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information!
+Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!
# Building [![Travis Build Status - master](https://travis-ci.org/Cockatrice/Cockatrice.svg?branch=master)](https://travis-ci.org/Cockatrice/Cockatrice) [![Appveyor Build Status - master](https://ci.appveyor.com/api/projects/status/lp5h0dhk4mhmeps7/branch/master?svg=true)](https://ci.appveyor.com/project/Daenyth/cockatrice/branch/master) @@ -48,15 +56,15 @@ Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Tra **Detailed compiling instructions are on the Cockatrice wiki under [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)** Dependencies: -- [Qt](http://qt-project.org/) -- [protobuf](http://code.google.com/p/protobuf/) -- [CMake](http://www.cmake.org/) +- [Qt](https://www.qt.io/developers/) +- [protobuf](https://github.com/google/protobuf) +- [CMake](https://www.cmake.org/) Oracle can optionally use zlib to load zipped files: -- [zlib](http://www.zlib.net/) +- [zlib](http://www.zlib.net/) (no https!) The server requires an additional dependency when compiled under Qt4: -- [libgcrypt](http://www.gnu.org/software/libgcrypt/) +- [libgcrypt](https://www.gnu.org/software/libgcrypt/) To compile: @@ -99,7 +107,7 @@ The following flags can be passed to `cmake`: `servatrice` is the server
-# License [![GPLv2 License](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING) +# License [![GPLv2 License](https://img.shields.io/badge/License-GPLv2-blue.svg)](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING) Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING). From ad0334e734787b9a4e1a9e860ab7923004168c48 Mon Sep 17 00:00:00 2001 From: Zach H Date: Thu, 14 Jan 2016 17:32:25 -0500 Subject: [PATCH 6/7] mtgjson now secure --- oracle/src/oraclewizard.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oracle/src/oraclewizard.cpp b/oracle/src/oraclewizard.cpp index 4a9940346..7b8721896 100644 --- a/oracle/src/oraclewizard.cpp +++ b/oracle/src/oraclewizard.cpp @@ -30,13 +30,13 @@ #include "settingscache.h" #define ZIP_SIGNATURE "PK" -#define ALLSETS_URL_FALLBACK "http://mtgjson.com/json/AllSets.json" +#define ALLSETS_URL_FALLBACK "https://mtgjson.com/json/AllSets.json" #ifdef HAS_ZLIB #include "zip/unzip.h" - #define ALLSETS_URL "http://mtgjson.com/json/AllSets.json.zip" + #define ALLSETS_URL "https://mtgjson.com/json/AllSets.json.zip" #else - #define ALLSETS_URL "http://mtgjson.com/json/AllSets.json" + #define ALLSETS_URL "https://mtgjson.com/json/AllSets.json" #endif #define TOKENS_URL "https://raw.githubusercontent.com/Cockatrice/Magic-Token/master/tokens.xml" From bacb289effabdc0787b859bc369f37553545d759 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 15 Jan 2016 16:07:26 +0100 Subject: [PATCH 7/7] Oracle: follow redirects --- oracle/src/oraclewizard.cpp | 56 +++++++++++++++++++++++++++---------- oracle/src/oraclewizard.h | 2 ++ 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/oracle/src/oraclewizard.cpp b/oracle/src/oraclewizard.cpp index 7b8721896..1c6e727d7 100644 --- a/oracle/src/oraclewizard.cpp +++ b/oracle/src/oraclewizard.cpp @@ -292,13 +292,7 @@ bool LoadSetsPage::validatePage() wizard()->disableButtons(); setEnabled(false); - if(!nam) - nam = new QNetworkAccessManager(this); - QNetworkReply *reply = nam->get(QNetworkRequest(url)); - - connect(reply, SIGNAL(finished()), this, SLOT(actDownloadFinishedSetsFile())); - connect(reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(actDownloadProgressSetsFile(qint64, qint64))); - + downloadSetsFile(url); } else if(fileRadioButton->isChecked()) { QFile setsFile(fileLineEdit->text()); if(!setsFile.exists()) @@ -321,6 +315,16 @@ bool LoadSetsPage::validatePage() return false; } +void LoadSetsPage::downloadSetsFile(QUrl url) +{ + if(!nam) + nam = new QNetworkAccessManager(this); + QNetworkReply *reply = nam->get(QNetworkRequest(url)); + + connect(reply, SIGNAL(finished()), this, SLOT(actDownloadFinishedSetsFile())); + connect(reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(actDownloadProgressSetsFile(qint64, qint64))); +} + void LoadSetsPage::actDownloadProgressSetsFile(qint64 received, qint64 total) { if(total > 0) @@ -333,9 +337,6 @@ void LoadSetsPage::actDownloadProgressSetsFile(qint64 received, qint64 total) void LoadSetsPage::actDownloadFinishedSetsFile() { - progressLabel->hide(); - progressBar->hide(); - // check for a reply QNetworkReply *reply = static_cast(sender()); QNetworkReply::NetworkError errorCode = reply->error(); @@ -349,6 +350,18 @@ void LoadSetsPage::actDownloadFinishedSetsFile() return; } + int statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + if (statusCode == 301 || statusCode == 302) { + QUrl redirectUrl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); + qDebug() << "following redirect url:" << redirectUrl.toString(); + downloadSetsFile(redirectUrl); + reply->deleteLater(); + return; + } + + progressLabel->hide(); + progressBar->hide(); + // save allsets.json url, but only if the user customized it and download was successfull if(urlLineEdit->text() != QString(ALLSETS_URL)) wizard()->settings->setValue("allsetsurl", urlLineEdit->text()); @@ -641,14 +654,18 @@ bool LoadTokensPage::validatePage() wizard()->disableButtons(); setEnabled(false); + downloadTokensFile(url); + return false; +} + +void LoadTokensPage::downloadTokensFile(QUrl url) +{ if(!nam) nam = new QNetworkAccessManager(this); QNetworkReply *reply = nam->get(QNetworkRequest(url)); connect(reply, SIGNAL(finished()), this, SLOT(actDownloadFinishedTokensFile())); connect(reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(actDownloadProgressTokensFile(qint64, qint64))); - - return false; } void LoadTokensPage::actDownloadProgressTokensFile(qint64 received, qint64 total) @@ -663,9 +680,6 @@ void LoadTokensPage::actDownloadProgressTokensFile(qint64 received, qint64 total void LoadTokensPage::actDownloadFinishedTokensFile() { - progressLabel->hide(); - progressBar->hide(); - // check for a reply QNetworkReply *reply = static_cast(sender()); QNetworkReply::NetworkError errorCode = reply->error(); @@ -679,6 +693,18 @@ void LoadTokensPage::actDownloadFinishedTokensFile() return; } + int statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + if (statusCode == 301 || statusCode == 302) { + QUrl redirectUrl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); + qDebug() << "following redirect url:" << redirectUrl.toString(); + downloadTokensFile(redirectUrl); + reply->deleteLater(); + return; + } + + progressLabel->hide(); + progressBar->hide(); + // save tokens.xml url, but only if the user customized it and download was successfull if(urlLineEdit->text() != QString(TOKENS_URL)) wizard()->settings->setValue("tokensurl", urlLineEdit->text()); diff --git a/oracle/src/oraclewizard.h b/oracle/src/oraclewizard.h index d06e09718..832144c35 100644 --- a/oracle/src/oraclewizard.h +++ b/oracle/src/oraclewizard.h @@ -80,6 +80,7 @@ protected: void initializePage(); bool validatePage(); void readSetsFromByteArray(QByteArray data); + void downloadSetsFile(QUrl url); private: QRadioButton *urlRadioButton; QRadioButton *fileRadioButton; @@ -128,6 +129,7 @@ public: protected: void initializePage(); bool validatePage(); + void downloadTokensFile(QUrl url); private: QLabel *urlLabel; QLineEdit *urlLineEdit;