Fix EFS export

This commit is contained in:
DarkPhoenix
2019-03-26 08:00:57 +03:00
parent 78c6d4f005
commit facb0b1023

View File

@@ -523,18 +523,18 @@ class EfsPort:
tf.mode = fit.mode
preTraitMultipliers = getCurrentMultipliers(tf)
for effect in fit.ship.item.effects.values():
if effect._Effect__effectModule is not None:
if effect.isImplemented:
effect.handler(tf, tf.ship, [])
# Factor in mode effects for T3 Destroyers
if fit.mode is not None:
for effect in fit.mode.item.effects.values():
if effect._Effect__effectModule is not None:
if effect.isImplemented:
effect.handler(tf, fit.mode, [])
if fit.ship.item.groupID == getGroup("Strategic Cruiser").ID:
subSystems = list(filter(lambda mod: mod.slot == FittingSlot.SUBSYSTEM and mod.item, fit.modules))
for sub in subSystems:
for effect in sub.item.effects.values():
if effect._Effect__effectModule is not None:
if effect.isImplemented:
effect.handler(tf, sub, [])
postTraitMultipliers = getCurrentMultipliers(tf)
getMaxRatio = lambda dictA, dictB, key: max(map(lambda a, b: b / a, dictA[key], dictB[key]))