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

Remote Capacitor Transmitters not being correctly written in EFS format #2425

Closed sajuukthanatoskhar closed 2 years ago

sajuukthanatoskhar commented 2 years ago

Bug Report

When exporting the EFS of a fit, the projections list does not include Remote Capacitor Transmitters's full set of attributes in the projections.

They were called Cap transfers at some point and this might be the problem.

Expected behavior:

(I took the below from the Actual behaviour section and edited it)

"projections": [{
            "type": "Remote Large Capacitor Transfer II"
            "optimal": 6500.0,
            "falloff": 0,
            "duration": 5000.0,
            "capacitorNeed": 91.5,
            "powerTransferAmount": 351.0
        }]

Actual behavior:

"projections": [{
            "optimal": 6500.0,
            "falloff": 0,
            "duration": 5000.0,
            "capacitorNeed": 91.5
        }]

Detailed steps to reproduce:

Make Fit, Fit -> To Clip Board Get 'EFS' Find out that capacitor transmitters are not formatted properly. Be disappointed and sad.

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

[Scorpion Navy Issue, Scorpion Navy Issue fit]

[Empty Low slot]
[Empty Low slot]
[Empty Low slot]
[Empty Low slot]
[Empty Low slot]

Burst Jammer II
Ladar ECM II
FZ-3a Enduring Gravimetric ECM
Gravimetric ECM II
Target Painter II
Remote Sensor Dampener II
Remote Sensor Booster II
Signature Radius Suppressor I

Large Remote Shield Booster II
Large Remote Capacitor Transmitter II
Small Remote Armor Repairer II
Small Remote Capacitor Transmitter II
Medium Remote Capacitor Transmitter II
[Empty High slot]
[Empty High slot]

[Empty Rig slot]
[Empty Rig slot]
[Empty Rig slot]

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

Release, affects 2.37 and 2.40

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

Windows 10

Other relevant information:

EFS Paste -

