Энергорасход при постройке здания

GwynnBleiidd

Школьник
Репутация
0 / 1 048
39997510.png


Автор: cerberus

редактируем файлы :


-includes/functions/BatimentBuildingPage.php
-templates/OpenGame/buildings_builds_row.tpl

1) Открываем BatimentBuildingPage.php примерно на 11 строке

Ищем -
Код:
global $lang, $resource, $reslist, $phpEx, $dpath, $game_config, $_GET;
Заменяем на - global $ProdGrid,$lang, $resource, $reslist, $phpEx, $dpath, $game_config, $_GET;

1.1) идем примерно на 92 строку

ищем -
Код:
$parse['nivel'] = ($BuildingLevel == 0) ? "" : " (". $lang['level'] ." ". $BuildingLevel .")";
после нее добавляем -
Вот это добавляем

Код:
// show energy on BuildingPage
//================================
$BuildLevelFactor = $CurrentPlanet[ $resource[$Element]."_porcent" ];
$BuildTemp = $CurrentPlanet[ 'temp_max' ];
$CurrentBuildtLvl = $BuildingLevel;
$BuildLevel = ($CurrentBuildtLvl > 0) ? $CurrentBuildtLvl : 1;

$Prod[3] = (floor(eval($ProdGrid[$Element]['formule']['deuterium']) * $game_config['resource_multiplier']) * (1 + ($CurrentUser['rpg_geologue'] * 0.05)));
$Prod[4] = (floor(eval($ProdGrid[$Element]['formule']['energy']) * $game_config['resource_multiplier']) * (1 + ($CurrentUser['rpg_ingenieur'] * 0.05)));

if ($Element != 12) {
$ActualNeed = floor($Prod[4]);
} else {
$ActualNeed = floor($Prod[3]);
}

$BuildLevel++;

$Prod[3] = (floor(eval($ProdGrid[$Element]['formule']['deuterium']) * $game_config['resource_multiplier']) * (1 + ($CurrentUser['rpg_geologue'] * 0.05)));
$Prod[4] = (floor(eval($ProdGrid[$Element]['formule']['energy']) * $game_config['resource_multiplier']) * (1 + ($CurrentUser['rpg_ingenieur'] * 0.05)));
if ($Element != 12) {

//$bloc['build_prod'] = pretty_number(floor($Prod[$BuildID]));
//$bloc['build_prod_diff'] = colorNumber( pretty_number(floor($Prod[$BuildID] - $ActualProd)) );
//$bloc['build_need'] = colorNumber( pretty_number(floor($Prod[4])) );
$EnergyNeed = colorNumber( pretty_number(floor($Prod[4] - $ActualNeed)) );
} else {

//$bloc['build_prod'] = pretty_number(floor($Prod[4]));
//$bloc['build_prod_diff'] = colorNumber( pretty_number(floor($Prod[4] - $ActualProd)) );
//$bloc['build_need'] = colorNumber( pretty_number(floor($Prod[3])) );
$EnergyNeed = colorNumber( pretty_number(floor($Prod[3] - $ActualNeed)) );
}

if ($Element >= 1 && $Element <= 3) {
$parse['build_need_diff'] = "("."<font color=#FF0000>". $EnergyNeed." ".$lang['Energy']."</font>".")";
$BuildLevel = 0;
}elseif ($Element == 4 || $Element == 12) {
$parse['build_need_diff'] = "("."<font color=#00FF00>+". $EnergyNeed." ".$lang['Energy']."</font>".")";
$BuildLevel = 0;
}

//================================


2) открываем buildings_builds_row.tpl

находим -
Код:
[url="infos.php?gid={i}"]{n}[/url]{nivel}
заменяем на -
Код:
[url="infos.php?gid={i}"]{n}[/url]{nivel} {build_need_diff}
 
в GPX нет:
-includes/functions/BatimentBuildingPage.php
-templates/OpenGame/buildings_builds_row.tpl
как прикрутить туда? :)
 
А ты строки кода которые надо искать поищи в файлах, я пока просто не брался
 
А ты строки кода которые надо искать поищи в файлах, я пока просто не брался
Помогите поставить под XGP 2.9.4. По строках искал не все находит что описано в первом посте :)
 
Господи, люди, зачем вы беретесь, что-то делать, если даже базовых знаний или представлений нет... ну, как можно поставить движок и пытаться к нему, что-то прикрутить, не зная из чего он состоит...
class.ShowBuildingsPage.php
/style/templates/builsings/buildings_builds_row.tpl
 
Господи, люди, зачем вы беретесь, что-то делать, если даже базовых знаний или представлений нет... ну, как можно поставить движок и пытаться к нему, что-то прикрутить, не зная из чего он состоит...
class.ShowBuildingsPage.php
/style/templates/builsings/buildings_builds_row.tpl
искал по строках совпадений нет. Тока похожие но не то.
 
class.ShowBuildingsPage.php
$parse['nivel'] = ($BuildingLevel == 0) ? "" : " (". $lang['level'] ." ". $BuildingLevel .")"; номер строки 437
/style/templates/builsings/buildings_builds_row.tpl
{nivel}
строка номер 8
 

Похожие темы

Сверху