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

@@ -52,7 +52,7 @@ class QDebriefingWindow(QDialog):
for unit_type, count in player_air_losses.items():
try:
lostUnitsLayout.addWidget(
QLabel(db.unit_type_name(unit_type)), row, 0)
QLabel(db.unit_pretty_name(self.debriefing.player_country, unit_type)), row, 0)
lostUnitsLayout.addWidget(QLabel(str(count)), row, 1)
row += 1
except AttributeError:
@@ -94,7 +94,7 @@ class QDebriefingWindow(QDialog):
for unit_type, count in enemy_air_losses.items():
try:
enemylostUnitsLayout.addWidget(
QLabel(db.unit_type_name(unit_type)), row, 0)
QLabel(db.unit_pretty_name(self.debriefing.enemy_country, unit_type)), row, 0)
enemylostUnitsLayout.addWidget(QLabel(str(count)), row, 1)
row += 1
except AttributeError: