Cherry pick d033e4a8d919664d3ae210098291e38df71d3256

This commit is contained in:
Ebag333
2017-02-15 17:23:53 -08:00
parent 0dc3eda99f
commit 93e7b4f5cf
3 changed files with 163 additions and 1 deletions

View File

@@ -701,6 +701,15 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
else:
return 0
def getAmountPerSec(self, attribute):
amount = self.getModifiedItemAttr(attribute)
if not amount:
return 0
cycleTime = self.cycleTime
if not cycleTime:
return 0
return float(amount) * 1000 / cycleTime
def __deepcopy__(self, memo):
item = self.item
if item is None: