Return 0 instead of -1 when there is no charge on a weapon. It was changed from None to -1 during the py3 conversion (as None can no longer be compared against non-None types). -1 was throwing the capSim off by quite a bit. See #1405

This commit is contained in:
blitzmann
2018-02-18 22:55:31 -05:00
parent 42ccc53166
commit 4bbbd33917

View File

@@ -182,7 +182,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
@property
def numShots(self):
if self.charge is None:
return -1
return 0
if self.__chargeCycles is None and self.charge:
numCharges = self.numCharges
# Usual ammo like projectiles and missiles