suspicion.py (744B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\abyss\common\suspicion.py 2 __all__ = ['FILAMENT_ACTIVATION_NOT_ALLOWED', 'FILAMENT_ACTIVATION_UNRESTRICTED', 'get_max_allowed_tier_by_security_level'] 3 FILAMENT_ACTIVATION_NOT_ALLOWED = -405 4 FILAMENT_ACTIVATION_UNRESTRICTED = 200 5 _MAX_TIER_ALLOWED_BY_DECA_SECURITY_RANGE = {10: 0, 6 9: 0, 7 8: 3, 8 7: 4, 9 6: 5, 10 5: 6} 11 12 def _deca_security_range(security_float): 13 if 0.0 < security_float < 0.05: 14 security_float = 0.05 15 return int(round(security_float, 1) * 10) 16 17 18 def get_max_allowed_tier_by_security_level(security_level): 19 return _MAX_TIER_ALLOWED_BY_DECA_SECURITY_RANGE.get(_deca_security_range(security_level), FILAMENT_ACTIVATION_UNRESTRICTED)