{
    "name": "Scorpion Navy Issue: Scorpion Navy Issue fit",
    "ehp": {
        "shield": 27262.931034,
        "armor": 17314.814815,
        "hull": 18470.149254
    },
    "droneDPS": 0,
    "droneVolley": 0,
    "hp": {
        "shield": 15812.5,
        "armor": 11687.5,
        "hull": 12375.0
    },
    "maxTargets": 7,
    "maxSpeed": 128.75,
    "weaponVolley": 0.0,
    "totalVolley": 0.0,
    "maxTargetRange": 135000.0,
    "scanStrength": 36.0,
    "weaponDPS": 0.0,
    "alignTime": 12.117946,
    "signatureRadius": 127.375776,
    "weapons": [],
    "scanRes": 122.5,
    "capUsed": 164.03125,
    "capRecharge": 20.833333,
    "capacitorCapacity": 6875.0,
    "rechargeRate": 825000.0,
    "rigSlots": 3.0,
    "lowSlots": 5.0,
    "midSlots": 8.0,
    "highSlots": 7.0,
    "turretSlots": 4.0,
    "launcherSlots": 6.0,
    "powerOutput": 13750.0,
    "cpuOutput": 975.0,
    "rigSize": 3.0,
    "effectiveTurrets": 4.0,
    "effectiveLaunchers": 7.95,
    "effectiveDroneBandwidth": 75.0,
    "resonance": {
        "hull": {
            "exp": 0.67,
            "kin": 0.67,
            "therm": 0.67,
            "em": 0.67
        },
        "armor": {
            "exp": 0.9,
            "kin": 0.75,
            "therm": 0.55,
            "em": 0.5
        },
        "shield": {
            "exp": 0.4,
            "kin": 0.48,
            "therm": 0.64,
            "em": 0.8
        }
    },
    "typeID": 32309,
    "groupID": 27,
    "shipSize": "Battleship",
    "droneControlRange": 60000.0,
    "mass": 103600000.0,
    "shieldrechargetime": 2542500.0,
    "shipinertia": 0.084375,
    "energyWarfareResistance": 1.0,
    "unpropedSpeed": 128.75,
    "unpropedSig": 127.375776,
    "usingMWD": 0,
    "mwdPropSpeed": 128.75,
    "projections": [{
            "type": "Remote Shield Booster",
            "shieldBonus": 680.0,
            "optimal": 8040.0,
            "falloff": 12000.0,
            "duration": 8000.0,
            "capacitorNeed": 407.25
        }, {
            "optimal": 4550.0,
            "falloff": 0.0,
            "duration": 5000.0,
            "capacitorNeed": 30.75
        }, {
            "optimal": 9750.0,
            "falloff": 0.0,
            "duration": 5000.0,
            "capacitorNeed": 274.5
        }, {
            "optimal": 6500.0,
            "falloff": 0.0,
            "duration": 5000.0,
            "capacitorNeed": 91.5
        }, {
            "type": "Burst Jammer",
            "scanGravimetricStrengthBonus": 9.0,
            "scanMagnetometricStrengthBonus": 9.0,
            "scanRadarStrengthBonus": 9.0,
            "scanLadarStrengthBonus": 9.0,
            "optimal": 0.0,
            "falloff": 0.0,
            "duration": 30000.0,
            "capacitorNeed": 216.0
        }, {
            "type": "ECM",
            "scanGravimetricStrengthBonus": 1.625,
            "scanMagnetometricStrengthBonus": 1.625,
            "scanRadarStrengthBonus": 1.625,
            "scanLadarStrengthBonus": 5.0,
            "optimal": 51840.0,
            "falloff": 48600.0,
            "duration": 20000.0,
            "capacitorNeed": 43.5
        }, {
            "type": "ECM",
            "scanGravimetricStrengthBonus": 5.0,
            "scanMagnetometricStrengthBonus": 1.625,
            "scanRadarStrengthBonus": 1.625,
            "scanLadarStrengthBonus": 1.625,
            "optimal": 51840.0,
            "falloff": 48600.0,
            "duration": 20000.0,
            "capacitorNeed": 43.5
        }, {
            "type": "ECM",
            "scanGravimetricStrengthBonus": 4.5,
            "scanMagnetometricStrengthBonus": 1.5,
            "scanRadarStrengthBonus": 1.5,
            "scanLadarStrengthBonus": 1.5,
            "optimal": 43200.0,
            "falloff": 40500.0,
            "duration": 20000.0,
            "capacitorNeed": 28.5
        }, {
            "type": "Sensor Dampener",
            "maxTargetRangeBonus": -19.125,
            "scanResolutionBonus": -19.125,
            "optimal": 45000.0,
            "falloff": 90000.0,
            "duration": 10000.0,
            "capacitorNeed": 27.0
        }, {
            "type": "Remote Armor Repairer",
            "armorDamageAmount": 64.0,
            "optimal": 8400.0,
            "falloff": 3000.0,
            "duration": 3000.0,
            "capacitorNeed": 31.5
        }, {
            "type": "Target Painter",
            "signatureRadiusBonus": 37.5,
            "optimal": 54000.0,
            "falloff": 135000.0,
            "duration": 5000.0,
            "capacitorNeed": 9.0
        }
    ],
    "repairs": [],
    "modTypeIDs": [3608, 12102, 26912, 1190, 12221, 2117, 2559, 19942, 2571, 19806, 1969, 1964, 4409],
    "moduleNames": ["High Slots:", "Large Remote Shield Booster II", "Large Remote Capacitor Transmitter II", "Small Remote Armor Repairer II", "Small Remote Capacitor Transmitter II", "Medium Remote Capacitor Transmitter II", "Empty Slot", "Empty Slot", "", "Med Slots:", "Burst Jammer II", "Ladar ECM II", "FZ-3a Enduring Gravimetric ECM", "Gravimetric ECM II", "Target Painter II", "Remote Sensor Dampener II", "Remote Sensor Booster II", "Signature Radius Suppressor I", "", "Low Slots:", "Empty Slot", "Empty Slot", "Empty Slot", "Empty Slot", "Empty Slot", "", "Rig Slots:", "Empty Slot", "Empty Slot", "Empty Slot"],
    "cargoItemIDs": [],
    "pyfaVersion": "v2.40.0",
    "efsExportVersion": 0.05
}
DarkFenX commented 2 years ago

Code suggests that "type" is not an item name, but rather broad type like "Remote Capacitor Transfer".

Could you find out if that's the case, and what's the exact type name is?

sajuukthanatoskhar commented 2 years ago

I can look into it!

sajuukthanatoskhar commented 2 years ago

@DarkFenX It is Remote Capacitor Transmitter, in efs.py getOutgoingProjectionData, it is seen and detected but there is no if block adding the relevant sections that I have highlighted above. I can add this in.

DarkFenX commented 2 years ago

Merged PR, closing this issue