Example #1
0
 $parse = array();
 $parse['dpath'] = $dpath;
 $parse['i'] = $i;
 //obtenemos el nivel del edificio
 $building_level = $planetrow[$resource[$i]];
 //Muestra el nivel actual de la mina
 $parse['nivel'] = $building_level == 0 ? "" : " ({$lang['level']} {$building_level})";
 $parse['n'] = $n;
 $parse['descriptions'] = $lang['res']['descriptions'][$i];
 /*
   Calculo del tiempo de produccion
   [(Cris+Met)/2500]*[1/(Nivel f.robots+1)]* 0,5^NivelFabrica Nanos.
 */
 $time = get_building_time($user, $planetrow, $i);
 //informacion del precio, etc
 $parse['time'] = building_time($time);
 $parse['price'] = price($user, $planetrow, $i);
 $parse['rest_price'] = rest_price($user, $planetrow, $i);
 //Comprobacion si es posible comprarlo
 $is_buyeable = is_buyeable($user, $planetrow, $i);
 $parse['click'] = '';
 if (!$planetrow["b_building_id"] || $features['buildList'] < time()) {
     if (!$building) {
         if ($user["b_tech_planet"] != 0 && $i == 31 && $game_config['allow_invetigate_while_lab_is_update'] != 1) {
             //en caso de que sea el laboratorio y se este investigando algo.
             $parse['click'] = "<font color=#FF0000>{$lang['Teching']}</font>";
             //Muestra la opcion a elegir para construir o ampliar un edificio
         } elseif ($planetrow[$resource[$i]] == 0 && LWCore::getPlanet()->checkFields() && $is_buyeable && $user['urlaubs_modus'] == 0) {
             $parse['click'] = "<a href=\"?bau={$i}\"><font color=#00FF00>{$lang['Build']}</font></a>";
         } elseif (LWCore::getPlanet()->checkFields() && $is_buyeable && $user['urlaubs_modus'] == 0) {
             $nplus = $planetrow[$resource[$i]] + 1;
Example #2
0
 			  Sintetizador de Deuterio: 225*1,5^(nivel-1) Metal y 75*1,5^(Nivel-1) Cristal
 			  Planta energ僘 Solar: 75*1,5^(nivel-1) Metal y 30*1,5^(Nivel-1) cristal
 			  Planta Fusion: 900*1,8^(nivel-1) Metal y 360*1,8^(Nivel-1) cristal y 180*1,8^(Nivel-1) Deuterio
 			  tecnolog僘 Gravit: *3 por Nivel.
   Todas las dem疽 investigaciones y edificios *2^Nivel 
 */
 $is_buyeable = @echo_price($userrow, $planetrow, $i);
 /*
   Calculo del tiempo de produccion
   [(Cris+Met)/2500]*[1/(Nivel f.robots+1)]* 0,5^NivelFabrica Nanos. 
 */
 //$time = ((($cost_crystal )+($cost_metal)) / 2500) * (1 / ($planetrow[$resource['14']] + 1)) * pow(0.5,$planetrow[$resource['15']]);
 //metodo temporal para mostrar el formato tiempo...
 //$time = ($time *60*60);
 $time = get_building_time($userrow, $planetrow, $i);
 echo building_time($time);
 echo_rest_price($userrow, $planetrow, $i);
 echo "<td class=k>";
 /*if(	if($planetrow["b_building_id"] == 31 &&
 		$game_config['allow_invetigate_while_lab_is_update']!=1)
 	{
 		$buildinglist = '<br><br><font color="#ff0000">'.$lang['cant_invetigate_while_lab_is_update'].'</font><br><br>';
 	}*/
 if (!$building) {
     if ($user["b_tech_planet"] != 0 && $i == 31 && $game_config['allow_invetigate_while_lab_is_update'] != 1) {
         //en caso de que sea el laboratorio y se este investigando algo.
         echo "<font color=#FF0000>Investigando</font>";
         //Muestra la opcion a elegir para construir o ampliar un edificio
     } elseif ($planetrow[$resource[$i]] == 0 && $planetrow["field_current"] < $planetrow["field_max"] && $is_buyeable) {
         echo "<a href=\"?bau={$i}\"><font color=#00FF00>Construir</font></a>";
     } elseif ($planetrow["field_current"] < $planetrow["field_max"] && $is_buyeable) {