Change sorting of fighters - group up by sub-roles as well
This commit is contained in:
@@ -236,9 +236,15 @@ class FighterDisplay(d.Display):
|
||||
FIGHTER_ORDER = ('Light Fighter', 'Heavy Fighter', 'Support Fighter')
|
||||
|
||||
def fighterKey(self, fighter):
|
||||
sMkt = Market.getInstance()
|
||||
groupName = sMkt.getGroupByItem(fighter.item).name
|
||||
return (self.FIGHTER_ORDER.index(groupName), fighter.item.name)
|
||||
groupName = Market.getInstance().getGroupByItem(fighter.item).name
|
||||
orderPos = self.FIGHTER_ORDER.index(groupName)
|
||||
# Sort support fighters by name, ignore their abilities
|
||||
if groupName == 'Support Fighter':
|
||||
abilityEffectIDs = ()
|
||||
# Group up fighters from various roles
|
||||
else:
|
||||
abilityEffectIDs = sorted(a.effectID for a in fighter.abilities)
|
||||
return orderPos, abilityEffectIDs, fighter.item.name
|
||||
|
||||
def fitChanged(self, event):
|
||||
sFit = Fit.getInstance()
|
||||
|
||||
@@ -211,12 +211,12 @@ class Display(wx.ListCtrl):
|
||||
colItem = self.GetItem(item, i)
|
||||
oldText = colItem.GetText()
|
||||
oldImageId = colItem.GetImage()
|
||||
oldColour = colItem.GetBackgroundColour();
|
||||
oldColour = colItem.GetBackgroundColour()
|
||||
newText = col.getText(st)
|
||||
if newText is False:
|
||||
col.delayedText(st, self, colItem)
|
||||
newText = "\u21bb"
|
||||
newColour = self.columnBackground(colItem, st);
|
||||
newColour = self.columnBackground(colItem, st)
|
||||
|
||||
newImageId = col.getImageId(st)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user