More getter swapping for efsPort
This commit is contained in:
@@ -458,13 +458,13 @@ class EfsPort():
|
|||||||
def sumDamage(attr):
|
def sumDamage(attr):
|
||||||
totalDamage = 0
|
totalDamage = 0
|
||||||
for damageType in ["emDamage", "thermalDamage", "kineticDamage", "explosiveDamage"]:
|
for damageType in ["emDamage", "thermalDamage", "kineticDamage", "explosiveDamage"]:
|
||||||
if attr[damageType] is not None:
|
if attr(damageType) is not None:
|
||||||
totalDamage += attr[damageType]
|
totalDamage += attr(damageType)
|
||||||
return totalDamage
|
return totalDamage
|
||||||
|
|
||||||
def getCurrentMultipliers(tf):
|
def getCurrentMultipliers(tf):
|
||||||
fitMultipliers = {}
|
fitMultipliers = {}
|
||||||
getDroneMulti = lambda d: sumDamage(d.itemModifiedAttributes) * d.getModifiedItemAttr("damageMultiplier")
|
getDroneMulti = lambda d: sumDamage(d.getModifiedItemAttr) * d.getModifiedItemAttr("damageMultiplier")
|
||||||
fitMultipliers["drones"] = list(map(getDroneMulti, tf.drones))
|
fitMultipliers["drones"] = list(map(getDroneMulti, tf.drones))
|
||||||
|
|
||||||
getFitTurrets = lambda f: filter(lambda mod: mod.hardpoint == Hardpoint.TURRET, f.modules)
|
getFitTurrets = lambda f: filter(lambda mod: mod.hardpoint == Hardpoint.TURRET, f.modules)
|
||||||
@@ -472,7 +472,7 @@ class EfsPort():
|
|||||||
fitMultipliers["turrets"] = list(map(getTurretMulti, getFitTurrets(tf)))
|
fitMultipliers["turrets"] = list(map(getTurretMulti, getFitTurrets(tf)))
|
||||||
|
|
||||||
getFitLaunchers = lambda f: filter(lambda mod: mod.hardpoint == Hardpoint.MISSILE, f.modules)
|
getFitLaunchers = lambda f: filter(lambda mod: mod.hardpoint == Hardpoint.MISSILE, f.modules)
|
||||||
getLauncherMulti = lambda mod: sumDamage(mod.chargeModifiedAttributes) / mod.cycleTime
|
getLauncherMulti = lambda mod: sumDamage(mod.getModifiedChargeAttr) / mod.cycleTime
|
||||||
fitMultipliers["launchers"] = list(map(getLauncherMulti, getFitLaunchers(tf)))
|
fitMultipliers["launchers"] = list(map(getLauncherMulti, getFitLaunchers(tf)))
|
||||||
return fitMultipliers
|
return fitMultipliers
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ class EfsPort():
|
|||||||
for mod in weaponTypeSet:
|
for mod in weaponTypeSet:
|
||||||
mod.owner = fit
|
mod.owner = fit
|
||||||
turrets = list(filter(lambda mod: mod.getModifiedItemAttr("damageMultiplier"), turrets))
|
turrets = list(filter(lambda mod: mod.getModifiedItemAttr("damageMultiplier"), turrets))
|
||||||
launchers = list(filter(lambda mod: sumDamage(mod.chargeModifiedAttributes), launchers))
|
launchers = list(filter(lambda mod: sumDamage(mod.getModifiedChargeAttr), launchers))
|
||||||
|
|
||||||
# Since the effect modules are fairly opaque a mock test fit is used to test the impact of traits.
|
# Since the effect modules are fairly opaque a mock test fit is used to test the impact of traits.
|
||||||
# standin class used to prevent . notation causing issues when used as an arg
|
# standin class used to prevent . notation causing issues when used as an arg
|
||||||
|
|||||||
Reference in New Issue
Block a user