Rework internal interfaces to be able to specify spoolup in more flexible manner and carry output dps types
This commit is contained in:
@@ -303,7 +303,7 @@ class EfsPort():
|
||||
weaponSystems = []
|
||||
groups = {}
|
||||
for mod in fit.modules:
|
||||
if mod.getDps() > 0:
|
||||
if mod.getDps().total > 0:
|
||||
# Group weapon + ammo combinations that occur more than once
|
||||
keystr = str(mod.itemID) + "-" + str(mod.chargeID)
|
||||
if keystr in groups:
|
||||
@@ -346,10 +346,10 @@ class EfsPort():
|
||||
else:
|
||||
maxRange = stats.maxRange
|
||||
statDict = {
|
||||
"dps": stats.getDps(spool=True) * n, "capUse": stats.capUse * n, "falloff": stats.falloff,
|
||||
"dps": stats.getDps().total * n, "capUse": stats.capUse * n, "falloff": stats.falloff,
|
||||
"type": typeing, "name": name, "optimal": maxRange,
|
||||
"numCharges": stats.numCharges, "numShots": stats.numShots, "reloadTime": stats.reloadTime,
|
||||
"cycleTime": stats.cycleTime, "volley": stats.getVolley(spool=True) * n, "tracking": tracking,
|
||||
"cycleTime": stats.cycleTime, "volley": stats.getVolley().total * n, "tracking": tracking,
|
||||
"maxVelocity": maxVelocity, "explosionDelay": explosionDelay, "damageReductionFactor": damageReductionFactor,
|
||||
"explosionRadius": explosionRadius, "explosionVelocity": explosionVelocity, "aoeFieldRange": aoeFieldRange,
|
||||
"damageMultiplierBonusMax": stats.getModifiedItemAttr("damageMultiplierBonusMax"),
|
||||
@@ -357,19 +357,19 @@ class EfsPort():
|
||||
}
|
||||
weaponSystems.append(statDict)
|
||||
for drone in fit.drones:
|
||||
if drone.getDps() > 0 and drone.amountActive > 0:
|
||||
if drone.getDps().total > 0 and drone.amountActive > 0:
|
||||
droneAttr = drone.getModifiedItemAttr
|
||||
# Drones are using the old tracking formula for trackingSpeed. This updates it to match turrets.
|
||||
newTracking = droneAttr("trackingSpeed") / (droneAttr("optimalSigRadius") / 40000)
|
||||
statDict = {
|
||||
"dps": drone.getDps(), "cycleTime": drone.cycleTime, "type": "Drone",
|
||||
"dps": drone.getDps().total, "cycleTime": drone.cycleTime, "type": "Drone",
|
||||
"optimal": drone.maxRange, "name": drone.item.name, "falloff": drone.falloff,
|
||||
"maxSpeed": droneAttr("maxVelocity"), "tracking": newTracking,
|
||||
"volley": drone.getVolley()
|
||||
"volley": drone.getVolley().total
|
||||
}
|
||||
weaponSystems.append(statDict)
|
||||
for fighter in fit.fighters:
|
||||
if fighter.getDps() > 0 and fighter.amountActive > 0:
|
||||
if fighter.getDps().total > 0 and fighter.amountActive > 0:
|
||||
fighterAttr = fighter.getModifiedItemAttr
|
||||
abilities = []
|
||||
if "fighterAbilityAttackMissileDamageEM" in fighter.item.attributes.keys():
|
||||
@@ -381,10 +381,10 @@ class EfsPort():
|
||||
ability = EfsPort.getFighterAbilityData(fighterAttr, fighter, baseRef)
|
||||
abilities.append(ability)
|
||||
statDict = {
|
||||
"dps": fighter.getDps(), "type": "Fighter", "name": fighter.item.name,
|
||||
"dps": fighter.getDps().total, "type": "Fighter", "name": fighter.item.name,
|
||||
"maxSpeed": fighterAttr("maxVelocity"), "abilities": abilities,
|
||||
"ehp": fighterAttr("shieldCapacity") / 0.8875 * fighter.amountActive,
|
||||
"volley": fighter.getVolley(), "signatureRadius": fighterAttr("signatureRadius")
|
||||
"volley": fighter.getVolley().total, "signatureRadius": fighterAttr("signatureRadius")
|
||||
}
|
||||
weaponSystems.append(statDict)
|
||||
return weaponSystems
|
||||
@@ -625,9 +625,9 @@ class EfsPort():
|
||||
dataDict = {
|
||||
"name": fitName, "ehp": fit.ehp, "droneDPS": fit.getDroneDps(),
|
||||
"droneVolley": fit.getDroneVolley(), "hp": fit.hp, "maxTargets": fit.maxTargets,
|
||||
"maxSpeed": fit.maxSpeed, "weaponVolley": fit.getWeaponVolley(spool=True), "totalVolley": fit.getTotalVolley(spool=True),
|
||||
"maxSpeed": fit.maxSpeed, "weaponVolley": fit.getWeaponVolley(), "totalVolley": fit.getTotalVolley(),
|
||||
"maxTargetRange": fit.maxTargetRange, "scanStrength": fit.scanStrength,
|
||||
"weaponDPS": fit.getWeaponDps(spool=True), "alignTime": fit.alignTime, "signatureRadius": fitModAttr("signatureRadius"),
|
||||
"weaponDPS": fit.getWeaponDps(), "alignTime": fit.alignTime, "signatureRadius": fitModAttr("signatureRadius"),
|
||||
"weapons": weaponSystems, "scanRes": fitModAttr("scanResolution"),
|
||||
"capUsed": fit.capUsed, "capRecharge": fit.capRecharge,
|
||||
"rigSlots": fitModAttr("rigSlots"), "lowSlots": fitModAttr("lowSlots"),
|
||||
|
||||
Reference in New Issue
Block a user