MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / Fit

Class Fit

service/fit.py:57–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57class Fit:
58 instance = None
59 processors = {}
60
61 @classmethod
62 def getInstance(cls):
63 if cls.instance is None:
64 cls.instance = Fit()
65
66 return cls.instance
67
68 def __init__(self):
69 pyfalog.debug("Initialize Fit class")
70 self.pattern = DamagePattern.getInstance().getDamagePattern("Uniform")
71 self.targetProfile = None
72 self.character = saveddata_Character.getAll5()
73 self.booster = False
74 self._loadedFits = WeakSet()
75
76 serviceFittingDefaultOptions = {
77 "useGlobalCharacter": False,
78 "useCharacterImplantsByDefault": True,
79 "useGlobalDamagePattern": False,
80 "defaultCharacter": self.character.ID,
81 "useGlobalForceReload": False,
82 "colorFitBySlot": False,
83 "rackSlots": True,
84 "rackLabels": True,
85 "compactSkills": True,
86 "showTooltip": True,
87 "showMarketShortcuts": False,
88 "enableGaugeAnimation": True,
89 "openFitInNew": False,
90 "priceSystem": "Jita",
91 "priceSource": "fuzzwork market",
92 "showShipBrowserTooltip": True,
93 "marketSearchDelay": 250,
94 "ammoChangeAll": False,
95 "additionsLabels": 1,
96 "expandedMutantNames": False,
97 }
98
99 self.serviceFittingOptions = SettingsProvider.getInstance().getSettings(
100 "pyfaServiceFittingOptions", serviceFittingDefaultOptions)
101
102 @staticmethod
103 def getAllFits():
104 pyfalog.debug("Fetching all fits")
105 fits = eos.db.getFitList()
106 return fits
107
108 @staticmethod
109 def getAllFitsLite():
110 fits = eos.db.getFitListLite()
111 shipMap = {f.shipID: None for f in fits}
112 for shipID in shipMap:
113 ship = eos.db.getItem(shipID)
114 if ship is not None:

Callers 6

importESIFunction · 0.90
_resolve_shipFunction · 0.90
importEftCfgFunction · 0.90
_importCreateFitFunction · 0.90
processImportInfoFunction · 0.90
getInstanceMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected