Skip to content

Commit

Permalink
Merge branch 'pyfa-org:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzheng2016 authored Feb 22, 2024
2 parents e314ecf + bb53e75 commit cc1fddd
Show file tree
Hide file tree
Showing 94 changed files with 23,755 additions and 1,765 deletions.
13 changes: 11 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,22 @@

CATALOG = 'lang'


slotColourMapDark = {
FittingSlot.LOW: wx.Colour(44, 36, 19), # yellow = low slots 24/13
FittingSlot.MED: wx.Colour(28, 39, 51), # blue = mid slots 8.1/9.5
FittingSlot.HIGH: wx.Colour(53, 31, 34), # red = high slots 6.5/11.5
FittingSlot.RIG: '',
FittingSlot.SUBSYSTEM: ''}
errColorDark = wx.Colour(70, 20, 20)
slotColourMap = {
FittingSlot.LOW: wx.Colour(250, 235, 204), # yellow = low slots
FittingSlot.MED: wx.Colour(188, 215, 241), # blue = mid slots
FittingSlot.HIGH: wx.Colour(235, 204, 209), # red = high slots
FittingSlot.RIG: '',
FittingSlot.SUBSYSTEM: ''
}
FittingSlot.SUBSYSTEM: ''}
errColor = wx.Colour(204, 51, 51)


def getClientSecret():
return clientHash
Expand Down
2 changes: 2 additions & 0 deletions dist_assets/linux/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ AppDir:
- libgtk-3-0
- librsvg2-common # GTK3 recommendation; without it, search in char editor crashes
- libwebkit2gtk-4.0-37 # Needed for wx's HTML lib
# Unknown
- libpcre2-32-0 # https://github.com/pyfa-org/Pyfa/issues/2572
exclude:
- hicolor-icon-theme
- humanity-icon-theme
Expand Down
2 changes: 1 addition & 1 deletion eos/db/migrations/upgrade1.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
loaded as they no longer exist in the database. We therefore replace these
modules with their new replacements
Based on http://community.eveonline.com/news/patch-notes/patch-notes-for-oceanus/
Based on https://www.eveonline.com/news/view/patch-notes-for-oceanus
and output of itemDiff.py
"""

Expand Down
6 changes: 3 additions & 3 deletions eos/db/migrations/upgrade25.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Migration 25
- Converts T3C fitting configurations based on the spreadsheet noted here:
https://community.eveonline.com/news/patch-notes/patch-notes-for-july-2017-release
https://www.eveonline.com/news/view/patch-notes-for-july-2017-release
(csv copies can be found on the pyfa repo in case the official documents are deleted)
Expand Down Expand Up @@ -4228,8 +4228,8 @@ def upgrade(saveddata_engine):
# We don't have a conversion for this. I don't think this will ever happen, but who knows
continue

# It doesn't actully matter which old module is replaced with which new module, so we don't have to worry
# about module position or anything like that. Just doe a straight up record UPDATE
# It doesn't actually matter which old module is replaced with which new module, so we don't have to worry
# about module position or anything like that. Just do a straight up record UPDATE
for i, old in enumerate(oldModules[:4]):
saveddata_engine.execute("UPDATE modules SET itemID = ? WHERE ID = ?", (newModules[i], old[0]))

Expand Down
2 changes: 1 addition & 1 deletion eos/db/migrations/upgrade4.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from database), which causes pyfa to crash. We therefore replace these
modules with their new replacements
Based on http://community.eveonline.com/news/patch-notes/patch-notes-for-proteus/
Based on https://www.eveonline.com/news/view/patch-notes-for-proteus
and output of itemDiff.py
"""

Expand Down
140 changes: 22 additions & 118 deletions eos/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,6 @@ class Effect446(BaseEffect):
Implants named like: Festival only 'Rock' SH Dose (4 of 4)
Implants named like: Halcyon G Booster (5 of 5)
Implants named like: Serenity Limited 'Hardshell' Dose (3 of 3)
Implants named like: Wightstorm Nirvana Booster (4 of 4)
Implants named like: Zainou 'Gnome' Shield Management SM (6 of 6)
Modules named like: Core Defense Field Extender (8 of 8)
Implant: AIR Nirvana Booster II
Expand All @@ -1329,7 +1328,6 @@ class Effect485(BaseEffect):
Implants named like: Halcyon G Booster (5 of 5)
Implants named like: Halcyon R Booster (5 of 5)
Implants named like: Inherent Implants 'Squire' Capacitor Systems Operation EO (6 of 6)
Implants named like: Wightstorm Rapture Booster (4 of 4)
Implants named like: grade Rapture (15 of 18)
Modules named like: Capacitor Control Circuit (8 of 8)
Implant: AIR Overclocker Booster III
Expand Down Expand Up @@ -3271,24 +3269,6 @@ def handler(fit, ship, context, projectionRange, **kwargs):
skill='Caldari Cruiser', **kwargs)


class Effect1025(BaseEffect):
"""
shipMissileLightVelocityBonusCC2

Used by:
Ship: Caracal
Ship: Osprey Navy Issue
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill('Light Missiles'),
'maxVelocity', ship.getModifiedItemAttr('shipBonusCC2'),
skill='Caldari Cruiser', **kwargs)


class Effect1030(BaseEffect):
"""
remoteArmorSystemsCapNeedBonusPostPercentCapacitorNeedLocationShipModulesRequiringRemoteArmorSystems
Expand Down Expand Up @@ -6819,7 +6799,6 @@ class Effect2296(BaseEffect):

Used by:
Implants named like: Halcyon Y Booster (5 of 5)
Implants named like: Tetrimon Resistance Booster (4 of 4)
"""

type = 'passive'
Expand Down Expand Up @@ -7017,7 +6996,6 @@ class Effect2432(BaseEffect):
Implants named like: Halcyon Y Booster (5 of 5)
Implants named like: Inherent Implants 'Squire' Capacitor Management EM (6 of 6)
Implants named like: Mindflood Booster (4 of 4)
Implants named like: Tetrimon Capacitor Booster (4 of 4)
Modules named like: Semiconductor Memory Cell (8 of 8)
Implant: Antipharmakon Aeolis
Implant: Basic Capsuleer Engineering Augmentation Chip
Expand Down Expand Up @@ -7642,7 +7620,6 @@ class Effect2696(BaseEffect):
maxRangeBonusEffectLasers

Used by:
Implants named like: Tetrimon Precision Booster (4 of 4)
Modules named like: Energy Locus Coordinator (8 of 8)
"""

Expand Down Expand Up @@ -8393,8 +8370,6 @@ class Effect2803(BaseEffect):
energyWeaponDamageMultiplyPassive

Used by:
Implants named like: Harvest Damage Booster (4 of 4)
Implants named like: Wightstorm Vitarka Booster (4 of 4)
Modules named like: Energy Collision Accelerator (8 of 8)
Implant: Wisdom of Gheinok
"""
Expand Down Expand Up @@ -9670,7 +9645,6 @@ class Effect3196(BaseEffect):
thermodynamicsSkillDamageBonus

Used by:
Implants named like: Wightstorm Sunyata Booster (4 of 4)
Skill: Thermodynamics
"""

Expand Down Expand Up @@ -10100,23 +10074,6 @@ def handler(fit, ship, context, projectionRange, **kwargs):
skill='Heavy Interdiction Cruisers', **kwargs)


class Effect3357(BaseEffect):
"""
eliteBonusHeavyInterdictorLightMissileVelocityBonus

Used by:
Ship: Onyx
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill('Light Missiles'),
'maxVelocity', ship.getModifiedItemAttr('eliteBonusHeavyInterdictors1'),
skill='Heavy Interdiction Cruisers', **kwargs)


class Effect3366(BaseEffect):
"""
shipRemoteSensorDampenerCapNeedGF
Expand Down Expand Up @@ -17365,9 +17322,10 @@ class Effect5069(BaseEffect):

