Make units selectable in faction overview during campaign gen

Resolves #35
Resolves #40
This commit is contained in:
Raffson
2022-12-31 23:25:26 +01:00
parent cd4ace4ad5
commit 192741af36
6 changed files with 145 additions and 120 deletions

View File

@@ -76,7 +76,7 @@
"Paratrooper AKS",
"Paratrooper RPG-16"
],
"missiles": [
"missiles": [
"SSM SS-1C Scud-B"
],
"preset_groups": [

View File

@@ -1,62 +1,4 @@
{{ faction.description|safe }}
<strong>Description:</strong> {{ faction.description|safe }}
<br/>
<strong>Author(s):</strong> {{ faction.authors }}
<br/><br/>
<strong>Potential aircraft:</strong>
<p>
The aircraft that will be present in the game are specified by the campaign.
Only aircraft in this list will be allowed, but not all aircraft in this
list will necessarily be available.
</p>
<p>
If the campaign you chose doesn't include the aircraft you want to fly, you
can mod the campaign by following the squadron section of the
<a style="color: #ffffff"
href="https://github.com/dcs-liberation/dcs_liberation/wiki/Custom-Campaigns#squadron-configuration">
custom campaigns guide</a>.
</p>
<ul>
{% for aircraft in faction.aircrafts | sort(attribute="name") %}
<li>{{aircraft.name}}</li>
{% endfor %}
</ul>
<br/>
<strong>Frontlines vehicles:</strong>
<ul>
{% for vehicle in faction.frontline_units | sort(attribute="name") %}
<li>
{% if vehicle.name is not none %}
{{ vehicle.name }}
{% else %}
{{ vehicle.id }}
{%endif %}
</li>
{% endfor %}
</ul>
<br/>
<strong>Artillery units:</strong>
<ul>
{% for arty in faction.artillery_units | sort(attribute="name") %}
<li>
{% if arty.name is not none %}
{{ arty.name }}
{% else %}
{{ arty.id }}
{%endif %}
</li>
{% endfor %}
</ul>
<br/>
<strong>Air defenses:</strong>
<ul>
{% for air_defense in faction.air_defenses | sort() %}
<li>{{air_defense}}</li>
{% endfor %}
</ul>
<br/>

View File

@@ -1,50 +1,4 @@
{{ faction.description|safe }}
<strong>Description:</strong> {{ faction.description|safe }}
<br/>
<strong>Auteur(s):</strong> {{ faction.authors }}
<br/><br/>
<strong>Aéronefs disponibles :</strong>
<ul>
{% for aircraft in faction.aircrafts | sort(attribute="name") %}
<li>{{aircraft.name}}</li>
{% endfor %}
</ul>
<br/>
<strong>Véhicules disponibles :</strong>
<ul>
{% for vehicle in faction.frontline_units | sort(attribute="name") %}
<li>
{% if vehicle.name is not none %}
{{ vehicle.name }}
{% else %}
{{ vehicle.id }}
{%endif %}
</li>
{% endfor %}
</ul>
<br/>
<strong>Pièces d'artillerie :</strong>
<ul>
{% for arty in faction.artillery_units | sort(attribute="name") %}
<li>
{% if arty.name is not none %}
{{ arty.name }}
{% else %}
{{ arty.id }}
{%endif %}
</li>
{% endfor %}
</ul>
<br/>
<strong>Défense Sol-Air:</strong>
<ul>
{% for air_defense in faction.air_defenses | sort() %}
<li>{{air_defense}}</li>
{% endfor %}
</ul>
<br/>
<strong>Auteur(s):</strong> {{ faction.authors }}