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

Method calculateSlot

eos/saveddata/module.py:864–881  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

862
863 @staticmethod
864 def calculateSlot(item):
865 effectSlotMap = {
866 "rigSlot" : FittingSlot.RIG.value,
867 "loPower" : FittingSlot.LOW.value,
868 "medPower" : FittingSlot.MED.value,
869 "hiPower" : FittingSlot.HIGH.value,
870 "subSystem" : FittingSlot.SUBSYSTEM.value,
871 "serviceSlot": FittingSlot.SERVICE.value
872 }
873 if item is None:
874 return None
875 for effectName, slot in effectSlotMap.items():
876 if effectName in item.effects:
877 return slot
878 if item.group.name in Module.SYSTEM_GROUPS:
879 return FittingSlot.SYSTEM
880
881 return None
882
883 @validates("ID", "itemID", "ammoID")
884 def validator(self, key, val):

Callers 2

buildMethod · 0.95
columnBackgroundMethod · 0.80

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected