forked from halo-battle/game
Affiche les techno dans l'arbre technologique (ce qui n'était pas le cas, rigolo vu son nom)
This commit is contained in:
parent
977a27f991
commit
6112a55cc0
@ -43,19 +43,40 @@ if (SURFACE == "asteroide") {
|
|||||||
$template->assign('batiments', $TEMP_liste);
|
$template->assign('batiments', $TEMP_liste);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
$TEMP_technologies = array();
|
function traiterBrancheTechnologie($TEMP_liste, $branche, $i)
|
||||||
$nb = count($technolo);
|
{
|
||||||
for ($id=0 ; $id<$nb ; $id++) {
|
global $LANG, $planete;
|
||||||
if (!empty($technolo[$id])) $TEMP_technologies[] = array(
|
|
||||||
|
foreach ($i as $key => $id) {
|
||||||
|
if (is_array($id)) {
|
||||||
|
$TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, $id);
|
||||||
|
} else {
|
||||||
|
$niveau = dTechnologies::niveau_du_joueur($branche, $id, $planete);
|
||||||
|
$niveau_max = dTechnologies::niveau_max($branche, $id, $planete, $LANG);
|
||||||
|
|
||||||
|
$object = array($branche, $id);
|
||||||
|
$TEMP_liste[$branche][$id] = array(
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'nom' => $technolo[$id],
|
'branche' => $branche,
|
||||||
'niveau' => $planete->technologies[$id],
|
'niveau' => $niveau,
|
||||||
'etat' => readDeblok($technoloTECH[$id], $planete)
|
'niveau_max' => $niveau_max,
|
||||||
|
'etat' => dTechnologies::needed($object, $planete, true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$template->assign('technologies',$TEMP_technologies);
|
}
|
||||||
*/
|
return $TEMP_liste;
|
||||||
|
}
|
||||||
|
|
||||||
|
$TEMP_liste = array();
|
||||||
|
$branche = 0;
|
||||||
|
while ($branche < 9) {
|
||||||
|
$TEMP_liste[$branche] = array();
|
||||||
|
$TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, dTechnologies::type($branche, $planete->race));
|
||||||
|
$branche++;
|
||||||
|
}
|
||||||
|
$template->assign('technologies', $TEMP_liste);
|
||||||
|
|
||||||
$TEMP_liste = array();
|
$TEMP_liste = array();
|
||||||
foreach ($planete->casernes as $id => $unite) {
|
foreach ($planete->casernes as $id => $unite) {
|
||||||
if (!empty($LANG[$race]["caserne"]["noms_sing"][$id])) {
|
if (!empty($LANG[$race]["caserne"]["noms_sing"][$id])) {
|
||||||
|
@ -18,15 +18,20 @@
|
|||||||
</tbody></table></div>
|
</tbody></table></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{*} <div{if $defaut == 'technologies'} class="hightlight"{/if}><a href="{$menu.arbre}&q=technologies&r={$raceAff}">Technologies</a>
|
<div{if $defaut == 'technologies'} class="hightlight"{/if}><a href="{$menu.arbre}&q=technologies&r={$raceAff}">Technologies</a>
|
||||||
<div><table><thead>
|
<div><table><thead>
|
||||||
<tr><th>Technologies (niveau)</th><th>Technologies nécessaires (niveau actuel)</th></tr>
|
<tr><th>Branche</th><th>Technologies (niveau)</th><th>Technologies nécessaires (niveau actuel)</th></tr>
|
||||||
</thead><tbody>
|
</thead><tbody>
|
||||||
|
{counter start=0 assign=branche print=false}
|
||||||
{foreach from=$technologies item=technologie}
|
{foreach from=$technologies item=technologie}
|
||||||
<tr><td><a href="?p=description&t={$technologie.id}&r={$raceAff}#menu">{$technologie.nom}</a> ({$technologie.niveau}) :</td><td>{$technologie.etat}</td></tr>
|
{foreach from=$technologies[$branche] item=technologie}
|
||||||
|
{assign var="id" value=$technologie.id}
|
||||||
|
<tr><td>{$LANG[$raceAff].technologies.branches.$branche|ucfirst}</td><td><a href="?p=description&b={$branche}&t={$id}&r={$raceAff}#menu">{$LANG[$raceAff].technologies.noms_sing.$branche.$id|ucfirst}</a> ({$technologie.niveau}/{$technologie.niveau_max}) :</td><td>{$technologie.etat}</td></tr>
|
||||||
|
{/foreach}
|
||||||
|
{counter}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody></table></div>
|
</tbody></table></div>
|
||||||
</div>{/*}
|
</div>
|
||||||
|
|
||||||
<div{if $defaut == 'caserne'} class="hightlight"{/if}><a href="{$menu.arbre}&q=caserne&r={$raceAff}">{$LANG[$raceAff].batiments.noms_sing.9|ucfirst}</a>
|
<div{if $defaut == 'caserne'} class="hightlight"{/if}><a href="{$menu.arbre}&q=caserne&r={$raceAff}">{$LANG[$raceAff].batiments.noms_sing.9|ucfirst}</a>
|
||||||
<div><table><thead>
|
<div><table><thead>
|
||||||
|
Loading…
Reference in New Issue
Block a user