diff --git a/README.md b/README.md index f889fe4b..b898a756 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,16 @@ --- -**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-) --- +
+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). diff --git a/cockatrice/src/carddatabase.cpp b/cockatrice/src/carddatabase.cpp index 433f1d8b..33dee5e6 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 1cb8544a..fdcfa7df 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 94939b8b..9b8a89bc 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 35ec45a9..ba862025 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 92725866..8cf88ee9 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 9d91eb72..ccb0fa2e 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/replay_timeline_widget.cpp b/cockatrice/src/replay_timeline_widget.cpp index fb3efc1d..e0776358 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 diff --git a/cockatrice/src/tab_deck_editor.cpp b/cockatrice/src/tab_deck_editor.cpp index 1e27434b..771111a2 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/common/pb/admin_commands.proto b/common/pb/admin_commands.proto index 9d5e5414..b9caae25 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 ac23ca0d..ecd30942 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 d932ba76..0bfabe7c 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 654e57c5..b6052b07 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 f89e36aa..8db604b6 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 5ac74235..05740546 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 55048031..067bcab3 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 d60fbdc2..99d63a1f 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 9fc61b70..f3da8150 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 a231ca08..de9daaa7 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 3364cac4..28eb75f6 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 19dda152..35518263 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 43f1b0e0..069a775b 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 ecb3b106..010767d7 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 d79bf37e..574bb398 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 0f250c5f..b0c2eee2 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 8d2689a2..fad28948 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 ba204989..0e86d32c 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 6851ac00..22777f9f 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 07bfe195..342d4197 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 d825c64f..324cda01 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 6aa47e0e..d9b5166e 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 8676fc89..b6945d0a 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 d99521b7..52f2a7b5 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 e95037c7..9683a266 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 afa1e6c4..2a916c51 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 ad3f7c57..aaa9e9c3 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 f0ffb87c..0fa9adf9 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 802d63cf..6c87d2c3 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 1d7d203c..ffa5cc79 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 33d6d44b..f85cf2e3 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 17724e5b..d8638f92 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 8fbcdc5a..2869c88d 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 6b342f44..1b4cb84f 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 5c4024ba..f94d61ac 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 bdcc7b51..cdceb526 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 ded7d819..e54e5b38 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 1e1d8664..144cb858 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 5fa9c3ee..d5671404 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 33cae56a..0ddf45b1 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 5aa6a64b..815e92b3 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 7ed0d10c..250fb9da 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 e2e1d5ec..d0eff7c8 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 1896c9dc..af5123a2 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 09428933..111ff67a 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 b417550a..3076c002 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 7b82aa31..98180447 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 c87f8bed..45d0a43d 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 dbd4ce16..f36c8b6c 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 49bcb77c..9a030e48 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 edcaf900..fd59e6da 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 e8f1b0bd..918c30a2 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 7a4e6089..67285307 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 a9a36f8b..8124005c 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 8b934079..340339e8 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 4a1072e8..3d13cc98 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 a71610f9..72191deb 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 0f1deb6d..7aabce09 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 03018b80..564f15a8 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 820d3cea..81a1250c 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 5dfca01e..4142a1e4 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 42c32eff..8bb7fd15 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 c693fc86..0785d091 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 bd165c97..b7767521 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 8bef2242..d31321f6 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 cea343a1..3b76263a 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 f3dc0852..5179dc4b 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 08a5d8c6..128c2e7f 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 e400926c..f3a10da0 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 50e3f968..397c1fb0 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 eaf2894c..5e52b5a4 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 8aa42eca..27385a08 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 092d45de..abbbd1ea 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 1c91dc09..ae9a9fa5 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 e575edc4..852614c8 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 02036cee..39bb6de3 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 c4a3740f..480c8f88 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 98dafe2d..d894b593 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 b69c7b5c..e613a793 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 e72d2ba1..05ddd4ed 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 f6d309f3..0d010d94 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 d909259e..de164167 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 c0feaf53..a597d5a1 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 81bb64ed..1b7de4ac 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 2efb5f37..5fcb8071 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 f6742c69..03a42638 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 4d99f2be..697bbb53 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 122f0f45..32f6f644 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 8adba1fd..cf098434 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 6548043e..da6f3794 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 a47d4eb7..04e3881b 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 879ec1ea..3618804d 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 a19dd4b9..5c6507a6 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 7962ac15..b4b79411 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 aa902fdd..217c13ae 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 e0426271..f959ca1d 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 55541a02..bbc19ba9 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 c1fc1afb..1a7b5925 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 3e8f1693..2abe3ea2 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 15ae93c3..f5c7021c 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 c857640d..5c06cc9e 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 9cf6003d..bec6080e 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 47d15441..3846be16 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 09fbe93b..a71d160a 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 fd4ca430..d99bc079 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 98d5047b..82e8e635 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 e8a0aa0b..907bbade 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 12520533..c9e91552 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 e2cf306c..820dfd0a 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 10ce87c3..8ab75c41 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 5f53f8e3..0c058173 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 db4ddbc6..68268b22 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 c91493f8..f996113d 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 de587d6d..0cff75d2 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 f1839a9e..7c39cd4a 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 bc516a25..8982566e 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 3648d877..defb759e 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 e37288df..1bf1de36 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 f179bcc6..daeef56e 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 fbfaaf21..e0890116 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 7023c648..a2a85354 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 825ae6f7..a48c965f 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 673eaa46..876896f1 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 b5360f14..62fbaeea 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 d263f8d9..e1ecaeea 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 68e7d41b..ac065c04 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 2572d7d2..94157dfa 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 a43180f3..609d1692 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 8d893103..2c8c46ef 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 d6872810..cb4051c9 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 b0cb3702..6774d6e9 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 a9330ab3..a0a54ae2 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 cd99bd79..72afbb66 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 2ad7ffd4..5c5d7ba2 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 4d9a585c..cf3bd371 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 d1799a65..16bd8134 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 27d4386e..393630f3 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 849e3b4e..0c948acd 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 16e3f28e..4709ee92 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 8ba29eee..d91779af 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 a135b89b..1ce21a9c 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 69cd4498..95711782 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 cb27e0e9..41a02959 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 96f3644a..d15bd0e3 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 4b15db18..d9e20857 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 05abeb94..06a3ebd5 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 571bc6f7..255fdf2e 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 f935bbfc..71e5849e 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 f2efed57..18518dd4 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 d359613c..a1786b94 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 afd85a39..689de9bd 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 3cce332c..101ae218 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; diff --git a/oracle/src/oracleimporter.cpp b/oracle/src/oracleimporter.cpp index 7659f465..f4f8e870 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) diff --git a/oracle/src/oraclewizard.cpp b/oracle/src/oraclewizard.cpp index 4a994034..1c6e727d 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" @@ -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 d06e0971..832144c3 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;