forked from halo-battle/game
Ajout d'une étape de linting dans DroneCi (#3)
Corrige un doublons laissé par le rebase semi-manuel Ajout d'une étape de linting dans DroneCi Fix linting Co-authored-by: Nigel Sheldon <nigelsheldon@live.fr> Reviewed-on: https://gitea.nemunai.re/halo-battle/game/pulls/3
This commit is contained in:
parent
5b17a7dbd7
commit
dd61d3b66b
263 changed files with 45327 additions and 42695 deletions
|
|
@ -1,44 +1,46 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ./'.$VAR['first_page']); exit; }
|
||||
if (!defined('INDEX')) {
|
||||
header('Location: ./'.$VAR['first_page']);
|
||||
exit;
|
||||
}
|
||||
$page = 'arbre';
|
||||
$titre = 'Arbre des technologies';
|
||||
|
||||
if (empty($_GET['q']))
|
||||
$_GET['q'] = '';
|
||||
if (empty($_GET['q'])) {
|
||||
$_GET['q'] = '';
|
||||
}
|
||||
$template->assign('defaut', gpc('q'));
|
||||
|
||||
//Récupération et vérification de la race voulue ou définition d'une race par défaut
|
||||
if (empty($_GET['r']) || (gpc('r') != 'humain' && gpc('r') != 'covenant'))
|
||||
$_GET['r'] = $planete->race;
|
||||
if (empty($_GET['r']) || (gpc('r') != 'humain' && gpc('r') != 'covenant')) {
|
||||
$_GET['r'] = $planete->race;
|
||||
}
|
||||
|
||||
$race = gpc('r');
|
||||
$template->assign('raceAff', $race);
|
||||
|
||||
if (SURFACE == "asteroide")
|
||||
{
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->batiments as $id => $batiment)
|
||||
{
|
||||
if (!empty($LANG[$race]["alli_batiments"]["noms_sing"][$id]))
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $batiment,
|
||||
'etat' => dAlliancesBatiments::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
$template->assign('batiments', $TEMP_liste);
|
||||
}
|
||||
else
|
||||
{
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->batiments as $id => $batiment)
|
||||
{
|
||||
if (!empty($LANG[$race]["batiments"]["noms_sing"][$id]))
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $batiment,
|
||||
'etat' => dBatiments::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
$template->assign('batiments', $TEMP_liste);
|
||||
if (SURFACE == "asteroide") {
|
||||
$TEMP_liste = array();
|
||||
foreach ($planete->batiments as $id => $batiment) {
|
||||
if (!empty($LANG[$race]["alli_batiments"]["noms_sing"][$id])) {
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $batiment,
|
||||
'etat' => dAlliancesBatiments::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
$template->assign('batiments', $TEMP_liste);
|
||||
} else {
|
||||
$TEMP_liste = array();
|
||||
foreach ($planete->batiments as $id => $batiment) {
|
||||
if (!empty($LANG[$race]["batiments"]["noms_sing"][$id])) {
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $batiment,
|
||||
'etat' => dBatiments::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
$template->assign('batiments', $TEMP_liste);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -55,37 +57,36 @@ else
|
|||
$template->assign('technologies',$TEMP_technologies);
|
||||
*/
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->casernes as $id => $unite)
|
||||
{
|
||||
if (!empty($LANG[$race]["caserne"]["noms_sing"][$id]))
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $unite,
|
||||
'etat' => dCaserne::needed($id, $planete, true)
|
||||
);
|
||||
foreach ($planete->casernes as $id => $unite) {
|
||||
if (!empty($LANG[$race]["caserne"]["noms_sing"][$id])) {
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $unite,
|
||||
'etat' => dCaserne::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
$template->assign('caserne', $TEMP_liste);
|
||||
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->terrestres as $id => $unite)
|
||||
{
|
||||
if (!empty($LANG[$race]["terrestre"]["noms_sing"][$id]))
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $unite,
|
||||
'etat' => dTerrestre::needed($id, $planete, true)
|
||||
);
|
||||
foreach ($planete->terrestres as $id => $unite) {
|
||||
if (!empty($LANG[$race]["terrestre"]["noms_sing"][$id])) {
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $unite,
|
||||
'etat' => dTerrestre::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
$template->assign('unites', $TEMP_liste);
|
||||
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->vaisseaux as $id => $unite)
|
||||
{
|
||||
if (!empty($LANG[$race]["vaisseaux"]["noms_sing"][$id]))
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $unite,
|
||||
'etat' => dSpatial::needed($id, $planete, true)
|
||||
);
|
||||
foreach ($planete->vaisseaux as $id => $unite) {
|
||||
if (!empty($LANG[$race]["vaisseaux"]["noms_sing"][$id])) {
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $unite,
|
||||
'etat' => dSpatial::needed($id, $planete, true)
|
||||
);
|
||||
}
|
||||
}
|
||||
$template->assign('vaisseaux', $TEMP_liste);
|
||||
|
||||
unset($TEMP_liste, $id, $unite);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue