mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Rename UnitType.name what it is: the variant ID.
This property affects safe compat because the ID is what gets preserved in the save, but it's unfortunately also used as the display name, which means changing the display name breaks save compat. It also prevents us from changing display names without breaking faction definitions. This is the first step in fixing that. The next is adding a separate display_name property that can be updated without breaking either of those.
This commit is contained in:
@@ -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.name} [${unit_type.price}M]",
|
||||
f"{unit_type.variant_id} [${unit_type.price}M]",
|
||||
userData=(unit_type.dcs_unit_type, unit_type.price),
|
||||
)
|
||||
# Add all possible statics with price = 0
|
||||
|
||||
Reference in New Issue
Block a user