Fix some mining effects

This commit is contained in:
blitzmann
2015-10-05 20:37:41 -04:00
parent f17fb82ce7
commit a67b46bb9a
7 changed files with 13 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
# crystalMiningamountInfo2
#
# Used by:
# Modules from group: Frequency Mining Laser (3 of 3)
type = "passive"
def handler(fit, module, context):
module.preAssignItemAttr("specialtyMiningAmount", module.getModifiedItemAttr("miningAmount"))

View File

@@ -3,6 +3,7 @@
# Used by: # Used by:
# Module: Medium Mercoxit Mining Crystal Optimization I # Module: Medium Mercoxit Mining Crystal Optimization I
type = "passive" type = "passive"
runTime="early"
def handler(fit, module, context): def handler(fit, module, context):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Mercoxit Processing"), fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Mercoxit Processing"),
"specialisationAsteroidYieldMultiplier", module.getModifiedItemAttr("miningAmountBonus")) "specialisationAsteroidYieldMultiplier", module.getModifiedItemAttr("miningAmountBonus"))

View File

@@ -5,4 +5,4 @@
# Charges named like: Mining Crystal (32 of 32) # Charges named like: Mining Crystal (32 of 32)
type = "passive" type = "passive"
def handler(fit, module, context): def handler(fit, module, context):
module.multiplyItemAttr("miningAmount", module.getModifiedChargeAttr("specialisationAsteroidYieldMultiplier")) module.multiplyItemAttr("specialtyMiningAmount", module.getModifiedChargeAttr("specialisationAsteroidYieldMultiplier"))

View File

@@ -1,7 +1,7 @@
# missileSkillRapidLauncherRoF # missileSkillRapidLauncherRoF
# #
# Used by: # Used by:
# Implants named like: Cerebral Accelerator (3 of 5) # Implants named like: Cerebral Accelerator (5 of 5)
# Implants named like: Zainou 'Deadeye' Rapid Launch RL (6 of 6) # Implants named like: Zainou 'Deadeye' Rapid Launch RL (6 of 6)
# Implant: Whelan Machorin's Ballistic Smartlink # Implant: Whelan Machorin's Ballistic Smartlink
# Skill: Missile Launcher Operation # Skill: Missile Launcher Operation

View File

@@ -1,7 +1,7 @@
# surgicalStrikeDamageMultiplierBonusPostPercentDamageMultiplierLocationShipModulesRequiringGunnery # surgicalStrikeDamageMultiplierBonusPostPercentDamageMultiplierLocationShipModulesRequiringGunnery
# #
# Used by: # Used by:
# Implants named like: Cerebral Accelerator (3 of 5) # Implants named like: Cerebral Accelerator (5 of 5)
# Implants named like: Eifyr and Co. 'Gunslinger' Surgical Strike SS (6 of 6) # Implants named like: Eifyr and Co. 'Gunslinger' Surgical Strike SS (6 of 6)
type = "passive" type = "passive"
def handler(fit, implant, context): def handler(fit, implant, context):

View File

@@ -316,7 +316,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
self.__miningyield = 0 self.__miningyield = 0
else: else:
if self.state >= State.ACTIVE: if self.state >= State.ACTIVE:
volley = sum(map(lambda attr: self.getModifiedItemAttr(attr) or 0, self.MINING_ATTRIBUTES)) volley = self.getModifiedItemAttr("specialtyMiningAmount") or self.getModifiedItemAttr("miningAmount") or 0
if volley: if volley:
cycleTime = self.cycleTime cycleTime = self.cycleTime
self.__miningyield = volley / (cycleTime / 1000.0) self.__miningyield = volley / (cycleTime / 1000.0)

View File

@@ -374,7 +374,7 @@ class Miscellanea(ViewColumn):
tooltip = "Optimal signature radius" tooltip = "Optimal signature radius"
return text, tooltip return text, tooltip
elif itemGroup in ("Frequency Mining Laser", "Strip Miner", "Mining Laser", "Gas Cloud Harvester"): elif itemGroup in ("Frequency Mining Laser", "Strip Miner", "Mining Laser", "Gas Cloud Harvester"):
miningAmount = stuff.getModifiedItemAttr("miningAmount") miningAmount = stuff.getModifiedItemAttr("specialtyMiningAmount") or stuff.getModifiedItemAttr("miningAmount")
cycleTime = stuff.cycleTime cycleTime = stuff.cycleTime
if not miningAmount or not cycleTime: if not miningAmount or not cycleTime:
return "", None return "", None