MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / miscSection

Function miscSection

service/port/shipstats.py:174–191  ·  view source on GitHub ↗
(fit)

Source from the content-addressed store, hash-verified

172
173
174def miscSection(fit):
175 text = ""
176 text += "Speed: {} m/s\n".format(formatAmount(fit.maxSpeed, 3, 0, 0))
177 text += "Signature: {} m\n".format(formatAmount(fit.ship.getModifiedItemAttr("signatureRadius"), 3, 0, 9))
178
179 text += "Capacitor: {} GJ".format(formatAmount(fit.ship.getModifiedItemAttr("capacitorCapacity"), 3, 0, 9))
180 capState = fit.capState
181 if fit.capStable:
182 text += " (Stable at {0:.0f}%)".format(capState)
183 else:
184 text += " (Lasts {})".format("%ds" % capState if capState <= 60 else "%dm%ds" % divmod(capState, 60))
185 text += "\n"
186
187 text += "Targeting range: {} km\n".format(formatAmount(fit.maxTargetRange / 1000, 3, 0, 0))
188 text += "Scan resolution: {0:.0f} mm\n".format(fit.ship.getModifiedItemAttr("scanResolution"))
189 text += "Sensor strength: {}\n".format(formatAmount(fit.scanStrength, 3, 0, 0))
190
191 return text
192
193
194def exportFitStats(fit, callback):

Callers 1

exportFitStatsFunction · 0.85

Calls 2

formatAmountFunction · 0.90
getModifiedItemAttrMethod · 0.45

Tested by

no test coverage detected