Ensure that we load all skills for a character and some minor tweaks.
This commit is contained in:
@@ -87,6 +87,7 @@ class Character(object):
|
||||
all0 = eos.db.getCharacter("All 0")
|
||||
if all0 is None:
|
||||
all0 = Character("All 0")
|
||||
all0.defaultLevel = None
|
||||
eos.db.add(all0)
|
||||
|
||||
cls.__all0 = all0
|
||||
@@ -173,12 +174,6 @@ class Character(object):
|
||||
return self.__implants
|
||||
|
||||
def iterSkills(self):
|
||||
if self.defaultLevel is not None:
|
||||
return self.iterDefaultLevel()
|
||||
else:
|
||||
return self.__skills.__iter__()
|
||||
|
||||
def iterDefaultLevel(self):
|
||||
for item in self.getSkillList():
|
||||
yield self.getSkill(item)
|
||||
|
||||
|
||||
@@ -1246,8 +1246,11 @@ class Fit(object):
|
||||
for attr in ("shieldRepair", "armorRepair", "hullRepair"):
|
||||
sustainable[attr] = self.extraAttributes[attr]
|
||||
dict = self.extraAttributes.getAfflictions(attr)
|
||||
print dict
|
||||
if self in dict:
|
||||
for mod, _, amount in dict[self]:
|
||||
for mod, _, amount, used in dict[self]:
|
||||
if not used:
|
||||
continue
|
||||
if mod.projected is False:
|
||||
usesCap = True
|
||||
try:
|
||||
|
||||
@@ -50,7 +50,7 @@ class ChangeAffectingSkills(ContextMenu):
|
||||
return len(self.skills) > 0
|
||||
|
||||
def getText(self, itmContext, selection):
|
||||
return "Change Affecting Skills"
|
||||
return "Change %s Skills" % itmContext
|
||||
|
||||
def activate(self, fullContext, selection, i):
|
||||
pass
|
||||
@@ -63,7 +63,7 @@ class ChangeAffectingSkills(ContextMenu):
|
||||
|
||||
id = wx.NewId()
|
||||
self.skillIds[id] = (skill, i)
|
||||
menuItem = wx.MenuItem(rootMenu, id, label)
|
||||
menuItem = wx.MenuItem(rootMenu, id, label, kind=wx.ITEM_CHECK)
|
||||
rootMenu.Bind(wx.EVT_MENU, self.handleSkillChange, menuItem)
|
||||
return menuItem
|
||||
|
||||
@@ -85,6 +85,7 @@ class ChangeAffectingSkills(ContextMenu):
|
||||
for i in xrange(-1, 6):
|
||||
levelItem = self.addSkill(menu, skill, i)
|
||||
sub.AppendItem(levelItem)
|
||||
#@ todo: add check to current level. Need to fix #109 first
|
||||
m.AppendItem(skillItem)
|
||||
|
||||
return m
|
||||
|
||||
Reference in New Issue
Block a user