Fix ammo picker

This commit is contained in:
blitzmann
2017-11-05 01:54:19 -04:00
parent 6a382c4445
commit 5ae7805bb1

View File

@@ -58,9 +58,9 @@ class ModuleAmmoPicker(ContextMenu):
def turretSorter(self, charge): def turretSorter(self, charge):
damage = 0 damage = 0
range_ = (self.module.getModifiedItemAttr("maxRange") or 0) * \ range_ = (self.module.getModifiedItemAttr("maxRange")) * \
(charge.getAttribute("weaponRangeMultiplier") or 1) (charge.getAttribute("weaponRangeMultiplier") or 1)
falloff = (self.module.getModifiedItemAttr("falloff") or 0) * \ falloff = (self.module.getModifiedItemAttr("falloff")) * \
(charge.getAttribute("fallofMultiplier") or 1) (charge.getAttribute("fallofMultiplier") or 1)
for type_ in self.DAMAGE_TYPES: for type_ in self.DAMAGE_TYPES:
d = charge.getAttribute("%sDamage" % type_) d = charge.getAttribute("%sDamage" % type_)
@@ -137,7 +137,7 @@ class ModuleAmmoPicker(ContextMenu):
hardpoint = self.module.hardpoint hardpoint = self.module.hardpoint
moduleName = self.module.item.name moduleName = self.module.item.name
# Make sure we do not consider mining turrets as combat turrets # Make sure we do not consider mining turrets as combat turrets
if hardpoint == Hardpoint.TURRET and self.module.getModifiedItemAttr("miningAmount") is None: if hardpoint == Hardpoint.TURRET and self.module.getModifiedItemAttr("miningAmount", None) is None:
self.addSeperator(m, "Long Range") self.addSeperator(m, "Long Range")
items = [] items = []
range_ = None range_ = None