support supported versions that start with v
This commit is contained in:
parent
18bcfe5f92
commit
5c5019dbce
2 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "stellarismodparser"
|
||||
version = "1.0.6"
|
||||
version = "1.0.7"
|
||||
authors = [
|
||||
{ name="cswimr", email="seaswimmerthefsh@gmail.com" },
|
||||
]
|
||||
|
|
|
@ -106,11 +106,13 @@ class Mod:
|
|||
supported_version: Optional[StellarisVersion] = None
|
||||
remote_file_id: Optional[int] = None
|
||||
|
||||
def __post_init__(self):
|
||||
def __post_init__(self) -> None:
|
||||
if self.tags and len(self.tags) > 10:
|
||||
logger.warning("Mod %s has more than 10 tags. This will prevent the mod from being uploaded to the Steam Workshop and Paradox Mods.", self.name)
|
||||
if self.supported_version and isinstance(self.supported_version, str):
|
||||
self.supported_version = StellarisVersion.parse(self.supported_version)
|
||||
if self.supported_version.startswith("v"):
|
||||
self.supported_version = self.supported_version[1:]
|
||||
self.supported_version = StellarisVersion.parse(version=self.supported_version)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
|
Loading…
Reference in a new issue