Add display name property for unit types.

Unlike the variant ID, this can be changed without breaking save compat.
This commit is contained in:
Dan Albert
2023-08-09 21:41:51 -07:00
committed by Raffson
parent 0ec375ad89
commit f5f11ff3ac
18 changed files with 45 additions and 32 deletions

View File

@@ -66,7 +66,7 @@ class QUnitInfoWindow(QDialog):
self.setModal(True)
self.game = game
self.unit_type = unit_type
self.name = unit_type.variant_id
self.name = unit_type.display_name
self.setWindowTitle(f"Unit Info: {self.name}")
self.setWindowIcon(QIcon("./resources/icon.png"))
self.setMinimumHeight(570)
@@ -93,7 +93,7 @@ class QUnitInfoWindow(QDialog):
self.details_grid_layout.setMargin(0)
self.name_box = QLabel(
f"<b>Name:</b> {unit_type.manufacturer} {unit_type.variant_id}"
f"<b>Name:</b> {unit_type.manufacturer} {unit_type.display_name}"
)
self.name_box.setProperty("style", "info-element")