pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.6k stars 406 forks source link

ECM Burst Jammers burst range is 0 when exported to EFS #2450

Closed sajuukthanatoskhar closed 2 years ago

sajuukthanatoskhar commented 2 years ago

Bug Report

ECM Burst Jammers do not have their burst range properly exported via EFS. Optimal is set to 0.0 km.

Expected behavior:

The correct value should be equal to the one displayed in Pyfa.

Actual behavior:

The EFS export does not give the value equal to the one displayed in Pyfa

Detailed steps to reproduce:

  1. Get Ship
  2. Get Burst Jammer (II or Sentient was tested)
  3. Export to EFS via Fit -> copy to clipboard

Fits involved in EFT format (Edit > To Clipboard > EFT):

[Scorpion, Cruise ECM Burst Scorp]

Damage Control II 1600mm Steel Plates II Signal Amplifier II Signal Amplifier II 1600mm Steel Plates II

Sentient Burst Jammer EM Shield Hardener II Multispectrum Shield Hardener II Multispectrum Shield Hardener II Sensor Booster II, ECCM Script Sensor Booster II, ECCM Script Large Shield Extender II Large Micro Jump Drive

Large Proton Smartbomb II Large Plasma Smartbomb II Large Graviton Smartbomb II Large EMP Smartbomb II Large Proton Smartbomb II

Large Particle Dispersion Projector II Large Particle Dispersion Projector II Large Particle Dispersion Projector I

Mjolnir Auto-Targeting Cruise Missile I x108

Release or development git branch? Please note the release version or commit hash:

Master v2.40.0 v2.43.0

Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):

Win 10

Other relevant information:

In efs.py under getOutgoingProjectionData during the EFS export process - the burst jammer range default is set equal to the correct value. At the step where the "optimal" is added, a call to get the modifiedItemAttr of the burst jammer is made, with the key maxRange. This returns a 0.

Proposed fix:

Add to the line

stats["optimal"] = mod.getModifiedItemAttr("maxRange", maxRangeDefault)

with

if mod.item.group.name != "Burst Jammer" else mod.maxRange

stats["optimal"] = mod.getModifiedItemAttr("maxRange", maxRangeDefault) if mod.item.group.name != "Burst Jammer" else mod.maxRange

DarkFenX commented 2 years ago

Merged, thanks for the fix