@staticmethod
def handler(fit, module, context, projectionRange, **kwargs):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill('Mercoxit Processing'),
'specializationAsteroidYieldMultiplier',
module.getModifiedItemAttr('miningAmountBonus'), **kwargs)
fit.modules.filteredChargeBoost(
lambda mod: mod.charge.requiresSkill('Mercoxit Ore Processing'),
'specializationAsteroidYieldMultiplier',
module.getModifiedItemAttr('miningAmountBonus'), **kwargs)


class Effect5079(BaseEffect):
Expand Down Expand Up @@ -18050,8 +18008,6 @@ class Effect5189(BaseEffect):
trackingSpeedBonusEffectLasers

Used by:
Implants named like: Tetrimon Precision Booster (4 of 4)
Implants named like: Wightstorm Manasikara Booster (4 of 4)
Modules named like: Energy Metastasis Adjuster (8 of 8)
"""

Expand Down Expand Up @@ -31615,7 +31571,7 @@ class Effect6783(BaseEffect):
Used by:
Ships from group: Carrier (4 of 4)
Ships from group: Combat Battlecruiser (20 of 20)
Ships from group: Command Ship (4 of 8)
Ships from group: Command Ship (8 of 8)
Ships from group: Force Auxiliary (6 of 6)
Ships from group: Supercarrier (6 of 6)
Ships from group: Titan (8 of 8)
Expand Down Expand Up @@ -37692,64 +37648,12 @@ def handler(fit, ship, context, projectionRange, **kwargs):
skill='Industrial Command Ships', **kwargs)


class Effect8267(BaseEffect):
"""
weaponDisruptorResistanceBonusPassive

Used by:
Implants named like: Harvest Anti Disruptor Booster (4 of 4)
"""

type = 'passive'

@staticmethod
def handler(fit, container, context, projectionRange, **kwargs):
fit.ship.boostItemAttr(
'weaponDisruptionResistance',
container.getModifiedItemAttr('weaponDisruptionResistanceBonus'), **kwargs)


class Effect8268(BaseEffect):
"""
nosferatuDurationBonusPassive

Used by:
Implants named like: Harvest Nosferatu Booster (4 of 4)
"""

type = 'passive'

@staticmethod
def handler(fit, module, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(
lambda mod: mod.item.group.name == 'Energy Nosferatu', 'duration',
module.getModifiedItemAttr('durationBonus'), **kwargs)


class Effect8269(BaseEffect):
"""
stasisWebifierMaxRangeAddPassive

Used by:
Implants named like: Harvest Webifier Booster (4 of 4)
"""

type = 'passive'

@staticmethod
def handler(fit, module, context, projectionRange, **kwargs):
fit.modules.filteredItemIncrease(
lambda mod: mod.item.group.name == 'Stasis Web', 'maxRange',
module.getModifiedItemAttr('stasisWebRangeAdd'), **kwargs)


class Effect8270(BaseEffect):
"""
capacitorWarfareResistanceBonusPassive

Used by:
Implants named like: Halcyon Y Booster (5 of 5)
Implants named like: Tetrimon Anti Drain Booster (4 of 4)
"""

type = 'passive'
Expand Down Expand Up @@ -37812,23 +37716,6 @@ def handler(fit, ship, context, projectionRange, **kwargs):
skill='Industrial Command Ships', **kwargs)


class Effect8291(BaseEffect):
"""
afterburnerSpeedBoostBonusPassive

