save function now works for a character... need to add defaults if options dont exist

This commit is contained in:
Ben Cook
2018-12-20 10:35:50 -05:00
parent b93b1ac6d7
commit 2b1f5981b4
10 changed files with 116 additions and 50 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ def create_spells_pdf(char, basename, flatten=False):
prep_names = tuple(f'Check Box {i}' for i in prep_numbers[level])
for spell, field, chk_field in zip(spells, field_names, prep_names):
fields[field] = str(spell)
is_prepared = any([isinstance(spell, Spl)
is_prepared = any([spell == Spl
for Spl in char.spells_prepared])
fields[chk_field] = CHECKBOX_ON if is_prepared else CHECKBOX_OFF
# # Uncomment to post field names instead: