Files
pyfa/eos/effects/modulebonusmicrowarpdrive.py
DarkPhoenix a8b1f38e84 Update database and implement ship effects, also make pyfa to show final damage value for disintegrators after ramp-up time is complete
(if you don't want me to commit here just write phoenix@mail.ru, i have no way to communicate with you otherwise)
2018-04-24 19:13:30 +03:00

17 lines
631 B
Python

# moduleBonusMicrowarpdrive
#
# Used by:
# Modules from group: Propulsion Module (68 of 133)
type = "active"
runTime = "late"
def handler(fit, module, context):
fit.ship.increaseItemAttr("mass", module.getModifiedItemAttr("massAddition"))
speedBoost = module.getModifiedItemAttr("speedFactor")
mass = fit.ship.getModifiedItemAttr("mass")
thrust = module.getModifiedItemAttr("speedBoostFactor")
fit.ship.boostItemAttr("maxVelocity", speedBoost * thrust / mass)
fit.ship.boostItemAttr("signatureRadius", module.getModifiedItemAttr("signatureRadiusBonus"),
stackingPenalties=True)