Reduce confusion with number of cycles vs charges

This commit is contained in:
blitzmann
2015-09-26 19:17:22 -04:00
parent c751544560
commit e07c162453

View File

@@ -32,15 +32,16 @@ class Ammo(ViewColumn):
def getText(self, stuff): def getText(self, stuff):
if getattr(stuff, "charge", None) is not None: if getattr(stuff, "charge", None) is not None:
shots = stuff.numShots charges = stuff.numCharges
if shots > 0: if charges > 0:
text = "%s (%s)" % (stuff.charge.name, stuff.numShots) cycles = stuff.numShots
if charges != cycles:
return "%s (%d, %d cycles)" % (stuff.charge.name, charges, cycles)
else:
return "%s (%d)" % (stuff.charge.name, charges)
else: else:
text = stuff.charge.name return stuff.charge.name
else: return ""
text = ""
return text
def getImageId(self, mod): def getImageId(self, mod):
return -1 return -1