Bunch of pep8 and inspection cleanup

This commit is contained in:
Ebag333
2016-12-15 12:43:19 -08:00
parent 658a87cbc0
commit 4fb07cc1d0
24 changed files with 105 additions and 93 deletions

View File

@@ -208,6 +208,7 @@ def getFit(lookfor, eager=None):
return fit
def getFitsWithShip(shipID, ownerID=None, where=None, eager=None):
"""
Get all the fits using a certain ship.
@@ -284,6 +285,7 @@ def getFitList(eager=None):
return fits
@cachedQuery(Price, 1, "typeID")
def getPrice(typeID):
if isinstance(typeID, int):
@@ -407,6 +409,7 @@ def searchFits(nameLike, where=None, eager=None):
return fits
def getProjectedFits(fitID):
if isinstance(fitID, int):
with sd_lock:

View File

@@ -1,5 +1,7 @@
# Not used by any item
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Information Command Specialist"),
"commandBonusHidden", module.getModifiedItemAttr("eliteBonusCommandShips3"), skill="Command Ships")

View File

@@ -5,8 +5,7 @@ type = "active", "projected"
def handler(fit, src, context):
if "projected" in context and (
(hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
if "projected" in context and ((hasattr(src, "state") and src.state >= State.ACTIVE) or hasattr(src, "amountActive")):
multiplier = src.amountActive if hasattr(src, "amountActive") else 1
amount = src.getModifiedItemAttr("energyNeutralizerAmount")
time = src.getModifiedItemAttr("duration")

View File

@@ -4,7 +4,8 @@ runTime = "late"
def handler(fit, module, context):
if "projected" not in context: return
if "projected" not in context:
return
bonus = module.getModifiedItemAttr("structureDamageAmount")
duration = module.getModifiedItemAttr("duration") / 1000.0
fit.extraAttributes.increase("hullRepair", bonus / duration)

View File

@@ -12,5 +12,5 @@ def handler(fit, module, context):
mod.charge.requiresSkill("Light Missiles"),
"{}Damage".format(type),
1 / module.getModifiedItemAttr("modeDamageBonusPostDiv"),
stackingPenalties = True,
stackingPenalties=True,
penaltyGroup="postDiv")

View File

@@ -6,8 +6,8 @@ type = "active", "projected"
def handler(fit, container, context):
amount = 0
if "projected" in context and ((hasattr(container, "state")
and container.state >= State.ACTIVE) or hasattr(container, "amountActive")):
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(container, time, amount, 0)
if "projected" in context:
if (hasattr(container, "state") and container.state >= State.ACTIVE) or hasattr(container, "amountActive"):
amount = container.getModifiedItemAttr("energyNeutralizerAmount")
time = container.getModifiedItemAttr("duration")
fit.addDrain(container, time, amount, 0)

View File

@@ -3,6 +3,7 @@ type = "active", "projected"
def handler(fit, module, context):
if "projected" not in context: return
if "projected" not in context:
return
fit.ship.boostItemAttr("maxVelocity", module.getModifiedItemAttr("speedFactor"),
stackingPenalties=True, remoteResists=True)

View File

@@ -1,5 +1,7 @@
# Not used by any item
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Information Command Specialist"),
"commandBonusHidden", module.getModifiedItemAttr("subsystemBonusAmarrDefensive"), skill="Amarr Defensive Systems")

View File

@@ -1,5 +1,7 @@
# Not used by any item
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Information Command Specialist"),
"commandBonusHidden", module.getModifiedItemAttr("subsystemBonusCaldariDefensive"), skill="Caldari Defensive Systems")

View File

@@ -1,5 +1,7 @@
# Not used by any item
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Information Command Specialist"),
"commandBonusHidden", module.getModifiedItemAttr("subsystemBonusGallenteDefensive"), skill="Gallente Defensive Systems")

View File

@@ -2,6 +2,7 @@
type = "passive"
runTime = "late"
def handler(fit, module, context):
for x in xrange(1, 4):
module.boostChargeAttr("warfareBuff{}Multiplier".format(x), module.getModifiedItemAttr("commandBurstStrengthBonus"))