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(
|
|
||||||
'id' => $id,
|
foreach ($i as $key => $id) {
|
||||||
'nom' => $technolo[$id],
|
if (is_array($id)) {
|
||||||
'niveau' => $planete->technologies[$id],
|
$TEMP_liste = traiterBrancheTechnologie($TEMP_liste, $branche, $id);
|
||||||
'etat' => readDeblok($technoloTECH[$id], $planete)
|
} else {
|
||||||
);
|
$niveau = dTechnologies::niveau_du_joueur($branche, $id, $planete);
|
||||||
}
|
$niveau_max = dTechnologies::niveau_max($branche, $id, $planete, $LANG);
|
||||||
$template->assign('technologies',$TEMP_technologies);
|
|
||||||
*/
|
$object = array($branche, $id);
|
||||||
|
$TEMP_liste[$branche][$id] = array(
|
||||||
|
'id' => $id,
|
||||||
|
'branche' => $branche,
|
||||||
|
'niveau' => $niveau,
|
||||||
|
'niveau_max' => $niveau_max,
|
||||||
|
'etat' => dTechnologies::needed($object, $planete, true)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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>
|
||||||
@ -58,4 +63,4 @@
|
|||||||
</tbody></table></div>
|
</tbody></table></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include file='game/footer.tpl'}
|
{include file='game/footer.tpl'}
|
||||||
|
Loading…
Reference in New Issue
Block a user