Set default value for count so it can be left out of json files

This commit is contained in:
Adam Goldsmith 2017-07-18 18:27:08 -04:00
parent 31868b3bf9
commit 7613bfcab9

View File

@ -182,7 +182,7 @@ def makeJson(deckJson, imgWidth, outfile):
cardNum += 2
for card in deckJson['deck']:
for i in range(0, card['count']):
for i in range(0, card.get('count', 1)):
outJson['ObjectStates'][0]['DeckIDs'].append(cardNum)
# add a card object thing for each card, and give it a name