Make sure spoolup function works with non-spoolup arguments passed to it

This commit is contained in:
DarkPhoenix
2018-12-10 14:53:46 +03:00
parent aa80a4812d
commit 2d9dcc624c
2 changed files with 14 additions and 15 deletions

View File

@@ -31,6 +31,12 @@ class SpoolType(IntEnum):
def calculateSpoolup(modMaxValue, modStepValue, modCycleTime, spoolType, spoolAmount):
"""
Calculate damage multiplier increment based on passed parameters. Module cycle time
is specified in seconds.
"""
if not modMaxValue or not modStepValue:
return 0
if spoolType == SpoolType.SCALE:
return int(floatUnerr(spoolAmount * modMaxValue / modStepValue)) * modStepValue
elif spoolType == SpoolType.TIME: