XG-Proyect-v3.x.x icon indicating copy to clipboard operation
XG-Proyect-v3.x.x copied to clipboard

[Feature] Energy info in the building

Open jonamix-ar opened this issue 3 years ago • 3 comments

Energía que necesitan las minas y las plantas de energía que producen

Mina de Metal image

Mina de Cristal image

Sintetizador de deuterio image

Planta de energia solar image

Planta de fusion image

Satelite solar image

Taladrador image

Esto lo hicimos hace mucho tiempo para la 2.9. pero no se como adaptarlo ahora a la 3.x

Codigo antiguo

// ENERGIA AL LADO DEL NIVEL
  $BuildLevelFactor         = 10;
  $BuildTemp                = $CurrentPlanet[ 'temp_max' ];
  $CurrentBuildtLvl         = $BuildingLevel;
  $BuildLevel               = ($CurrentBuildtLvl > 0) ? $CurrentBuildtLvl : 1;
  $EnergyTechLevel          = $CurrentUser["energy_tech"];
  $engineer_boost              = 1 + ( $CurrentUser['rpg_ingenieur'] * ENGINEER_ENERGY );
  
  $Prod[4]                  = (floor(eval($ProdGrid[$Element]['formule']['energy']) * read_config ( 'resource_multiplier' )) * $engineer_boost);
  $ActualNeed               =  floor($Prod[4]);
  $BuildLevel++;
  $Prod[4]                  = (floor(eval($ProdGrid[$Element]['formule']['energy']) * read_config ( 'resource_multiplier' )) * $engineer_boost);
  $EnergyNeed               = Format::color_number( Format::pretty_number(floor($Prod[4] - $ActualNeed)) );
  
  if ($Element >= 1 && $Element <= 3) {
       $parse['energia'] = "("."<font color=#FF0000>". $EnergyNeed." ".$lang['Energy']."</font>".")";
       $BuildLevel = 0;
  }elseif ($Element == 4 || $Element == 12) {
       $parse['energia'] = "("."<font color=#00FF00>+". $EnergyNeed." ".$lang['Energy']."</font>".")";
       $BuildLevel = 0;
  }
  // FIN ENERGIA AL LADO DEL NIVEL 

jonamix-ar avatar Jan 02 '22 16:01 jonamix-ar

Lenguaje español Energía necesaria: %s

Lenguaje ingles Energy needed: %s

jonamix-ar avatar Jan 02 '22 16:01 jonamix-ar

This must wait, the whole production system is chaotic and old, add the plasma resource calculation was a pain in the ass and also a bit messy.

So infos, resources, updateplanetresources they all need a refactor. Once that done, implementing this things will be easier.

LucasKovacs avatar Jan 05 '22 19:01 LucasKovacs

This must wait, the whole production system is chaotic and old, add the plasma resource calculation was a pain in the ass and also a bit messy.

So infos, resources, updateplanetresources they all need a refactor. Once that done, implementing this things will be easier.

Jajaja XD Por que crees que no pude adaptarlo xD igual yo, no quise poner todavía el si la construcción es posible o cuanto te falta para completar los recursos por que dijiste q ibas a refactorizar todo el sistema de edificios.

jonamix-ar avatar Jan 05 '22 19:01 jonamix-ar