Merge branch 'master' into wx3

This commit is contained in:
blitzmann
2015-04-17 17:48:56 -04:00
135 changed files with 1420 additions and 508 deletions

180
config.py
View File

@@ -1,90 +1,90 @@
import os
import sys
# Load variable overrides specific to distribution type
try:
import configforced
except ImportError:
configforced = None
# Turns on debug mode
debug = False
# Defines if our saveddata will be in pyfa root or not
saveInRoot = False
# Version data
version = "1.7.2"
tag = "git"
expansionName = "Rhea"
expansionVersion = "1.0"
evemonMinVersion = "4081"
# Database version (int ONLY)
# Increment every time we need to flag for user database upgrade/modification
dbversion = 3
pyfaPath = None
savePath = None
staticPath = None
saveDB = None
gameDB = None
def defPaths():
global pyfaPath
global savePath
global staticPath
global saveDB
global gameDB
global saveInRoot
# The main pyfa directory which contains run.py
# Python 2.X uses ANSI by default, so we need to convert the character encoding
pyfaPath = getattr(configforced, "pyfaPath", pyfaPath)
if pyfaPath is None:
pyfaPath = unicode(os.path.dirname(os.path.realpath(os.path.abspath(
sys.modules['__main__'].__file__))), sys.getfilesystemencoding())
# Where we store the saved fits etc, default is the current users home directory
if saveInRoot is True:
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = os.path.join(pyfaPath, "saveddata")
else:
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")),
sys.getfilesystemencoding())
# Redirect stderr to file if we're requested to do so
stderrToFile = getattr(configforced, "stderrToFile", None)
if stderrToFile is True:
if not os.path.exists(savePath):
os.mkdir(savePath)
sys.stderr = open(os.path.join(savePath, "error_log.txt"), "w")
# Same for stdout
stdoutToFile = getattr(configforced, "stdoutToFile", None)
if stdoutToFile is True:
if not os.path.exists(savePath):
os.mkdir(savePath)
sys.stdout = open(os.path.join(savePath, "output_log.txt"), "w")
# Static EVE Data from the staticdata repository, should be in the staticdata
# directory in our pyfa directory
staticPath = os.path.join(pyfaPath, "staticdata")
# The database where we store all the fits etc
saveDB = os.path.join(savePath, "saveddata.db")
# The database where the static EVE data from the datadump is kept.
# This is not the standard sqlite datadump but a modified version created by eos
# maintenance script
gameDB = os.path.join(staticPath, "eve.db")
## DON'T MODIFY ANYTHING BELOW ##
import eos.config
#Caching modifiers, disable all gamedata caching, its unneeded.
eos.config.gamedataCache = False
# saveddata db location modifier, shouldn't ever need to touch this
eos.config.saveddata_connectionstring = "sqlite:///" + saveDB + "?check_same_thread=False"
eos.config.gamedata_connectionstring = "sqlite:///" + gameDB + "?check_same_thread=False"
import os
import sys
# Load variable overrides specific to distribution type
try:
import configforced
except ImportError:
configforced = None
# Turns on debug mode
debug = False
# Defines if our saveddata will be in pyfa root or not
saveInRoot = False
# Version data
version = "1.10.1"
tag = "git"
expansionName = "Scylla"
expansionVersion = "1.0"
evemonMinVersion = "4081"
# Database version (int ONLY)
# Increment every time we need to flag for user database upgrade/modification
dbversion = 6
pyfaPath = None
savePath = None
staticPath = None
saveDB = None
gameDB = None
def defPaths():
global pyfaPath
global savePath
global staticPath
global saveDB
global gameDB
global saveInRoot
# The main pyfa directory which contains run.py
# Python 2.X uses ANSI by default, so we need to convert the character encoding
pyfaPath = getattr(configforced, "pyfaPath", pyfaPath)
if pyfaPath is None:
pyfaPath = unicode(os.path.dirname(os.path.realpath(os.path.abspath(
sys.modules['__main__'].__file__))), sys.getfilesystemencoding())
# Where we store the saved fits etc, default is the current users home directory
if saveInRoot is True:
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = os.path.join(pyfaPath, "saveddata")
else:
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")),
sys.getfilesystemencoding())
# Redirect stderr to file if we're requested to do so
stderrToFile = getattr(configforced, "stderrToFile", None)
if stderrToFile is True:
if not os.path.exists(savePath):
os.mkdir(savePath)
sys.stderr = open(os.path.join(savePath, "error_log.txt"), "w")
# Same for stdout
stdoutToFile = getattr(configforced, "stdoutToFile", None)
if stdoutToFile is True:
if not os.path.exists(savePath):
os.mkdir(savePath)
sys.stdout = open(os.path.join(savePath, "output_log.txt"), "w")
# Static EVE Data from the staticdata repository, should be in the staticdata
# directory in our pyfa directory
staticPath = os.path.join(pyfaPath, "staticdata")
# The database where we store all the fits etc
saveDB = os.path.join(savePath, "saveddata.db")
# The database where the static EVE data from the datadump is kept.
# This is not the standard sqlite datadump but a modified version created by eos
# maintenance script
gameDB = os.path.join(staticPath, "eve.db")
## DON'T MODIFY ANYTHING BELOW ##
import eos.config
#Caching modifiers, disable all gamedata caching, its unneeded.
eos.config.gamedataCache = False
# saveddata db location modifier, shouldn't ever need to touch this
eos.config.saveddata_connectionstring = "sqlite:///" + saveDB + "?check_same_thread=False"
eos.config.gamedata_connectionstring = "sqlite:///" + gameDB + "?check_same_thread=False"

View File

@@ -1,11 +1,11 @@
import os.path
from os.path import realpath, join, dirname, abspath
import sys
debug = False
gamedataCache = True
saveddataCache = True
gamedata_connectionstring = 'sqlite:///' + os.path.expanduser(os.path.join("~", ".pyfa","eve.db"))
gamedata_connectionstring = 'sqlite:///' + unicode(realpath(join(dirname(abspath(__file__)), "..", "staticdata", "eve.db")), sys.getfilesystemencoding())
saveddata_connectionstring = 'sqlite:///:memory:'
#Autodetect path, only change if the autodetection bugs out.
path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
path = dirname(unicode(__file__, sys.getfilesystemencoding()))

View File

@@ -75,7 +75,7 @@ from eos.db.saveddata.queries import getUser, getCharacter, getFit, getFitsWithS
getFitList, getFleetList, getFleet, save, remove, commit, add, \
getCharactersForUser, getMiscData, getSquadsIDsWithFitID, getWing, \
getSquad, getBoosterFits, getProjectedFits, getTargetResistsList, getTargetResists,\
clearPrices
clearPrices, countAllFits
#If using in memory saveddata, you'll want to reflect it so the data structure is good.
if config.saveddata_connectionstring == "sqlite:///:memory:":

View File

@@ -8,6 +8,6 @@ import sqlalchemy
def upgrade(saveddata_engine):
try:
saveddata_engine.execute("SELECT mode FROM fits LIMIT 1")
saveddata_engine.execute("SELECT modeID FROM fits LIMIT 1")
except sqlalchemy.exc.DatabaseError:
saveddata_engine.execute("ALTER TABLE fits ADD COLUMN modeID INTEGER")

View File

@@ -0,0 +1,141 @@
"""
Migration 4
- Converts modules based on Proteus Module Tiericide
Some modules have been unpublished (and unpublished module attributes are removed
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/
and output of itemDiff.py
"""
CONVERSIONS = {
506: ( # 'Basic' Capacitor Power Relay
8205, # Alpha Reactor Control: Capacitor Power Relay
8209, # Marked Generator Refitting: Capacitor Power Relay
8203, # Partial Power Plant Manager: Capacity Power Relay
8207, # Type-E Power Core Modification: Capacitor Power Relay
),
8177: ( # Mark I Compact Capacitor Power Relay
8173, # Beta Reactor Control: Capacitor Power Relay I
),
8175: ( # Type-D Restrained Capacitor Power Relay
8171, # Local Power Plant Manager: Capacity Power Relay I
),
421: ( # 'Basic' Capacitor Recharger
4425, # AGM Capacitor Charge Array,
4421, # F-a10 Buffer Capacitor Regenerator
4423, # Industrial Capacitor Recharger
4427, # Secondary Parallel Link-Capacitor
),
4435: ( # Eutectic Compact Cap Recharger
4433, # Barton Reactor Capacitor Recharger I
4431, # F-b10 Nominal Capacitor Regenerator
4437, # Fixed Parallel Link-Capacitor I
),
1315: ( # 'Basic' Expanded Cargohold
5483, # Alpha Hull Mod Expanded Cargo
5479, # Marked Modified SS Expanded Cargo
5481, # Partial Hull Conversion Expanded Cargo
5485, # Type-E Altered SS Expanded Cargo
),
5493: ( # Type-D Restrained Expanded Cargo
5491, # Beta Hull Mod Expanded Cargo
5489, # Local Hull Conversion Expanded Cargo I
5487, # Mark I Modified SS Expanded Cargo
),
1401: ( # 'Basic' Inertial Stabilizers
5523, # Alpha Hull Mod Inertial Stabilizers
5521, # Partial Hull Conversion Inertial Stabilizers
5525, # Type-E Altered SS Inertial Stabilizers
),
5533: ( # Type-D Restrained Inertial Stabilizers
5531, # Beta Hull Mod Inertial Stabilizers
5529, # Local Hull Conversion Inertial Stabilizers I
5527, # Mark I Modified SS Inertial Stabilizers
5519, # Marked Modified SS Inertial Stabilizers
),
5239: ( # EP-S Gaussian Scoped Mining Laser
5241, # Dual Diode Mining Laser I
),
5233: ( # Single Diode Basic Mining Laser
5231, # EP-R Argon Ion Basic Excavation Pulse
5237, # Rubin Basic Particle Bore Stream
5235, # Xenon Basic Drilling Beam
),
5245: ( # Particle Bore Compact Mining Laser
5243, # XeCl Drilling Beam I
),
22619: ( # Frigoris Restrained Ice Harvester Upgrade
22617, # Crisium Ice Harvester Upgrade
),
22611: ( # Elara Restrained Mining Laser Upgrade
22609, # Erin Mining Laser Upgrade
),
1242: ( # 'Basic' Nanofiber Internal Structure
5591, # Alpha Hull Mod Nanofiber Structure
5595, # Marked Modified SS Nanofiber Structure
5559, # Partial Hull Conversion Nanofiber Structure
5593, # Type-E Altered SS Nanofiber Structure
),
5599: ( # Type-D Restrained Nanofiber Structure
5597, # Beta Hull Mod Nanofiber Structure
5561, # Local Hull Conversion Nanofiber Structure I
5601, # Mark I Modified SS Nanofiber Structure
),
1192: ( # 'Basic' Overdrive Injector System
5613, # Alpha Hull Mod Overdrive Injector
5617, # Marked Modified SS Overdrive Injector
5611, # Partial Hull Conversion Overdrive Injector
5615, # Type-E Altered SS Overdrive Injector
),
5631: ( # Type-D Restrained Overdrive Injector
5629, # Beta Hull Mod Overdrive Injector
5627, # Local Hull Conversion Overdrive Injector I
5633, # Mark I Modified SS Overdrive Injector
),
1537: ( # 'Basic' Power Diagnostic System
8213, # Alpha Reactor Control: Diagnostic System
8217, # Marked Generator Refitting: Diagnostic System
8211, # Partial Power Plant Manager: Diagnostic System
8215, # Type-E Power Core Modification: Diagnostic System
8255, # Type-E Power Core Modification: Reaction Control
),
8225: ( # Mark I Compact Power Diagnostic System
8221, # Beta Reactor Control: Diagnostic System I
8219, # Local Power Plant Manager: Diagnostic System I
8223, # Type-D Power Core Modification: Diagnostic System
),
1240: ( # 'Basic' Reinforced Bulkheads
5677, # Alpha Hull Mod Reinforced Bulkheads
5681, # Marked Modified SS Reinforced Bulkheads
5675, # Partial Hull Conversion Reinforced Bulkheads
5679, # Type-E Altered SS Reinforced Bulkheads
),
5649: ( # Mark I Compact Reinforced Bulkheads
5645, # Beta Hull Mod Reinforced Bulkheads
),
5647: ( # Type-D Restrained Reinforced Bulkheads
5643, # Local Hull Conversion Reinforced Bulkheads I
),
}
def upgrade(saveddata_engine):
# Convert modules
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "modules" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))
saveddata_engine.execute('UPDATE "cargo" SET "itemID" = ? WHERE "itemID" = ?', (replacement_item, retired_item))

View File

@@ -0,0 +1,8 @@
"""
Migration 5
Simply deletes damage profiles with a blank name. See GH issue #256
"""
def upgrade(saveddata_engine):
saveddata_engine.execute('DELETE FROM damagePatterns WHERE name LIKE ?', ("",))

View File

@@ -0,0 +1,9 @@
"""
Migration 6
Overwrites damage profile 0 to reset bad uniform values (bad values set with bug)
"""
def upgrade(saveddata_engine):
saveddata_engine.execute('DELETE FROM damagePatterns WHERE name LIKE ? OR ID LIKE ?', ("Uniform", "1"))
saveddata_engine.execute('INSERT INTO damagePatterns VALUES (?, ?, ?, ?, ?, ?, ?)', (1, "Uniform", 25, 25, 25, 25, None))

View File

@@ -267,6 +267,11 @@ def getBoosterFits(ownerID=None, where=None, eager=None):
fits = saveddata_session.query(Fit).options(*eager).filter(filter).all()
return fits
def countAllFits():
with sd_lock:
count = saveddata_session.query(Fit).count()
return count
def countFitsWithShip(shipID, ownerID=None, where=None, eager=None):
"""
Get all the fits using a certain ship.

View File

@@ -1,9 +1,9 @@
# agilityMultiplierEffect
#
# Used by:
# Modules from group: Inertia Stabilizer (12 of 12)
# Modules from group: Nanofiber Internal Structure (14 of 14)
# Modules from group: Reinforced Bulkhead (12 of 12)
# Modules from group: Inertial Stabilizer (7 of 7)
# Modules from group: Nanofiber Internal Structure (7 of 7)
# Modules from group: Reinforced Bulkhead (8 of 8)
type = "passive"
def handler(fit, module, context):
fit.ship.boostItemAttr("agility",

View File

@@ -2,8 +2,8 @@
#
# Used by:
# Modules from group: Capacitor Flux Coil (6 of 6)
# Modules from group: Capacitor Power Relay (26 of 26)
# Modules from group: Power Diagnostic System (31 of 31)
# Modules from group: Capacitor Power Relay (20 of 20)
# Modules from group: Power Diagnostic System (23 of 23)
# Modules from group: Propulsion Module (107 of 107)
# Modules from group: Reactor Control Unit (22 of 22)
# Modules from group: Shield Flux Coil (11 of 11)

View File

@@ -1,9 +1,9 @@
# cargoCapacityMultiply
#
# Used by:
# Modules from group: Expanded Cargohold (13 of 13)
# Modules from group: Overdrive Injector System (14 of 14)
# Modules from group: Reinforced Bulkhead (12 of 12)
# Modules from group: Expanded Cargohold (7 of 7)
# Modules from group: Overdrive Injector System (7 of 7)
# Modules from group: Reinforced Bulkhead (8 of 8)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("capacity", module.getModifiedItemAttr("cargoCapacityMultiplier"))

View File

@@ -6,6 +6,7 @@ gangBonus = "commandBonusTD"
gangBoost = "ewarStrTD"
type = "active", "gang"
def handler(fit, module, context):
if "gang" not in context: return
for bonus in ("maxRangeBonus", "falloffBonus", "trackingSpeedBonus"):
fit.modules.filteredItemBoost(lambda mod: lambda mod: mod.item.requiresSkill("Weapon Disruption"),
bonus, module.getModifiedItemAttr("commandBonusTD"))

View File

@@ -3,6 +3,7 @@
# Used by:
# Ship: Astero
# Ship: Prospect
# Ship: Victorieux Luxury Yacht
type = "passive"
runTime = "early"
def handler(fit, ship, context):

View File

@@ -1,10 +0,0 @@
# eliteReconBonusAssaultLauncherROF1
#
# Used by:
# Ship: Huginn
# Ship: Lachesis
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Rapid Light",
"speed", ship.getModifiedItemAttr("eliteBonusReconShip1") * level)

View File

@@ -1,9 +0,0 @@
# eliteReconBonusHeavyAssaultLauncherROF1
#
# Used by:
# Ship: Huginn
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Heavy Assault",
"speed", ship.getModifiedItemAttr("eliteBonusReconShip1") * level)

View File

@@ -1,10 +0,0 @@
# eliteReconBonusHeavyLauncherROF1
#
# Used by:
# Ship: Huginn
# Ship: Lachesis
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Heavy",
"speed", ship.getModifiedItemAttr("eliteBonusReconShip1") * level)

View File

@@ -0,0 +1,9 @@
# eliteReconBonusMHTOptimalRange1
#
# Used by:
# Ship: Lachesis
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Hybrid Turret"),
"maxRange", ship.getModifiedItemAttr("eliteBonusReconShip1") * level)

View File

@@ -0,0 +1,9 @@
# eliteReconBonusMPTdamage1
#
# Used by:
# Ship: Huginn
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Medium Projectile Turret"),
"damageMultiplier", ship.getModifiedItemAttr("eliteBonusReconShip1") * level)

View File

@@ -0,0 +1,9 @@
# eliteReconBonusNeutRange3
#
# Used by:
# Ship: Pilgrim
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Destabilizer",
"energyDestabilizationRange", ship.getModifiedItemAttr("eliteBonusReconShip3") * level)

View File

@@ -0,0 +1,9 @@
# eliteReconBonusVampRange3
#
# Used by:
# Ship: Pilgrim
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Recon Ships").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Vampire",
"powerTransferRange", ship.getModifiedItemAttr("eliteBonusReconShip3") * level)

View File

@@ -1,7 +1,7 @@
# iceHarvestCycleTimeModulesRequiringIceHarvestingOnline
#
# Used by:
# Variations of module: Ice Harvester Upgrade I (6 of 6)
# Variations of module: Ice Harvester Upgrade I (5 of 5)
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Ice Harvesting"),

View File

@@ -1,7 +1,7 @@
# iceMinerCpuUsagePercent
#
# Used by:
# Variations of module: Ice Harvester Upgrade I (6 of 6)
# Variations of module: Ice Harvester Upgrade I (5 of 5)
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Ice Harvesting"),

View File

@@ -1,7 +1,7 @@
# increaseSignatureRadiusOnline
#
# Used by:
# Modules from group: Inertia Stabilizer (12 of 12)
# Modules from group: Inertial Stabilizer (7 of 7)
type = "passive"
def handler(fit, module, context):
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusBonus"))

View File

@@ -1,7 +1,7 @@
# minerCpuUsageMultiplyPercent2
#
# Used by:
# Variations of module: Mining Laser Upgrade I (6 of 6)
# Variations of module: Mining Laser Upgrade I (5 of 5)
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Mining"),

View File

@@ -2,7 +2,7 @@
#
# Used by:
# Modules from group: Frequency Mining Laser (3 of 3)
# Modules from group: Mining Laser (17 of 17)
# Modules from group: Mining Laser (12 of 12)
# Modules from group: Strip Miner (5 of 5)
type = 'active'
def handler(fit, module, context):

View File

@@ -1,7 +1,7 @@
# miningYieldMultiplyPercent
#
# Used by:
# Variations of module: Mining Laser Upgrade I (6 of 6)
# Variations of module: Mining Laser Upgrade I (5 of 5)
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Mining"),

View File

@@ -1,8 +1,12 @@
# modeAgilityPostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Propulsion Mode
# Modules named like: Propulsion Mode (2 of 2)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("agility", 1/module.getModifiedItemAttr("modeAgilityPostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")
fit.ship.multiplyItemAttr(
"agility",
1 / module.getModifiedItemAttr("modeAgilityPostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -1,15 +1,18 @@
# modeArmorResonancePostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Defense Mode
# Modules named like: Defense Mode (2 of 2)
type = "passive"
def handler(fit, module, context):
for resType in ("Em", "Explosive", "Kinetic"):
fit.ship.multiplyItemAttr("armor{0}DamageResonance".format(resType),
1/module.getModifiedItemAttr("mode{0}ResistancePostDiv".format(resType)),
stackingPenalties = True, penaltyGroup="postDiv")
# Thermal != Thermic
fit.ship.multiplyItemAttr("armorThermalDamageResonance",
1/module.getModifiedItemAttr("modeThermicResistancePostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")
for srcResType, tgtResType in (
("Em", "Em"),
("Explosive", "Explosive"),
("Kinetic", "Kinetic"),
("Thermic", "Thermal")
):
fit.ship.multiplyItemAttr(
"armor{0}DamageResonance".format(tgtResType),
1 / module.getModifiedItemAttr("mode{0}ResistancePostDiv".format(srcResType)),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -0,0 +1,13 @@
# modeMWDSigRadiusPostDiv
#
# Used by:
# Module: Svipul Defense Mode
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemMultiply(
lambda mod: mod.item.requiresSkill("High Speed Maneuvering"),
"signatureRadiusBonus",
1 / module.getModifiedItemAttr("modeMWDSigPenaltyPostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -0,0 +1,18 @@
# modeShieldResonancePostDiv
#
# Used by:
# Module: Svipul Defense Mode
type = "passive"
def handler(fit, module, context):
for srcResType, tgtResType in (
("Em", "Em"),
("Explosive", "Explosive"),
("Kinetic", "Kinetic"),
("Thermic", "Thermal")
):
fit.ship.multiplyItemAttr(
"shield{0}DamageResonance".format(tgtResType),
1 / module.getModifiedItemAttr("mode{0}ResistancePostDiv".format(srcResType)),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -1,9 +1,8 @@
# modeSigRadiusPostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Defense Mode
# Module: Confessor Defense Mode
type = "passive"
def handler(fit, module, context):
level = fit.character.getSkill("Minmatar Destroyer").level
fit.ship.multiplyItemAttr("signatureRadius", 1/module.getModifiedItemAttr("modeSignatureRadiusPostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")

View File

@@ -1,8 +1,12 @@
# modeVelocityPostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Propulsion Mode
# Modules named like: Propulsion Mode (2 of 2)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("maxVelocity", 1/module.getModifiedItemAttr("modeVelocityPostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")
fit.ship.multiplyItemAttr(
"maxVelocity",
1 / module.getModifiedItemAttr("modeVelocityPostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -1,7 +1,7 @@
# modifyMaxVelocityOfShipPassive
#
# Used by:
# Modules from group: Expanded Cargohold (13 of 13)
# Modules from group: Expanded Cargohold (7 of 7)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("maxVelocity", module.getModifiedItemAttr("maxVelocityBonus"),

View File

@@ -2,9 +2,9 @@
#
# Used by:
# Modules from group: Capacitor Flux Coil (6 of 6)
# Modules from group: Capacitor Power Relay (26 of 26)
# Modules from group: Capacitor Recharger (25 of 25)
# Modules from group: Power Diagnostic System (31 of 31)
# Modules from group: Capacitor Power Relay (20 of 20)
# Modules from group: Capacitor Recharger (18 of 18)
# Modules from group: Power Diagnostic System (23 of 23)
# Modules from group: Reactor Control Unit (22 of 22)
# Modules from group: Shield Flux Coil (11 of 11)
# Modules from group: Shield Power Relay (11 of 11)

View File

@@ -2,8 +2,8 @@
#
# Used by:
# Modules from group: Capacitor Flux Coil (6 of 6)
# Modules from group: Capacitor Power Relay (26 of 26)
# Modules from group: Power Diagnostic System (31 of 31)
# Modules from group: Capacitor Power Relay (20 of 20)
# Modules from group: Power Diagnostic System (23 of 23)
# Modules from group: Reactor Control Unit (22 of 22)
# Modules from group: Shield Flux Coil (11 of 11)
# Modules from group: Shield Recharger (6 of 6)

View File

@@ -2,7 +2,7 @@
#
# Used by:
# Ships from group: Assault Frigate (8 of 12)
# Ships from group: Heavy Assault Cruiser (8 of 11)
# Ships from group: Heavy Assault Cruiser (10 of 13)
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"),

View File

@@ -1,7 +1,7 @@
# overloadRofBonus
#
# Used by:
# Modules from group: Energy Weapon (100 of 186)
# Modules from group: Energy Weapon (100 of 187)
# Modules from group: Hybrid Weapon (110 of 202)
# Modules from group: Missile Launcher Citadel (4 of 4)
# Modules from group: Missile Launcher Heavy (12 of 12)

View File

@@ -1,7 +1,7 @@
# overloadSelfDamageBonus
#
# Used by:
# Modules from group: Energy Weapon (86 of 186)
# Modules from group: Energy Weapon (86 of 187)
# Modules from group: Hybrid Weapon (92 of 202)
# Modules from group: Projectile Weapon (86 of 146)
type = "overheat"

View File

@@ -2,8 +2,8 @@
#
# Used by:
# Modules from group: Capacitor Flux Coil (6 of 6)
# Modules from group: Capacitor Power Relay (26 of 26)
# Modules from group: Power Diagnostic System (31 of 31)
# Modules from group: Capacitor Power Relay (20 of 20)
# Modules from group: Power Diagnostic System (23 of 23)
# Modules from group: Reactor Control Unit (22 of 22)
# Modules from group: Shield Flux Coil (11 of 11)
# Modules from group: Shield Power Relay (11 of 11)

View File

@@ -1,7 +1,7 @@
# probeLauncherCPUPercentBonusTacticalDestroyer
#
# Used by:
# Ship: Confessor
# Ships from group: Tactical Destroyer (2 of 2)
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Astrometrics"),

View File

@@ -1,4 +1,4 @@
# energyTransferPowerNeedBonusEffect
# remoteCapacitorTransmitterPowerNeedBonusEffect
#
# Used by:
# Ships from group: Logistics (3 of 5)

View File

@@ -5,7 +5,9 @@
# Module: QA ECCM
type = "active"
def handler(fit, module, context):
for type in ("Gravimetric", "Magnetometric", "Radar", "Ladar"):
fit.ship.boostItemAttr("scan%sStrength" % type,
module.getModifiedItemAttr("scan%sStrengthPercent" % type),
stackingPenalties = True)
for scanType in ("Gravimetric", "Magnetometric", "Radar", "Ladar"):
fit.ship.boostItemAttr(
"scan{}Strength".format(scanType),
module.getModifiedItemAttr("scan{}StrengthPercent".format(scanType)),
stackingPenalties=True
)

View File

@@ -1,7 +1,7 @@
# shieldBoostAmplifier
#
# Used by:
# Modules from group: Capacitor Power Relay (26 of 26)
# Modules from group: Capacitor Power Relay (20 of 20)
# Modules from group: Shield Boost Amplifier (25 of 25)
type = "passive"
def handler(fit, module, context):

View File

@@ -2,8 +2,8 @@
#
# Used by:
# Modules from group: Capacitor Flux Coil (6 of 6)
# Modules from group: Capacitor Power Relay (26 of 26)
# Modules from group: Power Diagnostic System (31 of 31)
# Modules from group: Capacitor Power Relay (20 of 20)
# Modules from group: Power Diagnostic System (23 of 23)
# Modules from group: Reactor Control Unit (22 of 22)
# Modules from group: Shield Flux Coil (11 of 11)
# Modules from group: Shield Power Relay (11 of 11)

View File

@@ -2,6 +2,7 @@
#
# Used by:
# Variations of ship: Dominix (3 of 3)
# Ship: Dominix Quafe Edition
# Ship: Nestor
type = "passive"
def handler(fit, ship, context):

View File

@@ -2,7 +2,7 @@
#
# Used by:
# Ships named like: Stratios (2 of 2)
# Variations of ship: Vexor (3 of 4)
# Ships named like: Vexor (3 of 4)
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level

View File

@@ -2,6 +2,7 @@
#
# Used by:
# Variations of ship: Dominix (3 of 3)
# Ship: Dominix Quafe Edition
# Ship: Nestor
type = "passive"
def handler(fit, ship, context):

View File

@@ -2,7 +2,7 @@
#
# Used by:
# Ships named like: Stratios (2 of 2)
# Variations of ship: Vexor (3 of 4)
# Ships named like: Vexor (3 of 4)
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level

View File

@@ -1,8 +1,8 @@
# shipBonusDroneHitpointsGF
#
# Used by:
# Ships named like: Tristan (2 of 2)
# Ship: Astero
# Ship: Tristan
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Frigate").level

View File

@@ -1,8 +1,7 @@
# shipBonusDroneMiningAmountGC2
#
# Used by:
# Ship: Vexor
# Ship: Vexor Navy Issue
# Ships named like: Vexor (3 of 4)
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level

View File

@@ -2,6 +2,7 @@
#
# Used by:
# Ship: Dominix
# Ship: Dominix Quafe Edition
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Battleship").level

View File

@@ -2,6 +2,7 @@
#
# Used by:
# Ship: Dominix
# Ship: Dominix Quafe Edition
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Battleship").level

View File

@@ -1,7 +1,7 @@
# shipBonusDroneTrackingGF
#
# Used by:
# Ship: Tristan
# Ships named like: Tristan (2 of 2)
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Frigate").level

View File

@@ -1,9 +0,0 @@
# shipBonusHeavyAssaultLauncherRateOfFireCC2
#
# Used by:
# Ship: Rook
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Caldari Cruiser").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Heavy Assault",
"speed", ship.getModifiedItemAttr("shipBonusCC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusHeavyDroneArmorHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Heavy Drone Operation"),
"armorHP", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusHeavyDroneDamageMultiplierGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Heavy Drone Operation"),
"damageMultiplier", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusHeavyDroneHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Heavy Drone Operation"),
"hp", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusHeavyDroneShieldHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Heavy Drone Operation"),
"shieldCapacity", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -1,9 +0,0 @@
# shipBonusHeavyLauncherRateOfFireCC2
#
# Used by:
# Ship: Rook
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Caldari Cruiser").level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Heavy",
"speed", ship.getModifiedItemAttr("shipBonusCC2") * level)

View File

@@ -1,10 +1,10 @@
# shipBonusHybridTrackingGF2
#
# Used by:
# Ships named like: Tristan (2 of 2)
# Ship: Ares
# Ship: Federation Navy Comet
# Ship: Police Pursuit Comet
# Ship: Tristan
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Frigate").level

View File

@@ -0,0 +1,9 @@
# shipBonusLightDroneArmorHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Light Drone Operation"),
"armorHP", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusLightDroneDamageMultiplierGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Light Drone Operation"),
"damageMultiplier", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusLightDroneHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Light Drone Operation"),
"hp", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusLightDroneShieldHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Light Drone Operation"),
"shieldCapacity", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusMediumDroneArmorHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Medium Drone Operation"),
"armorHP", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusMediumDroneDamageMultiplierGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Medium Drone Operation"),
"damageMultiplier", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusMediumDroneHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Medium Drone Operation"),
"hp", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusMediumDroneShieldHPGC2
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Medium Drone Operation"),
"shieldCapacity", ship.getModifiedItemAttr("shipBonusGC2") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusSentryArmorHPGC3
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Sentry Drone Interfacing"),
"armorHP", ship.getModifiedItemAttr("shipBonusGC3") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusSentryDamageMultiplierGC3
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Sentry Drone Interfacing"),
"damageMultiplier", ship.getModifiedItemAttr("shipBonusGC3") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusSentryHPGC3
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Sentry Drone Interfacing"),
"hp", ship.getModifiedItemAttr("shipBonusGC3") * level)

View File

@@ -0,0 +1,9 @@
# shipBonusSentryShieldHPGC3
#
# Used by:
# Ship: Ishtar
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level
fit.drones.filteredItemBoost(lambda drone: drone.item.requiresSkill("Sentry Drone Interfacing"),
"shieldCapacity", ship.getModifiedItemAttr("shipBonusGC3") * level)

View File

@@ -3,6 +3,7 @@
# Used by:
# Ship: Chameleon
# Ship: Gila
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level

View File

@@ -0,0 +1,9 @@
# shipHeatDamageMinmatarTacticalDestroyer3
#
# Used by:
# Ship: Svipul
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Tactical Destroyer").level
fit.modules.filteredItemBoost(lambda mod: True, "heatDamage",
ship.getModifiedItemAttr("shipBonusTacticalDestroyerMinmatar3") * level)

View File

@@ -2,13 +2,11 @@
#
# Used by:
# Ships named like: Thorax (3 of 3)
# Ships named like: Vexor (3 of 4)
# Ship: Adrestia
# Ship: Arazu
# Ship: Deimos
# Ship: Exequror Navy Issue
# Ship: Guardian-Vexor
# Ship: Lachesis
# Ship: Vexor
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Cruiser").level

View File

@@ -1,6 +1,7 @@
# shipHybridTrackingGC
#
# Used by:
# Ship: Lachesis
# Ship: Phobos
type = "passive"
def handler(fit, ship, context):

View File

@@ -0,0 +1,9 @@
# shipMissileBonusEMdmgMC
#
# Used by:
# Ship: Rapier
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Cruiser").level
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"emDamage", ship.getModifiedItemAttr("shipBonusMC") * level)

View File

@@ -0,0 +1,9 @@
# shipMissileBonusExpdmgMC
#
# Used by:
# Ship: Rapier
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Cruiser").level
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"explosiveDamage", ship.getModifiedItemAttr("shipBonusMC") * level)

View File

@@ -0,0 +1,9 @@
# shipMissileBonusKindmgMC
#
# Used by:
# Ship: Rapier
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Cruiser").level
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"kineticDamage", ship.getModifiedItemAttr("shipBonusMC") * level)

View File

@@ -0,0 +1,9 @@
# shipMissileBonusThermdmgMC
#
# Used by:
# Ship: Rapier
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Cruiser").level
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"thermalDamage", ship.getModifiedItemAttr("shipBonusMC") * level)

View File

@@ -2,6 +2,7 @@
#
# Used by:
# Ship: Osprey Navy Issue
# Ship: Rook
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Caldari Cruiser").level

View File

@@ -1,8 +1,12 @@
# shipModeMaxTargetRangePostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Sharpshooter Mode
# Modules named like: Sharpshooter Mode (2 of 2)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("maxTargetRange", 1/module.getModifiedItemAttr("modeMaxTargetRangePostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")
fit.ship.multiplyItemAttr(
"maxTargetRange",
1 / module.getModifiedItemAttr("modeMaxTargetRangePostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -1,8 +1,12 @@
# shipModeScanResPostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Sharpshooter Mode
# Modules named like: Sharpshooter Mode (2 of 2)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("scanResolution", 1/module.getModifiedItemAttr("modeScanResPostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")
fit.ship.multiplyItemAttr(
"scanResolution",
1 / module.getModifiedItemAttr("modeScanResPostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -1,8 +1,13 @@
# shipModeScanStrengthPostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Sharpshooter Mode
# Modules named like: Sharpshooter Mode (2 of 2)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("scanRadarStrength", 1/module.getModifiedItemAttr("modeRadarStrengthPostDiv"),
stackingPenalties = True, penaltyGroup="postDiv")
for scanType in ("Gravimetric", "Magnetometric", "Radar", "Ladar"):
fit.ship.multiplyItemAttr(
"scan{}Strength".format(scanType),
1 / (module.getModifiedItemAttr("mode{}StrengthPostDiv".format(scanType)) or 1),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -1,9 +1,13 @@
# shipModeSETOptimalRangePostDiv
#
# Used by:
# Module: Amarr Tactical Destroyer Sharpshooter Mode
# Module: Confessor Sharpshooter Mode
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemMultiply(lambda mod: mod.item.requiresSkill("Small Energy Turret"),
"maxRange", 1/module.getModifiedItemAttr("modeMaxRangePostDiv"),
stackingPenalties=True, penaltyGroup="postDiv")
fit.modules.filteredItemMultiply(
lambda mod: mod.item.requiresSkill("Small Energy Turret"),
"maxRange",
1 / module.getModifiedItemAttr("modeMaxRangePostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -0,0 +1,13 @@
# shipModeSPTTrackingPostDiv
#
# Used by:
# Module: Svipul Sharpshooter Mode
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemMultiply(
lambda mod: mod.item.requiresSkill("Small Projectile Turret"),
"trackingSpeed",
1 / module.getModifiedItemAttr("modeTrackingPostDiv"),
stackingPenalties=True,
penaltyGroup="postDiv"
)

View File

@@ -6,4 +6,4 @@ type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Gallente Battleship").level
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Large Projectile Turret"),
"falloff", ship.getModifiedItemAttr("shipBonusGB") * level)
"falloff", ship.getModifiedItemAttr("shipBonusGB") * level)

View File

@@ -5,7 +5,6 @@
# Variations of ship: Rupture (3 of 3)
# Variations of ship: Stabber (3 of 3)
# Ship: Huginn
# Ship: Rapier
# Ship: Scythe Fleet Issue
type = "passive"
def handler(fit, ship, context):

View File

@@ -0,0 +1,9 @@
# shipSPTDamageMinmatarTacticalDestroyer1
#
# Used by:
# Ship: Svipul
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Tactical Destroyer").level
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"),
"damageMultiplier", ship.getModifiedItemAttr("shipBonusTacticalDestroyerMinmatar1") * level)

View File

@@ -0,0 +1,9 @@
# shipSPTOptimalMinmatarTacticalDestroyer2
#
# Used by:
# Ship: Svipul
type = "passive"
def handler(fit, ship, context):
level = fit.character.getSkill("Minmatar Tactical Destroyer").level
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"),
"maxRange", ship.getModifiedItemAttr("shipBonusTacticalDestroyerMinmatar2") * level)

View File

@@ -1,8 +1,8 @@
# structureHPMultiply
#
# Used by:
# Modules from group: Nanofiber Internal Structure (14 of 14)
# Modules from group: Reinforced Bulkhead (12 of 12)
# Modules from group: Nanofiber Internal Structure (7 of 7)
# Modules from group: Reinforced Bulkhead (8 of 8)
# Modules named like: QA Multiship Module Players (4 of 4)
type = "passive"
def handler(fit, module, context):

View File

@@ -1,7 +1,7 @@
# structureHPMultiplyPassive
#
# Used by:
# Modules from group: Expanded Cargohold (13 of 13)
# Modules from group: Expanded Cargohold (7 of 7)
type = "passive"
def handler(fit, module, context):
fit.ship.multiplyItemAttr("hp", module.getModifiedItemAttr("structureHPMultiplier"))

View File

@@ -0,0 +1,8 @@
# subsystemBonusCaldariDefensiveShieldRechargeRate
#
# Used by:
# Subsystem: Tengu Defensive - Supplemental Screening
type = "passive"
def handler(fit, module, context):
level = fit.character.getSkill("Caldari Defensive Systems").level
fit.ship.boostItemAttr("shieldRechargeRate", module.getModifiedItemAttr("subsystemBonusCaldariDefensive2") * level)

View File

@@ -3,7 +3,7 @@
# Used by:
# Drones from group: Combat Drone (74 of 74)
# Drones from group: Fighter Drone (4 of 4)
# Modules from group: Energy Weapon (186 of 186)
# Modules from group: Energy Weapon (186 of 187)
type = 'active'
def handler(fit, module, context):
# Set reload time to 1 second

View File

@@ -1,8 +1,8 @@
# velocityBonusOnline
#
# Used by:
# Modules from group: Nanofiber Internal Structure (14 of 14)
# Modules from group: Overdrive Injector System (14 of 14)
# Modules from group: Nanofiber Internal Structure (7 of 7)
# Modules from group: Overdrive Injector System (7 of 7)
type = "passive"
def handler(fit, module, context):
fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("implantBonusVelocity"),

View File

@@ -120,7 +120,12 @@ class Effect(EqBase):
'''
try:
self.__effectModule = effectModule = __import__('eos.effects.' + self.handlerName, fromlist=True)
self.__handler = getattr(effectModule, "handler")
try:
self.__handler = getattr(effectModule, "handler")
except AttributeError:
print "effect {} exists, but no handler".format(self.handlerName)
raise
try:
self.__runTime = getattr(effectModule, "runTime") or "normal"
except AttributeError:
@@ -133,7 +138,7 @@ class Effect(EqBase):
t = t if isinstance(t, tuple) or t is None else (t,)
self.__type = t
except ImportError as e:
except (ImportError, AttributeError) as e:
self.__handler = effectDummy
self.__runTime = "normal"
self.__type = None

View File

@@ -406,12 +406,14 @@ class Fit(object):
(effect.isType("active") and thing.state >= State.ACTIVE):
# Run effect, and get proper bonuses applied
try:
self.register(thing)
effect.handler(self, thing, context)
except:
pass
else:
# Run effect, and get proper bonuses applied
try:
self.register(thing)
effect.handler(self, thing, context)
except:
pass
@@ -735,7 +737,7 @@ class Fit(object):
capAdded = 0
for mod in self.modules:
if mod.state >= State.ACTIVE:
if mod.getModifiedItemAttr("capacitorNeed") != 0:
if (mod.getModifiedItemAttr("capacitorNeed") or 0) != 0:
cycleTime = mod.rawCycleTime or 0
reactivationTime = mod.getModifiedItemAttr("moduleReactivationDelay") or 0
fullCycleTime = cycleTime + reactivationTime

View File

@@ -549,14 +549,14 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU General Public License.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU General Public License,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

View File

@@ -24,7 +24,7 @@ class DamagePattern(ContextMenu):
self.fit = sFit.getFit(fitID)
self.patterns = sDP.getDamagePatternList()
self.patterns.sort(key=lambda p: (p.name not in ["Uniform","Selected Ammo"], p.name))
self.patterns.sort(key=lambda p: (p.name not in ["Uniform", "Selected Ammo"], p.name))
self.patternIds = {}
self.subMenus = OrderedDict()
@@ -71,7 +71,6 @@ class DamagePattern(ContextMenu):
def getSubMenu(self, context, selection, rootMenu, i, pitem):
msw = True if "wxMSW" in wx.PlatformInfo else False
rootMenu.Bind(wx.EVT_MENU, self.handlePatternSwitch) # this bit is required for some reason
if self.m[i] not in self.subMenus:
# if we're trying to get submenu to something that shouldn't have one,
@@ -79,10 +78,11 @@ class DamagePattern(ContextMenu):
# our patternIds mapping, then return None for no submenu
id = pitem.GetId()
self.patternIds[id] = self.singles[i]
rootMenu.Bind(wx.EVT_MENU, self.handlePatternSwitch, pitem)
if self.patternIds[id] == self.fit.damagePattern:
bitmap = bitmapLoader.getBitmap("state_active_small", "icons")
pitem.SetBitmap(bitmap)
return None
return False
sub = wx.Menu()

View File

@@ -53,6 +53,9 @@ class PFGeneralPref ( PreferenceView):
labelSizer.Add( self.cbRackLabels, 0, wx.ALL|wx.EXPAND, 5 )
mainSizer.Add( labelSizer, 0, wx.LEFT|wx.EXPAND, 30 )
self.cbShowTooltip = wx.CheckBox( panel, wx.ID_ANY, u"Show tab tooltips", wx.DefaultPosition, wx.DefaultSize, 0 )
mainSizer.Add( self.cbShowTooltip, 0, wx.ALL|wx.EXPAND, 5 )
defCharSizer = wx.BoxSizer( wx.HORIZONTAL )
self.sFit = service.Fit.getInstance()
@@ -65,6 +68,7 @@ class PFGeneralPref ( PreferenceView):
self.cbRackLabels.SetValue(self.sFit.serviceFittingOptions["rackLabels"] or False)
self.cbCompactSkills.SetValue(self.sFit.serviceFittingOptions["compactSkills"] or False)
self.cbReopenFits.SetValue(self.openFitsSettings["enabled"])
self.cbShowTooltip.SetValue(self.sFit.serviceFittingOptions["showTooltip"] or False)
self.cbGlobalChar.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalCharStateChange)
self.cbGlobalDmgPattern.Bind(wx.EVT_CHECKBOX, self.OnCBGlobalDmgPatternStateChange)
@@ -74,6 +78,7 @@ class PFGeneralPref ( PreferenceView):
self.cbRackLabels.Bind(wx.EVT_CHECKBOX, self.onCBGlobalRackLabels)
self.cbCompactSkills.Bind(wx.EVT_CHECKBOX, self.onCBCompactSkills)
self.cbReopenFits.Bind(wx.EVT_CHECKBOX, self.onCBReopenFits)
self.cbShowTooltip.Bind(wx.EVT_CHECKBOX, self.onCBShowTooltip)
self.cbRackLabels.Enable(self.sFit.serviceFittingOptions["rackSlots"] or False)
@@ -127,6 +132,9 @@ class PFGeneralPref ( PreferenceView):
def onCBReopenFits(self, event):
self.openFitsSettings["enabled"] = self.cbReopenFits.GetValue()
def onCBShowTooltip(self, event):
self.sFit.serviceFittingOptions["showTooltip"] = self.cbShowTooltip.GetValue()
def getImage(self):
return bitmapLoader.getBitmap("prefs_settings", "icons")

Some files were not shown because too many files have changed in this diff Show More