Merge pull request #1328 from burnsypet/wcs-display

Display warp core strength on warp speed tooltip
This commit is contained in:
Ryan Holmes
2017-11-12 15:38:25 -05:00
committed by GitHub
7 changed files with 44 additions and 10 deletions

View File

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

View File

@@ -9,6 +9,9 @@ type = "projected", "active"
def handler(fit, module, context):
if "projected" not in context:
return
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
# this is such a dirty hack
for mod in fit.modules:
if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE:

View File

@@ -2,7 +2,9 @@
#
# Used by:
# Modules from group: Warp Disrupt Field Generator (7 of 7)
type = "active"
from eos.saveddata.module import State
type = "projected", "active"
runTime = "early"
@@ -14,3 +16,11 @@ def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Propulsion Module",
"speedFactor", module.getModifiedItemAttr("speedFactorBonus"))
fit.ship.forceItemAttr("disallowAssistance", 1)
if "projected" in context:
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
if module.charge is not None and module.charge.ID == 45010:
for mod in fit.modules:
if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE:
mod.state = State.ONLINE

View File

@@ -6,4 +6,5 @@ type = "projected", "active"
def handler(fit, module, context):
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
if "projected" in context:
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))

View File

@@ -2,7 +2,6 @@
#
# Used by:
# Modules named like: Warp Scrambler (26 of 26)
from eos.saveddata.module import State
runTime = "early"
@@ -12,6 +11,9 @@ type = "projected", "active"
def handler(fit, module, context):
if "projected" not in context:
return
fit.ship.increaseItemAttr("warpScrambleStatus", module.getModifiedItemAttr("warpScrambleStrength"))
# this is such a dirty hack
for mod in fit.modules:
if not mod.isEmpty and mod.item.requiresSkill("High Speed Maneuvering") and mod.state > State.ONLINE:

View File

@@ -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" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1)
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" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1)
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:

View File

@@ -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" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1)
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" % (fit.ship.getModifiedItemAttr("warpScrambleStatus") * -1)
else:
warpScrambleStatus = "Warp Core Strength: %.1f" % 0
label.SetToolTip(wx.ToolTip("%s\n%s" % (maxWarpDistance, warpScrambleStatus)))
else:
label.SetToolTip(wx.ToolTip(""))
elif labelName == "labelSensorStr":