From 181e1e1e30d95770c703da9bbf475b3128034c54 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 15 Jun 2020 16:37:52 +0300 Subject: [PATCH] Make scanners active and expose data to misc column --- eos/effects.py | 33 +++++++++++++++++++++++++++++++++ gui/builtinViewColumns/misc.py | 7 +++++++ 2 files changed, 40 insertions(+) diff --git a/eos/effects.py b/eos/effects.py index 819a84254..038a1cf4d 100644 --- a/eos/effects.py +++ b/eos/effects.py @@ -218,6 +218,28 @@ class Effect39(BaseEffect): fit.ship.increaseItemAttr('warpScrambleStatus', module.getModifiedItemAttr('warpScrambleStrength'), **kwargs) +class Effect46(BaseEffect): + """ + shipScan + + Used by: + Modules from group: Ship Scanner (3 of 3) + """ + + type = 'active' + + +class Effect47(BaseEffect): + """ + cargoScan + + Used by: + Modules from group: Cargo Scanner (4 of 4) + """ + + type = 'active' + + class Effect48(BaseEffect): """ powerBooster @@ -447,6 +469,17 @@ class Effect67(BaseEffect): module.reloadTime = 1000 +class Effect81(BaseEffect): + """ + surveyScan + + Used by: + Modules from group: Survey Scanner (3 of 3) + """ + + type = 'active' + + class Effect89(BaseEffect): """ projectileWeaponSpeedMultiply diff --git a/gui/builtinViewColumns/misc.py b/gui/builtinViewColumns/misc.py index 52888ed87..4337da392 100644 --- a/gui/builtinViewColumns/misc.py +++ b/gui/builtinViewColumns/misc.py @@ -691,6 +691,13 @@ class Miscellanea(ViewColumn): formatAmount(itemArmorResistanceShiftHardenerExp, 3, 0, 3), ) return text, tooltip + elif itemGroup in ("Cargo Scanner", "Ship Scanner", "Survey Scanner"): + duration = stuff.getModifiedItemAttr("duration") + if not duration: + return "", None + text = "{}s".format(formatAmount(duration / 1000, 3, 0, 0)) + tooltip = "Scan duration" + return text, tooltip elif stuff.charge is not None: chargeGroup = stuff.charge.group.name if chargeGroup.endswith("Rocket") or chargeGroup.endswith("Missile") or chargeGroup.endswith("Torpedo"):