Check if the state is valid for this module, without considering other modules at all
(self, state)
| 730 | return True |
| 731 | |
| 732 | def isValidState(self, state): |
| 733 | """ |
| 734 | Check if the state is valid for this module, without considering other modules at all |
| 735 | """ |
| 736 | # Check if we're within bounds |
| 737 | if state < -1 or state > 2: |
| 738 | return False |
| 739 | elif state >= FittingModuleState.ACTIVE and (not self.item.isType("active") or self.getModifiedItemAttr('activationBlocked') > 0): |
| 740 | return False |
| 741 | elif state == FittingModuleState.OVERHEATED and not self.item.isType("overheat"): |
| 742 | return False |
| 743 | # Some destructible effect beacons contain active effects, hardcap those at online state |
| 744 | elif state > FittingModuleState.ONLINE and self.slot == FittingSlot.SYSTEM: |
| 745 | return False |
| 746 | else: |
| 747 | return True |
| 748 | |
| 749 | def getMaxState(self, proposedState=None): |
| 750 | states = sorted((s for s in FittingModuleState if proposedState is None or s <= proposedState), reverse=True) |
no test coverage detected