Add ammo display when relevant as well as icons for the stats

This commit is contained in:
cncfanatics
2010-10-04 16:26:05 +02:00
parent 1ee8f481d6
commit c5e69816fa
5 changed files with 30 additions and 10 deletions

View File

@@ -118,9 +118,17 @@ class FittingView(d.Display):
cFit = service.Fit.getInstance()
selection = []
sel = self.GetFirstSelected()
ammo = False
while sel != -1:
selection.append(self.mods[self.GetItemData(sel)])
mod = self.mods[self.GetItemData(sel)]
if ammo is False and mod.charge is not None:
ammo = True
selection.append(mod)
sel = self.GetNextSelected(sel)
menu = ContextMenu.getMenu(selection, "module", "ship")
if ammo:
menu = ContextMenu.getMenu(selection, "module", "ammo", "ship")
else:
menu = ContextMenu.getMenu(selection, "module", "ship")
self.PopupMenu(menu)