mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Load additional xml sets from $userprofile/customsets/
This commit is contained in:
parent
292d730ca7
commit
b566bf4a19
3 changed files with 20 additions and 0 deletions
|
|
@ -1053,6 +1053,18 @@ void CardDatabase::loadTokenDatabase()
|
|||
loadCardDatabase(settingsCache->getTokenDatabasePath(), true);
|
||||
}
|
||||
|
||||
void CardDatabase::loadCustomCardDatabases(const QString &path)
|
||||
{
|
||||
QDir dir(path);
|
||||
if(!dir.exists())
|
||||
return;
|
||||
|
||||
foreach(QString fileName, dir.entryList(QStringList("*.xml"), QDir::Files | QDir::Readable, QDir::Name))
|
||||
{
|
||||
loadCardDatabase(dir.absoluteFilePath(fileName), false);
|
||||
}
|
||||
}
|
||||
|
||||
QStringList CardDatabase::getAllColors() const
|
||||
{
|
||||
QSet<QString> colors;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue