Re-ordered the Damage Profile menus

Changed name of the selected ammo damage profile
This commit is contained in:
Corollax
2010-10-28 13:24:15 -05:00
parent da2152e61a
commit 8f259501ed
5 changed files with 8 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ class AmmoPattern(ContextMenu):
return False
def getText(self, context, selection):
return "Set as damage pattern"
return "Set as Damage Pattern"
def activate(self, context, selection, i):
item = selection[0]

View File

@@ -12,10 +12,12 @@ class DamagePattern(ContextMenu):
def display(self, context, selection):
return context in ("resistancesViewFull",) and self.mainFrame.getActiveFit() is not None
SPCL_PTRN = ("Selected Ammo", "Uniform")
def getText(self, context, selection):
sDP = service.DamagePattern.getInstance()
self.patterns = sDP.getDamagePatternList()
self.patterns.sort(key=lambda p: p.name)
self.patterns.sort( key=lambda p: (p.name in
DamagePattern.SPCL_PTRN, p.name) )
m = map(lambda p: p.name, self.patterns)
return m

View File

@@ -25,7 +25,7 @@ class ModuleAmmo(ViewColumn):
name = "Module Ammo"
def __init__(self, fittingView, params):
ViewColumn.__init__(self, fittingView)
self.columnText = "Ammo"
self.columnText = "Selected Ammo"
def getText(self, mod):
return "%s (%s)" % (mod.charge.name, mod.numCharges) if mod.charge is not None else ""

View File

@@ -227,7 +227,7 @@ class DmgPatternEditorDlg (wx.Dialog):
def patternChanged(self, event=None):
p = self.getActivePattern()
if p.name == "Uniform":
if p.name == "Uniform" or p.name == "Selected Ammo":
self.restrict()
else:
self.unrestrict()

View File

@@ -345,10 +345,10 @@ class Fit(object):
try:
sDP = DamagePattern.getInstance()
dp = sDP.getDamagePattern("Ammo")
dp = sDP.getDamagePattern("Selected Ammo")
except:
dp = eos.types.DamagePattern()
dp.name = "Ammo"
dp.name = "Selected Ammo"
fit = eos.db.getFit(fitID)
for attr in ("em", "thermal", "kinetic", "explosive"):