systemEffects.py (1641B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\corruptionsuppression\systemEffects.py 2 import appConst 3 from crimewatch.const import targetGroupsWithSuspectPenaltyInHighSec 4 from eve.common.script.util.facwarCommon import IsPirateFWFaction 5 import logging 6 WARP_SPEED_INCREASE_STAGE_THRESHOLD = 4 7 8 def DoesConcordReact(dogmaLM, targetGroupID, isHighSec): 9 if not isHighSec: 10 return False 11 if targetGroupID == appConst.groupCapsule: 12 return True 13 if targetGroupID in targetGroupsWithSuspectPenaltyInHighSec: 14 return False 15 if dogmaLM.IsFullyCorrupted(): 16 return False 17 return True 18 19 20 class BaseCorruptionWarpSpeedIncreaserChecker(object): 21 22 def __init__(self, solarSystemID): 23 self._solarSystemID = solarSystemID 24 self.defaultIncrease = 0.0 25 self.doesSystemHaveCorruptionIncrease = None 26 27 def GetWarpSpeedIncrease(self, charWarFactionID): 28 if not charWarFactionID: 29 return self.defaultIncrease 30 try: 31 if self.doesSystemHaveCorruptionIncrease is None: 32 self.doesSystemHaveCorruptionIncrease = self.DoesSystemHaveCorruptionWarpIncrease(self._solarSystemID) 33 if not self.doesSystemHaveCorruptionIncrease: 34 return self.defaultIncrease 35 if IsPirateFWFaction(charWarFactionID): 36 return 2.0 37 return self.defaultIncrease 38 except Exception: 39 logging.exception('GetWarpSpeedIncrease failed') 40 41 return self.defaultIncrease 42 43 def DoesSystemHaveCorruptionWarpIncrease(self, solarSystemID): 44 return False