From ea7bece3b81d1d114e8a40a76fd1a3825b31981f Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 30 Jan 2021 17:23:18 -0800 Subject: [PATCH] Display the TGO's income, not the CPs. --- changelog.md | 1 + qt_ui/widgets/map/QMapGroundObject.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index a26e0b18..8c25e7f7 100644 --- a/changelog.md +++ b/changelog.md @@ -54,6 +54,7 @@ Saves from 2.3 are not compatible with 2.4. * **[UI]** Base intel menu no longer compresses text, and is now scrollable. * **[UI]** Edit Flight window is now dynamically sized to adapt to the width of waypoint names, so they no longer get truncated. * **[UI]** Budget income display is now rounded to 2 decimal places. +* **[UI]** Fixed incorrect income per turn displayed for strike target tooltip. * **[Factions]** USA with C-130 faction now links to the required mod. * **[Campaign]** Fixed issue where destroyed buildings would sometimes not count as destroyed and thus respawn. * **[Campaign]** Fixed issue where destroyed runways were not registered. diff --git a/qt_ui/widgets/map/QMapGroundObject.py b/qt_ui/widgets/map/QMapGroundObject.py index a0f51205..8f5bac11 100644 --- a/qt_ui/widgets/map/QMapGroundObject.py +++ b/qt_ui/widgets/map/QMapGroundObject.py @@ -58,9 +58,9 @@ class QMapGroundObject(QMapObject): @property def production_per_turn(self) -> int: production = 0 - for g in self.control_point.ground_objects: - if g.category in REWARDS.keys(): - production += REWARDS[g.category] + for building in self.buildings: + if building.category in REWARDS.keys(): + production += REWARDS[building.category] return production def paint(self, painter, option, widget=None) -> None: