Fix for bug #261
Missile launchers do not have a "capacitorNeed" attribute (while other capless weapon systems do), so getModifiedItemAttr will return None rather than 0. Added a check for this.
This commit is contained in:
@@ -737,7 +737,7 @@ class Fit(object):
|
||||
capAdded = 0
|
||||
for mod in self.modules:
|
||||
if mod.state >= State.ACTIVE:
|
||||
if mod.getModifiedItemAttr("capacitorNeed") != 0:
|
||||
if mod.getModifiedItemAttr("capacitorNeed") != 0 and mod.getModifiedItemAttr("capacitorNeed") is not None:
|
||||
cycleTime = mod.rawCycleTime or 0
|
||||
reactivationTime = mod.getModifiedItemAttr("moduleReactivationDelay") or 0
|
||||
fullCycleTime = cycleTime + reactivationTime
|
||||
|
||||
Reference in New Issue
Block a user