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

@@ -76,7 +76,7 @@ class QTgoLayoutGroupRow(QWidget):
# Add all possible units with the price
for unit_type in force_group.unit_types_for_group(group):
self.unit_selector.addItem(
f"{unit_type.variant_id} [${unit_type.price}M]",
f"{unit_type.display_name} [${unit_type.price}M]",
userData=(unit_type.dcs_unit_type, unit_type.price),
)
# Add all possible statics with price = 0