Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Energy info in the building #474

Open
jonamix-ar opened this issue Jan 2, 2022 · 3 comments
Open

[Feature] Energy info in the building #474

jonamix-ar opened this issue Jan 2, 2022 · 3 comments
Assignees
Labels
Feature Issues that will become new features

Comments

@jonamix-ar
Copy link

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
Copy link
Author

Lenguaje español
Energía necesaria: %s

Lenguaje ingles
Energy needed: %s

@LucasKovacs
Copy link
Member

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.

@jonamix-ar
Copy link
Author

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.

@LucasKovacs LucasKovacs added Enhancement Issues that require improvements Feature Issues that will become new features and removed Enhancement Issues that require improvements labels Jan 5, 2022
@LucasKovacs LucasKovacs self-assigned this Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issues that will become new features
Projects
Status: No status
Development

No branches or pull requests

2 participants