Display warp core strength as warp speed tooltip
Changes to antiwarpscramblingpassive.py: Fixed a typo of "warmScrambleStatus" to "warpScrambleStatus" Changes to targetingMiscViewMinimal.py: Extended existing tooltip to include warp core strength. Warp core strength is none for ships that do not have a hull bonus (venture etc.) or do not have any warp core stabs fitted so logic is added to default value to 0. Changes to targetingMiscViewFull.py: As above.
This commit is contained in:
@@ -6,4 +6,4 @@ type = "passive"
|
||||
|
||||
|
||||
def handler(fit, module, context):
|
||||
fit.ship.increaseItemAttr("warmScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
|
||||
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
|
||||
|
||||
@@ -197,7 +197,12 @@ class TargetingMiscViewFull(StatsView):
|
||||
elif labelName == "labelFullSigRadius":
|
||||
label.SetToolTip(wx.ToolTip("Probe Size: %.3f" % (fit.probeSize or 0)))
|
||||
elif labelName == "labelFullWarpSpeed":
|
||||
label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance))
|
||||
maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance
|
||||
if fit.ship.getModifiedItemAttr("warpScrambleStatus"):
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % abs(fit.ship.getModifiedItemAttr("warpScrambleStatus"))
|
||||
else:
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % 0
|
||||
label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus)))
|
||||
elif labelName == "labelSensorStr":
|
||||
if fit.jamChance > 0:
|
||||
label.SetToolTip(
|
||||
@@ -222,9 +227,12 @@ class TargetingMiscViewFull(StatsView):
|
||||
self._cachedValues[counter] = newValues
|
||||
elif labelName == "labelFullWarpSpeed":
|
||||
if fit:
|
||||
label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance))
|
||||
else:
|
||||
label.SetToolTip(wx.ToolTip(""))
|
||||
maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance
|
||||
if fit.ship.getModifiedItemAttr("warpScrambleStatus"):
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % abs(fit.ship.getModifiedItemAttr("warpScrambleStatus"))
|
||||
else:
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % 0
|
||||
label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus)))
|
||||
elif labelName == "labelSensorStr":
|
||||
if fit:
|
||||
if fit.jamChance > 0:
|
||||
|
||||
@@ -192,7 +192,12 @@ class TargetingMiscViewMinimal(StatsView):
|
||||
lockTime += "%5s\t%s\n" % (left, right)
|
||||
label.SetToolTip(wx.ToolTip(lockTime))
|
||||
elif labelName == "labelFullWarpSpeed":
|
||||
label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance))
|
||||
maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance
|
||||
if fit.ship.getModifiedItemAttr("warpScrambleStatus"):
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % abs(fit.ship.getModifiedItemAttr("warpScrambleStatus"))
|
||||
else:
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % 0
|
||||
label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus)))
|
||||
elif labelName == "labelSensorStr":
|
||||
if fit.jamChance > 0:
|
||||
label.SetToolTip(wx.ToolTip("Type: %s\n%.1f%% Chance of Jam" % (fit.scanType, fit.jamChance)))
|
||||
@@ -216,7 +221,12 @@ class TargetingMiscViewMinimal(StatsView):
|
||||
self._cachedValues[counter] = newValues
|
||||
elif labelName == "labelFullWarpSpeed":
|
||||
if fit:
|
||||
label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance))
|
||||
maxWarpDistance = "Max Warp Distance: %.1f AU" % fit.maxWarpDistance
|
||||
if fit.ship.getModifiedItemAttr("warpScrambleStatus"):
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % abs(fit.ship.getModifiedItemAttr("warpScrambleStatus"))
|
||||
else:
|
||||
warpScrambleStatus = "Warp Core Strength: %.1f" % 0
|
||||
label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus)))
|
||||
else:
|
||||
label.SetToolTip(wx.ToolTip(""))
|
||||
elif labelName == "labelSensorStr":
|
||||
|
||||
Reference in New Issue
Block a user