mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 05:20:00 -08:00
Disable upstream MTG onboarding/importer and bootstrap Continuumatrice card data
This commit is contained in:
parent
c0ba0db6ec
commit
dddefd0cae
1 changed files with 12 additions and 0 deletions
|
|
@ -256,6 +256,18 @@ void SettingsCache::loadPaths()
|
|||
|
||||
computePath("customSets", dataPath + "/customsets/");
|
||||
computeFilePath("cardDatabase", dataPath + "/cards.xml");
|
||||
|
||||
// On a new Continuumatrice profile create an empty, valid XML v4 database.
|
||||
// Never download MTG data or copy the user's Cockatrice card database.
|
||||
const QString initialCardDb = dataPath + "/cards.xml";
|
||||
if (!QFile::exists(initialCardDb)) {
|
||||
if (!QFile::copy(QStringLiteral(":/resources/continuumatrice-empty-carddatabase.xml"), initialCardDb)) {
|
||||
qCWarning(SettingsCacheLog) << "Could not create Continuumatrice starter database:" << initialCardDb;
|
||||
} else {
|
||||
QFile::setPermissions(initialCardDb, QFile::ReadOwner | QFile::WriteOwner |
|
||||
QFile::ReadUser | QFile::WriteUser);
|
||||
}
|
||||
}
|
||||
computeFilePath("tokenDatabase", dataPath + "/tokens.xml");
|
||||
computeFilePath("spoilerDatabase", dataPath + "/spoiler.xml");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue