(fit, typeNotFitFlag, callback)
| 659 | |
| 660 | @staticmethod |
| 661 | def exportEfs(fit, typeNotFitFlag, callback): |
| 662 | sFit = Fit.getInstance() |
| 663 | includeShipTypeData = typeNotFitFlag > 0 |
| 664 | if includeShipTypeData: |
| 665 | fitName = fit.name |
| 666 | else: |
| 667 | fitName = fit.ship.name + ": " + fit.name |
| 668 | pyfalog.info("Creating Eve Fleet Simulator data for: " + fit.name) |
| 669 | fitModAttr = fit.ship.getModifiedItemAttr |
| 670 | propData = EfsPort.getPropData(fit, sFit) |
| 671 | mwdPropSpeed = fit.maxSpeed |
| 672 | if includeShipTypeData: |
| 673 | mwdPropSpeed = EfsPort.getT2MwdSpeed(fit, sFit) |
| 674 | projections = EfsPort.getOutgoingProjectionData(fit) |
| 675 | modInfo = EfsPort.getModuleInfo(fit) |
| 676 | moduleNames = modInfo["moduleNames"] |
| 677 | modTypeIDs = modInfo["modTypeIDs"] |
| 678 | weaponSystems = EfsPort.getWeaponSystemData(fit) |
| 679 | |
| 680 | |
| 681 | turretSlots = fitModAttr("turretSlotsLeft") if fitModAttr("turretSlotsLeft") is not None else 0 |
| 682 | launcherSlots = fitModAttr("launcherSlotsLeft") if fitModAttr("launcherSlotsLeft") is not None else 0 |
| 683 | droneBandwidth = fitModAttr("droneBandwidth") if fitModAttr("droneBandwidth") is not None else 0 |
| 684 | weaponBonusMultipliers = EfsPort.getWeaponBonusMultipliers(fit) |
| 685 | effectiveTurretSlots = round(turretSlots * weaponBonusMultipliers["turret"], 2) |
| 686 | effectiveLauncherSlots = round(launcherSlots * weaponBonusMultipliers["launcher"], 2) |
| 687 | effectiveDroneBandwidth = round(droneBandwidth * weaponBonusMultipliers["droneBandwidth"], 2) |
| 688 | # Assume a T2 siege module for dreads |
| 689 | if fit.ship.item.group.name == "Dreadnought": |
| 690 | effectiveTurretSlots *= 9.4 |
| 691 | effectiveLauncherSlots *= 15 |
| 692 | hullResonance = { |
| 693 | "exp": fitModAttr("explosiveDamageResonance"), "kin": fitModAttr("kineticDamageResonance"), |
| 694 | "therm": fitModAttr("thermalDamageResonance"), "em": fitModAttr("emDamageResonance") |
| 695 | } |
| 696 | armorResonance = { |
| 697 | "exp": fitModAttr("armorExplosiveDamageResonance"), "kin": fitModAttr("armorKineticDamageResonance"), |
| 698 | "therm": fitModAttr("armorThermalDamageResonance"), "em": fitModAttr("armorEmDamageResonance") |
| 699 | } |
| 700 | shieldResonance = { |
| 701 | "exp": fitModAttr("shieldExplosiveDamageResonance"), "kin": fitModAttr("shieldKineticDamageResonance"), |
| 702 | "therm": fitModAttr("shieldThermalDamageResonance"), "em": fitModAttr("shieldEmDamageResonance") |
| 703 | } |
| 704 | |
| 705 | resonance = {"hull": hullResonance, "armor": armorResonance, "shield": shieldResonance} |
| 706 | shipSize = EfsPort.getShipSize(fit.ship.item.groupID) |
| 707 | # Export at maximum spool for consistency, spoolup data is exported anyway. |
| 708 | defaultSpoolValue = 1 |
| 709 | spoolOptions = SpoolOptions(SpoolType.SPOOL_SCALE, defaultSpoolValue, True) |
| 710 | |
| 711 | cargoIDs = [] |
| 712 | for cargo in fit.cargo: |
| 713 | cargoIDs.append(cargo.itemID) |
| 714 | |
| 715 | repairs = EfsPort.getRepairData(fit, sFit) |
| 716 | |
| 717 | def roundNumbers(data, digits): |
| 718 | if isinstance(data, str): |
nothing calls this directly
no test coverage detected