Add more functionality to preferences window.

This commit is contained in:
Ebag333
2017-02-27 12:05:38 -08:00
parent dbffdedc92
commit d67573f83a
6 changed files with 53 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
# Used by:
# Module: Reactive Armor Hardener
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
@@ -13,6 +14,13 @@ type = "active"
def handler(fit, module, context):
damagePattern = fit.damagePattern
sFit = Fit.getInstance()
static_adaptive_behavior = sFit.serviceFittingOptions["useStaticAdaptiveArmorHardener"]
if (damagePattern.emAmount == damagePattern.thermalAmount == damagePattern.kineticAmount == damagePattern.explosiveAmount) and static_adaptive_behavior:
pyfalog.debug("Setting adaptivearmorhardener resists to uniform profile.")
return
# Skip if there is no damage pattern. Example: projected ships or fleet boosters
if damagePattern: