Completed
Push — trunk ( 8c8cf8...dc0cf2 )
by SuperNova.WS
04:27
created
includes/functions/eco_get_build_data.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 use Meta\Economic\BuildDataStatic;
4 4
 use Unit\DBStaticUnit;
5 5
 
6
-function eco_lab_sort_effectivness($a, $b)
7
-{
6
+function eco_lab_sort_effectivness($a, $b) {
8 7
   return $a['laboratory_effective_level'] > $b['laboratory_effective_level'] ? -1 : ($a['laboratory_effective_level'] < $b['laboratory_effective_level'] ? 1 : 0);
9 8
 }
10 9
 
@@ -14,8 +13,7 @@  discard block
 block discarded – undo
14 13
  * 1.0 - copyright (c) 2010 by Gorlum for http://supernova.ws
15 14
  * @version 1.0
16 15
  */
17
-function eco_get_lab_max_effective_level(&$user, $lab_require)
18
-{
16
+function eco_get_lab_max_effective_level(&$user, $lab_require) {
19 17
   if(!$user['user_as_ally'] && !isset($user['laboratories_active']))
20 18
   {
21 19
     $user['laboratories_active'] = array();
@@ -41,8 +39,7 @@  discard block
 block discarded – undo
41 39
     if($user['user_as_ally'])
42 40
     {
43 41
       $lab_level = doquery("SELECT ally_members AS effective_level FROM {{alliance}} WHERE id = {$user['user_as_ally']} LIMIT 1", true);
44
-    }
45
-    else
42
+    } else
46 43
     {
47 44
       $tech_intergalactic = mrc_get_level($user, false, TECH_RESEARCH) + 1;
48 45
       $lab_level['effective_level'] = 0;
@@ -197,8 +194,7 @@  discard block
 block discarded – undo
197 194
   return $result;
198 195
 }
199 196
 
200
-function eco_is_builds_in_que($planet_que, $unit_list)
201
-{
197
+function eco_is_builds_in_que($planet_que, $unit_list) {
202 198
   $eco_is_builds_in_que = false;
203 199
 
204 200
   $unit_list = is_array($unit_list) ? $unit_list : array($unit_list => $unit_list);
@@ -220,8 +216,7 @@  discard block
 block discarded – undo
220 216
 }
221 217
 
222 218
 function eco_unit_busy(&$user, &$planet, $unit_id){$result = null;return sn_function_call('eco_unit_busy', [&$user, &$planet, $unit_id, &$result]);}
223
-function sn_eco_unit_busy(&$user, &$planet, $unit_id, &$result)
224
-{
219
+function sn_eco_unit_busy(&$user, &$planet, $unit_id, &$result) {
225 220
   global $config;
226 221
 
227 222
   $result = isset($result) ? $result : false;
@@ -242,8 +237,7 @@  discard block
 block discarded – undo
242 237
       //{
243 238
       //  $result = true;
244 239
       //}
245
-    }
246
-    elseif(($unit_id == UNIT_TECHNOLOGIES || in_array($unit_id, sn_get_groups('tech'))) && !$config->BuildLabWhileRun && $planet['que'])
240
+    } elseif(($unit_id == UNIT_TECHNOLOGIES || in_array($unit_id, sn_get_groups('tech'))) && !$config->BuildLabWhileRun && $planet['que'])
247 241
     {
248 242
       $result = eco_is_builds_in_que($planet['que'], array(STRUC_LABORATORY, STRUC_LABORATORY_NANO));
249 243
     }
Please login to merge, or discard this patch.