Esempio n. 1
0
 def on_ok(self, evt):
     name = self.profiles[self.profile_listbox.GetSelection()]
     stats = profiledb.load(name)
     try:
         self.player = Player(stats)
     except:
         gui.notification(None, 'Your profile cannot be loaded.')
         sys.exit()
     gui.notification(None, 'You are now ready to play!', caption="Loaded player profile")
     self.parent.main_menu(self.options)
Esempio n. 2
0
 def get_stats(self,parent,name):
     stats = profiledb.load(name)
     s = ("Name: {}\n"
          "Level: {}\n"
          "Exp: {}\n"
          "Money: {}\n"
          "Vitality: {}\n"
          "Strength: {}\n"
          "Resistance: {}\n"
          "Agility: {}\n"
          "Intelligence: {}\n"
          "Weapon: {}\n"
          "Armor: {}\n"
          "Skill: {}").format(stats['NAME'],stats['LEVEL'],stats['EXP'], stats['MONEY'],stats['VIT'],stats['STR'],
                          stats['RES'],stats['AGI'],stats['INT'],stats['WEAPON'],stats['ARMOR'],stats['SKILL'])
     return s
Esempio n. 3
0
 def get_stats(self, parent, name):
     stats = profiledb.load(name)
     s = ("Name: {}\n"
          "Level: {}\n"
          "Exp: {}\n"
          "Money: {}\n"
          "Vitality: {}\n"
          "Strength: {}\n"
          "Resistance: {}\n"
          "Agility: {}\n"
          "Intelligence: {}\n"
          "Weapon: {}\n"
          "Armor: {}\n"
          "Skill: {}").format(stats['NAME'], stats['LEVEL'], stats['EXP'],
                              stats['MONEY'], stats['VIT'], stats['STR'],
                              stats['RES'], stats['AGI'], stats['INT'],
                              stats['WEAPON'], stats['ARMOR'],
                              stats['SKILL'])
     return s
Esempio n. 4
0
 def ok(self,evt):
     name = self.profiles[self.profile_listbox.GetSelection()]
     stats = profiledb.load(name)
     self.stats = stats
     self.Close()
     self.MakeModal(False)
Esempio n. 5
0
 def ok(self, evt):
     name = self.profiles[self.profile_listbox.GetSelection()]
     stats = profiledb.load(name)
     self.stats = stats
     self.Close()
     self.MakeModal(False)