From a5d10c4a76afb93562ecfd76a70b45816b56712f Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 7 Dec 2019 15:41:07 +0300 Subject: [PATCH] Change sorting of built-in damage profiles --- eos/saveddata/damagePattern.py | 181 +++++++++--------- .../damagePatternChange.py | 6 +- 2 files changed, 94 insertions(+), 93 deletions(-) diff --git a/eos/saveddata/damagePattern.py b/eos/saveddata/damagePattern.py index 65262c9cc..97fcccd0e 100644 --- a/eos/saveddata/damagePattern.py +++ b/eos/saveddata/damagePattern.py @@ -31,100 +31,99 @@ BUILTINS = OrderedDict([ (-3, ('[Generic]Thermal', 0, 1, 0, 0)), (-4, ('[Generic]Kinetic', 0, 0, 1, 0)), (-5, ('[Generic]Explosive', 0, 0, 0, 1)), - (-6, ('[Bombs]Electron Bomb', 6400, 0, 0, 0)), - (-7, ('[Bombs]Scorch Bomb', 0, 6400, 0, 0)), - (-8, ('[Bombs]Concussion Bomb', 0, 0, 6400, 0)), - (-9, ('[Bombs]Shrapnel Bomb', 0, 0, 0, 6400)), - (-10, ('[Frequency Crystals]|[T2] Conflagration', 7.7, 7.7, 0, 0)), - (-11, ('[Frequency Crystals]|[T2] Scorch', 9, 2, 0, 0)), - (-12, ('[Frequency Crystals]|[T2] Gleam', 7, 7, 0, 0)), - (-13, ('[Frequency Crystals]|[T2] Aurora', 5, 3, 0, 0)), - (-14, ('[Frequency Crystals]Multifrequency', 7, 5, 0, 0)), - (-15, ('[Frequency Crystals]Gamma', 7, 4, 0, 0)), - (-16, ('[Frequency Crystals]Xray', 6, 4, 0, 0)), - (-17, ('[Frequency Crystals]Ultraviolet', 6, 3, 0, 0)), - (-18, ('[Frequency Crystals]Standard', 5, 3, 0, 0)), - (-19, ('[Frequency Crystals]Infrared', 5, 2, 0, 0)), - (-20, ('[Frequency Crystals]Microwave', 4, 2, 0, 0)), - (-21, ('[Frequency Crystals]Radio', 5, 0, 0, 0)), - (-22, ('[Hybrid Charges]|[T2] Void', 0, 7.7, 7.7, 0)), - (-23, ('[Hybrid Charges]|[T2] Null', 0, 6, 5, 0)), - (-24, ('[Hybrid Charges]|[T2] Javelin', 0, 8, 6, 0)), - (-25, ('[Hybrid Charges]|[T2] Spike', 0, 4, 4, 0)), - (-26, ('[Hybrid Charges]Antimatter', 0, 5, 7, 0)), - (-27, ('[Hybrid Charges]Plutonium', 0, 5, 6, 0)), - (-28, ('[Hybrid Charges]Uranium', 0, 4, 6, 0)), - (-29, ('[Hybrid Charges]Thorium', 0, 4, 5, 0)), - (-30, ('[Hybrid Charges]Lead', 0, 3, 5, 0)), - (-31, ('[Hybrid Charges]Iridium', 0, 3, 4, 0)), - (-32, ('[Hybrid Charges]Tungsten', 0, 2, 4, 0)), - (-33, ('[Hybrid Charges]Iron', 0, 2, 3, 0)), - (-34, ('[Missiles]Mjolnir', 1, 0, 0, 0)), - (-35, ('[Missiles]Inferno', 0, 1, 0, 0)), - (-36, ('[Missiles]Scourge', 0, 0, 1, 0)), - (-37, ('[Missiles]Nova', 0, 0, 0, 1)), - (-38, ('[Missiles]|[Structure] Standup Missile', 1, 1, 1, 1)), - (-39, ('[Projectile Ammo]|[T2] Hail', 0, 0, 3.3, 12.1)), - (-40, ('[Projectile Ammo]|[T2] Barrage', 0, 0, 5, 6)), - (-41, ('[Projectile Ammo]|[T2] Quake', 0, 0, 5, 9)), - (-42, ('[Projectile Ammo]|[T2] Tremor', 0, 0, 3, 5)), - (-43, ('[Projectile Ammo]EMP', 9, 0, 1, 2)), - (-44, ('[Projectile Ammo]Phased Plasma', 0, 10, 2, 0)), - (-45, ('[Projectile Ammo]Fusion', 0, 0, 2, 10)), - (-46, ('[Projectile Ammo]Depleted Uranium', 0, 3, 2, 3)), - (-47, ('[Projectile Ammo]Titanium Sabot', 0, 0, 6, 2)), - (-48, ('[Projectile Ammo]Proton', 3, 0, 2, 0)), - (-49, ('[Projectile Ammo]Carbonized Lead', 0, 0, 4, 1)), - (-50, ('[Projectile Ammo]Nuclear', 0, 0, 1, 4)), + (-6, ('[Frequency Crystals]|[T2] Aurora', 5, 3, 0, 0)), + (-7, ('[Frequency Crystals]|[T2] Scorch', 9, 2, 0, 0)), + (-8, ('[Frequency Crystals]Radio', 5, 0, 0, 0)), + (-9, ('[Frequency Crystals]Microwave', 4, 2, 0, 0)), + (-10, ('[Frequency Crystals]Infrared', 5, 2, 0, 0)), + (-11, ('[Frequency Crystals]Standard', 5, 3, 0, 0)), + (-12, ('[Frequency Crystals]Ultraviolet', 6, 3, 0, 0)), + (-13, ('[Frequency Crystals]Xray', 6, 4, 0, 0)), + (-14, ('[Frequency Crystals]Gamma', 7, 4, 0, 0)), + (-15, ('[Frequency Crystals]Multifrequency', 7, 5, 0, 0)), + (-16, ('[Frequency Crystals]|[T2] Gleam', 7, 7, 0, 0)), + (-17, ('[Frequency Crystals]|[T2] Conflagration', 7.7, 7.7, 0, 0)), # Different sizes of plasma do different damage ratios, the values here # are average of ratios across sizes - (-51, ('[Exotic Plasma]|[T2] Occult', 0, 55863, 0, 44137)), - (-52, ('[Exotic Plasma]|[T2] Mystic', 0, 66319, 0, 33681)), - (-53, ('[Exotic Plasma]Tetryon', 0, 69208, 0, 30792)), - (-54, ('[Exotic Plasma]Baryon', 0, 59737, 0, 40263)), - (-55, ('[Exotic Plasma]Meson', 0, 60519, 0, 39481)), - (-56, ('[NPC][Asteroid]Angel Cartel', 1838, 562, 2215, 3838)), - (-57, ('[NPC][Asteroid]Blood Raiders', 5067, 4214, 0, 0)), - (-58, ('[NPC][Asteroid]Guristas', 0, 1828, 7413, 0)), - (-59, ('[NPC][Asteroid]Rogue Drone', 394, 666, 1090, 1687)), - (-60, ('[NPC][Asteroid]Sanshas Nation', 5586, 4112, 0, 0)), - (-61, ('[NPC][Asteroid]Serpentis', 0, 5373, 4813, 0)), - (-62, ('[NPC][Deadspace]Angel Cartel', 369, 533, 1395, 3302)), - (-63, ('[NPC][Deadspace]Blood Raiders', 6040, 5052, 10, 15)), - (-64, ('[NPC][Deadspace]Guristas', 0, 1531, 9680, 0)), - (-65, ('[NPC][Deadspace]Rogue Drone', 276, 1071, 1069, 871)), - (-66, ('[NPC][Deadspace]Sanshas Nation', 3009, 2237, 0, 0)), - (-67, ('[NPC][Deadspace]Serpentis', 0, 3110, 1929, 0)), - (-68, ('[NPC][Mission]Amarr Empire', 4464, 3546, 97, 0)), - (-69, ('[NPC][Mission]Caldari State', 0, 2139, 4867, 0)), - (-70, ('[NPC][Mission]CONCORD', 336, 134, 212, 412)), - (-71, ('[NPC][Mission]Gallente Federation', 9, 3712, 2758, 0)), - (-72, ('[NPC][Mission]Khanid', 612, 483, 43, 6)), - (-73, ('[NPC][Mission]Minmatar Republic', 1024, 388, 1655, 4285)), - (-74, ('[NPC][Mission]Mordus Legion', 25, 262, 625, 0)), - (-75, ('[NPC][Mission]Thukker', 0, 52, 10, 79)), - (-76, ('[NPC][Burner]Cruor (Blood Raiders)', 90, 90, 0, 0)), - (-77, ('[NPC][Burner]Dramiel (Angel)', 55, 0, 20, 96)), - (-78, ('[NPC][Burner]Daredevil (Serpentis)', 0, 110, 154, 0)), - (-79, ('[NPC][Burner]Succubus (Sanshas Nation)', 135, 30, 0, 0)), - (-80, ('[NPC][Burner]Worm (Guristas)', 0, 0, 228, 0)), - (-81, ('[NPC][Burner]Enyo', 0, 147, 147, 0)), - (-82, ('[NPC][Burner]Hawk', 0, 0, 247, 0)), - (-83, ('[NPC][Burner]Jaguar', 36, 0, 50, 182)), - (-84, ('[NPC][Burner]Vengeance', 232, 0, 0, 0)), - (-85, ('[NPC][Burner]Ashimmu (Blood Raiders)', 260, 100, 0, 0)), - (-86, ('[NPC][Burner]Talos', 0, 413, 413, 0)), - (-87, ('[NPC][Burner]Sentinel', 0, 75, 0, 90)), - (-88, ('[NPC][Other]Sleepers', 1472, 1472, 1384, 1384)), - (-89, ('[NPC][Other]Sansha Incursion', 1682, 1347, 3678, 3678)), + (-18, ('[Exotic Plasma]|[T2] Mystic', 0, 66319, 0, 33681)), + (-19, ('[Exotic Plasma]Meson', 0, 60519, 0, 39481)), + (-20, ('[Exotic Plasma]Baryon', 0, 59737, 0, 40263)), + (-21, ('[Exotic Plasma]Tetryon', 0, 69208, 0, 30792)), + (-22, ('[Exotic Plasma]|[T2] Occult', 0, 55863, 0, 44137)), + (-23, ('[Hybrid Charges]|[T2] Spike', 0, 4, 4, 0)), + (-24, ('[Hybrid Charges]|[T2] Null', 0, 6, 5, 0)), + (-25, ('[Hybrid Charges]Iron', 0, 2, 3, 0)), + (-26, ('[Hybrid Charges]Tungsten', 0, 2, 4, 0)), + (-27, ('[Hybrid Charges]Iridium', 0, 3, 4, 0)), + (-28, ('[Hybrid Charges]Lead', 0, 3, 5, 0)), + (-29, ('[Hybrid Charges]Thorium', 0, 4, 5, 0)), + (-30, ('[Hybrid Charges]Uranium', 0, 4, 6, 0)), + (-31, ('[Hybrid Charges]Plutonium', 0, 5, 6, 0)), + (-32, ('[Hybrid Charges]Antimatter', 0, 5, 7, 0)), + (-33, ('[Hybrid Charges]|[T2] Javelin', 0, 8, 6, 0)), + (-34, ('[Hybrid Charges]|[T2] Void', 0, 7.7, 7.7, 0)), + (-35, ('[Projectile Ammo]|[T2] Tremor', 0, 0, 3, 5)), + (-36, ('[Projectile Ammo]|[T2] Barrage', 0, 0, 5, 6)), + (-37, ('[Projectile Ammo]Carbonized Lead', 0, 0, 4, 1)), + (-38, ('[Projectile Ammo]Nuclear', 0, 0, 1, 4)), + (-39, ('[Projectile Ammo]Proton', 3, 0, 2, 0)), + (-40, ('[Projectile Ammo]Depleted Uranium', 0, 3, 2, 3)), + (-41, ('[Projectile Ammo]Titanium Sabot', 0, 0, 6, 2)), + (-42, ('[Projectile Ammo]EMP', 9, 0, 1, 2)), + (-43, ('[Projectile Ammo]Phased Plasma', 0, 10, 2, 0)), + (-44, ('[Projectile Ammo]Fusion', 0, 0, 2, 10)), + (-45, ('[Projectile Ammo]|[T2] Quake', 0, 0, 5, 9)), + (-46, ('[Projectile Ammo]|[T2] Hail', 0, 0, 3.3, 12.1)), + (-47, ('[Missiles]Mjolnir', 1, 0, 0, 0)), + (-48, ('[Missiles]Inferno', 0, 1, 0, 0)), + (-49, ('[Missiles]Scourge', 0, 0, 1, 0)), + (-50, ('[Missiles]Nova', 0, 0, 0, 1)), + (-51, ('[Bombs]Electron Bomb', 6400, 0, 0, 0)), + (-52, ('[Bombs]Scorch Bomb', 0, 6400, 0, 0)), + (-53, ('[Bombs]Concussion Bomb', 0, 0, 6400, 0)), + (-54, ('[Bombs]Shrapnel Bomb', 0, 0, 0, 6400)), + (-55, ('[NPC][Asteroid]Angel Cartel', 1838, 562, 2215, 3838)), + (-56, ('[NPC][Asteroid]Blood Raiders', 5067, 4214, 0, 0)), + (-57, ('[NPC][Asteroid]Guristas', 0, 1828, 7413, 0)), + (-58, ('[NPC][Asteroid]Rogue Drone', 394, 666, 1090, 1687)), + (-59, ('[NPC][Asteroid]Sanshas Nation', 5586, 4112, 0, 0)), + (-60, ('[NPC][Asteroid]Serpentis', 0, 5373, 4813, 0)), + (-61, ('[NPC][Burner]Cruor (Blood Raiders)', 90, 90, 0, 0)), + (-62, ('[NPC][Burner]Dramiel (Angel)', 55, 0, 20, 96)), + (-63, ('[NPC][Burner]Daredevil (Serpentis)', 0, 110, 154, 0)), + (-64, ('[NPC][Burner]Succubus (Sanshas Nation)', 135, 30, 0, 0)), + (-65, ('[NPC][Burner]Worm (Guristas)', 0, 0, 228, 0)), + (-66, ('[NPC][Burner]Enyo', 0, 147, 147, 0)), + (-67, ('[NPC][Burner]Hawk', 0, 0, 247, 0)), + (-68, ('[NPC][Burner]Jaguar', 36, 0, 50, 182)), + (-69, ('[NPC][Burner]Vengeance', 232, 0, 0, 0)), + (-70, ('[NPC][Burner]Ashimmu (Blood Raiders)', 260, 100, 0, 0)), + (-71, ('[NPC][Burner]Talos', 0, 413, 413, 0)), + (-72, ('[NPC][Burner]Sentinel', 0, 75, 0, 90)), + (-73, ('[NPC][Deadspace]Angel Cartel', 369, 533, 1395, 3302)), + (-74, ('[NPC][Deadspace]Blood Raiders', 6040, 5052, 10, 15)), + (-75, ('[NPC][Deadspace]Guristas', 0, 1531, 9680, 0)), + (-76, ('[NPC][Deadspace]Rogue Drone', 276, 1071, 1069, 871)), + (-77, ('[NPC][Deadspace]Sanshas Nation', 3009, 2237, 0, 0)), + (-78, ('[NPC][Deadspace]Serpentis', 0, 3110, 1929, 0)), # Source: ticket #2067 - (-90, ('[NPC][Invasion][Invading Precursor Entities]0% spool up', 31, 29, 24, 16)), - (-91, ('[NPC][Invasion][Invading Precursor Entities]50% spool up', 29, 37, 15, 19)), - (-92, ('[NPC][Invasion][Invading Precursor Entities]100% spool up', 28, 41, 11, 20)), - (-93, ('[NPC][Invasion]Retaliating Amarr Entities', 58, 42, 0, 0)), - (-94, ('[NPC][Invasion]Retaliating Caldari Entities', 30, 43, 2, 25)), - (-95, ('[NPC][Invasion]Retaliating Gallente Entities', 0, 42, 58, 0)), - (-96, ('[NPC][Invasion]Retaliating Minmatar Entities', 17, 8, 44, 31))]) + (-79, ('[NPC][Invasion][Invading Precursor Entities]0% spool up', 31, 29, 24, 16)), + (-80, ('[NPC][Invasion][Invading Precursor Entities]50% spool up', 29, 37, 15, 19)), + (-81, ('[NPC][Invasion][Invading Precursor Entities]100% spool up', 28, 41, 11, 20)), + (-82, ('[NPC][Invasion]Retaliating Amarr Entities', 58, 42, 0, 0)), + (-83, ('[NPC][Invasion]Retaliating Caldari Entities', 30, 43, 2, 25)), + (-84, ('[NPC][Invasion]Retaliating Gallente Entities', 0, 42, 58, 0)), + (-85, ('[NPC][Invasion]Retaliating Minmatar Entities', 17, 8, 44, 31)), + (-86, ('[NPC][Mission]Amarr Empire', 4464, 3546, 97, 0)), + (-87, ('[NPC][Mission]Caldari State', 0, 2139, 4867, 0)), + (-88, ('[NPC][Mission]CONCORD', 336, 134, 212, 412)), + (-89, ('[NPC][Mission]Gallente Federation', 9, 3712, 2758, 0)), + (-90, ('[NPC][Mission]Khanid', 612, 483, 43, 6)), + (-91, ('[NPC][Mission]Minmatar Republic', 1024, 388, 1655, 4285)), + (-92, ('[NPC][Mission]Mordus Legion', 25, 262, 625, 0)), + (-93, ('[NPC][Mission]Thukker', 0, 52, 10, 79)), + (-94, ('[NPC][Other]Sleepers', 1472, 1472, 1384, 1384)), + (-95, ('[NPC][Other]Sansha Incursion', 1682, 1347, 3678, 3678))]) class DamagePattern: diff --git a/gui/builtinContextMenus/damagePatternChange.py b/gui/builtinContextMenus/damagePatternChange.py index 59c84a123..cf592e8ec 100644 --- a/gui/builtinContextMenus/damagePatternChange.py +++ b/gui/builtinContextMenus/damagePatternChange.py @@ -30,10 +30,12 @@ class ChangeDamagePattern(ContextMenuUnconditional): fitID = self.mainFrame.getActiveFit() self.fit = sFit.getFit(fitID) + builtinPatterns = sDP.getBuiltinDamagePatternList() + userPatterns = sorted(sDP.getUserDamagePatternList(), key=lambda p: smartSort(p.fullName)) # Order here is important: patterns with duplicate names from the latter will overwrite # patterns from the former - self.patterns = list(chain(sDP.getBuiltinDamagePatternList(), sDP.getUserDamagePatternList())) - self.patterns.sort(key=lambda p: (p.fullName not in ["Uniform", "Selected Ammo"], smartSort(p.fullName))) + self.patterns = list(chain(builtinPatterns, userPatterns)) + self.patterns.sort(key=lambda p: p.fullName not in ["Uniform", "Selected Ammo"]) self.patternEventMap = {}