(item)
| 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): |
no test coverage detected