Change how command burst misc column info is processed

This commit is contained in:
DarkPhoenix
2021-11-28 00:06:15 +03:00
parent 6677435474
commit 7992ba43b2

View File

@@ -679,7 +679,7 @@ class Miscellanea(ViewColumn):
formatAmount(itemArmorResistanceShiftHardenerKin, 3, 0, 3), formatAmount(itemArmorResistanceShiftHardenerKin, 3, 0, 3),
formatAmount(itemArmorResistanceShiftHardenerExp, 3, 0, 3), formatAmount(itemArmorResistanceShiftHardenerExp, 3, 0, 3),
) )
tooltip = "Resistances Shifted to Damage Profile:\n{0}% EM | {1}% Therm | {2}% Kin | {3}% Exp".format( tooltip = "Resistances shifted to damage profile:\n{0}% EM | {1}% Therm | {2}% Kin | {3}% Exp".format(
formatAmount(itemArmorResistanceShiftHardenerEM, 3, 0, 3), formatAmount(itemArmorResistanceShiftHardenerEM, 3, 0, 3),
formatAmount(itemArmorResistanceShiftHardenerTherm, 3, 0, 3), formatAmount(itemArmorResistanceShiftHardenerTherm, 3, 0, 3),
formatAmount(itemArmorResistanceShiftHardenerKin, 3, 0, 3), formatAmount(itemArmorResistanceShiftHardenerKin, 3, 0, 3),
@@ -693,96 +693,80 @@ class Miscellanea(ViewColumn):
text = "{}s".format(formatAmount(duration / 1000, 3, 0, 0)) text = "{}s".format(formatAmount(duration / 1000, 3, 0, 0))
tooltip = "Scan duration" tooltip = "Scan duration"
return text, tooltip return text, tooltip
elif itemGroup == "Command Burst": elif itemGroup == "Command Burst":
textSections = []
# Text and tooltip are empty if there is no charge. tooltipSections = []
text = "" buffMap = {}
tooltip = "" for seq in (1, 2, 3, 4):
buffId = stuff.getModifiedChargeAttr(f'warfareBuff{seq}ID')
if not buffId:
buff_value = stuff.getModifiedItemAttr('warfareBuff1Value') continue
buff_id = stuff.getModifiedChargeAttr('warfareBuff1ID') buffValue = stuff.getModifiedItemAttr(f'warfareBuff{seq}Value')
if buff_id == 10: # Shield Burst: Shield Harmonizing: Shield Resistance buffMap[buffId] = buffValue
# minus buff value because ingame shows positive value if buffId == 10: # Shield Burst: Shield Harmonizing: Shield Resistance
text = f"{-buff_value:.1f}%" # minus buff value because ingame shows positive value
tooltip = "Shield Resistance Bonus" textSections.append(f"{formatAmount(-buffValue, 3, 0, 3, forceSign=True)}%")
tooltipSections.append("shield resistance")
elif buff_id == 11: # Shield Burst: Active Shielding: Repair Duration/Capacitor elif buffId == 11: # Shield Burst: Active Shielding: Repair Duration/Capacitor
text = f"{buff_value:+.1f}%" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltip = "Shield Repair Modules: Duration & Capacictor-use bonus" tooltipSections.append("shield RR duration & capacictor use")
elif buffId == 12: # Shield Burst: Shield Extension: Shield HP
elif buff_id == 12: # Shield Burst: Shield Extension: Shield HP textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
text = f"{buff_value:.1f}%" tooltipSections.append("shield HP")
tooltip = "Shield HP Bonus" elif buffId == 13: # Armor Burst: Armor Energizing: Armor Resistance
# minus buff value because ingame shows positive value
elif buff_id == 13: # Armor Burst: Armor Energizing: Armor Resistance textSections.append(f"{formatAmount(-buffValue, 3, 0, 3, forceSign=True)}%")
# minus buff value because ingame shows positive value tooltipSections.append("armor resistance")
text = f"{-buff_value:.1f}%" elif buffId == 14: # Armor Burst: Rapid Repair: Repair Duration/Capacitor
tooltip = "Armor Resistance Bonus" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltipSections.append("armor RR duration & capacitor use")
elif buff_id == 14: # Armor Burst: Rapid Repair: Repair Duration/Capacitor elif buffId == 15: # Armor Burst: Armor Reinforcement: Armor HP
text = f"{buff_value:+.1f}%" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltip = "Armor Repair Modules: Duration & Capacitor-use bonus" tooltipSections.append("armor HP")
elif buffId == 16: # Information Burst: Sensor Optimization: Scan Resolution
elif buff_id == 15: # Armor Burst: Armor Reinforcement: Armor HP textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
text = f"{buff_value:.1f}%" tooltipSections.append("scan resolution")
tooltip = "Armor HP Bonus" elif buffId == 26: # Information Burst: Sensor Optimization: Targeting Range
textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
elif buff_id == 16: # Information Burst: Sensor Optimization: Scan Resolution tooltipSections.append("targeting range")
text = f"{buff_value:.1f}%" elif buffId == 17: # Information Burst: Electronic Superiority: EWAR Range and Strength
tooltip = "Scan Resolution bonus" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltipSections.append("electronic warfare modules range & strength")
elif buff_id == 26: # Information Burst: Sensor Optimization: Targeting Range elif buffId == 18: # Information Burst: Electronic Hardening: Sensor Strength
text += f" | {buff_value:.1f}%" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltip += " | Targeting Range bonus" tooltipSections.append("sensor strength")
elif buffId == 19: # Information Burst: Electronic Hardening: RSD/RWD Resistance
elif buff_id == 17: # Information Burst: Electronic Superiority: EWAR Range and Strength textSections.append(f"{formatAmount(-buffValue, 3, 0, 3, forceSign=True)}%")
text = f"{buff_value:.1f}%" tooltipSections.append("sensor dampener & weapon disruption resistance")
tooltip = "Electronic Warfare modules: Range and Strength bonus" elif buffId == 20: # Skirmish Burst: Evasive Maneuvers: Signature Radius
textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
elif buff_id == 18: # Information Burst: Electronic Hardening: Sensor Strength tooltipSections.append("signature radius")
text = f"{buff_value:.1f}%" elif buffId == 60: # Skirmish Burst: Evasive Maneuvers: Agility
tooltip = "Sensor Strength bonus" # minus the buff value because we want Agility as shown ingame, not inertia modifier
textSections.append(f"{formatAmount(-buffValue, 3, 0, 3, forceSign=True)}%")
buff2_value = stuff.getModifiedItemAttr('warfareBuff2Value') tooltipSections.append("agility")
elif buffId == 21: # Skirmish Burst: Interdiction Maneuvers: Tackle Range
# Information Burst: Electronic Hardening: RSD/RWD Resistance textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
text += f" | {buff2_value:+.1f}%" tooltipSections.append("warp disruption & stasis web range")
tooltip += " | Remote Sensor Dampener / Remote Weapon Disruption Resistance bonus" elif buffId == 22: # Skirmish Burst: Rapid Deployment: AB/MWD Speed Increase
textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
elif buff_id == 20: # Skirmish Burst: Evasive Maneuvers: Signature Radius tooltipSections.append("AB/MWD speed increase")
text = f"{buff_value:+.1f}%" elif buffId == 23: # Mining Burst: Mining Laser Field Enhancement: Mining/Survey Range
tooltip = "Signature Radius bonus" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltipSections.append("mining/survey module range")
buff2_value = stuff.getModifiedItemAttr('warfareBuff2Value') elif buffId == 24: # Mining Burst: Mining Laser Optimization: Mining Capacitor/Duration
# Skirmish Burst: Evasive Maneuvers: Agility textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
# minus the buff value because we want Agility as shown ingame, not inertia modifier tooltipSections.append("mining module duration & capacitor use")
text += f" | {-buff2_value:.1f}%" elif buffId == 25: # Mining Burst: Mining Equipment Preservation: Crystal Volatility
tooltip += " | Agility bonus" textSections.append(f"{formatAmount(buffValue, 3, 0, 3, forceSign=True)}%")
tooltipSections.append("mining crystal volatility")
elif buff_id == 21: # Skirmish Burst: Interdiction Maneuvers: Tackle Range if not textSections:
text = f"{buff_value:.1f}%" return '', None
tooltip = "Propulsion disruption module range bonus" text = ' | '.join(textSections)
tooltip = '{} bonus'.format(' | '.join(tooltipSections))
elif buff_id == 22: # Skirmish Burst: Rapid Deployment: AB/MWD Speed Increase if tooltip:
text = f"{buff_value:.1f}%" tooltip = tooltip[0].capitalize() + tooltip[1:]
tooltip = "AB/MWD module speed increase"
elif buff_id == 23: # Mining Burst: Mining Laser Field Enhancement: Mining/Survey Range
text = f"{buff_value:.1f}%"
tooltip = "Mining/Survey module range bonus"
elif buff_id == 24: # Mining Burst: Mining Laser Optimization: Mining Capacitor/Duration
text = f"{buff_value:+.1f}%"
tooltip = "Mining Modules: Duration & Capacitor-use bonus"
elif buff_id == 25: # Mining Burst: Mining Equipment Preservation: Crystal Volatility
text = f"{buff_value:+.1f}%"
tooltip = "Mining crystal volatility bonus"
return text, tooltip return text, tooltip
elif stuff.charge is not None: elif stuff.charge is not None:
chargeGroup = stuff.charge.group.name chargeGroup = stuff.charge.group.name
if chargeGroup.endswith("Rocket") or chargeGroup.endswith("Missile") or chargeGroup.endswith("Torpedo"): if chargeGroup.endswith("Rocket") or chargeGroup.endswith("Missile") or chargeGroup.endswith("Torpedo"):