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

@@ -20,6 +20,7 @@ DcsUnitTypeT = TypeVar("DcsUnitTypeT", bound=Type[DcsUnitType])
class UnitType(ABC, Generic[DcsUnitTypeT]):
dcs_unit_type: DcsUnitTypeT
variant_id: str
display_name: str
description: str
year_introduced: str
country_of_origin: str
@@ -31,7 +32,7 @@ class UnitType(ABC, Generic[DcsUnitTypeT]):
_loaded: ClassVar[bool] = False
def __str__(self) -> str:
return self.variant_id
return self.display_name
@property
def dcs_id(self) -> str: