Exemple #1
0
 def contents(self):
     cnt = SubDocument.contents(self)
     if self.reorder:
         cnt['stat_blocks'] = sorted(self.stat_blocks, key=lambda sb: sb['blocklength'])
     else:
         cnt['stat_blocks'] = self.stat_blocks
     cnt['encounter_table'] = self.encounter_table
     cnt['sidebars'] = [get_sidebar(sb) for sb in self.sidebars]
     cnt['label'] = self.label()
     cnt['map'] = self.map
     cnt['evenstart'] = self.evenstart
     cnt['extra_critters'] = self.extra_critters
     return cnt
Exemple #2
0
def inject_sidebar():
    from sidebar import get_sidebar
    return dict(sidebar=get_sidebar())