Used by:
Implants named like: Wightstorm Cetana Booster (4 of 4)
"""

type = 'passive'

@staticmethod
def handler(fit, booster, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(
lambda mod: mod.item.requiresSkill('Afterburner'), 'speedFactor',
booster.getModifiedItemAttr('speedFBonus'), **kwargs)


class Effect8294(BaseEffect):
"""
industrialCommandBonusDroneOreMiningYield
Expand Down Expand Up @@ -40539,3 +40426,20 @@ def handler(fit, booster, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(
lambda mod: mod.item.requiresSkill('Vorton Projector Operation'), 'speed',
booster.getModifiedItemAttr('turretSpeeBonus'), **kwargs)


class Effect12038(BaseEffect):
"""
shipBonusSPTFalloffMF3

Used by:
Ship: Republic Fleet Firetail
"""

type = 'passive'

@staticmethod
def handler(fit, ship, context, projectionRange, **kwargs):
fit.modules.filteredItemBoost(
lambda mod: mod.item.requiresSkill('Small Projectile Turret'), 'falloff',
ship.getModifiedItemAttr('shipBonus3MF'), skill='Minmatar Frigate', **kwargs)
4 changes: 3 additions & 1 deletion gui/builtinItemStatsViews/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
# noinspection PyPackageRequirements
import wx.lib.mixins.listctrl as listmix

from gui.utils.dark import isDark


class AutoListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ListRowHighlighter):
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.ListCtrlAutoWidthMixin.__init__(self)
listmix.ListRowHighlighter.__init__(self)
if wx.SystemSettings.GetAppearance().IsDark():
if isDark():
listcol = wx.SystemSettings.GetColour(wx.SYS_COLOUR_LISTBOX)
highlight = listcol.ChangeLightness(110)
listmix.ListRowHighlighter.SetHighlightColor(self, highlight)
Expand Down
10 changes: 7 additions & 3 deletions gui/builtinViews/fittingView.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
from gui.chrome_tabs import EVT_NOTEBOOK_PAGE_CHANGED
from gui.contextMenu import ContextMenu
from gui.utils.staticHelpers import DragDropHelper
from gui.utils.dark import isDark
from service.fit import Fit
from service.market import Market
from config import slotColourMap
from config import slotColourMap, slotColourMapDark, errColor, errColorDark
from gui.fitCommands.helpers import getSimilarModPositions

pyfalog = Logger(__name__)
Expand Down Expand Up @@ -729,7 +730,10 @@ def click(self, event):
event.Skip()

def slotColour(self, slot):
return slotColourMap.get(slot) or self.GetBackgroundColour()
if isDark():
return slotColourMapDark.get(slot) or self.GetBackgroundColour()
else:
return slotColourMap.get(slot) or self.GetBackgroundColour()

def refresh(self, stuff):
"""
Expand Down Expand Up @@ -774,7 +778,7 @@ def refresh(self, stuff):


if slotMap[mod.slot] or hasRestrictionOverriden: # Color too many modules as red
self.SetItemBackgroundColour(i, wx.Colour(204, 51, 51))
self.SetItemBackgroundColour(i, errColorDark if isDark() else errColor)
elif sFit.serviceFittingOptions["colorFitBySlot"]: # Color by slot it enabled
self.SetItemBackgroundColour(i, self.slotColour(mod.slot))

Expand Down
12 changes: 12 additions & 0 deletions gui/utils/dark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import wx


def isDark():
if 'wxMSW' in wx.PlatformInfo:
return False
try:
return wx.SystemSettings.GetAppearance().IsDark()
except (KeyboardInterrupt, SystemExit):
raise
except:
return False
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed imgs/icons/[email protected]
Binary file not shown.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file removed imgs/icons/[email protected]
Diff not rendered.
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
Binary file modified imgs/renders/[email protected]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matplotlib==3.8.2
python-dateutil==2.8.2
requests==2.31.0
sqlalchemy==1.4.50
cryptography==41.0.7
cryptography==42.0.2
markdown2==2.4.11
packaging==23.2
roman==4.1
Expand Down
Loading

0 comments on commit cc1fddd

Please sign in to comment.