@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $last_co = new \DateTime($last_co); |
| 98 | 98 | $last_co = $last_co->getTimestamp(); |
| 99 | 99 | |
| 100 | - $diff_temps = $today-$last_co; |
|
| 100 | + $diff_temps = $today - $last_co; |
|
| 101 | 101 | |
| 102 | 102 | //si la derniere actualisation ou connexion est supérieur à 30 sec |
| 103 | 103 | if ($diff_temps > 180) { |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | private function setAddRessource($nom_ressource, $ressrouce, $diff_temps) { |
| 118 | 118 | $dbc = App::getDb(); |
| 119 | 119 | |
| 120 | - $ressource = $ressrouce+(round((Bataille::getBatiment()->getProduction($nom_ressource, $this->id_base)/3600)*$diff_temps)); |
|
| 120 | + $ressource = $ressrouce + (round((Bataille::getBatiment()->getProduction($nom_ressource, $this->id_base) / 3600) * $diff_temps)); |
|
| 121 | 121 | $stockage_max = Bataille::getBatiment()->getStockageEntrepot($this->id_base); |
| 122 | 122 | |
| 123 | 123 | if ($ressource > $stockage_max) { |
@@ -148,18 +148,18 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | //soit on enelve ou on ajoute |
| 150 | 150 | if ($signe == "-") { |
| 151 | - $eau = $this->getEau()-$eau; |
|
| 152 | - $electricite = $this->getElectricite()-$electricite; |
|
| 153 | - $fer = $this->getFer()-$fer; |
|
| 154 | - $fuel = $this->getFuel()-$fuel; |
|
| 155 | - $nourriture = $this->getNourriture()-$nourriture; |
|
| 151 | + $eau = $this->getEau() - $eau; |
|
| 152 | + $electricite = $this->getElectricite() - $electricite; |
|
| 153 | + $fer = $this->getFer() - $fer; |
|
| 154 | + $fuel = $this->getFuel() - $fuel; |
|
| 155 | + $nourriture = $this->getNourriture() - $nourriture; |
|
| 156 | 156 | } |
| 157 | 157 | else { |
| 158 | - $eau = $this->getEau()+$eau; |
|
| 159 | - $electricite = $this->getElectricite()+$electricite; |
|
| 160 | - $fer = $this->getFer()+$fer; |
|
| 161 | - $fuel = $this->getFuel()+$fuel; |
|
| 162 | - $nourriture = $this->getNourriture()+$nourriture; |
|
| 158 | + $eau = $this->getEau() + $eau; |
|
| 159 | + $electricite = $this->getElectricite() + $electricite; |
|
| 160 | + $fer = $this->getFer() + $fer; |
|
| 161 | + $fuel = $this->getFuel() + $fuel; |
|
| 162 | + $nourriture = $this->getNourriture() + $nourriture; |
|
| 163 | 163 | |
| 164 | 164 | $stockage_max = Bataille::getBatiment()->getStockageEntrepot(); |
| 165 | 165 | |