mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
oracle now loads sets from extern file
This commit is contained in:
parent
aaa56acfd1
commit
63614b4549
2 changed files with 297 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
OracleImporter::OracleImporter()
|
||||
: setIndex(-1)
|
||||
{
|
||||
setsToDownload << SetToDownload("10E", "Tenth Edition", "http://www.crystalkeep.com/magic/rules/oracle/oracle-10.txt");
|
||||
/*setsToDownload << SetToDownload("10E", "Tenth Edition", "http://www.crystalkeep.com/magic/rules/oracle/oracle-10.txt");
|
||||
setsToDownload << SetToDownload("ARB", "Alara Reborn", "http://www.crystalkeep.com/magic/rules/oracle/oracle-ar.txt");
|
||||
setsToDownload << SetToDownload("CFX", "Conflux", "http://www.crystalkeep.com/magic/rules/oracle/oracle-cf.txt");
|
||||
setsToDownload << SetToDownload("ALA", "Shards of Alara", "http://www.crystalkeep.com/magic/rules/oracle/oracle-sa.txt");
|
||||
|
|
@ -74,7 +74,24 @@ OracleImporter::OracleImporter()
|
|||
setsToDownload << SetToDownload("UG", "Unglued", "http://www.crystalkeep.com/magic/rules/oracle/oracle-ug.txt");
|
||||
setsToDownload << SetToDownload("UNH", "Unhinged", "http://www.crystalkeep.com/magic/rules/oracle/oracle-uh.txt");
|
||||
setsToDownload << SetToDownload("M10", "Magic 2010", "http://www.crystalkeep.com/magic/rules/oracle/oracle-m10.txt");
|
||||
|
||||
*/
|
||||
|
||||
QFile setsFile("sets.txt");
|
||||
setsFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
QTextStream setStream(&setsFile);
|
||||
QString date = setStream.readLine();
|
||||
QString edition;
|
||||
QString editionLong;
|
||||
QString editionURL;
|
||||
setStream.readLine();
|
||||
while(!setStream.atEnd()){
|
||||
edition = setStream.readLine();
|
||||
editionLong = setStream.readLine();
|
||||
editionURL = setStream.readLine();
|
||||
setStream.readLine();
|
||||
setsToDownload << SetToDownload(edition, editionLong, editionURL);
|
||||
}
|
||||
|
||||
colorOverride.insert("Ancestral Vision", QStringList("U"));
|
||||
colorOverride.insert("Crimson Kobolds", QStringList("R"));
|
||||
colorOverride.insert("Crookshank Kobolds", QStringList("R"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue