Fix floats in skill tree, and fix typo - apparently I can't spell dependents x_x
This commit is contained in:
@@ -668,7 +668,7 @@ class Fit(object):
|
||||
|
||||
del self.commandBonuses[warfareBuffID]
|
||||
|
||||
def __resetDependantCalcs(self):
|
||||
def __resetDependentCalcs(self):
|
||||
self.calculated = False
|
||||
for value in self.projectedOnto.values():
|
||||
if value.victim_fit: # removing a self-projected fit causes victim fit to be None. @todo: look into why. :3
|
||||
@@ -697,14 +697,14 @@ class Fit(object):
|
||||
# tree to (resetting the first degree of projection will suffice)
|
||||
if targetFit is None:
|
||||
# This resets all fits that local projects onto, allowing them to recalc when loaded
|
||||
self.__resetDependantCalcs()
|
||||
self.__resetDependentCalcs()
|
||||
|
||||
# For fits that are under local's Command, we do the same thing
|
||||
for value in self.boostedOnto.values():
|
||||
# apparently this is a thing that happens when removing a command fit from a fit and then switching to
|
||||
# that command fit. Same as projected clears, figure out why.
|
||||
if value.boosted_fit:
|
||||
value.boosted_fit.__resetDependantCalcs()
|
||||
value.boosted_fit.__resetDependentCalcs()
|
||||
|
||||
if targetFit and type == CalcType.PROJECTED:
|
||||
pyfalog.debug("Calculating projections from {0} to target {1}", repr(self), repr(targetFit))
|
||||
|
||||
@@ -413,7 +413,7 @@ class SkillTreeView(wx.Panel):
|
||||
iconId = self.skillBookImageId
|
||||
childId = tree.AppendItem(root, name, iconId, data=wx.TreeItemData(id))
|
||||
level, dirty = sChar.getSkillLevel(char.ID, id)
|
||||
tree.SetItemText(childId, "Level %d" % level if isinstance(level, float) else level, 1)
|
||||
tree.SetItemText(childId, "Level %d" % int(level) if isinstance(level, float) else level, 1)
|
||||
if dirty:
|
||||
tree.SetItemTextColour(childId, wx.BLUE)
|
||||
|
||||
@@ -461,7 +461,7 @@ class SkillTreeView(wx.Panel):
|
||||
iconId = self.skillBookImageId
|
||||
childId = tree.AppendItem(root, name, iconId, data=wx.TreeItemData(id))
|
||||
level, dirty = sChar.getSkillLevel(char.ID, id)
|
||||
tree.SetItemText(childId, "Level %d" % level if isinstance(level, float) else level, 1)
|
||||
tree.SetItemText(childId, "Level %d" % int(level) if isinstance(level, float) else level, 1)
|
||||
if dirty:
|
||||
tree.SetItemTextColour(childId, wx.BLUE)
|
||||
|
||||
@@ -512,7 +512,7 @@ class SkillTreeView(wx.Panel):
|
||||
# grand = Skill (or "dummy" if not expanded)
|
||||
if self.skillTreeListCtrl.GetItemText(grand) != "dummy":
|
||||
lvl, dirty = sChar.getSkillLevel(char.ID, self.skillTreeListCtrl.GetPyData(grand))
|
||||
self.skillTreeListCtrl.SetItemText(grand, "Level {}".format(lvl) if not isinstance(lvl, basestring) else lvl, 1)
|
||||
self.skillTreeListCtrl.SetItemText(grand, "Level {}".format(int(lvl)) if not isinstance(lvl, basestring) else lvl, 1)
|
||||
if not dirty:
|
||||
self.skillTreeListCtrl.SetItemTextColour(grand, None)
|
||||
grand, cookie2 = self.skillTreeListCtrl.GetNextChild(child, cookie2)
|
||||
|
||||
@@ -192,8 +192,8 @@ class ItemStatsContainer(wx.Panel):
|
||||
self.nbContainer.AddPage(self.reqs, "Requirements")
|
||||
|
||||
if context == "Skill":
|
||||
self.dependants = ItemDependants(self.nbContainer, stuff, item)
|
||||
self.nbContainer.AddPage(self.dependants, "Dependants")
|
||||
self.dependents = ItemDependents(self.nbContainer, stuff, item)
|
||||
self.nbContainer.AddPage(self.dependents, "Dependents")
|
||||
|
||||
self.effects = ItemEffects(self.nbContainer, stuff, item)
|
||||
self.nbContainer.AddPage(self.effects, "Effects")
|
||||
@@ -766,7 +766,7 @@ class ItemRequirements(wx.Panel):
|
||||
self.skillIdHistory.append(skill.ID)
|
||||
|
||||
|
||||
class ItemDependants(wx.Panel):
|
||||
class ItemDependents(wx.Panel):
|
||||
def __init__(self, parent, stuff, item):
|
||||
wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user