Skip to content

Commit

Permalink
Fixed the strength display in the selected unit pane
Browse files Browse the repository at this point in the history
  • Loading branch information
alberts8 committed Mar 29, 2020
1 parent a6916c4 commit 3415c99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Python/Screens/CvMainInterface.py
Expand Up @@ -3934,12 +3934,12 @@ def updateInfoPaneStrings(self, screen):
if CyUnit.isHurt():
fPercentHP = float(CyUnit.currHitPoints()) / CyUnit.maxHitPoints()
fStrength = strengthBase * fPercentHP
szTxt2 += "%.1f" % fStrength
szTxt2 += self.floatToString(fStrength)
if szTxt2[-1] == "0":
szTxt2 = szTxt2[:-2]
szTxt2 += "/"

szTxt2 += "%.1f" % strengthBase
szTxt2 += self.floatToString(strengthBase)
if szTxt2[-1] == "0":
szTxt2 = szTxt2[:-2]
szTxt2 += self.iconStrength
Expand Down

1 comment on commit 3415c99

@Toffer90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, you found the utility function floatToString that I made in PPIO.
A bit strange I didn't use it there myself, I must have thought %.1f was adequate there for some reason.

Please sign in to comment.