12 lines
422 B
Python
Executable File
12 lines
422 B
Python
Executable File
# 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)
|