Skip to content

Commit

Permalink
Handle flip cards in updateDuplicatePrintings.
Browse files Browse the repository at this point in the history
  • Loading branch information
plural committed Feb 9, 2024
1 parent aac0af4 commit 060a693
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/updateDuplicatePrintings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ packsNeedingUpdates.forEach(p => {
printing.stripped_title = newCard.stripped_title;
printing.text = newCard.text;
printing.stripped_text = newCard.stripped_text;
// Note: this only handles single flip cards, not cards with more than 2 faces.
if ('faces' in newCard) {
printing.text = `${printing.text}\nFlip side:\n${newCard.faces[0].text}`;
printing.stripped_text = `${printing.stripped_text} Flip side: ${newCard.faces[0].stripped_text}`;
}
}
v1.push(printing);
});
Expand Down

0 comments on commit 060a693

Please sign in to comment.