Example #1
0
    def reloadProfiles(self):

        # we may have gained or lost character names if the user bought something; reload these too..
        self.characterNamesLocalUnlocked = bsSpaz.getAppearances()
        self.characterNamesLocalUnlocked.sort(key=lambda x: x.lower())

        # self.characterNamesAll = bsSpaz.getAppearances(includeLocked=True)
        # self.characterNamesAll.sort(key=lambda x:x.lower())

        # do any overall prep we need to such as creating account profile..
        bsUtils._ensureHaveAccountPlayerProfile()

        # grab available player profiles
        # try: self.profiles = dict(bs.getConfig()['Player Profiles'])
        # except Exception: self.profiles = {}

        # # add in a random one so we're ok even if there's no user-created profiles
        # self.profiles['_random'] = {}
        # self.profileNames = self.profiles.keys()
        # self.profileNames.sort(key=lambda x:x.lower())

        for chooser in self.choosers:
            try:
                chooser.reloadProfiles()
                chooser.updateFromPlayerProfile()
            except Exception:
                bs.printException('exception reloading profiles')
Example #2
0
    def reloadProfiles(self):
        # we may have gained or lost character names if the user
        # bought something; reload these too..
        self.characterNamesLocalUnlocked = bsSpaz.getAppearances()
        self.characterNamesLocalUnlocked.sort(key=lambda x: x.lower())

        # do any overall prep we need to such as creating account profile..
        bsUtils._ensureHaveAccountPlayerProfile()

        for chooser in self.choosers:
            try:
                chooser.reloadProfiles()
                chooser.updateFromPlayerProfile()
            except Exception:
                bs.printException('exception reloading profiles')