Compare commits
48 Commits
v2.9.2
...
v2.9.4dev1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47c34f2186 | ||
|
|
2ca418c287 | ||
|
|
775e69305c | ||
|
|
0f1cbb4234 | ||
|
|
306710a314 | ||
|
|
776a4ee977 | ||
|
|
9dccfd756a | ||
|
|
15281ee6ce | ||
|
|
9a0dd6c521 | ||
|
|
a570f291ae | ||
|
|
cde7fdcaba | ||
|
|
e4780bc8ba | ||
|
|
4d35e5aee1 | ||
|
|
f7b705b9e2 | ||
|
|
48f44cdb0c | ||
|
|
013a2264c0 | ||
|
|
8222686dda | ||
|
|
7f2121e98d | ||
|
|
4b6c881dca | ||
|
|
5f9bf4a861 | ||
|
|
154db5df0b | ||
|
|
321b939d3a | ||
|
|
95a1d669f5 | ||
|
|
9e3c9bd056 | ||
|
|
bb9b3780ae | ||
|
|
4c976d9f35 | ||
|
|
52a1314803 | ||
|
|
a5475eb244 | ||
|
|
ba0a5db72f | ||
|
|
2bac4a954f | ||
|
|
e9f3453b04 | ||
|
|
c950592b5b | ||
|
|
1cd42669a0 | ||
|
|
2b24f14122 | ||
|
|
4932b685e1 | ||
|
|
cfffa1d99d | ||
|
|
44a7e53b9e | ||
|
|
b35bdd4e33 | ||
|
|
7f52f6fe44 | ||
|
|
34e49da0c1 | ||
|
|
5132698974 | ||
|
|
832cebcaaf | ||
|
|
4eaccd1eed | ||
|
|
5245f289a5 | ||
|
|
672aed44f2 | ||
|
|
8c890cf9a5 | ||
|
|
8f9a95db93 | ||
|
|
5a056e6d47 |
@@ -17,10 +17,8 @@
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===============================================================================
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.exception import HandledListActionError
|
||||
from utils.deprecated import deprecated
|
||||
from logbook import Logger
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
@@ -137,27 +135,23 @@ class HandledModuleList(HandledList):
|
||||
self.__toModule(emptyPosition, mod)
|
||||
if mod.isInvalid:
|
||||
self.__toDummy(mod.position)
|
||||
raise HandledListActionError(mod)
|
||||
return
|
||||
|
||||
self.appendIgnoreEmpty(mod)
|
||||
else:
|
||||
self.appendIgnoreEmpty(mod)
|
||||
|
||||
def appendIgnoreEmpty(self, mod):
|
||||
mod.position = len(self)
|
||||
HandledList.append(self, mod)
|
||||
if mod.isInvalid:
|
||||
self.remove(mod)
|
||||
raise HandledListActionError(mod)
|
||||
|
||||
def replace(self, idx, mod):
|
||||
try:
|
||||
oldMod = self[idx]
|
||||
except IndexError:
|
||||
raise HandledListActionError(mod)
|
||||
return
|
||||
self.__toModule(idx, mod)
|
||||
if mod.isInvalid:
|
||||
self.__toModule(idx, oldMod)
|
||||
raise HandledListActionError(mod)
|
||||
|
||||
def replaceRackPosition(self, rackPosition, mod):
|
||||
listPositions = []
|
||||
@@ -182,7 +176,6 @@ class HandledModuleList(HandledList):
|
||||
self.__toDummy(modListPosition)
|
||||
else:
|
||||
self.__toModule(modListPosition, oldMod)
|
||||
raise HandledListActionError(mod)
|
||||
|
||||
def insert(self, idx, mod):
|
||||
mod.position = idx
|
||||
@@ -193,8 +186,6 @@ class HandledModuleList(HandledList):
|
||||
HandledList.insert(self, idx, mod)
|
||||
if mod.isInvalid:
|
||||
self.remove(mod)
|
||||
raise HandledListActionError(mod)
|
||||
|
||||
|
||||
def remove(self, mod):
|
||||
HandledList.remove(self, mod)
|
||||
@@ -236,13 +227,11 @@ class HandledDroneCargoList(HandledList):
|
||||
HandledList.append(self, thing)
|
||||
if thing.isInvalid:
|
||||
self.remove(thing)
|
||||
raise HandledListActionError(thing)
|
||||
|
||||
def insert(self, idx, thing):
|
||||
HandledList.insert(self, idx, thing)
|
||||
if thing.isInvalid:
|
||||
self.remove(thing)
|
||||
raise HandledListActionError(thing)
|
||||
|
||||
|
||||
class HandledImplantList(HandledList):
|
||||
@@ -251,22 +240,22 @@ class HandledImplantList(HandledList):
|
||||
if implant.isInvalid:
|
||||
HandledList.append(self, implant)
|
||||
self.remove(implant)
|
||||
raise HandledListActionError(implant)
|
||||
return
|
||||
if self.__slotCheck(implant):
|
||||
HandledList.append(self, implant)
|
||||
self.remove(implant)
|
||||
raise HandledListActionError(implant)
|
||||
return
|
||||
HandledList.append(self, implant)
|
||||
|
||||
def insert(self, idx, implant):
|
||||
if implant.isInvalid:
|
||||
HandledList.insert(self, idx, implant)
|
||||
self.remove(implant)
|
||||
raise HandledListActionError(implant)
|
||||
return
|
||||
if self.__slotCheck(implant):
|
||||
HandledList.insert(self, idx, implant)
|
||||
self.remove(implant)
|
||||
raise HandledListActionError(implant)
|
||||
return
|
||||
HandledList.insert(self, idx, implant)
|
||||
|
||||
def makeRoom(self, implant):
|
||||
@@ -292,22 +281,22 @@ class HandledBoosterList(HandledList):
|
||||
if booster.isInvalid:
|
||||
HandledList.append(self, booster)
|
||||
self.remove(booster)
|
||||
raise HandledListActionError(booster)
|
||||
return
|
||||
if self.__slotCheck(booster):
|
||||
HandledList.append(self, booster)
|
||||
self.remove(booster)
|
||||
raise HandledListActionError(booster)
|
||||
return
|
||||
HandledList.append(self, booster)
|
||||
|
||||
def insert(self, idx, booster):
|
||||
if booster.isInvalid:
|
||||
HandledList.insert(self, idx, booster)
|
||||
self.remove(booster)
|
||||
raise HandledListActionError(booster)
|
||||
return
|
||||
if self.__slotCheck(booster):
|
||||
HandledList.insert(self, idx, booster)
|
||||
self.remove(booster)
|
||||
raise HandledListActionError(booster)
|
||||
return
|
||||
HandledList.insert(self, idx, booster)
|
||||
|
||||
def makeRoom(self, booster):
|
||||
@@ -346,16 +335,12 @@ class HandledProjectedModList(HandledList):
|
||||
# rows and relationships in database are removed as well
|
||||
HandledList.append(self, proj)
|
||||
self.remove(proj)
|
||||
raise HandledListActionError(proj)
|
||||
|
||||
return
|
||||
proj.projected = True
|
||||
|
||||
HandledList.append(self, proj)
|
||||
|
||||
# Remove non-projectable modules
|
||||
if not proj.item.isType("projected") and not proj.isExclusiveSystemEffect:
|
||||
self.remove(proj)
|
||||
raise HandledListActionError(proj)
|
||||
|
||||
def insert(self, idx, proj):
|
||||
if proj.isInvalid:
|
||||
@@ -363,16 +348,12 @@ class HandledProjectedModList(HandledList):
|
||||
# rows and relationships in database are removed as well
|
||||
HandledList.insert(self, idx, proj)
|
||||
self.remove(proj)
|
||||
raise HandledListActionError(proj)
|
||||
|
||||
return
|
||||
proj.projected = True
|
||||
|
||||
HandledList.insert(self, idx, proj)
|
||||
|
||||
# Remove non-projectable modules
|
||||
if not proj.item.isType("projected") and not proj.isExclusiveSystemEffect:
|
||||
self.remove(proj)
|
||||
raise HandledListActionError(proj)
|
||||
|
||||
@property
|
||||
def currentSystemEffect(self):
|
||||
@@ -399,24 +380,18 @@ class HandledProjectedDroneList(HandledDroneCargoList):
|
||||
def append(self, proj):
|
||||
proj.projected = True
|
||||
HandledList.append(self, proj)
|
||||
|
||||
# Remove invalid or non-projectable drones
|
||||
if proj.isInvalid or not proj.item.isType("projected"):
|
||||
self.remove(proj)
|
||||
proj.projected = False
|
||||
raise HandledListActionError(proj)
|
||||
return True
|
||||
|
||||
def insert(self, idx, proj):
|
||||
proj.projected = True
|
||||
HandledList.insert(self, idx, proj)
|
||||
|
||||
# Remove invalid or non-projectable drones
|
||||
if proj.isInvalid or not proj.item.isType("projected"):
|
||||
self.remove(proj)
|
||||
proj.projected = False
|
||||
raise HandledListActionError(proj)
|
||||
return True
|
||||
|
||||
|
||||
class HandledItem(object):
|
||||
|
||||
401
eos/effects.py
401
eos/effects.py
@@ -6739,7 +6739,7 @@ class Effect2302(BaseEffect):
|
||||
damageControl
|
||||
|
||||
Used by:
|
||||
Modules from group: Damage Control (22 of 27)
|
||||
Modules from group: Damage Control (24 of 29)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -9050,7 +9050,7 @@ class Effect3001(BaseEffect):
|
||||
|
||||
Used by:
|
||||
Modules from group: Missile Launcher Torpedo (22 of 22)
|
||||
Items from market group: Ship Equipment > Turrets & Bays (429 of 883)
|
||||
Items from market group: Ship Equipment > Turrets & Bays (429 of 888)
|
||||
Module: Interdiction Sphere Launcher I
|
||||
"""
|
||||
|
||||
@@ -9113,7 +9113,7 @@ class Effect3025(BaseEffect):
|
||||
Used by:
|
||||
Modules from group: Energy Weapon (101 of 214)
|
||||
Modules from group: Hybrid Weapon (105 of 221)
|
||||
Modules from group: Precursor Weapon (15 of 15)
|
||||
Modules from group: Precursor Weapon (18 of 18)
|
||||
Modules from group: Projectile Weapon (99 of 165)
|
||||
"""
|
||||
|
||||
@@ -15232,96 +15232,57 @@ class Effect4575(BaseEffect):
|
||||
|
||||
# Remote Shield Repper Bonuses
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Shield Emission Systems'),
|
||||
'duration',
|
||||
src.getModifiedItemAttr('industrialCoreRemoteLogisticsDurationBonus'),
|
||||
)
|
||||
'duration', src.getModifiedItemAttr('industrialCoreRemoteLogisticsDurationBonus'))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Shield Emission Systems'),
|
||||
'maxRange',
|
||||
src.getModifiedItemAttr('industrialCoreRemoteLogisticsRangeBonus'),
|
||||
stackingPenalties=True
|
||||
)
|
||||
'maxRange', src.getModifiedItemAttr('industrialCoreRemoteLogisticsRangeBonus'),
|
||||
stackingPenalties=True)
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Shield Emission Systems'),
|
||||
'capacitorNeed',
|
||||
src.getModifiedItemAttr('industrialCoreRemoteLogisticsDurationBonus')
|
||||
)
|
||||
'capacitorNeed', src.getModifiedItemAttr('industrialCoreRemoteLogisticsDurationBonus'))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Shield Emission Systems'),
|
||||
'falloffEffectiveness',
|
||||
src.getModifiedItemAttr('industrialCoreRemoteLogisticsRangeBonus'),
|
||||
stackingPenalties=True
|
||||
)
|
||||
'falloffEffectiveness', src.getModifiedItemAttr('industrialCoreRemoteLogisticsRangeBonus'),
|
||||
stackingPenalties=True)
|
||||
|
||||
# Local Shield Repper Bonuses
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Shield Operation'),
|
||||
'duration',
|
||||
src.getModifiedItemAttr('industrialCoreLocalLogisticsDurationBonus'),
|
||||
)
|
||||
'duration', src.getModifiedItemAttr('industrialCoreLocalLogisticsDurationBonus'))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Capital Shield Operation'),
|
||||
'shieldBonus',
|
||||
src.getModifiedItemAttr('industrialCoreLocalLogisticsAmountBonus'),
|
||||
stackingPenalties=True
|
||||
)
|
||||
'shieldBonus', src.getModifiedItemAttr('industrialCoreLocalLogisticsAmountBonus'),
|
||||
stackingPenalties=True)
|
||||
|
||||
# Mining Burst Bonuses
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Mining Foreman'),
|
||||
'warfareBuff1Value',
|
||||
src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'),
|
||||
)
|
||||
|
||||
'warfareBuff1Value', src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Mining Foreman'),
|
||||
'warfareBuff2Value',
|
||||
src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'),
|
||||
)
|
||||
|
||||
'warfareBuff2Value', src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Mining Foreman'),
|
||||
'warfareBuff3Value',
|
||||
src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'),
|
||||
)
|
||||
|
||||
'warfareBuff3Value', src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Mining Foreman'),
|
||||
'warfareBuff4Value',
|
||||
src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'),
|
||||
)
|
||||
'warfareBuff4Value', src.getModifiedItemAttr('industrialCoreBonusMiningBurstStrength'))
|
||||
|
||||
# Command Burst Range Bonus
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Leadership'),
|
||||
'maxRange',
|
||||
src.getModifiedItemAttr('industrialCoreBonusCommandBurstRange'),
|
||||
stackingPenalties=True
|
||||
)
|
||||
'maxRange', src.getModifiedItemAttr('industrialCoreBonusCommandBurstRange'),
|
||||
stackingPenalties=True)
|
||||
|
||||
# Drone Bonuses
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Ice Harvesting Drone Operation'),
|
||||
'duration',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneIceHarvesting'),
|
||||
)
|
||||
'duration', src.getModifiedItemAttr('industrialCoreBonusDroneIceHarvesting'))
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Mining Drone Operation'),
|
||||
'miningAmount',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneMining'),
|
||||
)
|
||||
'miningAmount', src.getModifiedItemAttr('industrialCoreBonusDroneMining'))
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'maxVelocity',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneVelocity'),
|
||||
)
|
||||
'maxVelocity', src.getModifiedItemAttr('industrialCoreBonusDroneVelocity'),
|
||||
stackingPenalties=True)
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'damageMultiplier', src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'),
|
||||
stackingPenalties=True)
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'shieldCapacity', src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'))
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'armorHP', src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'))
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'hp', src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'))
|
||||
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'damageMultiplier',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'),
|
||||
stackingPenalties=True
|
||||
)
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'shieldCapacity',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'),
|
||||
)
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'armorHP',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'),
|
||||
)
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'hp',
|
||||
src.getModifiedItemAttr('industrialCoreBonusDroneDamageHP'),
|
||||
)
|
||||
|
||||
# Todo: remote impedance (no reps, etc)
|
||||
# Remote impedance (no reps, etc)
|
||||
fit.ship.increaseItemAttr('warpScrambleStatus', src.getModifiedItemAttr('siegeModeWarpStatus'))
|
||||
fit.ship.boostItemAttr('remoteRepairImpedance', src.getModifiedItemAttr('remoteRepairImpedanceBonus'))
|
||||
fit.ship.increaseItemAttr('disallowTethering', src.getModifiedItemAttr('disallowTethering'))
|
||||
@@ -16285,9 +16246,9 @@ class Effect4902(BaseEffect):
|
||||
MWDSignatureRadiusRoleBonus
|
||||
|
||||
Used by:
|
||||
Ships from group: Assault Frigate (8 of 12)
|
||||
Ships from group: Command Destroyer (4 of 4)
|
||||
Ships from group: Heavy Assault Cruiser (8 of 11)
|
||||
Ships from group: Assault Frigate (9 of 13)
|
||||
Ships from group: Command Destroyer (5 of 5)
|
||||
Ships from group: Heavy Assault Cruiser (9 of 12)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -25230,7 +25191,7 @@ class Effect6214(BaseEffect):
|
||||
roleBonusCDLinksPGReduction
|
||||
|
||||
Used by:
|
||||
Ships from group: Command Destroyer (4 of 4)
|
||||
Ships from group: Command Destroyer (5 of 5)
|
||||
Ship: Porpoise
|
||||
"""
|
||||
|
||||
@@ -25812,8 +25773,7 @@ class Effect6315(BaseEffect):
|
||||
eliteBonusCommandDestroyerSkirmish1
|
||||
|
||||
Used by:
|
||||
Ship: Bifrost
|
||||
Ship: Magus
|
||||
Ships from group: Command Destroyer (3 of 5)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -25862,7 +25822,7 @@ class Effect6317(BaseEffect):
|
||||
eliteBonusCommandDestroyerMJFGspool2
|
||||
|
||||
Used by:
|
||||
Ships from group: Command Destroyer (4 of 4)
|
||||
Ships from group: Command Destroyer (5 of 5)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -26135,8 +26095,7 @@ class Effect6334(BaseEffect):
|
||||
eliteBonusCommandDestroyerInfo1
|
||||
|
||||
Used by:
|
||||
Ship: Pontifex
|
||||
Ship: Stork
|
||||
Ships from group: Command Destroyer (3 of 5)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -32253,7 +32212,7 @@ class Effect6845(BaseEffect):
|
||||
shipBonusCommandDestroyerRole1DefenderBonus
|
||||
|
||||
Used by:
|
||||
Ships from group: Command Destroyer (4 of 4)
|
||||
Ships from group: Command Destroyer (4 of 5)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -33802,10 +33761,10 @@ class Effect6994(BaseEffect):
|
||||
|
||||
class Effect6995(BaseEffect):
|
||||
"""
|
||||
targetABCAttack
|
||||
targetDisintegratorAttack
|
||||
|
||||
Used by:
|
||||
Modules from group: Precursor Weapon (15 of 15)
|
||||
Modules from group: Precursor Weapon (18 of 18)
|
||||
"""
|
||||
|
||||
type = 'active'
|
||||
@@ -33969,6 +33928,7 @@ class Effect7012(BaseEffect):
|
||||
|
||||
Used by:
|
||||
Variations of module: Assault Damage Control I (5 of 5)
|
||||
Module: Abyssal Assault Damage Control
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
@@ -34853,7 +34813,7 @@ class Effect7077(BaseEffect):
|
||||
disintegratorWeaponDamageMultiply
|
||||
|
||||
Used by:
|
||||
Modules from group: Entropic Radiation Sink (4 of 4)
|
||||
Modules from group: Entropic Radiation Sink (6 of 6)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -34870,7 +34830,7 @@ class Effect7078(BaseEffect):
|
||||
disintegratorWeaponSpeedMultiply
|
||||
|
||||
Used by:
|
||||
Modules from group: Entropic Radiation Sink (4 of 4)
|
||||
Modules from group: Entropic Radiation Sink (6 of 6)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -34919,8 +34879,8 @@ class Effect7085(BaseEffect):
|
||||
shipbonusPCTDamagePC1
|
||||
|
||||
Used by:
|
||||
Variations of ship: Vedmak (2 of 2)
|
||||
Ship: Tiamat
|
||||
Ship: Vedmak
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -34936,8 +34896,8 @@ class Effect7086(BaseEffect):
|
||||
shipbonusPCTTrackingPC2
|
||||
|
||||
Used by:
|
||||
Variations of ship: Vedmak (2 of 2)
|
||||
Ship: Tiamat
|
||||
Ship: Vedmak
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -34953,7 +34913,6 @@ class Effect7087(BaseEffect):
|
||||
shipbonusPCTOptimalPF2
|
||||
|
||||
Used by:
|
||||
Ship: Damavik
|
||||
Ship: Hydra
|
||||
"""
|
||||
|
||||
@@ -34970,7 +34929,7 @@ class Effect7088(BaseEffect):
|
||||
shipbonusPCTDamagePF1
|
||||
|
||||
Used by:
|
||||
Ship: Damavik
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
Ship: Hydra
|
||||
"""
|
||||
|
||||
@@ -35002,13 +34961,13 @@ class Effect7092(BaseEffect):
|
||||
shipBonusRemoteRepCapNeedRoleBonus2
|
||||
|
||||
Used by:
|
||||
Ship: Damavik
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
Variations of ship: Kikimora (2 of 2)
|
||||
Variations of ship: Vedmak (2 of 2)
|
||||
Ship: Drekavac
|
||||
Ship: Hydra
|
||||
Ship: Kikimora
|
||||
Ship: Leshak
|
||||
Ship: Tiamat
|
||||
Ship: Vedmak
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -35024,14 +34983,14 @@ class Effect7093(BaseEffect):
|
||||
shipBonusSmartbombCapNeedRoleBonus2
|
||||
|
||||
Used by:
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
Variations of ship: Kikimora (2 of 2)
|
||||
Variations of ship: Rodiva (2 of 2)
|
||||
Ship: Damavik
|
||||
Variations of ship: Vedmak (2 of 2)
|
||||
Ship: Drekavac
|
||||
Ship: Hydra
|
||||
Ship: Kikimora
|
||||
Ship: Leshak
|
||||
Ship: Tiamat
|
||||
Ship: Vedmak
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -35047,13 +35006,13 @@ class Effect7094(BaseEffect):
|
||||
shipBonusRemoteRepMaxRangeRoleBonus1
|
||||
|
||||
Used by:
|
||||
Ship: Damavik
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
Variations of ship: Kikimora (2 of 2)
|
||||
Variations of ship: Vedmak (2 of 2)
|
||||
Ship: Drekavac
|
||||
Ship: Hydra
|
||||
Ship: Kikimora
|
||||
Ship: Leshak
|
||||
Ship: Tiamat
|
||||
Ship: Vedmak
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -35085,7 +35044,7 @@ class Effect7111(BaseEffect):
|
||||
systemSmallPrecursorTurretDamage
|
||||
|
||||
Used by:
|
||||
Celestials named like: Wolf Rayet Effect Beacon Class (5 of 6)
|
||||
Celestials named like: Wolf Rayet Effect Beacon Class (6 of 6)
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
@@ -35103,13 +35062,13 @@ class Effect7112(BaseEffect):
|
||||
shipBonusNeutCapNeedRoleBonus2
|
||||
|
||||
Used by:
|
||||
Ship: Damavik
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
Variations of ship: Kikimora (2 of 2)
|
||||
Variations of ship: Vedmak (2 of 2)
|
||||
Ship: Drekavac
|
||||
Ship: Hydra
|
||||
Ship: Kikimora
|
||||
Ship: Leshak
|
||||
Ship: Tiamat
|
||||
Ship: Vedmak
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -35215,7 +35174,7 @@ class Effect7154(BaseEffect):
|
||||
shipBonusPD1DisintegratorDamage
|
||||
|
||||
Used by:
|
||||
Ship: Kikimora
|
||||
Variations of ship: Kikimora (2 of 2)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -35265,7 +35224,7 @@ class Effect7157(BaseEffect):
|
||||
shipBonusPD2DisintegratorMaxRange
|
||||
|
||||
Used by:
|
||||
Ship: Kikimora
|
||||
Variations of ship: Kikimora (2 of 2)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
@@ -35571,8 +35530,9 @@ class Effect7183(BaseEffect):
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, src, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == 'Warp Scrambler', 'maxRange',
|
||||
src.getModifiedItemAttr('warpScrambleRangeBonus'), stackingPenalties=False)
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == 'Warp Scrambler',
|
||||
'maxRange', src.getModifiedItemAttr('warpScrambleRangeBonus'),
|
||||
stackingPenalties=False)
|
||||
|
||||
|
||||
class Effect7184(BaseEffect):
|
||||
@@ -35621,3 +35581,232 @@ class Effect7186(BaseEffect):
|
||||
def handler(fit, ship, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Medium Drone Operation'),
|
||||
'armorHP', ship.getModifiedItemAttr('shipBonusRole8'))
|
||||
|
||||
|
||||
class Effect7193(BaseEffect):
|
||||
"""
|
||||
systemMiningCycleTimeBonus
|
||||
|
||||
Used by:
|
||||
Celestials named like: Invasion Effects (3 of 3)
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
type = ('projected', 'passive')
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, beacon, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Mining'),
|
||||
'duration', beacon.getModifiedItemAttr('miningDurationMultiplier'))
|
||||
|
||||
|
||||
class Effect7202(BaseEffect):
|
||||
"""
|
||||
systemDroneSpeedBonusPercent
|
||||
|
||||
Used by:
|
||||
Celestials named like: Invasion Effects (3 of 3)
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
type = ('projected', 'passive')
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, beacon, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'maxVelocity', beacon.getModifiedItemAttr('droneMaxVelocityBonus'),
|
||||
stackingPenalties=True)
|
||||
|
||||
|
||||
class Effect7203(BaseEffect):
|
||||
"""
|
||||
systemDroneDamageBonusPercent
|
||||
|
||||
Used by:
|
||||
Celestials named like: Invasion Effects (3 of 3)
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
type = ('projected', 'passive')
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, beacon, context):
|
||||
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill('Drones'),
|
||||
'damageMultiplier', beacon.getModifiedItemAttr('droneDamageBonus'),
|
||||
stackingPenalties=True)
|
||||
|
||||
|
||||
class Effect7204(BaseEffect):
|
||||
"""
|
||||
shipArmorEMResistancePF2
|
||||
|
||||
Used by:
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.ship.boostItemAttr('armorEmDamageResonance', ship.getModifiedItemAttr('shipBonusPF2'), skill='Precursor Frigate')
|
||||
|
||||
|
||||
class Effect7205(BaseEffect):
|
||||
"""
|
||||
shipArmorKinResistancePF2
|
||||
|
||||
Used by:
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.ship.boostItemAttr('armorKineticDamageResonance', ship.getModifiedItemAttr('shipBonusPF2'), skill='Precursor Frigate')
|
||||
|
||||
|
||||
class Effect7206(BaseEffect):
|
||||
"""
|
||||
shipArmorThermResistancePF2
|
||||
|
||||
Used by:
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.ship.boostItemAttr('armorThermalDamageResonance', ship.getModifiedItemAttr('shipBonusPF2'), skill='Precursor Frigate')
|
||||
|
||||
|
||||
class Effect7207(BaseEffect):
|
||||
"""
|
||||
shipArmorExpResistancePF2
|
||||
|
||||
Used by:
|
||||
Variations of ship: Damavik (2 of 2)
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.ship.boostItemAttr('armorExplosiveDamageResonance', ship.getModifiedItemAttr('shipBonusPF2'), skill='Precursor Frigate')
|
||||
|
||||
|
||||
class Effect7209(BaseEffect):
|
||||
"""
|
||||
shipPCTOptimalBonusEliteGunship2
|
||||
|
||||
Used by:
|
||||
Ship: Nergal
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Small Precursor Weapon'),
|
||||
'maxRange', ship.getModifiedItemAttr('eliteBonusGunship2'),
|
||||
skill='Assault Frigates')
|
||||
|
||||
|
||||
class Effect7210(BaseEffect):
|
||||
"""
|
||||
shipBonusCommandDestroyerRole2DefenderBonus
|
||||
|
||||
Used by:
|
||||
Ship: Draugur
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Defender Missiles'),
|
||||
'moduleReactivationDelay', ship.getModifiedItemAttr('shipBonusRole2'))
|
||||
|
||||
|
||||
class Effect7211(BaseEffect):
|
||||
"""
|
||||
shipDmgMultiMaxEliteHeavyGunship1
|
||||
|
||||
Used by:
|
||||
Ship: Ikitursa
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Medium Precursor Weapon'),
|
||||
'damageMultiplierBonusMax', ship.getModifiedItemAttr('eliteBonusHeavyGunship1'),
|
||||
skill='Heavy Assault Cruisers')
|
||||
|
||||
|
||||
class Effect7216(BaseEffect):
|
||||
"""
|
||||
shipDmgMultiMaxEliteGunship1
|
||||
|
||||
Used by:
|
||||
Ship: Nergal
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Small Precursor Weapon'),
|
||||
'damageMultiplierBonusMax', ship.getModifiedItemAttr('eliteBonusGunship1'),
|
||||
skill='Assault Frigates')
|
||||
|
||||
|
||||
class Effect7223(BaseEffect):
|
||||
"""
|
||||
systemAgilityBonusPercentItem
|
||||
|
||||
Used by:
|
||||
Celestials named like: Invasion Effects (3 of 3)
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
type = ('projected', 'passive')
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, beacon, context):
|
||||
fit.ship.boostItemAttr('agility', beacon.getModifiedItemAttr('agilityBonus'), stackingPenalties=True)
|
||||
|
||||
|
||||
class Effect7227(BaseEffect):
|
||||
"""
|
||||
systemHullHPBonusPercentItem
|
||||
|
||||
Used by:
|
||||
Celestials named like: Invasion Effects (3 of 3)
|
||||
"""
|
||||
|
||||
runTime = 'early'
|
||||
type = ('projected', 'passive')
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, beacon, context):
|
||||
fit.ship.boostItemAttr('hp', beacon.getModifiedItemAttr('hullHpBonus'))
|
||||
|
||||
|
||||
class Effect7228(BaseEffect):
|
||||
"""
|
||||
shipMediumPrecursorWeaponOptimalEliteHeavyGunship2
|
||||
|
||||
Used by:
|
||||
Ship: Ikitursa
|
||||
"""
|
||||
|
||||
type = 'passive'
|
||||
|
||||
@staticmethod
|
||||
def handler(fit, ship, context):
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill('Medium Precursor Weapon'),
|
||||
'maxRange', ship.getModifiedItemAttr('eliteBonusHeavyGunship2'),
|
||||
skill='Heavy Assault Cruisers')
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
class HandledListActionError(Exception):
|
||||
...
|
||||
@@ -21,6 +21,7 @@ import itertools
|
||||
|
||||
|
||||
class Graph(object):
|
||||
|
||||
def __init__(self, fit, function, data=None):
|
||||
self.fit = fit
|
||||
self.data = {}
|
||||
|
||||
43
eos/graph/fitDmgTime.py
Normal file
43
eos/graph/fitDmgTime.py
Normal file
@@ -0,0 +1,43 @@
|
||||
# ===============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of eos.
|
||||
#
|
||||
# eos is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# eos is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===============================================================================
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.graph import Graph
|
||||
from eos.utils.spoolSupport import SpoolType, SpoolOptions
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
class FitDmgTimeGraph(Graph):
|
||||
|
||||
defaults = {"time": 0}
|
||||
|
||||
def __init__(self, fit, data=None):
|
||||
Graph.__init__(self, fit, self.calcDps, data if data is not None else self.defaults)
|
||||
self.fit = fit
|
||||
|
||||
def calcDps(self, data):
|
||||
fit = self.fit
|
||||
time = data["time"]
|
||||
dmg = 0
|
||||
for i in range(round(time) + 1):
|
||||
dmg += fit.getTotalDps(spoolOptions=SpoolOptions(SpoolType.TIME, i, True)).total
|
||||
return dmg
|
||||
@@ -17,16 +17,19 @@
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===============================================================================
|
||||
|
||||
from math import log, sin, radians, exp
|
||||
from math import exp, log, radians, sin
|
||||
|
||||
from eos.graph import Graph
|
||||
from eos.const import FittingModuleState, FittingHardpoint
|
||||
from logbook import Logger
|
||||
|
||||
from eos.const import FittingHardpoint, FittingModuleState
|
||||
from eos.graph import Graph
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
class FitDpsGraph(Graph):
|
||||
class FitDpsRangeGraph(Graph):
|
||||
|
||||
defaults = {
|
||||
"angle" : 0,
|
||||
"distance" : 0,
|
||||
42
eos/graph/fitDpsTime.py
Normal file
42
eos/graph/fitDpsTime.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# ===============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of eos.
|
||||
#
|
||||
# eos is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# eos is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with eos. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===============================================================================
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.graph import Graph
|
||||
from eos.utils.spoolSupport import SpoolType, SpoolOptions
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
class FitDpsTimeGraph(Graph):
|
||||
|
||||
defaults = {"time": 0}
|
||||
|
||||
def __init__(self, fit, data=None):
|
||||
Graph.__init__(self, fit, self.calcDps, data if data is not None else self.defaults)
|
||||
self.fit = fit
|
||||
|
||||
def calcDps(self, data):
|
||||
fit = self.fit
|
||||
time = data["time"]
|
||||
dps = fit.getTotalDps(spoolOptions=SpoolOptions(SpoolType.TIME, time, True)).total
|
||||
return dps
|
||||
|
||||
@@ -1547,8 +1547,9 @@ class Fit(object):
|
||||
fitCopy.systemSecurity = self.systemSecurity
|
||||
fitCopy.notes = self.notes
|
||||
|
||||
for i in self.modules:
|
||||
fitCopy.modules.appendIgnoreEmpty(deepcopy(i))
|
||||
toCopy = (
|
||||
"modules",
|
||||
"drones",
|
||||
"fighters",
|
||||
"cargo",
|
||||
|
||||
@@ -50,8 +50,11 @@ class BitmapLoader(object):
|
||||
|
||||
@classmethod
|
||||
def getStaticBitmap(cls, name, parent, location):
|
||||
bitmap = cls.getBitmap(name or 0, location)
|
||||
if bitmap is None:
|
||||
return None
|
||||
static = wx.StaticBitmap(parent)
|
||||
static.SetBitmap(cls.getBitmap(name or 0, location))
|
||||
static.SetBitmap(bitmap)
|
||||
return static
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -123,7 +123,8 @@ class AddEnvironmentEffect(ContextMenuUnconditional):
|
||||
|
||||
# Expressions for matching when detecting effects we're looking for
|
||||
if incursions:
|
||||
validgroups = ("Incursion ship attributes effects",)
|
||||
validgroups = ("Incursion ship attributes effects",
|
||||
"Invasion Effects")
|
||||
else:
|
||||
validgroups = ("Black Hole Effect Beacon",
|
||||
"Cataclysmic Variable Effect Beacon",
|
||||
@@ -133,7 +134,7 @@ class AddEnvironmentEffect(ContextMenuUnconditional):
|
||||
"Wolf Rayet Effect Beacon")
|
||||
|
||||
# Stuff we don't want to see in names
|
||||
garbages = ("Effect", "Beacon", "ship attributes effects")
|
||||
garbages = ("Effects?", "Beacon", "ship attributes effects")
|
||||
|
||||
# Get group with all the system-wide beacons
|
||||
grp = sMkt.getGroup("Effect Beacon")
|
||||
|
||||
@@ -54,7 +54,7 @@ class AddImplantSet(ContextMenuSingle):
|
||||
|
||||
self.idmap = {}
|
||||
|
||||
for set in implantSets:
|
||||
for set in sorted(implantSets, key=lambda i: i.name):
|
||||
id = ContextMenuSingle.nextID()
|
||||
mitem = wx.MenuItem(rootMenu, id, set.name)
|
||||
bindmenu.Bind(wx.EVT_MENU, self.handleSelection, mitem)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import math
|
||||
|
||||
# noinspection PyPackageRequirements
|
||||
import wx
|
||||
|
||||
@@ -48,15 +50,44 @@ class ChangeModuleSpool(ContextMenuSingle):
|
||||
cycleCurrent = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, eos.config.settings['globalDefaultSpoolupPercentage'], False))[0]
|
||||
cycleMin = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, 0, True))[0]
|
||||
cycleMax = self.mod.getSpoolData(spoolOptions=SpoolOptions(SpoolType.SCALE, 1, True))[0]
|
||||
cycleTotalMin = min(cycleDefault, cycleCurrent, cycleMin)
|
||||
cycleTotalMax = max(cycleDefault, cycleCurrent, cycleMax)
|
||||
|
||||
for cycle in range(cycleMin, cycleMax + 1):
|
||||
def findCycles(val1, val2):
|
||||
# Try to compose list of 21 steps max (0-20)
|
||||
maxSteps = 20
|
||||
valDiff = val2 - val1
|
||||
valScale = valDiff / maxSteps
|
||||
minStep = math.ceil(round(valScale, 9))
|
||||
maxStep = math.floor(round(valDiff / 4, 9))
|
||||
# Check steps from smallest to highest and see if we can go from min value
|
||||
# to max value using those
|
||||
for currentStep in range(minStep, maxStep + 1):
|
||||
if valDiff % currentStep == 0:
|
||||
return set(range(val1, val2 + currentStep, currentStep))
|
||||
# Otherwise just split range in halves and go both ends using min values
|
||||
else:
|
||||
cycles = set()
|
||||
while val2 >= val1:
|
||||
cycles.add(val1)
|
||||
cycles.add(val2)
|
||||
val1 += minStep
|
||||
val2 -= minStep
|
||||
return cycles
|
||||
|
||||
cyclesToShow = findCycles(cycleMin, cycleMax)
|
||||
for cycle in range(cycleTotalMin, cycleTotalMax + 1):
|
||||
menuId = ContextMenuSingle.nextID()
|
||||
|
||||
# Show default only for current value and when not overriden
|
||||
if not isNotDefault and cycle == cycleDefault:
|
||||
text = "{} (default)".format(cycle)
|
||||
else:
|
||||
# Always show current selection and stuff which we decided to show via the cycles function
|
||||
elif cycle == cycleCurrent or cycle in cyclesToShow:
|
||||
text = "{}".format(cycle)
|
||||
# Ignore the rest to not have very long menu
|
||||
else:
|
||||
continue
|
||||
|
||||
item = wx.MenuItem(m, menuId, text, kind=wx.ITEM_CHECK)
|
||||
bindmenu.Bind(wx.EVT_MENU, self.handleSpoolChange, item)
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
__all__ = ["fitDps"]
|
||||
__all__ = [
|
||||
"fitDpsRange",
|
||||
"fitDpsTime",
|
||||
"fitDmgTime"
|
||||
]
|
||||
|
||||
82
gui/builtinGraphs/fitDmgTime.py
Normal file
82
gui/builtinGraphs/fitDmgTime.py
Normal file
@@ -0,0 +1,82 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
import gui.mainFrame
|
||||
from eos.graph import Data
|
||||
from eos.graph.fitDmgTime import FitDmgTimeGraph as EosFitDmgTimeGraph
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from gui.graph import Graph
|
||||
from service.attribute import Attribute
|
||||
|
||||
|
||||
class FitDmgTimeGraph(Graph):
|
||||
|
||||
propertyLabelMap = {"time": "Time (seconds)"}
|
||||
|
||||
defaults = EosFitDmgTimeGraph.defaults.copy()
|
||||
|
||||
def __init__(self):
|
||||
Graph.__init__(self)
|
||||
self.defaults["time"] = "0-300"
|
||||
self.name = "Damage over time"
|
||||
self.fitDmgTime = None
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
|
||||
def getFields(self):
|
||||
return self.defaults
|
||||
|
||||
def getLabels(self):
|
||||
return self.propertyLabelMap
|
||||
|
||||
def getIcons(self):
|
||||
iconFile = Attribute.getInstance().getAttributeInfo('duration').iconID
|
||||
bitmap = BitmapLoader.getBitmap(iconFile, "icons")
|
||||
return {"time": bitmap}
|
||||
|
||||
def getPoints(self, fit, fields):
|
||||
fitDmgTime = getattr(self, "fitDmgTime", None)
|
||||
if fitDmgTime is None or fitDmgTime.fit != fit:
|
||||
fitDmgTime = self.fitDmgTime = EosFitDmgTimeGraph(fit)
|
||||
|
||||
fitDmgTime.clearData()
|
||||
variable = None
|
||||
for fieldName, value in fields.items():
|
||||
d = Data(fieldName, value)
|
||||
if not d.isConstant():
|
||||
if variable is None:
|
||||
variable = fieldName
|
||||
else:
|
||||
# We can't handle more then one variable atm, OOPS FUCK OUT
|
||||
return False, "Can only handle 1 variable"
|
||||
|
||||
fitDmgTime.setData(d)
|
||||
|
||||
if variable is None:
|
||||
return False, "No variable"
|
||||
|
||||
x = []
|
||||
y = []
|
||||
for point, val in fitDmgTime.getIterator():
|
||||
x.append(point[variable])
|
||||
y.append(val)
|
||||
|
||||
return x, y
|
||||
|
||||
|
||||
FitDmgTimeGraph.register()
|
||||
@@ -17,15 +17,16 @@
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
from gui.graph import Graph
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from eos.graph.fitDps import FitDpsGraph as FitDps
|
||||
from eos.graph import Data
|
||||
import gui.mainFrame
|
||||
from eos.graph import Data
|
||||
from eos.graph.fitDpsRange import FitDpsRangeGraph as EosFitDpsRangeGraph
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from gui.graph import Graph
|
||||
from service.attribute import Attribute
|
||||
|
||||
|
||||
class FitDpsGraph(Graph):
|
||||
class FitDpsRangeGraph(Graph):
|
||||
|
||||
propertyAttributeMap = {"angle": "maxVelocity",
|
||||
"distance": "maxRange",
|
||||
"signatureRadius": "signatureRadius",
|
||||
@@ -36,13 +37,13 @@ class FitDpsGraph(Graph):
|
||||
"signatureRadius": "Target Signature Radius (m)",
|
||||
"velocity": "Target Velocity (m/s)"}
|
||||
|
||||
defaults = FitDps.defaults.copy()
|
||||
defaults = EosFitDpsRangeGraph.defaults.copy()
|
||||
|
||||
def __init__(self):
|
||||
Graph.__init__(self)
|
||||
self.defaults["distance"] = "0-100"
|
||||
self.name = "DPS"
|
||||
self.fitDps = None
|
||||
self.name = "DPS over range"
|
||||
self.fitDpsRange = None
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
|
||||
def getFields(self):
|
||||
@@ -63,11 +64,11 @@ class FitDpsGraph(Graph):
|
||||
return icons
|
||||
|
||||
def getPoints(self, fit, fields):
|
||||
fitDps = getattr(self, "fitDps", None)
|
||||
if fitDps is None or fitDps.fit != fit:
|
||||
fitDps = self.fitDps = FitDps(fit)
|
||||
fitDpsRange = getattr(self, "fitDpsRange", None)
|
||||
if fitDpsRange is None or fitDpsRange.fit != fit:
|
||||
fitDpsRange = self.fitDpsRange = EosFitDpsRangeGraph(fit)
|
||||
|
||||
fitDps.clearData()
|
||||
fitDpsRange.clearData()
|
||||
variable = None
|
||||
for fieldName, value in fields.items():
|
||||
d = Data(fieldName, value)
|
||||
@@ -78,18 +79,18 @@ class FitDpsGraph(Graph):
|
||||
# We can't handle more then one variable atm, OOPS FUCK OUT
|
||||
return False, "Can only handle 1 variable"
|
||||
|
||||
fitDps.setData(d)
|
||||
fitDpsRange.setData(d)
|
||||
|
||||
if variable is None:
|
||||
return False, "No variable"
|
||||
|
||||
x = []
|
||||
y = []
|
||||
for point, val in fitDps.getIterator():
|
||||
for point, val in fitDpsRange.getIterator():
|
||||
x.append(point[variable])
|
||||
y.append(val)
|
||||
|
||||
return x, y
|
||||
|
||||
|
||||
FitDpsGraph.register()
|
||||
FitDpsRangeGraph.register()
|
||||
82
gui/builtinGraphs/fitDpsTime.py
Normal file
82
gui/builtinGraphs/fitDpsTime.py
Normal file
@@ -0,0 +1,82 @@
|
||||
# =============================================================================
|
||||
# Copyright (C) 2010 Diego Duclos
|
||||
#
|
||||
# This file is part of pyfa.
|
||||
#
|
||||
# pyfa is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyfa is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pyfa. If not, see <http://www.gnu.org/licenses/>.
|
||||
# =============================================================================
|
||||
|
||||
import gui.mainFrame
|
||||
from eos.graph import Data
|
||||
from eos.graph.fitDpsTime import FitDpsTimeGraph as EosFitDpsTimeGraph
|
||||
from gui.bitmap_loader import BitmapLoader
|
||||
from gui.graph import Graph
|
||||
from service.attribute import Attribute
|
||||
|
||||
|
||||
class FitDpsTimeGraph(Graph):
|
||||
|
||||
propertyLabelMap = {"time": "Time (seconds)"}
|
||||
|
||||
defaults = EosFitDpsTimeGraph.defaults.copy()
|
||||
|
||||
def __init__(self):
|
||||
Graph.__init__(self)
|
||||
self.defaults["time"] = "0-300"
|
||||
self.name = "DPS over time"
|
||||
self.fitDpsTime = None
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
|
||||
def getFields(self):
|
||||
return self.defaults
|
||||
|
||||
def getLabels(self):
|
||||
return self.propertyLabelMap
|
||||
|
||||
def getIcons(self):
|
||||
iconFile = Attribute.getInstance().getAttributeInfo('duration').iconID
|
||||
bitmap = BitmapLoader.getBitmap(iconFile, "icons")
|
||||
return {"time": bitmap}
|
||||
|
||||
def getPoints(self, fit, fields):
|
||||
fitDpsTime = getattr(self, "fitDpsTime", None)
|
||||
if fitDpsTime is None or fitDpsTime.fit != fit:
|
||||
fitDpsTime = self.fitDpsTime = EosFitDpsTimeGraph(fit)
|
||||
|
||||
fitDpsTime.clearData()
|
||||
variable = None
|
||||
for fieldName, value in fields.items():
|
||||
d = Data(fieldName, value)
|
||||
if not d.isConstant():
|
||||
if variable is None:
|
||||
variable = fieldName
|
||||
else:
|
||||
# We can't handle more then one variable atm, OOPS FUCK OUT
|
||||
return False, "Can only handle 1 variable"
|
||||
|
||||
fitDpsTime.setData(d)
|
||||
|
||||
if variable is None:
|
||||
return False, "No variable"
|
||||
|
||||
x = []
|
||||
y = []
|
||||
for point, val in fitDpsTime.getIterator():
|
||||
x.append(point[variable])
|
||||
y.append(val)
|
||||
|
||||
return x, y
|
||||
|
||||
|
||||
FitDpsTimeGraph.register()
|
||||
@@ -96,8 +96,10 @@ class AttributeSlider(wx.Panel):
|
||||
self.ctrl = wx.SpinCtrlDouble(self, min=minValue, max=maxValue, inc=getStep(maxValue - minValue))
|
||||
self.ctrl.SetDigits(getDigitPlaces(minValue, maxValue))
|
||||
|
||||
|
||||
self.ctrl.Bind(wx.EVT_SPINCTRLDOUBLE, self.UpdateValue)
|
||||
# GTK scrolls spinboxes with mousewheel, others do not
|
||||
if "wxGTK" not in wx.PlatformInfo:
|
||||
self.ctrl.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)
|
||||
|
||||
self.slider = AttributeGauge(self, size=(-1, 8))
|
||||
|
||||
@@ -124,6 +126,16 @@ class AttributeSlider(wx.Panel):
|
||||
if post_event:
|
||||
wx.PostEvent(self, ValueChanged(self, None, value, None, slider_percentage))
|
||||
|
||||
def OnMouseWheel(self, evt):
|
||||
if evt.GetWheelRotation() > 0 and evt.GetWheelAxis() == wx.MOUSE_WHEEL_VERTICAL:
|
||||
self.ctrl.Value = self.ctrl.Value + self.ctrl.Increment
|
||||
self.SetValue(self.ctrl.GetValue())
|
||||
elif evt.GetWheelRotation() < 0 and evt.GetWheelAxis() == wx.MOUSE_WHEEL_VERTICAL:
|
||||
self.ctrl.Value = self.ctrl.Value - self.ctrl.Increment
|
||||
self.SetValue(self.ctrl.GetValue())
|
||||
else:
|
||||
evt.Skip()
|
||||
|
||||
|
||||
class TestAttributeSlider(wx.Frame):
|
||||
|
||||
|
||||
@@ -26,8 +26,12 @@ class ItemMutatorPanel(wx.Panel):
|
||||
|
||||
headerSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
headerSizer.AddStretchSpacer()
|
||||
headerSizer.Add(BitmapLoader.getStaticBitmap(mod.item.iconID, self, "icons"), 0, 0, 0)
|
||||
headerSizer.Add(BitmapLoader.getStaticBitmap(mod.mutaplasmid.item.iconID, self, "icons"), 0, wx.LEFT, 0)
|
||||
itemIcon = BitmapLoader.getStaticBitmap(mod.item.iconID, self, "icons")
|
||||
if itemIcon is not None:
|
||||
headerSizer.Add(itemIcon, 0, 0, 0)
|
||||
mutaIcon = BitmapLoader.getStaticBitmap(mod.mutaplasmid.item.iconID, self, "icons")
|
||||
if mutaIcon is not None:
|
||||
headerSizer.Add(mutaIcon, 0, wx.LEFT, 0)
|
||||
sourceItemShort = "{} {}".format(mod.mutaplasmid.item.name.split(" ")[0], mod.baseItem.name)
|
||||
sourceItemText = wx.StaticText(self, wx.ID_ANY, sourceItemShort)
|
||||
font = parent.GetFont()
|
||||
@@ -81,6 +85,7 @@ class ItemMutatorList(wx.ScrolledWindow):
|
||||
self.event_mapping = {}
|
||||
higOverrides = {
|
||||
('Stasis Web', 'speedFactor'): False,
|
||||
('Damage Control', 'duration'): True,
|
||||
}
|
||||
|
||||
first = True
|
||||
|
||||
@@ -528,9 +528,9 @@ class Miscellanea(ViewColumn):
|
||||
text = "{0}/s".format(formatAmount(capPerSec, 3, 0, 3))
|
||||
tooltip = "Energy neutralization per second"
|
||||
return text, tooltip
|
||||
elif itemGroup == "Micro Jump Drive":
|
||||
elif itemGroup in ("Micro Jump Drive", "Micro Jump Field Generators"):
|
||||
cycleTime = stuff.getModifiedItemAttr("duration") / 1000
|
||||
text = "{0}s".format(cycleTime)
|
||||
text = "{0}s".format(formatAmount(cycleTime, 3, 0, 3))
|
||||
tooltip = "Spoolup time"
|
||||
return text, tooltip
|
||||
elif itemGroup in ("Siege Module", "Cynosural Field Generator"):
|
||||
|
||||
@@ -67,8 +67,8 @@ class ContextMenu(metaclass=ABCMeta):
|
||||
(('marketItemGroup', 'Implant'),)
|
||||
(('fittingShip', 'Ship'),)
|
||||
"""
|
||||
cls._idxid = -1
|
||||
debug_start = len(cls._ids)
|
||||
ContextMenu._idxid = -1
|
||||
debug_start = len(ContextMenu._ids)
|
||||
|
||||
rootMenu = wx.Menu()
|
||||
rootMenu.info = {}
|
||||
@@ -95,7 +95,7 @@ class ContextMenu(metaclass=ABCMeta):
|
||||
bitmap = m._baseGetBitmap(srcContext, mainItem, selection)
|
||||
multiple = not isinstance(bitmap, wx.Bitmap)
|
||||
for it, text in enumerate(texts):
|
||||
id = cls.nextID()
|
||||
id = ContextMenu.nextID()
|
||||
check = m.checked
|
||||
rootItem = wx.MenuItem(rootMenu, id, text, kind=wx.ITEM_NORMAL if m.checked is None else wx.ITEM_CHECK)
|
||||
rootMenu.info[id] = (m, fullContext, it)
|
||||
@@ -104,7 +104,7 @@ class ContextMenu(metaclass=ABCMeta):
|
||||
|
||||
if sub is None:
|
||||
# if there is no sub menu, bind the handler to the rootItem
|
||||
rootMenu.Bind(wx.EVT_MENU, cls.handler, rootItem)
|
||||
rootMenu.Bind(wx.EVT_MENU, ContextMenu.handler, rootItem)
|
||||
elif sub:
|
||||
# If sub exists and is not False, set submenu.
|
||||
# Sub might return False when we have a mix of
|
||||
@@ -141,14 +141,14 @@ class ContextMenu(metaclass=ABCMeta):
|
||||
if display_amount > 0 and i != len(fullContexts) - 1:
|
||||
rootMenu.AppendSeparator()
|
||||
|
||||
debug_end = len(cls._ids)
|
||||
debug_end = len(ContextMenu._ids)
|
||||
if debug_end - debug_start:
|
||||
pyfalog.debug("{} new IDs created for this menu".format(debug_end - debug_start))
|
||||
|
||||
return rootMenu if empty is False else None
|
||||
|
||||
@classmethod
|
||||
def handler(cls, event):
|
||||
@staticmethod
|
||||
def handler(event):
|
||||
menu = event.EventObject
|
||||
stuff = menu.info.get(event.Id)
|
||||
if stuff is not None:
|
||||
@@ -162,21 +162,22 @@ class ContextMenu(metaclass=ABCMeta):
|
||||
else:
|
||||
event.Skip()
|
||||
|
||||
@classmethod
|
||||
def nextID(cls):
|
||||
@staticmethod
|
||||
def nextID():
|
||||
"""
|
||||
Fetches an ID from the pool of IDs allocated to Context Menu.
|
||||
If we don't have enough ID's to fulfill request, create new
|
||||
ID and add it to the pool.
|
||||
|
||||
See GH Issue #589
|
||||
See GH Issue #589.
|
||||
Has to be static method to properly handle modifications of primitives from subclasses (_idxid).
|
||||
"""
|
||||
cls._idxid += 1
|
||||
ContextMenu._idxid += 1
|
||||
|
||||
if cls._idxid >= len(cls._ids): # We don't ahve an ID for this index, create one
|
||||
cls._ids.append(wx.NewId())
|
||||
if ContextMenu._idxid >= len(ContextMenu._ids): # We don't ahve an ID for this index, create one
|
||||
ContextMenu._ids.append(wx.NewId())
|
||||
|
||||
return cls._ids[cls._idxid]
|
||||
return ContextMenu._ids[ContextMenu._idxid]
|
||||
|
||||
@property
|
||||
def checked(self):
|
||||
|
||||
@@ -23,13 +23,14 @@ from collections import OrderedDict
|
||||
# noinspection PyPackageRequirements
|
||||
import wx
|
||||
|
||||
from eos.db import getFit
|
||||
from gui.utils.clipboard import toClipboard
|
||||
from service.const import PortMultiBuyOptions
|
||||
from service.port import EfsPort, Port
|
||||
from service.port.dna import DNA_OPTIONS
|
||||
from service.port.eft import EFT_OPTIONS
|
||||
from service.port.multibuy import MULTIBUY_OPTIONS
|
||||
from service.settings import SettingsProvider
|
||||
from service.port import EfsPort, Port
|
||||
from service.const import PortMultiBuyOptions
|
||||
from eos.db import getFit
|
||||
from gui.utils.clipboard import toClipboard
|
||||
|
||||
|
||||
class CopySelectDialog(wx.Dialog):
|
||||
@@ -60,9 +61,9 @@ class CopySelectDialog(wx.Dialog):
|
||||
("EFT", (CopySelectDialog.copyFormatEft, EFT_OPTIONS)),
|
||||
("MultiBuy", (CopySelectDialog.copyFormatMultiBuy, MULTIBUY_OPTIONS)),
|
||||
("ESI", (CopySelectDialog.copyFormatEsi, None)),
|
||||
("DNA", (CopySelectDialog.copyFormatDna, DNA_OPTIONS)),
|
||||
("EFS", (CopySelectDialog.copyFormatEfs, None)),
|
||||
# ("XML", (CopySelectDialog.copyFormatXml, None)),
|
||||
# ("DNA", (CopySelectDialog.copyFormatDna, None)),
|
||||
))
|
||||
|
||||
defaultFormatOptions = {}
|
||||
@@ -99,6 +100,8 @@ class CopySelectDialog(wx.Dialog):
|
||||
|
||||
for optId, optName, optDesc, _ in formatOptions:
|
||||
checkbox = wx.CheckBox(self, -1, optName)
|
||||
if optDesc:
|
||||
checkbox.SetToolTip(wx.ToolTip(optDesc))
|
||||
self.options[formatId][optId] = checkbox
|
||||
if self.settings['options'].get(formatId, {}).get(optId, defaultFormatOptions.get(formatId, {}).get(optId)):
|
||||
checkbox.SetValue(True)
|
||||
@@ -166,7 +169,7 @@ class CopySelectDialog(wx.Dialog):
|
||||
|
||||
def exportDna(self, options, callback):
|
||||
fit = getFit(self.mainFrame.getActiveFit())
|
||||
Port.exportDna(fit, callback)
|
||||
Port.exportDna(fit, options, callback)
|
||||
|
||||
def exportEsi(self, options, callback):
|
||||
fit = getFit(self.mainFrame.getActiveFit())
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -35,9 +34,8 @@ class CalcAddBoosterCommand(wx.Command):
|
||||
self.oldPosition, self.oldBoosterInfo = fit.boosters.makeRoom(newBooster)
|
||||
|
||||
if self.newPosition is not None:
|
||||
try:
|
||||
fit.boosters.insert(self.newPosition, newBooster)
|
||||
except HandledListActionError:
|
||||
fit.boosters.insert(self.newPosition, newBooster)
|
||||
if newBooster not in fit.boosters:
|
||||
pyfalog.warning('Failed to insert to list')
|
||||
cmd = CalcAddBoosterCommand(
|
||||
fitID=self.fitID,
|
||||
@@ -47,9 +45,8 @@ class CalcAddBoosterCommand(wx.Command):
|
||||
cmd.Do()
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
fit.boosters.append(newBooster)
|
||||
except HandledListActionError:
|
||||
fit.boosters.append(newBooster)
|
||||
if newBooster not in fit.boosters:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
cmd = CalcAddBoosterCommand(
|
||||
fitID=self.fitID,
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -25,9 +24,8 @@ class CalcAddCargoCommand(wx.Command):
|
||||
cargo.amount += self.cargoInfo.amount
|
||||
else:
|
||||
cargo = self.cargoInfo.toCargo()
|
||||
try:
|
||||
fit.cargo.append(cargo)
|
||||
except HandledListActionError:
|
||||
fit.cargo.append(cargo)
|
||||
if cargo not in fit.cargo:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
|
||||
@@ -3,7 +3,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import DroneInfo, droneStackLimit
|
||||
from service.fit import Fit
|
||||
from service.market import Market
|
||||
@@ -50,9 +49,8 @@ class CalcAddLocalDroneCommand(wx.Command):
|
||||
if not self.ignoreRestrictions and not drone.fits(fit):
|
||||
pyfalog.warning('Drone does not fit')
|
||||
return False
|
||||
try:
|
||||
fit.drones.append(drone)
|
||||
except HandledListActionError:
|
||||
fit.drones.append(drone)
|
||||
if drone not in fit.drones:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import DroneInfo
|
||||
from service.fit import Fit
|
||||
|
||||
@@ -48,9 +47,8 @@ class CalcRemoveLocalDroneCommand(wx.Command):
|
||||
drone = self.savedDroneInfo.toDrone()
|
||||
if drone is None:
|
||||
return False
|
||||
try:
|
||||
fit.drones.insert(self.position, drone)
|
||||
except HandledListActionError:
|
||||
fit.drones.insert(self.position, drone)
|
||||
if drone not in fit.drones:
|
||||
pyfalog.warning('Failed to insert to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
|
||||
@@ -4,7 +4,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import DroneInfo
|
||||
from service.fit import Fit
|
||||
|
||||
@@ -43,9 +42,8 @@ class CalcAddProjectedDroneCommand(wx.Command):
|
||||
if not drone.item.isType('projected'):
|
||||
pyfalog.debug('Drone is not projectable')
|
||||
return False
|
||||
try:
|
||||
fit.projectedDrones.append(drone)
|
||||
except HandledListActionError:
|
||||
fit.projectedDrones.append(drone)
|
||||
if drone not in fit.projectedDrones:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -41,18 +40,16 @@ class CalcAddLocalFighterCommand(wx.Command):
|
||||
fighter.active = True
|
||||
|
||||
if self.position is None:
|
||||
try:
|
||||
fit.fighters.append(fighter)
|
||||
except HandledListActionError:
|
||||
fit.fighters.append(fighter)
|
||||
if fighter not in fit.fighters:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
return False
|
||||
self.position = fit.fighters.index(fighter)
|
||||
else:
|
||||
try:
|
||||
fit.fighters.insert(self.position, fighter)
|
||||
except HandledListActionError:
|
||||
fit.fighters.insert(self.position, fighter)
|
||||
if fighter not in fit.fighters:
|
||||
pyfalog.warning('Failed to insert to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -25,16 +24,14 @@ class CalcAddProjectedFighterCommand(wx.Command):
|
||||
return False
|
||||
fit = Fit.getInstance().getFit(self.fitID)
|
||||
if self.position is not None:
|
||||
try:
|
||||
fit.projectedFighters.insert(self.position, fighter)
|
||||
except HandledListActionError:
|
||||
fit.projectedFighters.insert(self.position, fighter)
|
||||
if fighter not in fit.projectedFighters:
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
fit.projectedFighters.append(fighter)
|
||||
except HandledListActionError:
|
||||
fit.projectedFighters.append(fighter)
|
||||
if fighter not in fit.projectedFighters:
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
return False
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -35,9 +34,8 @@ class CalcAddImplantCommand(wx.Command):
|
||||
self.oldPosition, self.oldImplantInfo = fit.implants.makeRoom(newImplant)
|
||||
|
||||
if self.newPosition is not None:
|
||||
try:
|
||||
fit.implants.insert(self.newPosition, newImplant)
|
||||
except HandledListActionError:
|
||||
fit.implants.insert(self.newPosition, newImplant)
|
||||
if newImplant not in fit.implants:
|
||||
pyfalog.warning('Failed to insert to list')
|
||||
cmd = CalcAddImplantCommand(
|
||||
fitID=self.fitID,
|
||||
@@ -47,9 +45,8 @@ class CalcAddImplantCommand(wx.Command):
|
||||
cmd.Do()
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
fit.implants.append(newImplant)
|
||||
except HandledListActionError:
|
||||
fit.implants.append(newImplant)
|
||||
if newImplant not in fit.implants:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
cmd = CalcAddImplantCommand(
|
||||
fitID=self.fitID,
|
||||
|
||||
@@ -2,8 +2,7 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import restoreCheckedStates, stateLimit
|
||||
from gui.fitCommands.helpers import restoreCheckedStates, activeStateLimit
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -26,7 +25,7 @@ class CalcAddLocalModuleCommand(wx.Command):
|
||||
sFit = Fit.getInstance()
|
||||
fit = sFit.getFit(self.fitID)
|
||||
|
||||
newMod = self.newModInfo.toModule(fallbackState=stateLimit(self.newModInfo.itemID))
|
||||
newMod = self.newModInfo.toModule(fallbackState=activeStateLimit(self.newModInfo.itemID))
|
||||
if newMod is None:
|
||||
return False
|
||||
|
||||
@@ -55,9 +54,8 @@ class CalcAddLocalModuleCommand(wx.Command):
|
||||
if not newMod.fits(fit):
|
||||
pyfalog.warning('Module does not fit')
|
||||
return False
|
||||
try:
|
||||
fit.modules.append(newMod)
|
||||
except HandledListActionError:
|
||||
fit.modules.append(newMod)
|
||||
if newMod not in fit.modules:
|
||||
pyfalog.warning('Failed to append to list')
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
|
||||
@@ -4,7 +4,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import restoreCheckedStates
|
||||
from service.fit import Fit
|
||||
|
||||
@@ -31,9 +30,8 @@ class CalcCloneLocalModuleCommand(wx.Command):
|
||||
return False
|
||||
if not fit.modules[self.dstPosition].isEmpty:
|
||||
return False
|
||||
try:
|
||||
fit.modules.replace(self.dstPosition, copyMod)
|
||||
except HandledListActionError:
|
||||
fit.modules.replace(self.dstPosition, copyMod)
|
||||
if copyMod not in fit.modules:
|
||||
pyfalog.warning('Failed to replace module')
|
||||
eos.db.commit()
|
||||
return False
|
||||
|
||||
@@ -2,8 +2,7 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import ModuleInfo, restoreCheckedStates, stateLimit
|
||||
from gui.fitCommands.helpers import ModuleInfo, restoreCheckedStates, activeStateLimit
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -34,7 +33,7 @@ class CalcReplaceLocalModuleCommand(wx.Command):
|
||||
self.oldModInfo = ModuleInfo.fromModule(oldMod)
|
||||
if self.newModInfo == self.oldModInfo:
|
||||
return False
|
||||
newMod = self.newModInfo.toModule(fallbackState=stateLimit(self.newModInfo.itemID))
|
||||
newMod = self.newModInfo.toModule(fallbackState=activeStateLimit(self.newModInfo.itemID))
|
||||
if newMod is None:
|
||||
return False
|
||||
if newMod.slot != oldMod.slot:
|
||||
@@ -53,9 +52,8 @@ class CalcReplaceLocalModuleCommand(wx.Command):
|
||||
pyfalog.warning('Invalid charge')
|
||||
self.Undo()
|
||||
return False
|
||||
try:
|
||||
fit.modules.replace(self.position, newMod)
|
||||
except HandledListActionError:
|
||||
fit.modules.replace(self.position, newMod)
|
||||
if newMod not in fit.modules:
|
||||
pyfalog.warning('Failed to replace in list')
|
||||
self.Undo()
|
||||
return False
|
||||
@@ -87,9 +85,8 @@ class CalcReplaceLocalModuleCommand(wx.Command):
|
||||
if oldMod is None:
|
||||
return False
|
||||
fit.modules.free(self.position)
|
||||
try:
|
||||
fit.modules.replace(self.position, oldMod)
|
||||
except HandledListActionError:
|
||||
fit.modules.replace(self.position, oldMod)
|
||||
if oldMod not in fit.modules:
|
||||
pyfalog.warning('Failed to replace in list')
|
||||
self.Do()
|
||||
return False
|
||||
|
||||
@@ -2,7 +2,6 @@ import wx
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.exception import HandledListActionError
|
||||
from service.fit import Fit
|
||||
|
||||
|
||||
@@ -33,16 +32,14 @@ class CalcSwapLocalModuleCommand(wx.Command):
|
||||
mod2 = fit.modules[position2]
|
||||
fit.modules.free(position1)
|
||||
fit.modules.free(position2)
|
||||
try:
|
||||
fit.modules.replace(position2, mod1)
|
||||
except HandledListActionError:
|
||||
fit.modules.replace(position2, mod1)
|
||||
if len(fit.modules) <= position2 or fit.modules[position2] is not mod1:
|
||||
fit.modules.replace(position1, mod1)
|
||||
fit.modules.replace(position2, mod2)
|
||||
eos.db.commit()
|
||||
return False
|
||||
try:
|
||||
fit.modules.replace(position1, mod2)
|
||||
except HandledListActionError:
|
||||
fit.modules.replace(position1, mod2)
|
||||
if len(fit.modules) <= position1 or fit.modules[position1] is not mod2:
|
||||
fit.modules.free(position2)
|
||||
fit.modules.replace(position1, mod1)
|
||||
fit.modules.replace(position2, mod2)
|
||||
|
||||
@@ -3,7 +3,6 @@ from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
from eos.const import FittingModuleState
|
||||
from eos.exception import HandledListActionError
|
||||
from gui.fitCommands.helpers import restoreCheckedStates
|
||||
from service.fit import Fit
|
||||
|
||||
@@ -39,16 +38,14 @@ class CalcAddProjectedModuleCommand(wx.Command):
|
||||
self.oldPosition, self.oldModInfo = fit.projectedModules.makeRoom(newMod)
|
||||
|
||||
if self.newPosition is not None:
|
||||
try:
|
||||
fit.projectedModules.insert(self.newPosition, newMod)
|
||||
except HandledListActionError:
|
||||
fit.projectedModules.insert(self.newPosition, newMod)
|
||||
if newMod not in fit.projectedModules:
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
fit.projectedModules.append(newMod)
|
||||
except HandledListActionError:
|
||||
fit.projectedModules.append(newMod)
|
||||
if newMod not in fit.projectedModules:
|
||||
if self.commit:
|
||||
eos.db.commit()
|
||||
return False
|
||||
|
||||
@@ -317,9 +317,12 @@ class CargoInfo:
|
||||
return makeReprStr(self, ['itemID', 'amount'])
|
||||
|
||||
|
||||
def stateLimit(itemIdentity):
|
||||
def activeStateLimit(itemIdentity):
|
||||
item = Market.getInstance().getItem(itemIdentity)
|
||||
if {'moduleBonusAssaultDamageControl', 'moduleBonusIndustrialInvulnerability'}.intersection(item.effects):
|
||||
if {
|
||||
'moduleBonusAssaultDamageControl', 'moduleBonusIndustrialInvulnerability',
|
||||
'microJumpDrive', 'microJumpPortalDrive'
|
||||
}.intersection(item.effects):
|
||||
return FittingModuleState.ONLINE
|
||||
return FittingModuleState.ACTIVE
|
||||
|
||||
|
||||
@@ -36,4 +36,8 @@ class Graph(object):
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
from gui.builtinGraphs import fitDps # noqa: E402, F401
|
||||
from gui.builtinGraphs import (
|
||||
fitDpsRange, # noqa: E402, F401
|
||||
fitDpsTime, # noqa: E402, F401
|
||||
fitDmgTime, # noqa: E402, F401
|
||||
)
|
||||
|
||||
@@ -163,6 +163,7 @@ class GraphFrame(wx.Frame):
|
||||
self.mainFrame.Bind(GE.FIT_CHANGED, self.draw)
|
||||
self.Bind(wx.EVT_CLOSE, self.closeEvent)
|
||||
self.Bind(wx.EVT_CHAR_HOOK, self.kbEvent)
|
||||
self.Bind(wx.EVT_CHOICE, self.graphChanged)
|
||||
|
||||
self.Fit()
|
||||
self.SetMinSize(self.GetSize())
|
||||
@@ -182,6 +183,10 @@ class GraphFrame(wx.Frame):
|
||||
return
|
||||
event.Skip()
|
||||
|
||||
def graphChanged(self, event):
|
||||
self.select(self.graphSelection.GetSelection())
|
||||
event.Skip()
|
||||
|
||||
def closeWindow(self):
|
||||
self.fitList.fitList.Unbind(wx.EVT_LEFT_DCLICK, handler=self.removeItem)
|
||||
self.mainFrame.Unbind(GE.FIT_CHANGED, handler=self.draw)
|
||||
@@ -202,6 +207,7 @@ class GraphFrame(wx.Frame):
|
||||
icons = view.getIcons()
|
||||
labels = view.getLabels()
|
||||
sizer = self.gridSizer
|
||||
sizer.Clear()
|
||||
self.gridPanel.DestroyChildren()
|
||||
self.fields.clear()
|
||||
|
||||
@@ -237,6 +243,7 @@ class GraphFrame(wx.Frame):
|
||||
imgLabelSizer.Add(wx.StaticText(self.gridPanel, wx.ID_ANY, label), 0,
|
||||
wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
|
||||
sizer.Add(imgLabelSizer, 0, wx.ALIGN_CENTER_VERTICAL)
|
||||
sizer.Layout()
|
||||
self.draw()
|
||||
|
||||
def draw(self, event=None):
|
||||
|
||||
@@ -146,8 +146,8 @@ class ItemStatsDialog(wx.Dialog):
|
||||
event.Skip()
|
||||
|
||||
def closeEvent(self, event):
|
||||
self.closeWindow()
|
||||
self.container.onParentClose()
|
||||
self.closeWindow()
|
||||
event.Skip()
|
||||
|
||||
def closeWindow(self):
|
||||
|
||||
@@ -134,7 +134,7 @@ class MarketBrowser(wx.Panel):
|
||||
@mode.setter
|
||||
def mode(self, newMode):
|
||||
oldMode = self.__mode
|
||||
if newMode == oldMode:
|
||||
if newMode == oldMode != 'search':
|
||||
return
|
||||
# Store meta button states when switching from normal
|
||||
if oldMode == 'normal':
|
||||
|
||||
BIN
imgs/renders/24469@1x.png
Normal file
BIN
imgs/renders/24469@1x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
imgs/renders/24469@2x.png
Normal file
BIN
imgs/renders/24469@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
imgs/renders/24470@1x.png
Normal file
BIN
imgs/renders/24470@1x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
imgs/renders/24470@2x.png
Normal file
BIN
imgs/renders/24470@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
imgs/renders/24471@1x.png
Normal file
BIN
imgs/renders/24471@1x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
imgs/renders/24471@2x.png
Normal file
BIN
imgs/renders/24471@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -81,6 +81,14 @@ class PortEftRigSize(IntEnum):
|
||||
CAPITAL = 4
|
||||
|
||||
|
||||
@unique
|
||||
class PortDnaOptions(IntEnum):
|
||||
"""
|
||||
Contains different types of items for DNA export
|
||||
"""
|
||||
FORMATTING = 1
|
||||
|
||||
|
||||
@unique
|
||||
class GuiAttrGroup(IntEnum):
|
||||
"""
|
||||
@@ -101,4 +109,4 @@ class GuiAttrGroup(IntEnum):
|
||||
JUMP_SYSTEMS = auto()
|
||||
PROPULSIONS = auto()
|
||||
FIGHTERS = auto()
|
||||
SHIP_GROUP = auto()
|
||||
SHIP_GROUP = auto()
|
||||
|
||||
@@ -84,7 +84,7 @@ capac: 2500mm Repeating Cannon
|
||||
3500rt: 3500mm Artillery
|
||||
caprt: 3500mm Artillery
|
||||
dlp: Dual Light Pulse
|
||||
gpl: Gatling Pulse Laser
|
||||
# gpl: Gatling Pulse Laser - conflicts with giga pulse
|
||||
sfp: Small Focused Pulse
|
||||
fmp: Focused Medium Pulse
|
||||
hpl: Heavy Pulse Laser #also catches dual heavy
|
||||
@@ -110,7 +110,7 @@ hml: Heavy Missile Launcher #gets HAM + RHML launcher too?
|
||||
rhml: Rapid Heavy Missile Launcher
|
||||
cml: Cruise Missile Launcher
|
||||
tpl: Torpedo Launcher
|
||||
tl: Torpedo Launcher
|
||||
# tl: Torpedo Launcher - conflicts with tracking link entry
|
||||
rtl: Rapid Torpedo Launcher
|
||||
hawml: Rapid Torpedo Launcher
|
||||
hawtl: Rapid Torpedo Launcher
|
||||
@@ -124,6 +124,7 @@ dd: Doomsday
|
||||
rp: Reaper
|
||||
disco: Smartbomb
|
||||
sbomb: Smartbomb
|
||||
fvb: Focused Void Bomb
|
||||
|
||||
# Propulsion Modules
|
||||
ab: Afterburner
|
||||
|
||||
@@ -23,6 +23,7 @@ from collections import OrderedDict
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.const import FittingModuleState, FittingSlot
|
||||
from eos.saveddata.cargo import Cargo
|
||||
from eos.saveddata.citadel import Citadel
|
||||
from eos.saveddata.drone import Drone
|
||||
@@ -30,13 +31,18 @@ from eos.saveddata.fighter import Fighter
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.module import Module
|
||||
from eos.saveddata.ship import Ship
|
||||
from eos.const import FittingSlot, FittingModuleState
|
||||
from gui.fitCommands.helpers import activeStateLimit
|
||||
from service.const import PortDnaOptions
|
||||
from service.fit import Fit as svcFit
|
||||
from service.market import Market
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
DNA_OPTIONS = (
|
||||
(PortDnaOptions.FORMATTING, 'Formatting Tags', 'Include formatting tags to paste fit directly into corp bulletins, MOTD, etc.', True),
|
||||
)
|
||||
|
||||
|
||||
def importDna(string, fitName=None):
|
||||
sMkt = Market.getInstance()
|
||||
@@ -111,7 +117,7 @@ def importDna(string, fitName=None):
|
||||
else:
|
||||
m.owner = f
|
||||
if m.isValidState(FittingModuleState.ACTIVE):
|
||||
m.state = FittingModuleState.ACTIVE
|
||||
m.state = activeStateLimit(m.item)
|
||||
moduleList.append(m)
|
||||
|
||||
# Recalc to get slot numbers correct for T3 cruisers
|
||||
@@ -123,18 +129,17 @@ def importDna(string, fitName=None):
|
||||
if module.fits(f):
|
||||
module.owner = f
|
||||
if module.isValidState(FittingModuleState.ACTIVE):
|
||||
module.state = FittingModuleState.ACTIVE
|
||||
module.state = activeStateLimit(module.item)
|
||||
f.modules.append(module)
|
||||
|
||||
return f
|
||||
|
||||
|
||||
def exportDna(fit, callback):
|
||||
def exportDna(fit, options, callback):
|
||||
dna = str(fit.shipID)
|
||||
subsystems = [] # EVE cares which order you put these in
|
||||
mods = OrderedDict()
|
||||
charges = OrderedDict()
|
||||
sFit = svcFit.getInstance()
|
||||
for mod in fit.modules:
|
||||
if not mod.isEmpty:
|
||||
if mod.slot == FittingSlot.SUBSYSTEM:
|
||||
@@ -162,9 +167,6 @@ def exportDna(fit, callback):
|
||||
for fighter in fit.fighters:
|
||||
dna += ":{0};{1}".format(fighter.itemID, fighter.amountActive)
|
||||
|
||||
for fighter in fit.fighters:
|
||||
dna += ":{0};{1}".format(fighter.itemID, fighter.amountActive)
|
||||
|
||||
for cargo in fit.cargo:
|
||||
# DNA format is a simple/dumb format. As CCP uses the slot information of the item itself
|
||||
# without designating slots in the DNA standard, we need to make sure we only include
|
||||
@@ -181,6 +183,9 @@ def exportDna(fit, callback):
|
||||
|
||||
text = dna + "::"
|
||||
|
||||
if options[PortDnaOptions.FORMATTING]:
|
||||
text = '<url=fitting:{}>{}</url>'.format(text, fit.name)
|
||||
|
||||
if callback:
|
||||
callback(text)
|
||||
else:
|
||||
|
||||
@@ -22,18 +22,19 @@ import re
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.const import FittingModuleState, FittingSlot
|
||||
from eos.db.gamedata.queries import getDynamicItem
|
||||
from eos.saveddata.booster import Booster
|
||||
from eos.saveddata.cargo import Cargo
|
||||
from eos.saveddata.citadel import Citadel
|
||||
from eos.saveddata.booster import Booster
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.fighter import Fighter
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.implant import Implant
|
||||
from eos.saveddata.module import Module
|
||||
from eos.saveddata.ship import Ship
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.const import FittingSlot, FittingModuleState
|
||||
from service.const import PortEftOptions, PortEftRigSize
|
||||
from gui.fitCommands.helpers import activeStateLimit
|
||||
from service.const import PortEftOptions
|
||||
from service.fit import Fit as svcFit
|
||||
from service.market import Market
|
||||
from service.port.muta import parseMutant, renderMutant
|
||||
@@ -443,7 +444,7 @@ def importEftCfg(shipname, lines, iportuser):
|
||||
m.owner = fitobj
|
||||
# Activate mod if it is activable
|
||||
if m.isValidState(FittingModuleState.ACTIVE):
|
||||
m.state = FittingModuleState.ACTIVE
|
||||
m.state = activeStateLimit(m.item)
|
||||
# Add charge to mod if applicable, on any errors just don't add anything
|
||||
if chargeName:
|
||||
try:
|
||||
@@ -804,7 +805,7 @@ class AbstractFit:
|
||||
if itemSpec.offline and m.isValidState(FittingModuleState.OFFLINE):
|
||||
m.state = FittingModuleState.OFFLINE
|
||||
elif m.isValidState(FittingModuleState.ACTIVE):
|
||||
m.state = FittingModuleState.ACTIVE
|
||||
m.state = activeStateLimit(m.item)
|
||||
return m
|
||||
|
||||
def addImplant(self, itemSpec):
|
||||
|
||||
@@ -23,14 +23,15 @@ import json
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.const import FittingModuleState, FittingSlot
|
||||
from eos.saveddata.cargo import Cargo
|
||||
from eos.saveddata.citadel import Citadel
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.fighter import Fighter
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.module import Module
|
||||
from eos.const import FittingSlot, FittingModuleState
|
||||
from eos.saveddata.ship import Ship
|
||||
from gui.fitCommands.helpers import activeStateLimit
|
||||
from service.fit import Fit as svcFit
|
||||
from service.market import Market
|
||||
|
||||
@@ -196,7 +197,7 @@ def importESI(string):
|
||||
fitobj.modules.append(m)
|
||||
else:
|
||||
if m.isValidState(FittingModuleState.ACTIVE):
|
||||
m.state = FittingModuleState.ACTIVE
|
||||
m.state = activeStateLimit(m.item)
|
||||
|
||||
moduleList.append(m)
|
||||
|
||||
|
||||
@@ -272,8 +272,8 @@ class Port(object):
|
||||
return importDna(string, fitName=fitName)
|
||||
|
||||
@staticmethod
|
||||
def exportDna(fit, callback=None):
|
||||
return exportDna(fit, callback=callback)
|
||||
def exportDna(fit, options, callback=None):
|
||||
return exportDna(fit, options, callback=callback)
|
||||
|
||||
# ESI-related methods
|
||||
@staticmethod
|
||||
|
||||
@@ -23,6 +23,7 @@ import xml.parsers.expat
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
from eos.const import FittingModuleState, FittingSlot
|
||||
from eos.saveddata.cargo import Cargo
|
||||
from eos.saveddata.citadel import Citadel
|
||||
from eos.saveddata.drone import Drone
|
||||
@@ -30,12 +31,11 @@ from eos.saveddata.fighter import Fighter
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.module import Module
|
||||
from eos.saveddata.ship import Ship
|
||||
from eos.const import FittingSlot, FittingModuleState
|
||||
from gui.fitCommands.helpers import activeStateLimit
|
||||
from service.fit import Fit as svcFit
|
||||
from service.market import Market
|
||||
from utils.strfunctions import sequential_rep, replace_ltgt
|
||||
|
||||
from service.port.shared import IPortUser, processing_notify
|
||||
from utils.strfunctions import replace_ltgt, sequential_rep
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
@@ -200,7 +200,7 @@ def importXml(text, iportuser):
|
||||
fitobj.modules.append(m)
|
||||
else:
|
||||
if m.isValidState(FittingModuleState.ACTIVE):
|
||||
m.state = FittingModuleState.ACTIVE
|
||||
m.state = activeStateLimit(m.item)
|
||||
|
||||
moduleList.append(m)
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
version: v2.9.2
|
||||
version: v2.9.4dev1
|
||||
|
||||
Reference in New Issue
Block a user