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:
blitzmann
2014-12-02 14:33:47 -05:00
parent 795230dae6
commit 337db326fd
7 changed files with 28 additions and 4 deletions

View File

@@ -495,6 +495,10 @@ class Fit(object):
Slot.RIG: "rigSlots",
Slot.SUBSYSTEM: "maxSubSystems"}
if type == Slot.MODE:
# Mode slot doesn't really exist, return default 0
return 0
slotsUsed = self.getSlotsUsed(type, countDummies)
totalSlots = self.ship.getModifiedItemAttr(slots[type]) or 0
return int(totalSlots - slotsUsed)

View File

@@ -36,6 +36,7 @@ class Slot(Enum):
HIGH = 3
RIG = 4
SUBSYSTEM = 5
MODE = 6 # not a real slot, need for pyfa display rack separation
class Hardpoint(Enum):
NONE = 0