forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
27
onyx2/include/game/jeu/ressources.php
Normal file
27
onyx2/include/game/jeu/ressources.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$page = 'ressources';
|
||||
$titre = 'Ressources';
|
||||
|
||||
if (isset($_POST['coeff_metal']) && isset($_POST['coeff_cs'])) {
|
||||
|
||||
$planete->coeff_bat[0] = floor($_POST['coeff_metal'])/100;
|
||||
if (isset($_POST['coeff_cristal'])) $planete->coeff_bat[1] = floor($_POST['coeff_cristal'])/100;
|
||||
if (isset($_POST['coeff_hydrogene'])) $planete->coeff_bat[2] = floor($_POST['coeff_hydrogene'])/100;
|
||||
$planete->coeff_bat[3] = floor($_POST['coeff_cs'])/100;
|
||||
if (isset($_POST['coeff_ce'])) $planete->coeff_bat[4] = floor($_POST['coeff_ce'])/100;
|
||||
$planete->addModif("coeff_bat");
|
||||
|
||||
redirection('?p=ressources');
|
||||
}
|
||||
|
||||
$tablo = $planete->production(3600, true);
|
||||
|
||||
$template->assign('ressources_prod', $tablo[1]);
|
||||
$template->assign('ressources_conso', $tablo[2]);
|
||||
$template->assign('ressources_coef', $tablo[0]);
|
||||
$template->assign('ressources_silo', array($planete->batiments[10], pow(2, $planete->batiments[10]) * 100000));
|
||||
$template->assign('ressources_toto', array($tablo[1][2] - $tablo[2][3], '(0)'));
|
||||
|
||||
$template->assign('ressources_tab', array(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100));
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue