if skip_bgs or bg is None: return self.cur_bg = bg.name self.cur_bg_src_short = bg.source self.cur_traits = bg.get_traits_as_str() def pick(self, even=False, skip_race=False, skip_class=False, skip_spec=False, skip_bg=False, sources=None): self._shuffle_race(even, skip_race, sources) self._shuffle_class(even, skip_class, skip_spec, sources) self._shuffle_bg(skip_bg, sources) # self.print_race_class_with_short_sources() def print_race_class(self): print(self.cur_race) print(self.cur_class) def print_race_class_with_sources(self): print('%s | %s' % (self.cur_race, self.cur_race_src)) print('%s | %s' % (self.cur_class, self.cur_class_src)) def print_race_class_with_short_sources(self): print('%s | %s' % (self.cur_race, self.cur_race_src_short)) print('%s | %s' % (self.cur_class, self.cur_class_src_short)) if __name__ == '__main__': rnd = Randomizer() v = MainView.load_view(rnd) v.present(style='fullscreen')
def main(): v = MainView.load_view() v.present(style='fullscreen', orientations=['portrait'])