Add Mode and separation to fitting list.
Todo: A few exceptions are thrown when trying to remove mode via double click, spawn context menu, move to a different position, etc. All simply because Mode is not a Module. Will need to add try-except blocks to cover these instances
This commit is contained in:
@@ -42,7 +42,10 @@ class BaseName(ViewColumn):
|
||||
return "%s (%s)" % (stuff.name, stuff.ship.item.name)
|
||||
elif isinstance(stuff, Rack):
|
||||
if service.Fit.getInstance().serviceFittingOptions["rackLabels"]:
|
||||
return u'─ {} Slots ─'.format(Slot.getName(stuff.slot).capitalize())
|
||||
if stuff.slot == Slot.MODE:
|
||||
return u'─ Tactical Mode ─'
|
||||
else:
|
||||
return u'─ {} Slots ─'.format(Slot.getName(stuff.slot).capitalize())
|
||||
else:
|
||||
return ""
|
||||
elif isinstance(stuff, Module):
|
||||
|
||||
@@ -23,6 +23,7 @@ import service
|
||||
from gui.utils.numberFormatter import formatAmount
|
||||
from gui.viewColumn import ViewColumn
|
||||
from gui import bitmapLoader
|
||||
from eos.types import Mode
|
||||
|
||||
class CapacitorUse(ViewColumn):
|
||||
name = "Capacitor Usage"
|
||||
@@ -38,6 +39,9 @@ class CapacitorUse(ViewColumn):
|
||||
|
||||
|
||||
def getText(self, mod):
|
||||
if isinstance(mod, Mode):
|
||||
return ""
|
||||
|
||||
capUse = mod.capUse
|
||||
if capUse:
|
||||
return "%s%s" % ("+" if capUse < 0 else "", (formatAmount(-capUse, 3, 0, 3)))
|
||||
|
||||
@@ -23,6 +23,7 @@ from gui import bitmapLoader
|
||||
import service
|
||||
from gui.utils.numberFormatter import formatAmount
|
||||
import wx
|
||||
from eos.types import Mode
|
||||
|
||||
class MaxRange(ViewColumn):
|
||||
name = "Max Range"
|
||||
@@ -51,6 +52,9 @@ class MaxRange(ViewColumn):
|
||||
self.mask |= wx.LIST_MASK_TEXT
|
||||
|
||||
def getText(self, stuff):
|
||||
if isinstance(stuff, Mode):
|
||||
return ""
|
||||
|
||||
maxRange = stuff.maxRange if hasattr(stuff, "maxRange") else stuff.getModifiedItemAttr("maxRange")
|
||||
falloff = stuff.falloff
|
||||
if falloff:
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
import gui.mainFrame
|
||||
from gui import builtinViewColumns
|
||||
from gui.viewColumn import ViewColumn
|
||||
from gui import bitmapLoader
|
||||
from gui.utils.numberFormatter import formatAmount
|
||||
@@ -69,7 +68,9 @@ class Miscellanea(ViewColumn):
|
||||
itemGroup = item.group.name
|
||||
itemCategory = item.category.name
|
||||
|
||||
if itemGroup in ("Energy Weapon", "Hybrid Weapon", "Projectile Weapon", "Combat Drone", "Fighter Drone"):
|
||||
if itemGroup == "Ship Modifiers":
|
||||
return "", None
|
||||
elif itemGroup in ("Energy Weapon", "Hybrid Weapon", "Projectile Weapon", "Combat Drone", "Fighter Drone"):
|
||||
trackingSpeed = stuff.getModifiedItemAttr("trackingSpeed")
|
||||
if not trackingSpeed:
|
||||
return "", None
|
||||
|
||||
Reference in New Issue
Block a user