MàJ des descriptions des tech covies pour les vaisseaux et affichage des bons noms
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Nigel Sheldon 2021-01-27 18:40:32 +01:00
parent 4fedde4cf9
commit 2269a56ce5
6 changed files with 23 additions and 21 deletions

View File

@ -87,10 +87,12 @@ class dDonnees
} }
} }
public static function print_neededCheck($tableau, surface $planete) public static function print_neededCheck($tableau, surface $planete, $race = null)
{ {
global $LANG; global $LANG;
$race = $planete->race; if ($race == null) {
$race = $planete->race;
}
if (!is_array($tableau)) { if (!is_array($tableau)) {
return 'Débloqué'; return 'Débloqué';
} else { } else {

View File

@ -727,7 +727,7 @@ class dSpatial implements Donnees
} }
if ($print) { if ($print) {
return dDonnees::print_neededCheck($neededSpatial[$id], $planete); return dDonnees::print_neededCheck($neededSpatial[$id], $planete, $race);
} else { } else {
return dDonnees::neededCheck($neededSpatial[$id], $planete); return dDonnees::neededCheck($neededSpatial[$id], $planete);
} }

View File

@ -1678,7 +1678,7 @@ class dTechnologies implements Donnees
} }
if ($print) { if ($print) {
return dDonnees::print_neededCheck($tableau[$object[1]], $planete); return dDonnees::print_neededCheck($tableau[$object[1]], $planete, $race);
} else { } else {
return dDonnees::neededCheck($tableau[$object[1]], $planete); return dDonnees::neededCheck($tableau[$object[1]], $planete);
} }

View File

@ -738,7 +738,7 @@ class dTerrestre implements Donnees
} }
if ($print) { if ($print) {
return dDonnees::print_neededCheck($neededTerrestre[$id], $planete); return dDonnees::print_neededCheck($neededTerrestre[$id], $planete, $race);
} else { } else {
return dDonnees::neededCheck($neededTerrestre[$id], $planete); return dDonnees::neededCheck($neededTerrestre[$id], $planete);
} }

View File

@ -44,13 +44,13 @@ if (SURFACE == "asteroide") {
} }
function traiterBrancheTechnologie($TEMP_liste, $branche, $i) function traiterBrancheTechnologie($TEMP_liste, $branche, $i, $race)
{ {
global $LANG, $planete; global $LANG, $planete;
foreach ($i as $key => $id) { foreach ($i as $key => $id) {
if (is_array($id)) { if (is_array($id)) {
$TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, $id); $TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, $id, $race);
} else { } else {
$niveau = dTechnologies::niveau_du_joueur($branche, $id, $planete); $niveau = dTechnologies::niveau_du_joueur($branche, $id, $planete);
$niveau_max = dTechnologies::niveau_max($branche, $id, $planete, $LANG); $niveau_max = dTechnologies::niveau_max($branche, $id, $planete, $LANG);
@ -61,7 +61,7 @@ function traiterBrancheTechnologie($TEMP_liste, $branche, $i)
'branche' => $branche, 'branche' => $branche,
'niveau' => $niveau, 'niveau' => $niveau,
'niveau_max' => $niveau_max, 'niveau_max' => $niveau_max,
'etat' => dTechnologies::needed($object, $planete, true) 'etat' => dTechnologies::needed($object, $planete, true, $race)
); );
} }
} }
@ -72,7 +72,7 @@ $TEMP_liste = array();
$branche = 0; $branche = 0;
while ($branche < 9) { while ($branche < 9) {
$TEMP_liste[$branche] = array(); $TEMP_liste[$branche] = array();
$TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, dTechnologies::type($branche, $planete->race)); $TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, dTechnologies::type($branche, $planete->race), $race);
$branche++; $branche++;
} }
$template->assign('technologies', $TEMP_liste); $template->assign('technologies', $TEMP_liste);

View File

@ -870,20 +870,20 @@
</var> </var>
<var name="7"> <var name="7">
<var name="0">Prototype Intercepteur Longsword</var> <var name="0">Prototype Intercepteur Longsword</var>
<var name="1">Prototype Bombardier Longsword</var> <var name="1">Prototype Séraphin</var>
<var name="2">Corvette de classe Mako</var> <var name="2">Prototype de chasseur lourd Tarasque</var>
<var name="3">Prototype de Frégate</var> <var name="3">Prototype de bombardier Gigas</var>
<var name="4">Récupération</var> <var name="4">Récupération</var>
<var name="5">Prototype de Destroyer</var> <var name="5">Prototype de Destroyer</var>
<var name="6">Prototype de Croiseur de classe Halcyon</var> <var name="6">Prototype de Destroyer de classe CVP</var>
<var name="7">Prototype de Croiseur de classe Marathon</var> <var name="7">Prototype de Croiseur de classe CCS</var>
<var name="8">Prototype de Porte-vaisseaux</var> <var name="8">Prototype de Croiseur de classe Révérence</var>
<var name="9">Prototype de Super Porte-Vaisseaux</var> <var name="9">Prototype de Cuirassé</var>
<var name="10">Prototype de Vaisseau d'exfiltration de classe Black Cat</var> <var name="10">Prototype de Super croiseur</var>
<var name="11">Prototype de Super canon à accélération magnétique</var> <var name="11">Prototype de Porte-vaisseau</var>
<var name="12">Bunker souterrain</var> <var name="12">Prototype de Porte-vaisseau lourd</var>
<var name="13">Bunker souterrain</var> <var name="13">Prototype de station orbitale</var>
<var name="14">Bunker souterrain</var> <var name="14">Prototype de ...</var>
</var> </var>
<var name="8"> <var name="8">
<var name="0">Expansion</var> <var name="0">Expansion</var>