From e79f97964a1ca3eeca9da6d044b32807d1910e58 Mon Sep 17 00:00:00 2001 From: StormDelay Date: Tue, 20 May 2025 18:30:08 +0200 Subject: [PATCH] Bombing: always round up the number of bomb to the higher first decimal place to avoid misleading display i.e. 7.03 displays 7.1 and not 7.0 --- gui/builtinStatsViews/bombingViewFull.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/builtinStatsViews/bombingViewFull.py b/gui/builtinStatsViews/bombingViewFull.py index e0fbbeb46..e938a8af4 100644 --- a/gui/builtinStatsViews/bombingViewFull.py +++ b/gui/builtinStatsViews/bombingViewFull.py @@ -19,6 +19,7 @@ # noinspection PyPackageRequirements import wx +import math import gui.mainFrame from gui.bitmap_loader import BitmapLoader @@ -148,7 +149,7 @@ class BombingViewFull(StatsView): (min(bomb.attributes['signatureRadius'].value, shipSigRadius) / bomb.attributes['signatureRadius'].value) label = getattr(self, "labelDamagetypeCovertlevel%s%s" % (damageType.capitalize(), covertLevel)) - label.SetLabel("{:.1f}".format(ehp / appliedBombDamage)) + label.SetLabel("{:.1f}".format(math.ceil((ehp / appliedBombDamage) * 10) / 10)) if covertLevel is not "0": label.SetToolTip("Number of %s to kill a %s using a %s " "with Covert Ops level %s" % (bomb.customName, fit.name, bomber, covertLevel))