Merge pull request #1495 from Neugeniko/Issue#1482-2

Fix cap use for non repeatable modules.
This commit is contained in:
Ryan Holmes
2018-03-22 00:58:16 -04:00
committed by GitHub

View File

@@ -720,7 +720,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
# Module can only fire one shot at a time, think bomb launchers or defender launchers
if self.disallowRepeatingAction:
if numShots > 1:
if numShots > 0:
"""
The actual mechanics behind this is complex. Behavior will be (for 3 ammo):
fire, reactivation delay, fire, reactivation delay, fire, max(reactivation delay, reload)
@@ -736,6 +736,7 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
Applies to MJD/MJFG
"""
effective_reload_time = max(raw_reload_time, self.reactivationDelay, 0)
speed = speed + effective_reload_time
else:
"""
Currently no other modules would have a reactivation delay, so for sanities sake don't try and account for it.