Support campaign version 10.0 for Liberation 5.2.0

- add a new const to the version.py to allow future campaign version to be backwards compatible
- Version 10.0 was only about orientation of ground objects which does not break the compatibility so we can give support for this specific version
This commit is contained in:
RndName 2022-03-26 12:47:02 +01:00
parent 1988836c61
commit 178ae3774e
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
2 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,7 @@ from game.theater import (
SyriaTheater,
MarianaIslandsTheater,
)
from game.version import CAMPAIGN_FORMAT_VERSION
from game.version import CAMPAIGN_FORMAT_VERSION, SUPPORTED_CAMPAIGN_VERSION
from .campaignairwingconfig import CampaignAirWingConfig
from .mizcampaignloader import MizCampaignLoader
from .. import persistency
@ -147,7 +147,7 @@ class Campaign:
@property
def is_from_future(self) -> bool:
"""Returns True if this campaign is newer than the supported format."""
return self.version > CAMPAIGN_FORMAT_VERSION
return self.version > SUPPORTED_CAMPAIGN_VERSION
@property
def is_compatible(self) -> bool:

View File

@ -124,3 +124,6 @@ VERSION = _build_version_string()
#: * Campaign files can optionally define a start date with
#: `recommended_start_date: YYYY-MM-DD`.
CAMPAIGN_FORMAT_VERSION = (9, 1)
# Version 5.2.0 of DCS Liberation also supports Campaigns of Version 10.0
SUPPORTED_CAMPAIGN_VERSION = (10, 0)