Adds prettier user-facing aircraft names. (#726)

This makes the names of the aircraft displayed to the player in the UI more verbose and readable.

It allows allows specific countries to display an aircraft's name differently. An example of this would be the JF-17 Thunder, which is known in China as the FC-1 Fierce Dragon - this now displays correctly in the Liberation UI.
This commit is contained in:
Simon Clark
2021-01-05 21:21:38 +00:00
committed by GitHub
parent c3401d478b
commit c740c8304b
12 changed files with 331 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ from PySide2.QtWidgets import (
QWidget,
)
from game.game import Game
from game.game import Game, db
from qt_ui.uiconstants import ICONS
from qt_ui.windows.finances.QFinancesMenu import FinancesLayout
@@ -81,7 +81,7 @@ class AircraftIntelLayout(IntelTableLayout):
for airframe, count in base.aircraft.items():
if not count:
continue
self.add_row(airframe.id, count)
self.add_row(db.unit_pretty_name(game.enemy_country, airframe), count)
self.add_spacer()
self.add_row("<b>Total</b>", total)