forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
72
onyx2/include/game/jeu/arbre.php
Normal file
72
onyx2/include/game/jeu/arbre.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$page = 'arbre';
|
||||
$titre = 'Arbre des technologies';
|
||||
|
||||
if (empty($_GET['q']))
|
||||
$_GET['q'] = '';
|
||||
$template->assign('defaut',$_GET['q']);
|
||||
|
||||
//Récupération et vérification de la race voulue ou définition d'une race par défaut
|
||||
if (empty($_GET['r']) || ($_GET['r'] != 'humain' && $_GET['r'] != 'covenant'))
|
||||
$_GET['r'] = $planete->race;
|
||||
|
||||
$race = $_GET['r'];
|
||||
$template->assign('raceAff', $race);
|
||||
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->batiments as $id => $batiment)
|
||||
{
|
||||
if (!empty($LANG[$race]["batiments"]["noms_sing"][$id]))
|
||||
$TEMP_liste[$id] = array(
|
||||
'niveau' => $batiment,
|
||||
'etat' => Donnee::print_neededBatiments($id, $planete, $race)
|
||||
);
|
||||
}
|
||||
$template->assign('batiments', $TEMP_liste);
|
||||
/*
|
||||
$TEMP_technologies = array();
|
||||
$nb = count($technolo);
|
||||
for ($id=0 ; $id<$nb ; $id++) {
|
||||
if (!empty($technolo[$id])) $TEMP_technologies[] = array(
|
||||
'id' => $id,
|
||||
'nom' => $technolo[$id],
|
||||
'niveau' => $planete->technologies[$id],
|
||||
'etat' => readDeblok($technoloTECH[$id], $planete)
|
||||
);
|
||||
}
|
||||
$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' => Donnee::print_neededCaserne($id, $planete, $race)
|
||||
);
|
||||
}
|
||||
$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' => Donnee::print_neededTerrestre($id, $planete, $race)
|
||||
);
|
||||
}
|
||||
$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' => Donnee::print_neededVaisseaux($id, $planete, $race)
|
||||
);
|
||||
}
|
||||
$template->assign('vaisseaux', $TEMP_liste);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue