Make scanners active and expose data to misc column

This commit is contained in:
DarkPhoenix
2020-06-15 16:37:52 +03:00
parent 3fc26254ae
commit 181e1e1e30
2 changed files with 40 additions and 0 deletions

View File

@@ -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"):