Compare commits

...

2 Commits

Author SHA1 Message Date
Nigel Sheldon 241d24ef01 La techno expansion peut monter jusqu'au niveau 18, il faut donc la calculer à part, sinon on ne peux pas passer au dessus du niveau 3
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-04-18 19:59:03 +02:00
Nigel Sheldon aad1364170 Ajoute une entrée dans le menu pour aller directement à la techno expansion 2021-04-18 19:58:21 +02:00
2 changed files with 23 additions and 1 deletions

View File

@ -81,14 +81,35 @@ function traiterBranche($onglet, $branche, $start = false)
}
}
//La technologie Expansion peut monter jusqu'au niveau 18 \o/
if ($onglet == 8) {
$i = 1;
while ($i < 18) {
$b = $origin_b;
if ((dTechnologies::idToBit($b + ($i - 1)) & $planete->technologies[$onglet]) &&
isset($LANG[$planete->race]["technologies"]["noms_sing"][$onglet][$b+$i]) &&
$LANG[$planete->race]["technologies"]["noms_sing"][$onglet][$b] ==
$LANG[$planete->race]["technologies"]["noms_sing"][$onglet][$b+$i]) {
//La techno est déjà a ce niveau, on ne fait rien
} else {
$b += ($i - 1);
break;
}
$i++;
}
}
if ($key >= 1) {
$return .= "</dl><dl>";
}
//La techno est au plus haut niveau
if (dTechnologies::idToBit($b) & $planete->technologies[$onglet]) {
$return .= '<dt><a href="#">';
//La techno peut encore être augmentée
} elseif (dTechnologies::idToBit($origin_b) & $planete->technologies[$onglet]) {
$return .= '<dt class="partial"><a href="?p=laboratoire&amp;n='.$onglet.'&amp;t='.$b.'">';
//La techno n'a pas encore été recherchée
} else {
$return .= '<dt class="lack"><a href="?p=laboratoire&amp;n='.$onglet.'&amp;t='.$b.'">';
}

View File

@ -27,6 +27,7 @@
<li><a href="{$menu.laboratoire}&amp;n=4"{if $page == "laboratoire" && $onglet == 4} class="hilight"{/if}>Armement</a></li>
<li><a href="{$menu.laboratoire}&amp;n=5"{if $page == "laboratoire" && ($onglet == 5 || $onglet == 6)} class="hilight"{/if}>Défenses</a></li>
<li><a href="{$menu.laboratoire}&amp;n=7"{if $page == "laboratoire" && $onglet == 7} class="hilight"{/if}>Projets expérimentaux</a></li>
<li><a href="{$menu.laboratoire}&amp;n=8"{if $page == "laboratoire" && $onglet == 8} class="hilight"{/if}>Expansion</a></li>
</ul>
</li>{/if}
<li>
@ -67,4 +68,4 @@
<li><a href="{$menu.bugs}"{if $page == "bugs"} class="hilight"{/if}>Rapports de bug</a></li>
<li><a href="{$menu.faq}"{if $page == "faq" || preg_match('/aide/', $page)} class="#hilight#"{/if}>F.A.Q.</a></li>
<li><a href="{$menu.deconnexion}">Déconnexion</a></li>
</ul>
</ul>