Fix EFS export after adding projection range support

This commit is contained in:
DarkPhoenix
2019-10-08 23:11:58 +03:00
parent 18d8ed6558
commit 885cd32cb0

View File

@@ -589,18 +589,18 @@ class EfsPort:
preTraitMultipliers = getCurrentMultipliers(tf)
for effect in fit.ship.item.effects.values():
if effect.isImplemented:
effect.handler(tf, tf.ship, [])
effect.handler(tf, tf.ship, [], None)
# Factor in mode effects for T3 Destroyers
if fit.mode is not None:
for effect in fit.mode.item.effects.values():
if effect.isImplemented:
effect.handler(tf, fit.mode, [])
effect.handler(tf, fit.mode, [], None)
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.isImplemented:
effect.handler(tf, sub, [])
effect.handler(tf, sub, [], None)
postTraitMultipliers = getCurrentMultipliers(tf)
getMaxRatio = lambda dictA, dictB, key: max(map(lambda a, b: b / a, dictA[key], dictB[key]))
multipliers["turret"] = round(getMaxRatio(preTraitMultipliers, postTraitMultipliers, "turrets"), 6)