mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
move format check code
This commit is contained in:
parent
ae137832b0
commit
1113eb4abe
4 changed files with 35 additions and 25 deletions
|
|
@ -75,6 +75,16 @@ QString CardInfo::getCorrectedName() const
|
|||
return result.remove(rmrx).replace(spacerx, space);
|
||||
}
|
||||
|
||||
bool CardInfo::isLegalInFormat(const QString &format) const
|
||||
{
|
||||
if (format.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
QString formatLegality = getProperty("format-" + format);
|
||||
return formatLegality == "legal" || formatLegality == "restricted";
|
||||
}
|
||||
|
||||
void CardInfo::addToSet(const CardSetPtr &_set, const PrintingInfo _info)
|
||||
{
|
||||
if (!_set->contains(smartThis)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue