Add version field to campaign descriptor file.

This is used to provide a UI hint to guide players towards campaigns
that have been updated to work with the current version of the game.
All the campaigns we currently have were made for an unknown version of
the game, so they're all flagged as incompatible.

The version field is not the DCS Liberation version number because the
campaign format may change multiple times during development. Instead
the version number is a monotonically increasing integer that we
increment whenever a game change requires campaign updates.
This commit is contained in:
Dan Albert
2021-04-18 17:30:49 -07:00
parent 5e054cfc77
commit 39135f8c80
5 changed files with 68 additions and 10 deletions

View File

@@ -1,8 +1,24 @@
<strong>Author(s): {{ campaign.authors }}</strong>
<br/><br/>
<p><strong>Author(s): {{ campaign.authors }}</strong></p>
<strong>Default factions:</strong>
<span style="color:#82A466">&nbsp;{{campaign.recommended_player_faction}}</span> VS <span style="color:orange">&nbsp;{{campaign.recommended_enemy_faction}}</span>
<br/>
{% if not campaign.version %}
<p><strong style="color:orange">This campaign was created for an unknown version
of the game.</strong></p>
<p>You can still attempt to play this campaign but there may be game breaking
{% elif campaign.is_out_of_date %}
<p><strong style="color:orange">This campaign was created for an older version
of the game.</strong></p>
<p>You can still attempt to play this campaign but there may be game breaking
bugs.</p>
{% elif campaign.is_from_future %}
<p><strong style="color:orange">This campaign was created for a newer version
of the game.</strong></p>
<p>You can still attempt to play this campaign but there may be game breaking
bugs.</p>
{% else %}
<p><strong style="color:#82A466">This campaign is up to date.</strong></p>
{% endif %}
{{ campaign.description|safe }}
<p><strong>Default factions:</strong></p>
<p><span style="color:#82A466">{{campaign.recommended_player_faction}}</span> VS <span style="color:orange">&nbsp;{{campaign.recommended_enemy_faction}}</span></p>
{{ campaign.description|safe }}