Files
pyfa/eos/effects/leech.py
2014-07-30 21:23:27 -04:00

12 lines
422 B
Python

# Used by:
# Modules from group: Energy Vampire (52 of 52)
type = "active", "projected"
runTime = "late"
def handler(fit, module, context):
amount = module.getModifiedItemAttr("powerTransferAmount")
time = module.getModifiedItemAttr("duration")
if "projected" in context:
fit.addDrain(time, amount, 0)
elif "module" in context:
module.itemModifiedAttributes.force("capacitorNeed", -amount)