From 9805b58f2bc3e92e2770fc3d1d5e566c36c6ffae Mon Sep 17 00:00:00 2001 From: Nigel Sheldon Date: Sun, 18 Apr 2021 19:59:03 +0200 Subject: [PATCH] =?UTF-8?q?La=20techno=20expansion=20peut=20monter=20jusqu?= =?UTF-8?q?'au=20niveau=2018,=20il=20faut=20donc=20la=20calculer=20=C3=A0?= =?UTF-8?q?=20part,=20sinon=20on=20ne=20peux=20pas=20passer=20au=20dessus?= =?UTF-8?q?=20du=20niveau=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- onyx2/include/game/laboratoire.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/onyx2/include/game/laboratoire.php b/onyx2/include/game/laboratoire.php index 479cc03..f9598a9 100644 --- a/onyx2/include/game/laboratoire.php +++ b/onyx2/include/game/laboratoire.php @@ -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 .= "
"; } + //La techno est au plus haut niveau if (dTechnologies::idToBit($b) & $planete->technologies[$onglet]) { $return .= '
'; + //La techno peut encore être augmentée } elseif (dTechnologies::idToBit($origin_b) & $planete->technologies[$onglet]) { $return .= '
'; + //La techno n'a pas encore été recherchée } else { $return .= '
'; }