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

Method getModuleFlatAmmo

service/ammo.py:47–57  ·  view source on GitHub ↗
(mod)

Source from the content-addressed store, hash-verified

45
46 @staticmethod
47 def getModuleFlatAmmo(mod):
48 sMkt = Market.getInstance()
49 if mod is None or mod.isEmpty:
50 return set()
51 chargeSet = set()
52 # Do not try to grab it for t3d modes which can also be passed as part of selection
53 if isinstance(mod, Module):
54 for charge in mod.getValidCharges():
55 if sMkt.getPublicityByItem(charge):
56 chargeSet.add(charge)
57 return chargeSet
58
59 @classmethod
60 def getModuleStructuredAmmo(cls, mod, ammo=None):

Callers 4

_getAmmoMethod · 0.80
getModsMethod · 0.80

Calls 3

getValidChargesMethod · 0.80
getPublicityByItemMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected