Completed
Push — work-fleets ( 9522d3...bdccb3 )
by SuperNova.WS
05:13
created
includes/init_secondary.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,19 +2,19 @@  discard block
 block discarded – undo
2 2
 
3 3
 $classLocale = classLocale::$lang;
4 4
 
5
-if(classSupernova::$config->server_updater_check_auto && classSupernova::$config->server_updater_check_last + classSupernova::$config->server_updater_check_period <= SN_TIME_NOW) {
5
+if (classSupernova::$config->server_updater_check_auto && classSupernova::$config->server_updater_check_last + classSupernova::$config->server_updater_check_period <= SN_TIME_NOW) {
6 6
   include(SN_ROOT_PHYSICAL . 'ajax_version_check' . DOT_PHP_EX);
7 7
 }
8 8
 
9
-if(classSupernova::$config->user_birthday_gift && SN_TIME_NOW - classSupernova::$config->user_birthday_celebrate > PERIOD_DAY) {
9
+if (classSupernova::$config->user_birthday_gift && SN_TIME_NOW - classSupernova::$config->user_birthday_celebrate > PERIOD_DAY) {
10 10
   require_once(SN_ROOT_PHYSICAL . "includes/includes/user_birthday_celebrate" . DOT_PHP_EX);
11 11
   sn_user_birthday_celebrate();
12 12
 }
13 13
 
14
-if(!classSupernova::$config->var_online_user_count || classSupernova::$config->var_online_user_time + 30 < SN_TIME_NOW) {
14
+if (!classSupernova::$config->var_online_user_count || classSupernova::$config->var_online_user_time + 30 < SN_TIME_NOW) {
15 15
   classSupernova::$config->db_saveItem('var_online_user_count', db_user_count(true));
16 16
   classSupernova::$config->db_saveItem('var_online_user_time', SN_TIME_NOW);
17
-  if(classSupernova::$config->server_log_online) {
17
+  if (classSupernova::$config->server_log_online) {
18 18
     db_log_online_insert();
19 19
   }
20 20
 }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 $template_result[F_ACCOUNT_IS_AUTHORIZED] = $sys_user_logged_in = !empty($user) && isset($user['id']) && $user['id'];
42 42
 //pdump($template_result[F_ACCOUNT_IS_AUTHORIZED]);die();
43 43
 
44
-if(!empty($user['id'])) {
44
+if (!empty($user['id'])) {
45 45
   classSupernova::$user_options->user_change($user['id']);
46 46
 }
47 47
 
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
     : false
55 55
   );
56 56
 
57
-if($template_result[F_LOGIN_STATUS] == LOGIN_ERROR_USERNAME_RESTRICTED_CHARACTERS) {
58
-  $prohibited_characters = array_map(function ($value) {
57
+if ($template_result[F_LOGIN_STATUS] == LOGIN_ERROR_USERNAME_RESTRICTED_CHARACTERS) {
58
+  $prohibited_characters = array_map(function($value) {
59 59
     return "'" . htmlentities($value, ENT_QUOTES, 'UTF-8') . "'";
60 60
   }, str_split(LOGIN_REGISTER_CHARACTERS_PROHIBITED));
61 61
   $template_result[F_LOGIN_MESSAGE] .= implode(', ', $prohibited_characters);
62 62
 }
63 63
 
64 64
 
65
-if(defined('DEBUG_AUTH') && DEBUG_AUTH && !defined('IN_AJAX')) {
65
+if (defined('DEBUG_AUTH') && DEBUG_AUTH && !defined('IN_AJAX')) {
66 66
   pdump("Отключи отладку перед продакшном!");
67 67
 }
68 68
 
@@ -76,17 +76,17 @@  discard block
 block discarded – undo
76 76
   ? define('INSTALL_MODE', GAME_DISABLE_INSTALL)
77 77
   : false;
78 78
 
79
-if($template_result[F_GAME_DISABLE] = classSupernova::$config->game_disable) {
79
+if ($template_result[F_GAME_DISABLE] = classSupernova::$config->game_disable) {
80 80
   $template_result[F_GAME_DISABLE_REASON] = sys_bbcodeParse(
81 81
     classSupernova::$config->game_disable == GAME_DISABLE_REASON
82 82
       ? classSupernova::$config->game_disable_reason
83 83
       : classLocale::$lang['sys_game_disable_reason'][classSupernova::$config->game_disable]
84 84
   );
85
-  if(defined('IN_API')) {
85
+  if (defined('IN_API')) {
86 86
     return;
87 87
   }
88 88
 
89
-  if(
89
+  if (
90 90
     ($user['authlevel'] < 1 || !(defined('IN_ADMIN') && IN_ADMIN))
91 91
     &&
92 92
     !(defined('INSTALL_MODE') && defined('LOGIN_LOGOUT'))
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
 
101 101
 // TODO ban
102 102
 // TODO $skip_ban_check
103
-if($template_result[F_BANNED_STATUS] && !$skip_ban_check) {
104
-  if(defined('IN_API')) {
103
+if ($template_result[F_BANNED_STATUS] && !$skip_ban_check) {
104
+  if (defined('IN_API')) {
105 105
     return;
106 106
   }
107 107
 
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
 // pdump($allow_anonymous, '$allow_anonymous');
120 120
 // pdump($sys_user_logged_in, '$sys_user_logged_in');
121 121
 
122
-if($sys_user_logged_in && INITIAL_PAGE == 'login') {
122
+if ($sys_user_logged_in && INITIAL_PAGE == 'login') {
123 123
   sys_redirect(SN_ROOT_VIRTUAL . 'overview.php');
124
-} elseif($account_logged_in && !$sys_user_logged_in) { // empty(core_auth::$user['id'])
124
+} elseif ($account_logged_in && !$sys_user_logged_in) { // empty(core_auth::$user['id'])
125 125
 //  pdump($sn_page_name);
126 126
 //  pdump(INITIAL_PAGE);
127 127
 //  die('{Тут должна быть ваша реклама. Точнее - ввод имени игрока}');
128
-} elseif(!$allow_anonymous && !$sys_user_logged_in) {
128
+} elseif (!$allow_anonymous && !$sys_user_logged_in) {
129 129
   // sn_setcookie(SN_COOKIE, '', time() - PERIOD_WEEK, SN_ROOT_RELATIVE);
130 130
   sys_redirect(SN_ROOT_VIRTUAL . 'login.php');
131 131
 }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 global $skip_fleet_update;
148 148
 $skip_fleet_update = $skip_fleet_update || $supernova->options['fleet_update_skip'] || defined('IN_ADMIN');
149
-if(
149
+if (
150 150
   !$skip_fleet_update
151 151
   && !(defined('IN_AJAX') && IN_AJAX === true)
152 152
   && SN_TIME_NOW - strtotime(classSupernova::$config->fleet_update_last) > classSupernova::$config->fleet_update_interval
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
   flt_flying_fleet_handler($skip_fleet_update);
156 156
 }
157 157
 
158
-if(!defined('IN_AJAX')) {
158
+if (!defined('IN_AJAX')) {
159 159
   print("Scheduled processes is disabled<br />");
160 160
 }
161 161
 // scheduler_process();
Please login to merge, or discard this patch.
admin/tools.php 2 patches
Switch Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -34,69 +34,69 @@
 block discarded – undo
34 34
 }
35 35
 
36 36
 switch($mode) {
37
-  case ADM_TOOL_CONFIG_RELOAD:
38
-    classSupernova::$config->db_loadAll();
39
-    sys_refresh_tablelist();
40
-
41
-    classSupernova::$config->db_loadItem('game_watchlist');
42
-    if(classSupernova::$config->game_watchlist) {
43
-      classSupernova::$config->game_watchlist_array = explode(';', classSupernova::$config->game_watchlist);
44
-    } else {
45
-      unset(classSupernova::$config->game_watchlist_array);
46
-    }
47
-  break;
48
-
49
-  case ADM_TOOL_MD5:
50
-    $template = gettemplate("admin/md5enc", true);
51
-    $password_seed = sys_get_param_str_unsafe('seed', SN_SYS_SEC_CHARS_ALLOWED);
52
-    $password_length = sys_get_param_int('length', 16);
53
-    $string = ($string = sys_get_param_str_unsafe('string')) ? $string : sys_random_string($password_length, $password_seed);
54
-
55
-    $template->assign_vars(array(
56
-      'SEED'   => $password_seed,
57
-      'LENGTH' => $password_length,
58
-      'STRING' => htmlentities($string),
59
-      'MD5'    => md5($string),
60
-    ));
61
-    display($template, classLocale::$lang['adm_tools_md5_header'], false, '', true);
62
-  break;
63
-
64
-  case ADM_TOOL_FORCE_ALL:
65
-    classSupernova::$config->db_saveItem('db_version', 0);
66
-    require_once('../includes/update.php');
67
-  break;
68
-
69
-  case ADM_TOOL_FORCE_LAST:
70
-    classSupernova::$config->db_saveItem('db_version', floor(classSupernova::$config->db_version - 1));
71
-    require_once('../includes/update.php');
72
-  break;
73
-
74
-  case ADM_TOOL_INFO_PHP:
75
-    phpinfo();
76
-  break;
77
-
78
-  case ADM_TOOL_INFO_SQL:
79
-    $template = gettemplate("simple_table", true);
80
-
81
-    $status = array(
82
-      classLocale::$lang['adm_tool_sql_server_version'] => classSupernova::$db->db_get_server_info(),
83
-      classLocale::$lang['adm_tool_sql_client_version'] => classSupernova::$db->db_get_client_info(),
84
-      classLocale::$lang['adm_tool_sql_host_info']      => classSupernova::$db->db_get_host_info(),
85
-    );
86
-    templateAssignTable($template, 'server', $status);
87
-
88
-    templateAssignTable($template, 'status', classSupernova::$db->db_get_server_stat());
89
-    templateAssignTable($template, 'params', classSupernova::$db->db_core_show_status());
90
-
91
-    $template->assign_vars(array(
92
-      'PAGE_HEADER'   => classLocale::$lang['adm_tool_sql_page_header'],
93
-      'COLUMN_NAME_1' => classLocale::$lang['adm_tool_sql_param_name'],
94
-      'COLUMN_NAME_2' => classLocale::$lang['adm_tool_sql_param_value'],
95
-      'TABLE_FOOTER'  => 'test',
96
-    ));
97
-
98
-    display($template, classLocale::$lang['adm_bn_ttle'], false, '', true);
99
-  break;
37
+    case ADM_TOOL_CONFIG_RELOAD:
38
+      classSupernova::$config->db_loadAll();
39
+      sys_refresh_tablelist();
40
+
41
+      classSupernova::$config->db_loadItem('game_watchlist');
42
+      if(classSupernova::$config->game_watchlist) {
43
+        classSupernova::$config->game_watchlist_array = explode(';', classSupernova::$config->game_watchlist);
44
+      } else {
45
+        unset(classSupernova::$config->game_watchlist_array);
46
+      }
47
+    break;
48
+
49
+    case ADM_TOOL_MD5:
50
+      $template = gettemplate("admin/md5enc", true);
51
+      $password_seed = sys_get_param_str_unsafe('seed', SN_SYS_SEC_CHARS_ALLOWED);
52
+      $password_length = sys_get_param_int('length', 16);
53
+      $string = ($string = sys_get_param_str_unsafe('string')) ? $string : sys_random_string($password_length, $password_seed);
54
+
55
+      $template->assign_vars(array(
56
+        'SEED'   => $password_seed,
57
+        'LENGTH' => $password_length,
58
+        'STRING' => htmlentities($string),
59
+        'MD5'    => md5($string),
60
+      ));
61
+      display($template, classLocale::$lang['adm_tools_md5_header'], false, '', true);
62
+    break;
63
+
64
+    case ADM_TOOL_FORCE_ALL:
65
+      classSupernova::$config->db_saveItem('db_version', 0);
66
+      require_once('../includes/update.php');
67
+    break;
68
+
69
+    case ADM_TOOL_FORCE_LAST:
70
+      classSupernova::$config->db_saveItem('db_version', floor(classSupernova::$config->db_version - 1));
71
+      require_once('../includes/update.php');
72
+    break;
73
+
74
+    case ADM_TOOL_INFO_PHP:
75
+      phpinfo();
76
+    break;
77
+
78
+    case ADM_TOOL_INFO_SQL:
79
+      $template = gettemplate("simple_table", true);
80
+
81
+      $status = array(
82
+        classLocale::$lang['adm_tool_sql_server_version'] => classSupernova::$db->db_get_server_info(),
83
+        classLocale::$lang['adm_tool_sql_client_version'] => classSupernova::$db->db_get_client_info(),
84
+        classLocale::$lang['adm_tool_sql_host_info']      => classSupernova::$db->db_get_host_info(),
85
+      );
86
+      templateAssignTable($template, 'server', $status);
87
+
88
+      templateAssignTable($template, 'status', classSupernova::$db->db_get_server_stat());
89
+      templateAssignTable($template, 'params', classSupernova::$db->db_core_show_status());
90
+
91
+      $template->assign_vars(array(
92
+        'PAGE_HEADER'   => classLocale::$lang['adm_tool_sql_page_header'],
93
+        'COLUMN_NAME_1' => classLocale::$lang['adm_tool_sql_param_name'],
94
+        'COLUMN_NAME_2' => classLocale::$lang['adm_tool_sql_param_value'],
95
+        'TABLE_FOOTER'  => 'test',
96
+      ));
97
+
98
+      display($template, classLocale::$lang['adm_bn_ttle'], false, '', true);
99
+    break;
100 100
 
101 101
 }
102 102
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
13 13
 
14 14
 // if($user['authlevel'] < 1)
15
-if($user['authlevel'] < 3) {
15
+if ($user['authlevel'] < 3) {
16 16
   AdminMessage(classLocale::$lang['adm_err_denied']);
17 17
 }
18 18
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  */
26 26
 function templateAssignTable($template, $str, $status) {
27 27
   $template->assign_block_vars('table', classLocale::$lang['adm_tool_sql_table'][$str]);
28
-  foreach($status as $key => $value) {
28
+  foreach ($status as $key => $value) {
29 29
     $template->assign_block_vars('table.row', array(
30 30
       'VALUE_1' => $key,
31 31
       'VALUE_2' => $value,
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
   }
34 34
 }
35 35
 
36
-switch($mode) {
36
+switch ($mode) {
37 37
   case ADM_TOOL_CONFIG_RELOAD:
38 38
     classSupernova::$config->db_loadAll();
39 39
     sys_refresh_tablelist();
40 40
 
41 41
     classSupernova::$config->db_loadItem('game_watchlist');
42
-    if(classSupernova::$config->game_watchlist) {
42
+    if (classSupernova::$config->game_watchlist) {
43 43
       classSupernova::$config->game_watchlist_array = explode(';', classSupernova::$config->game_watchlist);
44 44
     } else {
45 45
       unset(classSupernova::$config->game_watchlist_array);
Please login to merge, or discard this patch.
includes/classes/Vector.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
   /**
11 11
    * UniverseVector constructor.
12 12
    *
13
-   * @param int|string       $galaxy
14
-   * @param int|Vector|array $system
13
+   * @param integer       $galaxy
14
+   * @param integer $system
15 15
    * @param int              $planet
16 16
    * @param int              $type
17 17
    */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
   public $type = PT_NONE;
14 14
 
15 15
   public static function _staticInit() {
16
-    if(static::$_isStaticInit) {
16
+    if (static::$_isStaticInit) {
17 17
       return;
18 18
     }
19 19
     static::$knownGalaxies = intval(classSupernova::$config->game_maxGalaxy);
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
   public function __construct($galaxy = 0, $system = 0, $planet = 0, $type = PT_NONE) {
34 34
     // static::_staticInit();
35 35
 
36
-    if(is_string($galaxy) && $galaxy == VECTOR_READ_VECTOR && is_object($system) && $system instanceof Vector) {
36
+    if (is_string($galaxy) && $galaxy == VECTOR_READ_VECTOR && is_object($system) && $system instanceof Vector) {
37 37
       $this->readFromVector($system);
38
-    } elseif(is_string($galaxy) && $galaxy == VECTOR_READ_PARAMS && is_array($system)) {
38
+    } elseif (is_string($galaxy) && $galaxy == VECTOR_READ_PARAMS && is_array($system)) {
39 39
       $this->readFromParamFleets($system);
40 40
     } else {
41 41
       $this->galaxy = intval($galaxy);
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
    * @param Vector $vector
75 75
    */
76 76
   public function distance($vector) {
77
-    if($this->galaxy != $vector->galaxy) {
77
+    if ($this->galaxy != $vector->galaxy) {
78 78
       $distance = abs($this->galaxy - $vector->galaxy) * classSupernova::$config->uni_galaxy_distance;
79
-    } elseif($this->system != $vector->system) {
79
+    } elseif ($this->system != $vector->system) {
80 80
       $distance = abs($this->system - $vector->system) * 5 * 19 + 2700;
81
-    } elseif($this->planet != $vector->planet) {
81
+    } elseif ($this->planet != $vector->planet) {
82 82
       $distance = abs($this->planet - $vector->planet) * 5 + 1000;
83 83
       // TODO - uncomment
84 84
 //    } elseif($this->type != PT_NONE && $vector->type != PT_NONE && $this->type == $vector->type) {
Please login to merge, or discard this patch.
fleet.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 // TODO - Переместить это куда-нибудь
9 9
 $fleet_page = sys_get_param_int('fleet_page', sys_get_param_int('mode'));
10
-if($fleet_ship_sort = sys_get_param_id('sort_elements') && $fleet_page == 0) {
10
+if ($fleet_ship_sort = sys_get_param_id('sort_elements') && $fleet_page == 0) {
11 11
   define('IN_AJAX', true);
12
-  if(!empty(classLocale::$lang['player_option_fleet_ship_sort'][$fleet_ship_sort])) {
12
+  if (!empty(classLocale::$lang['player_option_fleet_ship_sort'][$fleet_ship_sort])) {
13 13
     // player_save_option($user, PLAYER_OPTION_FLEET_SHIP_SORT, $fleet_ship_sort);
14 14
     // player_save_option($user, PLAYER_OPTION_FLEET_SHIP_SORT_INVERSE, sys_get_param_id('fleet_ship_sort_inverse', 0));
15 15
     classSupernova::$user_options[PLAYER_OPTION_FLEET_SHIP_SORT] = $fleet_ship_sort;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 //}
73 73
 
74 74
 
75
-switch($fleet_page) {
75
+switch ($fleet_page) {
76 76
   case 3:
77 77
 
78 78
   case 2:
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 $objFleet5->fleetPage0Prepare();
92 92
 
93
-switch($fleet_page) {
93
+switch ($fleet_page) {
94 94
   case 1:
95 95
     $objFleet5->fleetPage1($planet_type);
96 96
   break;
Please login to merge, or discard this patch.
includes/classes/Player.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -228,8 +228,8 @@  discard block
 block discarded – undo
228 228
    * @return int|mixed
229 229
    */
230 230
   public function calcColonyMaxCount($astrotech = -1) {
231
-    if($astrotech == -1) {
232
-      if(!isset($this->_dbRow[UNIT_PLAYER_COLONIES_MAX])) {
231
+    if ($astrotech == -1) {
232
+      if (!isset($this->_dbRow[UNIT_PLAYER_COLONIES_MAX])) {
233 233
 
234 234
         $expeditions = get_player_max_expeditons($this->_dbRow);
235 235
         $astrotech = mrc_get_level($this->_dbRow, null, TECH_ASTROTECH);
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
 
304 304
   public function expeditionsMax() {
305
-    if($this->expeditionsMax === null) {
305
+    if ($this->expeditionsMax === null) {
306 306
       $this->expeditionsMax = get_player_max_expeditons($this->_dbRow);
307 307
     }
308 308
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
   }
311 311
 
312 312
   public function expeditionsFlying() {
313
-    if($this->expeditionsFlying === null) {
313
+    if ($this->expeditionsFlying === null) {
314 314
       $this->expeditionsFlying = FleetList::fleet_count_flying($this->_dbId, MT_EXPLORE);
315 315
     }
316 316
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 
320 320
 
321 321
   public function fleetsMax() {
322
-    if($this->fleetMax === null) {
322
+    if ($this->fleetMax === null) {
323 323
       $this->fleetMax = GetMaxFleets($this->_dbRow);
324 324
     }
325 325
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
   }
328 328
 
329 329
   public function fleetsFlying() {
330
-    if($this->fleetFlying === null) {
330
+    if ($this->fleetFlying === null) {
331 331
       $this->fleetFlying = FleetList::fleet_count_flying($this->_dbId);
332 332
     }
333 333
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
 
338 338
   public function coloniesMax() {
339
-    if($this->coloniesMax === null) {
339
+    if ($this->coloniesMax === null) {
340 340
       $this->coloniesMax = get_player_max_colonies($this->_dbRow);
341 341
     }
342 342
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
   }
345 345
 
346 346
   public function coloniesCurrent() {
347
-    if($this->coloniesCurrent === null) {
347
+    if ($this->coloniesCurrent === null) {
348 348
       $this->coloniesCurrent = get_player_current_colonies($this->_dbRow);
349 349
     }
350 350
 
Please login to merge, or discard this patch.
galaxy.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 $uni_system = sys_get_param_int('system', $planetrow['system']);
17 17
 $planet = sys_get_param_int('planet', $planetrow['planet']);
18 18
 
19
-if($mode == 'name') {
19
+if ($mode == 'name') {
20 20
   require_once('includes/includes/uni_rename.php');
21 21
 }
22 22
 
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 
38 38
 $flying_fleet_count = FleetList::fleet_count_flying($user['id']);
39 39
 
40
-if($mode == 1) {
41
-} elseif($mode == 2 || $mode == 3) {
40
+if ($mode == 1) {
41
+} elseif ($mode == 2 || $mode == 3) {
42 42
   $planet = $planetrow['planet'];
43 43
 } else {
44 44
   $uni_galaxy = $planetrow['galaxy'];
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
   $planet = $planetrow['planet'];
47 47
 }
48 48
 
49
-$uni_galaxy = $uni_galaxy < 1 ? 1 : ($uni_galaxy > Vector::$knownGalaxies? Vector::$knownGalaxies: $uni_galaxy);
49
+$uni_galaxy = $uni_galaxy < 1 ? 1 : ($uni_galaxy > Vector::$knownGalaxies ? Vector::$knownGalaxies : $uni_galaxy);
50 50
 $uni_system = $uni_system < 1 ? 1 : ($uni_system > Vector::$knownSystems ? Vector::$knownSystems : $uni_system);
51 51
 $planet = $planet < 1 ? 1 : ($planet > Vector::$knownPlanets + 1 ? Vector::$knownPlanets + 1 : $planet);
52 52
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 $PhalanxRange = GetPhalanxRange($HavePhalanx);
65 65
 
66 66
 $planet_precache_query = db_planet_list_in_system($uni_galaxy, $uni_system);
67
-if(!empty($planet_precache_query)) {
68
-  foreach($planet_precache_query as $planet_row) {
67
+if (!empty($planet_precache_query)) {
68
+  foreach ($planet_precache_query as $planet_row) {
69 69
     $planet_list[$planet_row['planet']][$planet_row['planet_type']] = $planet_row;
70 70
   }
71 71
 }
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
  * @var Fleet[][][] $fleet_list
84 84
  */
85 85
 $fleet_list = array();
86
-foreach($system_fleet_list->_container as $objFleetSystem) {
87
-  if(!$objFleetSystem->isReturning()) {
86
+foreach ($system_fleet_list->_container as $objFleetSystem) {
87
+  if (!$objFleetSystem->isReturning()) {
88 88
     $fleet_planet = $objFleetSystem->fleet_end_planet;
89 89
     $fleet_type = $objFleetSystem->fleet_end_type;
90 90
   } else {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 $recycler_info = array();
100 100
 $planet_recyclers_orbiting = 0;
101 101
 $recyclers_fleet = array();
102
-foreach(sn_get_groups('flt_recyclers') as $recycler_id) {
102
+foreach (sn_get_groups('flt_recyclers') as $recycler_id) {
103 103
   $recycler_info[$recycler_id] = get_ship_data($recycler_id, $user);
104 104
   $recyclers_fleet[$recycler_id] = mrc_get_level($user, $planetrow, $recycler_id);
105 105
   $planet_recyclers_orbiting += $recyclers_fleet[$recycler_id];
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 $fleet_id = 1;
110 110
 $fleets = array();
111 111
 $config_game_max_planet = Vector::$knownPlanets + 1;
112
-for($Planet = 1; $Planet < $config_game_max_planet; $Planet++) {
112
+for ($Planet = 1; $Planet < $config_game_max_planet; $Planet++) {
113 113
   unset($uni_galaxyRowPlanet);
114 114
   unset($uni_galaxyRowMoon);
115 115
   unset($uni_galaxyRowUser);
@@ -119,27 +119,27 @@  discard block
 block discarded – undo
119 119
   $uni_galaxyRowPlanet = $planet_list[$Planet][PT_PLANET];
120 120
 
121 121
   $planet_fleet_id = 0;
122
-  if($uni_galaxyRowPlanet['destruyed']) {
122
+  if ($uni_galaxyRowPlanet['destruyed']) {
123 123
     CheckAbandonPlanetState($uni_galaxyRowPlanet);
124
-  } elseif($uni_galaxyRowPlanet['id']) {
125
-    if($cached['users'][$uni_galaxyRowPlanet['id_owner']]) {
124
+  } elseif ($uni_galaxyRowPlanet['id']) {
125
+    if ($cached['users'][$uni_galaxyRowPlanet['id_owner']]) {
126 126
       $uni_galaxyRowUser = $cached['users'][$uni_galaxyRowPlanet['id_owner']];
127 127
     } else {
128 128
       $uni_galaxyRowUser = db_user_by_id($uni_galaxyRowPlanet['id_owner']);
129 129
       $cached['users'][$uni_galaxyRowUser['id']] = $uni_galaxyRowUser;
130 130
     }
131 131
 
132
-    if(!$uni_galaxyRowUser['id']) {
132
+    if (!$uni_galaxyRowUser['id']) {
133 133
       $debug->warning("Planet '{$uni_galaxyRowPlanet['name']}' [{$uni_galaxy}:{$uni_system}:{$Planet}] has no owner!", 'Userless planet', 503);
134 134
       $uni_galaxyRowPlanet['destruyed'] = SN_TIME_NOW + 60 * 60 * 24;
135 135
       $uni_galaxyRowPlanet['id_owner'] = 0;
136 136
       db_planet_set_by_id($uni_galaxyRowPlanet['id'], "id_owner = 0, destruyed = {$uni_galaxyRowPlanet['destruyed']}");
137 137
     }
138 138
 
139
-    if($uni_galaxyRowUser['id']) {
139
+    if ($uni_galaxyRowUser['id']) {
140 140
       $planetcount++;
141
-      if($uni_galaxyRowUser['ally_id']) {
142
-        if($cached['allies'][$uni_galaxyRowUser['ally_id']]) {
141
+      if ($uni_galaxyRowUser['ally_id']) {
142
+        if ($cached['allies'][$uni_galaxyRowUser['ally_id']]) {
143 143
           $allyquery = $cached['allies'][$uni_galaxyRowUser['ally_id']];
144 144
         } else {
145 145
           $allyquery = db_ally_get_by_id($uni_galaxyRowUser['ally_id']);
@@ -148,19 +148,19 @@  discard block
 block discarded – undo
148 148
       }
149 149
 
150 150
       $fleets_to_planet = flt_get_fleets_to_planet_by_array_of_Fleet($fleet_list[$Planet][PT_PLANET]);
151
-      if(!empty($fleets_to_planet['own']['count'])) {
151
+      if (!empty($fleets_to_planet['own']['count'])) {
152 152
         $planet_fleet_id = $fleet_id;
153 153
         $fleets[] = tpl_parse_fleet_sn($fleets_to_planet['own']['total'], $fleet_id);
154 154
         $fleet_id++;
155 155
       }
156 156
 
157 157
       $uni_galaxyRowMoon = $planet_list[$Planet][PT_MOON];
158
-      if($uni_galaxyRowMoon['destruyed']) {
158
+      if ($uni_galaxyRowMoon['destruyed']) {
159 159
         CheckAbandonPlanetState($uni_galaxyRowMoon);
160 160
       } else {
161 161
         $moon_fleet_id = 0;
162 162
         $fleets_to_planet = flt_get_fleets_to_planet_by_array_of_Fleet($fleet_list[$Planet][PT_MOON]);
163
-        if(!empty($fleets_to_planet['own']['count'])) {
163
+        if (!empty($fleets_to_planet['own']['count'])) {
164 164
           $moon_fleet_id = $fleet_id;
165 165
           $fleets[] = tpl_parse_fleet_sn($fleets_to_planet['own']['total'], $fleet_id);
166 166
           $fleet_id++;
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
 
172 172
   $recyclers_incoming_capacity = 0;
173 173
   $uni_galaxyRowPlanet['debris'] = $uni_galaxyRowPlanet['debris_metal'] + $uni_galaxyRowPlanet['debris_crystal'];
174
-  if($uni_galaxyRowPlanet['debris']) {
175
-    if(!empty($fleet_list[$Planet][PT_DEBRIS])) {
176
-      foreach($fleet_list[$Planet][PT_DEBRIS] as $objFleetToDebris) {
177
-        if($objFleetToDebris->playerOwnerId == $user['id']) {
174
+  if ($uni_galaxyRowPlanet['debris']) {
175
+    if (!empty($fleet_list[$Planet][PT_DEBRIS])) {
176
+      foreach ($fleet_list[$Planet][PT_DEBRIS] as $objFleetToDebris) {
177
+        if ($objFleetToDebris->playerOwnerId == $user['id']) {
178 178
           $recyclers_incoming_capacity += $objFleetToDebris->shipsGetCapacityRecyclers($recycler_info);
179 179
         }
180 180
       }
@@ -251,21 +251,21 @@  discard block
 block discarded – undo
251 251
 
252 252
 tpl_assign_fleet($template, $fleets);
253 253
 
254
-foreach(sn_get_groups('defense_active') as $unit_id) {
254
+foreach (sn_get_groups('defense_active') as $unit_id) {
255 255
   $template->assign_block_vars('defense_active', array(
256 256
     'ID'   => $unit_id,
257 257
     'NAME' => classLocale::$lang['tech'][$unit_id],
258 258
   ));
259 259
 }
260 260
 
261
-foreach($cached['users'] as $PlanetUser) {
262
-  if(!$PlanetUser) {
261
+foreach ($cached['users'] as $PlanetUser) {
262
+  if (!$PlanetUser) {
263 263
     continue;
264 264
   }
265 265
 
266 266
   $user_ally = $cached['allies'][$PlanetUser['ally_id']];
267
-  if(isset($user_ally)) {
268
-    if($PlanetUser['id'] == $user_ally['ally_owner']) {
267
+  if (isset($user_ally)) {
268
+    if ($PlanetUser['id'] == $user_ally['ally_owner']) {
269 269
       $user_rank_title = $user_ally['ally_owner_range'];
270 270
     } else {
271 271
       $ally_ranks = explode(';', $user_ally['ranklist']);
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
   ));
289 289
 }
290 290
 
291
-foreach($cached['allies'] as $PlanetAlly) {
292
-  if($PlanetAlly) {
291
+foreach ($cached['allies'] as $PlanetAlly) {
292
+  if ($PlanetAlly) {
293 293
     $template->assign_block_vars('alliances', array(
294 294
       'ID'      => $PlanetAlly['id'],
295 295
       'NAME_JS' => js_safe_string($PlanetAlly['ally_name']),
Please login to merge, or discard this patch.
includes/includes/flt_page3.inc 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 // @version 1.0
4 4
 // @copyright 2008 by Chlorel for XNova
5 5
 
6
-if(SN_IN_FLEET !== true) {
6
+if (SN_IN_FLEET !== true) {
7 7
   $debug->error("Attempt to call FLEET page mode {$mode} directly - not from fleet.php", 'Forbidden', 403);
8 8
 }
9 9
 
@@ -20,25 +20,25 @@  discard block
 block discarded – undo
20 20
   $errorlist .= !is_array($fleetarray) ? classLocale::$lang['fl_no_fleetarray'] : '';
21 21
 
22 22
   $errorlist = '';
23
-  if(!$galaxy || $galaxy > Vector::$knownGalaxies|| $galaxy < 1) {
23
+  if (!$galaxy || $galaxy > Vector::$knownGalaxies || $galaxy < 1) {
24 24
     $errorlist .= classLocale::$lang['fl_limit_galaxy'];
25 25
   }
26
-  if(!$system || $system > Vector::$knownSystems|| $system < 1) {
26
+  if (!$system || $system > Vector::$knownSystems || $system < 1) {
27 27
     $errorlist .= classLocale::$lang['fl_limit_system'];
28 28
   }
29
-  if(!$planet || $planet < 1 || ($planet > Vector::$knownPlanets&& $target_mission != MT_EXPLORE)) {
29
+  if (!$planet || $planet < 1 || ($planet > Vector::$knownPlanets && $target_mission != MT_EXPLORE)) {
30 30
     $errorlist .= classLocale::$lang['fl_limit_planet'];
31 31
   }
32
-  if($planetrow['galaxy'] == $galaxy && $planetrow['system'] == $system && $planetrow['planet'] == $planet && $planetrow['planet_type'] == $planet_type) {
32
+  if ($planetrow['galaxy'] == $galaxy && $planetrow['system'] == $system && $planetrow['planet'] == $planet && $planetrow['planet_type'] == $planet_type) {
33 33
     $errorlist .= classLocale::$lang['fl_ownpl_err'];
34 34
   }
35
-  if(!$planet_type) {
35
+  if (!$planet_type) {
36 36
     $errorlist .= classLocale::$lang['fl_no_planettype'];
37 37
   }
38
-  if($planet_type != PT_PLANET && $planet_type != PT_DEBRIS && $planet_type != PT_MOON) {
38
+  if ($planet_type != PT_PLANET && $planet_type != PT_DEBRIS && $planet_type != PT_MOON) {
39 39
     $errorlist .= classLocale::$lang['fl_fleet_err_pl'];
40 40
   }
41
-  if(empty($missiontype[$target_mission])) {
41
+  if (empty($missiontype[$target_mission])) {
42 42
     $errorlist .= classLocale::$lang['fl_bad_mission'];
43 43
   }
44 44
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
   $TransDeuterium = max(0, sys_get_param_float('resource2'));
48 48
   $StorageNeeded = $TransMetal + $TransCrystal + $TransDeuterium;
49 49
 
50
-  if(!$StorageNeeded && $target_mission == MT_TRANSPORT) {
50
+  if (!$StorageNeeded && $target_mission == MT_TRANSPORT) {
51 51
     $errorlist .= classLocale::$lang['fl_noenoughtgoods'];
52 52
   }
53 53
 
@@ -56,41 +56,41 @@  discard block
 block discarded – undo
56 56
   $user = db_user_by_id($user['id'], true);
57 57
   $planetrow = db_planet_by_id($planetrow['id'], true);
58 58
 
59
-  if($target_mission == MT_EXPLORE) {
60
-    if($MaxExpeditions == 0) {
59
+  if ($target_mission == MT_EXPLORE) {
60
+    if ($MaxExpeditions == 0) {
61 61
       $errorlist .= classLocale::$lang['fl_expe_notech'];
62
-    } elseif($FlyingExpeditions >= $MaxExpeditions) {
62
+    } elseif ($FlyingExpeditions >= $MaxExpeditions) {
63 63
       $errorlist .= classLocale::$lang['fl_expe_max'];
64 64
     }
65 65
   } else {
66
-    if($TargetPlanet['id_owner']) {
67
-      if($target_mission == MT_COLONIZE) {
66
+    if ($TargetPlanet['id_owner']) {
67
+      if ($target_mission == MT_COLONIZE) {
68 68
         $errorlist .= classLocale::$lang['fl_colonized'];
69 69
       }
70 70
 
71
-      if($TargetPlanet['id_owner'] == $planetrow['id_owner']) {
72
-        if($target_mission == MT_ATTACK) {
71
+      if ($TargetPlanet['id_owner'] == $planetrow['id_owner']) {
72
+        if ($target_mission == MT_ATTACK) {
73 73
           $errorlist .= classLocale::$lang['fl_no_self_attack'];
74 74
         }
75 75
 
76
-        if($target_mission == MT_SPY) {
76
+        if ($target_mission == MT_SPY) {
77 77
           $errorlist .= classLocale::$lang['fl_no_self_spy'];
78 78
         }
79 79
       } else {
80
-        if($target_mission == MT_RELOCATE) {
80
+        if ($target_mission == MT_RELOCATE) {
81 81
           $errorlist .= classLocale::$lang['fl_only_stay_at_home'];
82 82
         }
83 83
       }
84 84
     } else {
85
-      if($target_mission < MT_COLONIZE) {
85
+      if ($target_mission < MT_COLONIZE) {
86 86
         $errorlist .= classLocale::$lang['fl_unknow_target'];
87 87
       } else {
88
-        if($target_mission == MT_DESTROY) {
88
+        if ($target_mission == MT_DESTROY) {
89 89
           $errorlist .= classLocale::$lang['fl_nomoon'];
90 90
         }
91 91
 
92
-        if($target_mission == MT_RECYCLE) {
93
-          if($TargetPlanet['debris_metal'] + $TargetPlanet['debris_crystal'] == 0) {
92
+        if ($target_mission == MT_RECYCLE) {
93
+          if ($TargetPlanet['debris_metal'] + $TargetPlanet['debris_crystal'] == 0) {
94 94
             $errorlist .= classLocale::$lang['fl_nodebris'];
95 95
           }
96 96
         }
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
   }
100 100
 
101 101
 
102
-  if(sn_module::$sn_module['unit_captain']->manifest['active'] && $captain_id = sys_get_param_id('captain_id')) {
102
+  if (sn_module::$sn_module['unit_captain']->manifest['active'] && $captain_id = sys_get_param_id('captain_id')) {
103 103
     $captain = sn_module::$sn_module['unit_captain']->unit_captain_get($planetrow['id']);
104 104
 //      mrc_get_level($user, $planetrow, UNIT_CAPTAIN, true);
105
-    if(!$captain) {
105
+    if (!$captain) {
106 106
       $errorlist .= classLocale::$lang['module_unit_captain_error_no_captain'];
107
-    } elseif($captain['unit_location_type'] == LOC_PLANET) {
108
-      if($target_mission == MT_RELOCATE && ($arriving_captain = mrc_get_level($user, $TargetPlanet, UNIT_CAPTAIN, true))) {
107
+    } elseif ($captain['unit_location_type'] == LOC_PLANET) {
108
+      if ($target_mission == MT_RELOCATE && ($arriving_captain = mrc_get_level($user, $TargetPlanet, UNIT_CAPTAIN, true))) {
109 109
         $errorlist .= classLocale::$lang['module_unit_captain_error_captain_already_bound'];
110 110
       }
111 111
     } else {
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
     }
114 114
   }
115 115
 
116
-  if($errorlist) {
116
+  if ($errorlist) {
117 117
     sn_db_transaction_rollback();
118 118
     message("<span class='error'><ul>{$errorlist}</ul></span>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, false);
119 119
   }
120 120
 
121 121
   // On verifie s'il y a assez de vaisseaux sur la planete !
122
-  foreach($fleetarray as $Ship => $Count) {
123
-    if($Count > mrc_get_level($user, $planetrow, $Ship)) {
122
+  foreach ($fleetarray as $Ship => $Count) {
123
+    if ($Count > mrc_get_level($user, $planetrow, $Ship)) {
124 124
       message("<span class='error'><b>{$classLocale['fl_fleet_err']}</b></span>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 2);
125 125
     }
126 126
   }
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
   //But is it acs??
132 132
   //Well all acs fleets must have a fleet code.
133 133
   //The co-ords must be the same as where the acs fleet is going.
134
-  if($fleet_group && sys_get_param_str('acs_target_mr') == "g{$galaxy}s{$system}p{$planet}t{$planet_type}") {
134
+  if ($fleet_group && sys_get_param_str('acs_target_mr') == "g{$galaxy}s{$system}p{$planet}t{$planet_type}") {
135 135
     //ACS attack must exist (if acs fleet has arrived this will also return false (2 checks in 1!!!)
136 136
     $aks = db_acs_get_by_group_id($fleet_group);
137
-    if(!$aks) {
137
+    if (!$aks) {
138 138
       $fleet_group = 0;
139 139
     } else {
140 140
       //Also it must be mission type 2
@@ -145,31 +145,31 @@  discard block
 block discarded – undo
145 145
       $planet = $aks['planet'];
146 146
       $planet_type = $aks['planet_type'];
147 147
     }
148
-  } elseif($target_mission == MT_ACS) {
148
+  } elseif ($target_mission == MT_ACS) {
149 149
     //Check that a failed acs attack isn't being sent, if it is, make it an attack fleet.
150 150
     $target_mission = MT_ATTACK;
151 151
   }
152 152
 
153
-  if($target_mission == MT_COLONIZE || $target_mission == MT_EXPLORE) {
153
+  if ($target_mission == MT_COLONIZE || $target_mission == MT_EXPLORE) {
154 154
     $TargetPlanet = array('galaxy' => $galaxy, 'system' => $system, 'planet' => $planet, 'id_owner' => 0);
155 155
   }
156 156
   $options = array('fleet_speed_percent' => $speed_percent, 'fleet_group' => $fleet_group, 'resources' => $StorageNeeded);
157 157
   $cant_attack = flt_can_attack($planetrow, $TargetPlanet, $fleetarray, $target_mission, $options);
158 158
 
159
-  if($cant_attack !== FLIGHT_ALLOWED) {
159
+  if ($cant_attack !== FLIGHT_ALLOWED) {
160 160
     message("<span class='error'><b>{$classLocale['fl_attack_error'][$cant_attack]}</b></span>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 99);
161 161
   }
162 162
 
163 163
   $speed_possible = array(10, 9, 8, 7, 6, 5, 4, 3, 2, 1);
164
-  if(!in_array($speed_percent, $speed_possible)) {
164
+  if (!in_array($speed_percent, $speed_possible)) {
165 165
     message("<span class='error'><b>" . classLocale::$lang['fl_cheat_speed'] . "</b></span>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 2);
166 166
   }
167 167
 
168 168
   $mission_time_in_seconds = 0;
169 169
   $arrival_time = SN_TIME_NOW + $time_to_travel;
170
-  if($target_mission == MT_ACS && $aks) {
170
+  if ($target_mission == MT_ACS && $aks) {
171 171
 //    if($fleet_start_time > $aks['ankunft']) {
172
-    if($arrival_time > $aks['ankunft']) {
172
+    if ($arrival_time > $aks['ankunft']) {
173 173
       message(classLocale::$lang['fl_aks_too_slow'] . 'Fleet arrival: ' . date(FMT_DATE_TIME, $arrival_time) . " AKS arrival: " . date(FMT_DATE_TIME, $aks['ankunft']), classLocale::$lang['fl_error']);
174 174
     }
175 175
     $group_sync_delta_time = $aks['ankunft'] - $arrival_time;
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
     // Set return time to ACS return time + fleet's time to travel
179 179
     $return_time = $aks['ankunft'] + $time_to_travel;
180 180
   } else {
181
-    if($target_mission == MT_EXPLORE || $target_mission == MT_HOLD) {
181
+    if ($target_mission == MT_EXPLORE || $target_mission == MT_HOLD) {
182 182
       $max_duration = $target_mission == MT_EXPLORE ? get_player_max_expedition_duration($user) : ($target_mission == MT_HOLD ? 12 : 0);
183
-      if($max_duration) {
183
+      if ($max_duration) {
184 184
         $mission_time_in_hours = sys_get_param_id('missiontime');
185
-        if($mission_time_in_hours > $max_duration || $mission_time_in_hours < 1) {
185
+        if ($mission_time_in_hours > $max_duration || $mission_time_in_hours < 1) {
186 186
           $debug->warning('Supplying wrong mission time', 'Hack attempt', 302, array('base_dump' => true));
187 187
           die();
188 188
         }
@@ -196,19 +196,19 @@  discard block
 block discarded – undo
196 196
   $FleetStorage = 0;
197 197
 
198 198
   $db_changeset = array();
199
-  foreach($fleetarray as $Ship => $Count) {
199
+  foreach ($fleetarray as $Ship => $Count) {
200 200
     $FleetStorage += get_unit_param($Ship, P_CAPACITY) * $Count;
201 201
     $db_changeset['unit'][] = sn_db_unit_changeset_prepare($Ship, -$Count, $user, $planetrow['id']);
202 202
   }
203 203
   $FleetStorage -= $consumption;
204 204
 
205
-  if($StorageNeeded > $FleetStorage) {
205
+  if ($StorageNeeded > $FleetStorage) {
206 206
     message("<span class='error'><b>" . classLocale::$lang['fl_nostoragespa'] . pretty_number($StorageNeeded - $FleetStorage) . "</b></span>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 2);
207 207
   }
208
-  if($planetrow['deuterium'] < $TransDeuterium + $consumption) {
208
+  if ($planetrow['deuterium'] < $TransDeuterium + $consumption) {
209 209
     message("<font color=\"red\"><b>" . classLocale::$lang['fl_no_deuterium'] . pretty_number($TransDeuterium + $consumption - $planetrow['deuterium']) . "</b></font>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 2);
210 210
   }
211
-  if(($planetrow['metal'] < $TransMetal) || ($planetrow['crystal'] < $TransCrystal)) {
211
+  if (($planetrow['metal'] < $TransMetal) || ($planetrow['crystal'] < $TransCrystal)) {
212 212
     message("<font color=\"red\"><b>" . classLocale::$lang['fl_no_resources'] . "</b></font>", classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 2);
213 213
   }
214 214
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
   $template = gettemplate('fleet3', true);
240 240
 
241
-  if(is_array($captain)) {
241
+  if (is_array($captain)) {
242 242
     db_unit_set_by_id($captain['unit_id'], "`unit_location_type` = " . LOC_FLEET . ", `unit_location_id` = {$objFleet->dbId}");
243 243
   }
244 244
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     'START_LEFT'         => floor($return_time + 1 - SN_TIME_NOW),
252 252
   );
253 253
 
254
-  if(!empty($TargetPlanet)) {
254
+  if (!empty($TargetPlanet)) {
255 255
     $template_route += array(
256 256
       'END_TYPE_TEXT_SH' => classLocale::$lang['sys_planet_type_sh'][$TargetPlanet['planet_type']],
257 257
       'END_COORDS'       => uni_render_coordinates($TargetPlanet),
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
   $template->assign_block_vars('fleets', $template_route);
265 265
 
266 266
   $sn_groups_fleet = sn_get_groups('fleet');
267
-  foreach($fleetarray as $ship_id => $ship_count) {
268
-    if(in_array($ship_id, $sn_groups_fleet) && $ship_count) {
267
+  foreach ($fleetarray as $ship_id => $ship_count) {
268
+    if (in_array($ship_id, $sn_groups_fleet) && $ship_count) {
269 269
 //      $ship_base_data = get_ship_data($ship_id, $user);
270 270
       $template->assign_block_vars('fleets.ships', array(
271 271
         'ID'          => $ship_id,
Please login to merge, or discard this patch.
includes/includes/flt_page5.inc 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 *
13 13
 **/
14 14
 
15
-if(SN_IN_FLEET !== true) {
15
+if (SN_IN_FLEET !== true) {
16 16
   $debug->error("Attempt to call FLEET page mode {$mode} directly - not from fleet.php", 'Forbidden', 403);
17 17
 }
18 18
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
   $planet_list = array();
27 27
 
28
-  if(is_array($resources_taken))
28
+  if (is_array($resources_taken))
29 29
   {
30 30
     $query = implode(',', array_keys($resources_taken));
31 31
     $query = " AND `destruyed` = 0 AND `id` IN ({$query})";
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
     $query = '';
34 34
   }
35 35
 
36
-  foreach(sn_get_groups('flt_transports') as $transport_id) {
36
+  foreach (sn_get_groups('flt_transports') as $transport_id) {
37 37
     $transports[$transport_id] = get_unit_param($transport_id, P_CAPACITY);
38 38
   }
39 39
   arsort($transports);
40 40
 
41 41
   $planets_db_list = db_planet_list_sorted($user, $planetrow['id'], '*', $query);
42 42
   !is_array($planets_db_list) ? $planets_db_list = array() : false;
43
-  foreach($planets_db_list as $planet_db_data) {
43
+  foreach ($planets_db_list as $planet_db_data) {
44 44
   // begin planet loop
45
-    if(!$query) {
45
+    if (!$query) {
46 46
       $resources_taken[$planet_db_data['id']] = 1;
47 47
     }
48 48
     sn_db_transaction_start();
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     $planet_id = $planet_db_data['id'];
55 55
 
56 56
     $planet_resources = 0;
57
-    foreach(sn_get_groups('resources_loot') as $resource_id) {
58
-      if($resources_taken[$planet_id] == 1 || $resources_taken[$planet_id][$resource_id]) {
57
+    foreach (sn_get_groups('resources_loot') as $resource_id) {
58
+      if ($resources_taken[$planet_id] == 1 || $resources_taken[$planet_id][$resource_id]) {
59 59
         $planet_resources += floor(mrc_get_level($user, $planet_db_data, $resource_id, true, true)); // $planet_db_data[get_unit_param($resource_id, P_NAME)]);
60 60
       }
61 61
     }
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
     $fleet_capacity = 0;
87 87
     $ship_loadout = array();
88 88
     $fleet = array();
89
-    foreach($transports as $ship_id => $ship_capacity) {
90
-      if($ship_count = mrc_get_level($user, $planet_db_data, $ship_id, true, true)) {
89
+    foreach ($transports as $ship_id => $ship_capacity) {
90
+      if ($ship_count = mrc_get_level($user, $planet_db_data, $ship_id, true, true)) {
91 91
         $ship_loadout[$ship_id]['capacity'] = $ship_count * $ship_capacity;
92 92
         $ship_loadout[$ship_id]['taken'] = 0;
93 93
         $fleet_capacity += $ship_loadout[$ship_id]['capacity'];
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 
99 99
     $will_take = min($planet_resources, $fleet_capacity);
100 100
 
101
-    foreach($ship_loadout as $ship_id => &$planet_ship) {
101
+    foreach ($ship_loadout as $ship_id => &$planet_ship) {
102 102
       $can_take = min($will_take, $planet_ship['capacity']);
103
-      if($can_take <= 0) {
103
+      if ($can_take <= 0) {
104 104
         continue;
105 105
       }
106 106
       $planet_ship['capacity'] -= $can_take;
@@ -108,23 +108,23 @@  discard block
 block discarded – undo
108 108
       $fleet[$ship_id] = ceil($planet_ship['taken'] / $transports[$ship_id]);
109 109
 
110 110
       $will_take -= $can_take;
111
-      if($will_take <= 0) {
111
+      if ($will_take <= 0) {
112 112
         break;
113 113
       }
114 114
     }
115 115
 
116
-    if(!empty($fleet)) {
116
+    if (!empty($fleet)) {
117 117
       $travel_data = flt_travel_data($user, $planetrow, $planet_db_data, $fleet, 10);
118 118
       $planet_data['FLEET_SPEED'] = $travel_data['fleet_speed'];
119 119
       $planet_data['DISTANCE']    = $travel_data['distance'];
120 120
       $planet_data['DURATION']    = $travel_data['duration'];
121 121
       $planet_data['CONSUMPTION'] = $travel_data['consumption'];
122 122
 
123
-      if(floor(mrc_get_level($user, $planet_db_data, RES_DEUTERIUM, true)) >= $planet_data['CONSUMPTION']) {
123
+      if (floor(mrc_get_level($user, $planet_db_data, RES_DEUTERIUM, true)) >= $planet_data['CONSUMPTION']) {
124 124
         $will_take = min($planet_resources, $fleet_capacity) - $planet_data['CONSUMPTION'];
125 125
 
126
-        foreach(sn_get_groups('resources_loot') as $resource_id) {
127
-          if($resources_taken[$planet_id] != 1 && !$resources_taken[$planet_id][$resource_id]) {
126
+        foreach (sn_get_groups('resources_loot') as $resource_id) {
127
+          if ($resources_taken[$planet_id] != 1 && !$resources_taken[$planet_id][$resource_id]) {
128 128
             continue;
129 129
           }
130 130
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
           $fleet[$resource_id] = min($will_take, $resource_amount);
134 134
           $will_take -= $resource_amount;
135 135
 
136
-          if($will_take <= 0) {
136
+          if ($will_take <= 0) {
137 137
             break;
138 138
           }
139 139
         }
@@ -157,19 +157,19 @@  discard block
 block discarded – undo
157 157
 
158 158
 $resources_taken = sys_get_param('resources');
159 159
 
160
-if(!empty($resources_taken))  { // begin processing parameters
160
+if (!empty($resources_taken)) { // begin processing parameters
161 161
   $planet_list = flt_build_gathering($resources_taken);
162 162
 
163
-  foreach($planet_list as $planet_id => $planet_data) {
164
-    if($planet_data['RESULT'] == FLIGHT_ALLOWED) {
163
+  foreach ($planet_list as $planet_id => $planet_data) {
164
+    if ($planet_data['RESULT'] == FLIGHT_ALLOWED) {
165 165
       $planet_data['RESULT'] = flt_t_send_fleet($user, $planet_data['PLANET_DB_DATA'], $planetrow, $planet_data['FLEET'], MT_TRANSPORT);
166 166
     }
167 167
 
168 168
     $planet_data['MESSAGE'] = classLocale::$lang['fl_attack_error'][$planet_data['RESULT']];
169 169
 
170 170
     $template->assign_block_vars('results', $planet_data);
171
-    if(!empty($planet_data['FLEET']) && $planet_data['RESULT'] == FLIGHT_ALLOWED) {
172
-      foreach($planet_data['FLEET'] as $unit_id => $amount) {
171
+    if (!empty($planet_data['FLEET']) && $planet_data['RESULT'] == FLIGHT_ALLOWED) {
172
+      foreach ($planet_data['FLEET'] as $unit_id => $amount) {
173 173
         $template->assign_block_vars('results.units', array(
174 174
           'ID'     => $unit_id,
175 175
           'NAME'   => classLocale::$lang['tech'][$unit_id],
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 // Building list of own planets & moons
184 184
 $planet_list = flt_build_gathering();
185
-foreach($planet_list as $planet_data) {
185
+foreach ($planet_list as $planet_data) {
186 186
   $planet_data['DURATION'] = $planet_data['DURATION'] ? pretty_time($planet_data['DURATION']) : classLocale::$lang['flt_no_fuel'];
187 187
   $template->assign_block_vars('colonies', $planet_data);
188 188
 }
Please login to merge, or discard this patch.
includes/constants.php 1 patch
Spacing   +236 added lines, -236 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 
39 39
 // Game type constants starts with GAME_
40 40
 define('GAME_SUPERNOVA', 0);
41
-define('GAME_OGAME'    , 1);
42
-define('GAME_BLITZ'    , 2);
41
+define('GAME_OGAME', 1);
42
+define('GAME_BLITZ', 2);
43 43
 
44 44
 // Date & time range constants
45 45
 define('DATE_FOREVER', 2000000000);
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 define('PERIOD_YEAR', PERIOD_DAY * 365);
53 53
 define('PERIOD_FOREVER', PERIOD_YEAR * 100);
54 54
 
55
-define('PERIOD_MINUTE_2' , PERIOD_MINUTE * 2);
56
-define('PERIOD_MINUTE_3' , PERIOD_MINUTE * 3);
57
-define('PERIOD_MINUTE_5' , PERIOD_MINUTE * 5);
55
+define('PERIOD_MINUTE_2', PERIOD_MINUTE * 2);
56
+define('PERIOD_MINUTE_3', PERIOD_MINUTE * 3);
57
+define('PERIOD_MINUTE_5', PERIOD_MINUTE * 5);
58 58
 define('PERIOD_MINUTE_10', PERIOD_MINUTE * 10);
59
-define('PERIOD_DAY_3'    , PERIOD_DAY * 3);
60
-define('PERIOD_WEEK_2'   , PERIOD_WEEK * 2);
61
-define('PERIOD_MONTH_2'  , PERIOD_MONTH * 2);
62
-define('PERIOD_MONTH_3'  , PERIOD_MONTH * 3);
59
+define('PERIOD_DAY_3', PERIOD_DAY * 3);
60
+define('PERIOD_WEEK_2', PERIOD_WEEK * 2);
61
+define('PERIOD_MONTH_2', PERIOD_MONTH * 2);
62
+define('PERIOD_MONTH_3', PERIOD_MONTH * 3);
63 63
 
64 64
 define('FONT_SIZE_PERCENT_MIN', 56.25);
65 65
 define('FONT_SIZE_PERCENT_DEFAULT', 68.75);
@@ -112,100 +112,100 @@  discard block
 block discarded – undo
112 112
 define('SN_SYS_SEC_CHARS_ALLOWED', 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghkmnpqrstuvwxyz0123456789');
113 113
 
114 114
 // Mot qui sont interdit a la saisie !
115
-$ListCensure = array ( '/</', '/>/', '/script/i', '/doquery/i', '/http/i', '/javascript/i');
115
+$ListCensure = array('/</', '/>/', '/script/i', '/doquery/i', '/http/i', '/javascript/i');
116 116
 
117 117
 // Confirmation record types
118
-define('CONFIRM_REGISTRATION'  , 1);
118
+define('CONFIRM_REGISTRATION', 1);
119 119
 define('CONFIRM_PASSWORD_RESET', 2);
120
-define('CONFIRM_DELETE'        , 3);
120
+define('CONFIRM_DELETE', 3);
121 121
 
122 122
 define('AFFILIATE_MM_TO_REFERRAL_DM', 2);
123 123
 
124 124
 // Ally diplomacy statuses
125
-define('ALLY_DIPLOMACY_SELF'         , 'self');
126
-define('ALLY_DIPLOMACY_NEUTRAL'      , 'neutral');
127
-define('ALLY_DIPLOMACY_WAR'          , 'war');
128
-define('ALLY_DIPLOMACY_PEACE'        , 'peace');
125
+define('ALLY_DIPLOMACY_SELF', 'self');
126
+define('ALLY_DIPLOMACY_NEUTRAL', 'neutral');
127
+define('ALLY_DIPLOMACY_WAR', 'war');
128
+define('ALLY_DIPLOMACY_PEACE', 'peace');
129 129
 define('ALLY_DIPLOMACY_CONFEDERATION', 'confederation');
130
-define('ALLY_DIPLOMACY_FEDERATION'   , 'federation');
131
-define('ALLY_DIPLOMACY_UNION'        , 'union');
132
-define('ALLY_DIPLOMACY_MASTER'       , 'master');
133
-define('ALLY_DIPLOMACY_SLAVE'        , 'slave');
130
+define('ALLY_DIPLOMACY_FEDERATION', 'federation');
131
+define('ALLY_DIPLOMACY_UNION', 'union');
132
+define('ALLY_DIPLOMACY_MASTER', 'master');
133
+define('ALLY_DIPLOMACY_SLAVE', 'slave');
134 134
 
135 135
 define('ALLY_PROPOSE_SEND', 0);
136 136
 
137 137
 // Quest types
138
-define('QUEST_TYPE_BUILD'   , 1);
138
+define('QUEST_TYPE_BUILD', 1);
139 139
 define('QUEST_TYPE_RESEARCH', 2);
140
-define('QUEST_TYPE_COMBAT'  , 3);
140
+define('QUEST_TYPE_COMBAT', 3);
141 141
 
142
-define('QUEST_STATUS_NOT_STARTED' , 0);
143
-define('QUEST_STATUS_STARTED'     , 1);
144
-define('QUEST_STATUS_COMPLETE'    , 2);
142
+define('QUEST_STATUS_NOT_STARTED', 0);
143
+define('QUEST_STATUS_STARTED', 1);
144
+define('QUEST_STATUS_COMPLETE', 2);
145 145
 
146 146
 // *** Combat-related constants
147 147
 // *** Mission Type constants starts with MT_
148
-define('MT_NONE'     ,  0);
149
-define('MT_ATTACK'   ,  1);
150
-define('MT_ACS'      ,  2);
151
-define('MT_TRANSPORT',  3);
152
-define('MT_RELOCATE' ,  4);
153
-define('MT_HOLD'     ,  5);
154
-define('MT_SPY'      ,  6);
155
-define('MT_COLONIZE' ,  7);
156
-define('MT_RECYCLE'  ,  8);
157
-define('MT_DESTROY'  ,  9);
158
-define('MT_MISSILE'  , 10);
159
-define('MT_EXPLORE'  , 15);
148
+define('MT_NONE', 0);
149
+define('MT_ATTACK', 1);
150
+define('MT_ACS', 2);
151
+define('MT_TRANSPORT', 3);
152
+define('MT_RELOCATE', 4);
153
+define('MT_HOLD', 5);
154
+define('MT_SPY', 6);
155
+define('MT_COLONIZE', 7);
156
+define('MT_RECYCLE', 8);
157
+define('MT_DESTROY', 9);
158
+define('MT_MISSILE', 10);
159
+define('MT_EXPLORE', 15);
160 160
 
161 161
 // *** Planet Target constants starts with PT_
162 162
 define('PT_NONE', 0);
163 163
 define('PT_ALL', 0);
164 164
 define('PT_PLANET', 1);
165 165
 define('PT_DEBRIS', 2);
166
-define('PT_MOON'  , 3);
166
+define('PT_MOON', 3);
167 167
 
168 168
 // *** Unit locations - shows db table where unit belong
169 169
 // Also cache indexes
170
-define('LOC_NONE',    -1);
170
+define('LOC_NONE', -1);
171 171
 define('LOC_UNIVERSE', 0);
172
-define('LOC_PLANET',   1);
173
-define('LOC_DEBRIS',   2); // Translates to `planets` table planet_type = 1, `debris_*` fields
174
-define('LOC_MOON',     3); // Translates to `planets` table planet_type = 3
175
-define('LOC_USER',     4);
176
-define('LOC_FLEET',    5);
177
-define('LOC_ALLY',     6);
178
-define('LOC_UNIT_NUMERIC',     7);
179
-define('LOC_UNIT_LIST',     8);
172
+define('LOC_PLANET', 1);
173
+define('LOC_DEBRIS', 2); // Translates to `planets` table planet_type = 1, `debris_*` fields
174
+define('LOC_MOON', 3); // Translates to `planets` table planet_type = 3
175
+define('LOC_USER', 4);
176
+define('LOC_FLEET', 5);
177
+define('LOC_ALLY', 6);
178
+define('LOC_UNIT_NUMERIC', 7);
179
+define('LOC_UNIT_LIST', 8);
180 180
 
181 181
 // ТОЛЬКО ВНУТРЕНЕЕ!!!
182
-define('LOC_UNIT',    'LOC_UNIT');
183
-define('LOC_QUE',     'LOC_QUE');
184
-define('LOC_LOCATION','LOC_LOCATION');
185
-define('LOC_LOCKS','LOC_LOCKS');
182
+define('LOC_UNIT', 'LOC_UNIT');
183
+define('LOC_QUE', 'LOC_QUE');
184
+define('LOC_LOCATION', 'LOC_LOCATION');
185
+define('LOC_LOCKS', 'LOC_LOCKS');
186 186
 
187 187
 // *** Caching masks
188
-define('CACHE_NOTHING'    ,  0);
189
-define('CACHE_FLEET'      ,  1);
190
-define('CACHE_PLANET'     ,  2);
191
-define('CACHE_USER'       ,  4);
192
-define('CACHE_SOURCE'     ,  8);
188
+define('CACHE_NOTHING', 0);
189
+define('CACHE_FLEET', 1);
190
+define('CACHE_PLANET', 2);
191
+define('CACHE_USER', 4);
192
+define('CACHE_SOURCE', 8);
193 193
 define('CACHE_DESTINATION', 16);
194
-define('CACHE_EVENT'      , 32);
194
+define('CACHE_EVENT', 32);
195 195
 
196
-define('CACHE_USER_SRC'  , CACHE_USER | CACHE_SOURCE);
197
-define('CACHE_USER_DST'  , CACHE_USER | CACHE_DESTINATION);
196
+define('CACHE_USER_SRC', CACHE_USER | CACHE_SOURCE);
197
+define('CACHE_USER_DST', CACHE_USER | CACHE_DESTINATION);
198 198
 define('CACHE_PLANET_SRC', CACHE_PLANET | CACHE_SOURCE);
199 199
 define('CACHE_PLANET_DST', CACHE_PLANET | CACHE_DESTINATION);
200
-define('CACHE_COMBAT'    , CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION);
200
+define('CACHE_COMBAT', CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION);
201 201
 
202
-define('CACHE_ALL'       , CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION | CACHE_EVENT);
202
+define('CACHE_ALL', CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION | CACHE_EVENT);
203 203
 
204
-define('CACHE_NONE'      , CACHE_NOTHING); // Alias for me
204
+define('CACHE_NONE', CACHE_NOTHING); // Alias for me
205 205
 
206 206
 // *** Event types
207 207
 define('EVENT_FLEET_ARRIVE', 1);
208
-define('EVENT_FLEET_STAY'  , 2);
208
+define('EVENT_FLEET_STAY', 2);
209 209
 define('EVENT_FLEET_RETURN', 3);
210 210
 
211 211
 // *** Constants for changing DM
@@ -258,10 +258,10 @@  discard block
 block discarded – undo
258 258
 
259 259
 
260 260
 // Operation error status HARDCODE!
261
-define('ERR_NONE'               , 0); // No error
262
-define('ERR_WARNING'            , 1); // There is warning - something altering normal operation process
263
-define('ERR_ERROR'              , 2); // There is error - something permits operation from process
264
-define('ERR_HACK'               , 4); // Operation is qualified as hack attempt
261
+define('ERR_NONE', 0); // No error
262
+define('ERR_WARNING', 1); // There is warning - something altering normal operation process
263
+define('ERR_ERROR', 2); // There is error - something permits operation from process
264
+define('ERR_HACK', 4); // Operation is qualified as hack attempt
265 265
 // New GLOBAL operation results
266 266
 //define('RESULT_DEFAULT' , 0); // Default result - all went OK or result really doesn't matter
267 267
 //define('RESULT_WARNING' , 1);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 define('SN_PAYMENT_REQUEST_OK', 0);
282 282
 define('SN_PAYMENT_REQUEST_ERROR_UNIT_AMOUNT', 1);
283 283
 define('SN_PAYMENT_REQUEST_ERROR_PAYLINK_UNSUPPORTED', 2);
284
-define('SN_PAYMENT_REQUEST_IP_WRONG', 3);  // Неправильный IP входящей системы - обычно хак
284
+define('SN_PAYMENT_REQUEST_IP_WRONG', 3); // Неправильный IP входящей системы - обычно хак
285 285
 define('SN_PAYMENT_REQUEST_COMMAND_UNSUPPORTED', 4); // Неподдерживаемая команда - обычно хак
286 286
 define('SN_PAYMENT_REQUEST_SIGNATURE_INVALID', 5); // Неправильная подпись или не сошлась контрольная сумма - обычно хак
287 287
 define('SN_MODULE_DISABLED', 6); // Модуль отключен // УНИВЕРСАЛЬНЫЙ ОТВЕТ!
@@ -554,16 +554,16 @@  discard block
 block discarded – undo
554 554
 //define('F_DEVICE_ID',     'F_DEVICE_ID');
555 555
 //define('F_DEVICE_CYPHER', 'F_DEVICE_CYPHER');
556 556
 
557
-define('F_PROVIDER_ID',   'F_PROVIDER_ID');
557
+define('F_PROVIDER_ID', 'F_PROVIDER_ID');
558 558
 // define('F_PROVIDER_LIST', 'F_PROVIDER_LIST');
559 559
 
560 560
 define('F_IMPERSONATE_STATUS', 'F_IMPERSONATE_STATUS');
561 561
 define('F_IMPERSONATE_OPERATOR', 'F_IMPERSONATE_OPERATOR');
562 562
 
563
-define('F_LOGIN_STATUS',  'F_LOGIN_STATUS');
563
+define('F_LOGIN_STATUS', 'F_LOGIN_STATUS');
564 564
 define('F_LOGIN_MESSAGE', 'F_LOGIN_MESSAGE');
565 565
 
566
-define('F_PLAYER_REGISTER_STATUS',  'F_PLAYER_REGISTER_STATUS');
566
+define('F_PLAYER_REGISTER_STATUS', 'F_PLAYER_REGISTER_STATUS');
567 567
 define('F_PLAYER_REGISTER_MESSAGE', 'F_PLAYER_REGISTER_MESSAGE');
568 568
 
569 569
 define('F_USER_ID', 'F_USER_ID');
@@ -607,66 +607,66 @@  discard block
 block discarded – undo
607 607
 
608 608
 
609 609
 // Option groups
610
-define('OPT_ALL',      0);
611
-define('OPT_MESSAGE',  1);
610
+define('OPT_ALL', 0);
611
+define('OPT_MESSAGE', 1);
612 612
 define('OPT_UNIVERSE', 2);
613 613
 define('OPT_INTERFACE', 3);
614 614
 
615 615
 // Message classes
616
-define('MSG_TYPE_OUTBOX'   ,  -1);
617
-define('MSG_TYPE_SPY'      ,   0);
618
-define('MSG_TYPE_PLAYER'   ,   1);
619
-define('MSG_TYPE_ALLIANCE' ,   2);
620
-define('MSG_TYPE_COMBAT'   ,   3);
621
-define('MSG_TYPE_RECYCLE'  ,   4);
622
-define('MSG_TYPE_TRANSPORT',   5);
623
-define('MSG_TYPE_ADMIN'    ,   6);
624
-define('MSG_TYPE_EXPLORE'  ,  15);
625
-define('MSG_TYPE_QUE'      ,  99);
626
-define('MSG_TYPE_NEW'      , 100);
616
+define('MSG_TYPE_OUTBOX', -1);
617
+define('MSG_TYPE_SPY', 0);
618
+define('MSG_TYPE_PLAYER', 1);
619
+define('MSG_TYPE_ALLIANCE', 2);
620
+define('MSG_TYPE_COMBAT', 3);
621
+define('MSG_TYPE_RECYCLE', 4);
622
+define('MSG_TYPE_TRANSPORT', 5);
623
+define('MSG_TYPE_ADMIN', 6);
624
+define('MSG_TYPE_EXPLORE', 15);
625
+define('MSG_TYPE_QUE', 99);
626
+define('MSG_TYPE_NEW', 100);
627 627
 
628 628
 // Attack verification statuses
629
-define('FLIGHT_ALLOWED'           ,  0);
630
-define('FLIGHT_VECTOR_NO_TARGET'         ,  1);
631
-define('FLIGHT_PLAYER_OWN'               ,  2);
632
-define('FLIGHT_MISSION_IMPOSSIBLE'     ,  3);
633
-define('FLIGHT_MISSION_HOLD_NO_ALLY_DEPOSIT'   ,  4);
634
-define('FLIGHT_MISSION_RECYCLE_NO_DEBRIS'         ,  5);
635
-define('FLIGHT_PLAYER_VACATION'          ,  6);
636
-define('FLIGHT_PLAYER_SAME_IP'           ,  7);
637
-define('FLIGHT_PLAYER_BUFFING'           ,  8);
638
-define('FLIGHT_PLAYER_ADMIN'             ,  9);
639
-define('FLIGHT_PLAYER_NOOB'              , 10);
640
-define('FLIGHT_PLAYER_VACATION_OWN'      , 11);
641
-define('FLIGHT_MISSION_MISSILE_NO_SILO'           , 12);
642
-define('FLIGHT_MISSION_MISSILE_NO_MISSILES'        , 13);
643
-define('FLIGHT_SHIPS_NO_SHIPS'          , 14);
644
-define('FLIGHT_FLEET_NO_SLOTS'          , 15);
645
-define('FLIGHT_SHIPS_NOT_ENOUGH_OR_RESOURCES'          , 16);
646
-define('FLIGHT_SHIPS_NO_RECYCLERS'      , 17);
647
-define('FLIGHT_MISSION_SPY_NO_SPIES'          , 18);
648
-define('FLIGHT_SHIPS_NO_COLONIZER'      , 19);
649
-define('FLIGHT_MISSION_MISSILE_TOO_FAR'   , 20);
650
-define('FLIGHT_MISSION_MISSILE_WRONG_STRUCTURE'   , 21);
651
-define('FLIGHT_RESOURCES_FUEL_NOT_ENOUGH'           , 22);
652
-define('FLIGHT_RESOURCES_NOT_ENOUGH'      , 23);
653
-define('FLIGHT_MISSION_ACS_NOT_EXISTS'            , 24);
654
-define('FLIGHT_MISSION_ACS_MISSTARGET'    , 25);
655
-define('FLIGHT_FLEET_SPEED_WRONG'       , 26);
656
-define('FLIGHT_MISSION_ACS_TOO_LATE'      , 27);
657
-define('FLIGHT_MISSION_ATTACK_BASHING'           , 28);
658
-define('FLIGHT_MISSION_ATTACK_BASHING_WAR_DELAY' , 29);
659
-define('FLIGHT_MISSION_ACS_WRONG_TARGET'  , 30);
660
-define('FLIGHT_VECTOR_SAME_SOURCE'              , 31);
629
+define('FLIGHT_ALLOWED', 0);
630
+define('FLIGHT_VECTOR_NO_TARGET', 1);
631
+define('FLIGHT_PLAYER_OWN', 2);
632
+define('FLIGHT_MISSION_IMPOSSIBLE', 3);
633
+define('FLIGHT_MISSION_HOLD_NO_ALLY_DEPOSIT', 4);
634
+define('FLIGHT_MISSION_RECYCLE_NO_DEBRIS', 5);
635
+define('FLIGHT_PLAYER_VACATION', 6);
636
+define('FLIGHT_PLAYER_SAME_IP', 7);
637
+define('FLIGHT_PLAYER_BUFFING', 8);
638
+define('FLIGHT_PLAYER_ADMIN', 9);
639
+define('FLIGHT_PLAYER_NOOB', 10);
640
+define('FLIGHT_PLAYER_VACATION_OWN', 11);
641
+define('FLIGHT_MISSION_MISSILE_NO_SILO', 12);
642
+define('FLIGHT_MISSION_MISSILE_NO_MISSILES', 13);
643
+define('FLIGHT_SHIPS_NO_SHIPS', 14);
644
+define('FLIGHT_FLEET_NO_SLOTS', 15);
645
+define('FLIGHT_SHIPS_NOT_ENOUGH_OR_RESOURCES', 16);
646
+define('FLIGHT_SHIPS_NO_RECYCLERS', 17);
647
+define('FLIGHT_MISSION_SPY_NO_SPIES', 18);
648
+define('FLIGHT_SHIPS_NO_COLONIZER', 19);
649
+define('FLIGHT_MISSION_MISSILE_TOO_FAR', 20);
650
+define('FLIGHT_MISSION_MISSILE_WRONG_STRUCTURE', 21);
651
+define('FLIGHT_RESOURCES_FUEL_NOT_ENOUGH', 22);
652
+define('FLIGHT_RESOURCES_NOT_ENOUGH', 23);
653
+define('FLIGHT_MISSION_ACS_NOT_EXISTS', 24);
654
+define('FLIGHT_MISSION_ACS_MISSTARGET', 25);
655
+define('FLIGHT_FLEET_SPEED_WRONG', 26);
656
+define('FLIGHT_MISSION_ACS_TOO_LATE', 27);
657
+define('FLIGHT_MISSION_ATTACK_BASHING', 28);
658
+define('FLIGHT_MISSION_ATTACK_BASHING_WAR_DELAY', 29);
659
+define('FLIGHT_MISSION_ACS_WRONG_TARGET', 30);
660
+define('FLIGHT_VECTOR_SAME_SOURCE', 31);
661 661
 define('FLIGHT_RESOURCES_FORBIDDEN', 32);
662
-define('FLIGHT_RESOURCES_EMPTY'   , 33);
663
-define('FLIGHT_SHIPS_NOT_ONLY_SPIES'       , 34);
664
-define('FLIGHT_FLEET_TOO_FAR'           , 35);
665
-define('FLIGHT_FLEET_OVERLOAD'        , 36);
666
-define('FLIGHT_MISSION_UNKNOWN'    , 37);
667
-define('FLIGHT_SHIPS_UNIT_WRONG'        , 38);
668
-define('FLIGHT_SHIPS_UNMOVABLE'        , 39);
669
-define('FLIGHT_SHIPS_NEGATIVE'  , 40);
662
+define('FLIGHT_RESOURCES_EMPTY', 33);
663
+define('FLIGHT_SHIPS_NOT_ONLY_SPIES', 34);
664
+define('FLIGHT_FLEET_TOO_FAR', 35);
665
+define('FLIGHT_FLEET_OVERLOAD', 36);
666
+define('FLIGHT_MISSION_UNKNOWN', 37);
667
+define('FLIGHT_SHIPS_UNIT_WRONG', 38);
668
+define('FLIGHT_SHIPS_UNMOVABLE', 39);
669
+define('FLIGHT_SHIPS_NEGATIVE', 40);
670 670
 define('FLIGHT_RESOURCES_NEGATIVE', 41);
671 671
 define('FLIGHT_MISSION_MORATORIUM', 42);
672 672
 define('FLIGHT_PLAYER_CHILD_PROTECTION', 43);
@@ -681,12 +681,12 @@  discard block
 block discarded – undo
681 681
 
682 682
 
683 683
 // *** Races - Homeworlds
684
-define('RACE_NONE'    , 0);
685
-define('RACE_EARTH'   , 1);
686
-define('RACE_MOON'    , 2);
687
-define('RACE_MERCURY' , 3);
688
-define('RACE_VENUS'   , 4);
689
-define('RACE_MARS'    , 5);
684
+define('RACE_NONE', 0);
685
+define('RACE_EARTH', 1);
686
+define('RACE_MOON', 2);
687
+define('RACE_MERCURY', 3);
688
+define('RACE_VENUS', 4);
689
+define('RACE_MARS', 5);
690 690
 define('RACE_ASTEROID', 6);
691 691
 // define('MARKET_INFO'         , 7);
692 692
 
@@ -694,114 +694,114 @@  discard block
 block discarded – undo
694 694
 
695 695
 // *** Market variables
696 696
 // === Market blocks
697
-define('MARKET_ENTRY'        , 0);
698
-define('MARKET_RESOURCES'    , 1);
699
-define('MARKET_SCRAPPER'     , 2);
700
-define('MARKET_STOCKMAN'     , 3);
701
-define('MARKET_EXCHANGE'     , 4);
702
-define('MARKET_BANKER'       , 5);
703
-define('MARKET_PAWNSHOP'     , 6);
704
-define('MARKET_INFO'         , 7);
697
+define('MARKET_ENTRY', 0);
698
+define('MARKET_RESOURCES', 1);
699
+define('MARKET_SCRAPPER', 2);
700
+define('MARKET_STOCKMAN', 3);
701
+define('MARKET_EXCHANGE', 4);
702
+define('MARKET_BANKER', 5);
703
+define('MARKET_PAWNSHOP', 6);
704
+define('MARKET_INFO', 7);
705 705
 
706 706
 // === Market error statuses
707
-define('MARKET_NOTHING'              ,  0);
708
-define('MARKET_DEAL'                 ,  1);
709
-define('MARKET_DEAL_TRADE'           ,  2);
710
-define('MARKET_NO_DM'                ,  3);
711
-define('MARKET_NO_RESOURCES'         ,  4);
712
-define('MARKET_ZERO_DEAL'            ,  5);
713
-define('MARKET_NO_SHIPS'             ,  6);
714
-define('MARKET_NOT_A_SHIP'           ,  7);
715
-define('MARKET_NO_STOCK'             ,  8);
716
-define('MARKET_ZERO_RES_STOCK'       ,  9);
717
-define('MARKET_NEGATIVE_SHIPS'       , 10);
718
-
719
-define('MARKET_INFO_PLAYER'          , 12);
720
-define('MARKET_INFO_WRONG'           , 11);
707
+define('MARKET_NOTHING', 0);
708
+define('MARKET_DEAL', 1);
709
+define('MARKET_DEAL_TRADE', 2);
710
+define('MARKET_NO_DM', 3);
711
+define('MARKET_NO_RESOURCES', 4);
712
+define('MARKET_ZERO_DEAL', 5);
713
+define('MARKET_NO_SHIPS', 6);
714
+define('MARKET_NOT_A_SHIP', 7);
715
+define('MARKET_NO_STOCK', 8);
716
+define('MARKET_ZERO_RES_STOCK', 9);
717
+define('MARKET_NEGATIVE_SHIPS', 10);
718
+
719
+define('MARKET_INFO_PLAYER', 12);
720
+define('MARKET_INFO_WRONG', 11);
721 721
 define('MARKET_INFO_PLAYER_NOT_FOUND', 13);
722
-define('MARKET_INFO_PLAYER_WRONG'    , 14);
723
-define('MARKET_INFO_PLAYER_SAME'     , 15);
722
+define('MARKET_INFO_PLAYER_WRONG', 14);
723
+define('MARKET_INFO_PLAYER_SAME', 15);
724 724
 
725 725
 
726 726
 
727 727
 
728 728
 // *** Mercenary/talent bonus types
729
-define('BONUS_NONE'    ,            0);  // No bonus
730
-define('BONUS_PERCENT' ,            1);  // Percent on base value
731
-define('BONUS_ADD'     ,            2);  // Add
732
-define('BONUS_ABILITY' ,            3);  // Some ability
733
-define('BONUS_MULTIPLY',            4);  // Multiply by value
734
-define('BONUS_PERCENT_CUMULATIVE' , 5);  // Cumulative percent on base value
735
-define('BONUS_PERCENT_DEGRADED' ,   6);  // Bonus amount degraded with increase as pow(bonus, level) (?)
736
-define('BONUS_SPEED',               7);  // Speed bonus
729
+define('BONUS_NONE', 0); // No bonus
730
+define('BONUS_PERCENT', 1); // Percent on base value
731
+define('BONUS_ADD', 2); // Add
732
+define('BONUS_ABILITY', 3); // Some ability
733
+define('BONUS_MULTIPLY', 4); // Multiply by value
734
+define('BONUS_PERCENT_CUMULATIVE', 5); // Cumulative percent on base value
735
+define('BONUS_PERCENT_DEGRADED', 6); // Bonus amount degraded with increase as pow(bonus, level) (?)
736
+define('BONUS_SPEED', 7); // Speed bonus
737 737
 
738 738
 // *** Action constant (build should be replaced with ACTION)
739
-define('BUILD_CREATE' ,  1);
739
+define('BUILD_CREATE', 1);
740 740
 define('BUILD_DESTROY', -1);
741 741
 define('BUILD_AUTOCONVERT', 2);
742 742
 
743
-define('ACTION_SELL'       , -1);
744
-define('ACTION_NOTHING'    ,  0);
745
-define('ACTION_BUY'        ,  1);
746
-define('ACTION_USE'        ,  2);
747
-define('ACTION_DELETE'     ,  3);
743
+define('ACTION_SELL', -1);
744
+define('ACTION_NOTHING', 0);
745
+define('ACTION_BUY', 1);
746
+define('ACTION_USE', 2);
747
+define('ACTION_DELETE', 3);
748 748
 
749 749
 // *** Check unit availability codes
750
-define('BUILD_ALLOWED'         , 0); // HARDCODED! DO NOT CHANGE!
750
+define('BUILD_ALLOWED', 0); // HARDCODED! DO NOT CHANGE!
751 751
 define('BUILD_REQUIRE_NOT_MEET', 1);
752
-define('BUILD_AMOUNT_WRONG'    , 2);
753
-define('BUILD_QUE_WRONG'       , 3);
754
-define('BUILD_QUE_UNIT_WRONG'  , 4);
755
-define('BUILD_INDESTRUCTABLE'  , 5);
756
-define('BUILD_NO_RESOURCES'    , 6);
757
-define('BUILD_NO_UNITS'        , 7);
758
-define('BUILD_UNIT_BUSY'       , 8);
759
-define('BUILD_QUE_FULL'        , 9);
760
-define('BUILD_SILO_FULL'       ,10);
761
-define('BUILD_MAX_REACHED'     ,11);
762
-define('BUILD_SECTORS_NONE'    ,12);
752
+define('BUILD_AMOUNT_WRONG', 2);
753
+define('BUILD_QUE_WRONG', 3);
754
+define('BUILD_QUE_UNIT_WRONG', 4);
755
+define('BUILD_INDESTRUCTABLE', 5);
756
+define('BUILD_NO_RESOURCES', 6);
757
+define('BUILD_NO_UNITS', 7);
758
+define('BUILD_UNIT_BUSY', 8);
759
+define('BUILD_QUE_FULL', 9);
760
+define('BUILD_SILO_FULL', 10);
761
+define('BUILD_MAX_REACHED', 11);
762
+define('BUILD_SECTORS_NONE', 12);
763 763
 define('BUILD_AUTOCONVERT_AVAILABLE', 13);
764 764
 
765 765
 
766 766
 // *** Que types
767 767
 define('QUE_STRUCTURES', 1);
768
-define('QUE_HANGAR'    , 4);
769
-define('QUE_RESEARCH'  , 7);
770
-define('QUE_MERCENARY' , 600); // UNIT_MERCENARIES
768
+define('QUE_HANGAR', 4);
769
+define('QUE_RESEARCH', 7);
770
+define('QUE_MERCENARY', 600); // UNIT_MERCENARIES
771 771
 // *** Subque types
772
-define('SUBQUE_PLANET'  , 1);
773
-define('SUBQUE_MOON'    , 3);
774
-define('SUBQUE_FLEET'   , 4);
775
-define('SUBQUE_DEFENSE' , 6);
772
+define('SUBQUE_PLANET', 1);
773
+define('SUBQUE_MOON', 3);
774
+define('SUBQUE_FLEET', 4);
775
+define('SUBQUE_DEFENSE', 6);
776 776
 define('SUBQUE_RESEARCH', 7);
777 777
 
778 778
 // *** Que items
779
-define('QI_UNIT_ID'   , 0);
780
-define('QI_AMOUNT'    , 1);
781
-define('QI_TIME'      , 2);
782
-define('QI_MODE'      , 3);
783
-define('QI_QUE_ID'    , 4);
784
-define('QI_QUE_TYPE'  , 4);
785
-define('QI_PLANET_ID' , 5);
779
+define('QI_UNIT_ID', 0);
780
+define('QI_AMOUNT', 1);
781
+define('QI_TIME', 2);
782
+define('QI_MODE', 3);
783
+define('QI_QUE_ID', 4);
784
+define('QI_QUE_TYPE', 4);
785
+define('QI_PLANET_ID', 5);
786 786
 
787 787
 
788 788
 // *** Units
789 789
 
790 790
 // *** Sort options
791
-define('SORT_ASCENDING' , 0);
791
+define('SORT_ASCENDING', 0);
792 792
 define('SORT_DESCENDING', 1);
793 793
 
794
-define('SORT_ID'             , 0);
795
-define('SORT_LOCATION'       , 1);
796
-define('SORT_NAME'           , 2);
797
-define('SORT_SIZE'           , 3);
798
-define('SORT_EMAIL'          , 4);
799
-define('SORT_IP'             , 5);
794
+define('SORT_ID', 0);
795
+define('SORT_LOCATION', 1);
796
+define('SORT_NAME', 2);
797
+define('SORT_SIZE', 3);
798
+define('SORT_EMAIL', 4);
799
+define('SORT_IP', 5);
800 800
 define('SORT_TIME_REGISTERED', 6);
801 801
 define('SORT_TIME_LAST_VISIT', 7);
802
-define('SORT_TIME_BAN_UNTIL' , 8);
803
-define('SORT_REFERRAL_COUNT' , 9);
804
-define('SORT_REFERRAL_DM'    , 10);
802
+define('SORT_TIME_BAN_UNTIL', 8);
803
+define('SORT_REFERRAL_COUNT', 9);
804
+define('SORT_REFERRAL_DM', 10);
805 805
 
806 806
 
807 807
 define('HULL_SIZE_TINY', 1);
@@ -944,10 +944,10 @@  discard block
 block discarded – undo
944 944
 
945 945
 // === Artifacts
946 946
 define('UNIT_ARTIFACTS', 1000);
947
-define('ART_LHC', 1001);      // Additional moon chance
948
-define('ART_RCD_SMALL', 1002);   // Rapid Colony Deployment - Set of buildings up to 10th level - 10/14/ 3/0 -   405 DM
949
-define('ART_RCD_MEDIUM', 1003);  // Rapid Colony Deployment - Set of buildings up to 15th level - 15/20/ 8/0 -  4704 DM
950
-define('ART_RCD_LARGE', 1004);   // Rapid Colony Deployment - Set of buildings up to 20th level - 20/25/10/1 - 39790 DM
947
+define('ART_LHC', 1001); // Additional moon chance
948
+define('ART_RCD_SMALL', 1002); // Rapid Colony Deployment - Set of buildings up to 10th level - 10/14/ 3/0 -   405 DM
949
+define('ART_RCD_MEDIUM', 1003); // Rapid Colony Deployment - Set of buildings up to 15th level - 15/20/ 8/0 -  4704 DM
950
+define('ART_RCD_LARGE', 1004); // Rapid Colony Deployment - Set of buildings up to 20th level - 20/25/10/1 - 39790 DM
951 951
 define('ART_HEURISTIC_CHIP', 1005); // Speed up research
952 952
 define('ART_NANO_BUILDER', 1006); // Speed up building
953 953
 define('ART_NANO_CONSTRUCTOR', 1007); // RESERVED Speed up hangar constructions
@@ -1018,18 +1018,18 @@  discard block
 block discarded – undo
1018 1018
 define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE1', 2201); // Блиц-сервер, участник 0-го раунда, 1-е место
1019 1019
 define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE2', 2202); // Блиц-сервер, участник 0-го раунда, 2-е место
1020 1020
 define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE3', 2203); // Блиц-сервер, участник 0-го раунда, 3-е место
1021
-define('UNIT_AWARD_MEDAL_2016_WOMEN_DAY_BEST', 2204);  // Медаль Лучшему Кавалеру за максимум потраченной ММ/максимум одаренных женщин Женщине от Мужчины во время ивента 8 марта 2016 года
1021
+define('UNIT_AWARD_MEDAL_2016_WOMEN_DAY_BEST', 2204); // Медаль Лучшему Кавалеру за максимум потраченной ММ/максимум одаренных женщин Женщине от Мужчины во время ивента 8 марта 2016 года
1022 1022
 
1023 1023
 define('UNIT_AWARD_MEMORY', 2300); // Памятные знаки за существование и участие - например "4 года в игре". "Был онлайн в новогоднюю ночь 2013". итд
1024
-define('UNIT_AWARD_MEMORY_IMMORTAL', 2301);  // Бессмертный
1025
-define('UNIT_AWARD_MEMORY_2015_WOMEN_DAY', 2302);  // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2015 года
1024
+define('UNIT_AWARD_MEMORY_IMMORTAL', 2301); // Бессмертный
1025
+define('UNIT_AWARD_MEMORY_2015_WOMEN_DAY', 2302); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2015 года
1026 1026
 define('UNIT_AWARD_MEMORY_BLITZ_R0', 2303); // Блиц-сервер, участник 0-го раунда
1027 1027
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_SIMPLE', 2304); // День Рождения СН
1028 1028
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_BRONZE', 2305); // День Рождения СН
1029 1029
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_SILVER', 2306); // День Рождения СН
1030 1030
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_GOLD', 2307); // День Рождения СН
1031 1031
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_PLATINUM', 2308); // День Рождения СН
1032
-define('UNIT_AWARD_MEMORY_2016_WOMEN_DAY', 2309);  // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2016 года
1032
+define('UNIT_AWARD_MEMORY_2016_WOMEN_DAY', 2309); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2016 года
1033 1033
 
1034 1034
 define('UNIT_AWARD_PENNANT', 2400); // Переходящий вымпел - индикация статуса на сервере: "Топ-1", "Топ", "Сабтоп", "Самый большой флот" итд
1035 1035
 define('UNIT_AWARD_BADGE', 2600); // Бейджики/значки за ачивки - например, "Построил 1000 кораблей"
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
 
1127 1127
 define('UNIT_NEXT', 4000); // !!! Next unit start on 4000 !!!
1128 1128
 
1129
-define('GROUP_PART',         800000);
1129
+define('GROUP_PART', 800000);
1130 1130
 // Зарезервировано для запчастей: 800.001 - 899.999
1131 1131
 // define('GROUP_PART_HULL',    801000); // Корпуса - 1000 штук
1132 1132
 // define('GROUP_PART_ARMOR',   802000); // Броня - 1000 штук
@@ -1383,32 +1383,32 @@  discard block
 block discarded – undo
1383 1383
 
1384 1384
 
1385 1385
 // define('NICK_ID',               -1);
1386
-define('NICK_HTML',              0);
1387
-
1388
-define('NICK_FIRST',             1);
1389
-define('NICK_RACE',           1000);
1390
-define('NICK_GENDER',         2000);
1391
-define('NICK_AWARD',          3000);
1392
-define('NICK_VACATION',       3500);
1393
-define('NICK_BIRTHSDAY',      4000);
1394
-define('NICK_PREMIUM',        5000);
1395
-define('NICK_AUTH_LEVEL',     6000);
1396
-
1397
-define('NICK_HIGHLIGHT',      6300);
1398
-define('NICK_CLASS',          6450);
1399
-
1400
-define('NICK_NICK_CLASS',     6600);
1401
-define('NICK_NICK',           7000);
1386
+define('NICK_HTML', 0);
1387
+
1388
+define('NICK_FIRST', 1);
1389
+define('NICK_RACE', 1000);
1390
+define('NICK_GENDER', 2000);
1391
+define('NICK_AWARD', 3000);
1392
+define('NICK_VACATION', 3500);
1393
+define('NICK_BIRTHSDAY', 4000);
1394
+define('NICK_PREMIUM', 5000);
1395
+define('NICK_AUTH_LEVEL', 6000);
1396
+
1397
+define('NICK_HIGHLIGHT', 6300);
1398
+define('NICK_CLASS', 6450);
1399
+
1400
+define('NICK_NICK_CLASS', 6600);
1401
+define('NICK_NICK', 7000);
1402 1402
 define('NICK_NICK_CLASS_END', 7300);
1403 1403
 
1404
-define('NICK_ALLY_CLASS',     7600);
1405
-define('NICK_ALLY',           8000);
1404
+define('NICK_ALLY_CLASS', 7600);
1405
+define('NICK_ALLY', 8000);
1406 1406
 define('NICK_ALLY_CLASS_END', 8300);
1407 1407
 
1408
-define('NICK_CLASS_END',      8450);
1409
-define('NICK_HIGHLIGHT_END',  8600);
1408
+define('NICK_CLASS_END', 8450);
1409
+define('NICK_HIGHLIGHT_END', 8600);
1410 1410
 
1411
-define('NICK_LAST',           9999);
1411
+define('NICK_LAST', 9999);
1412 1412
 
1413 1413
 // Настройки игрока
1414 1414
 define('PLAYER_OPTION_MENU_SORT', 1);
@@ -1501,8 +1501,8 @@  discard block
 block discarded – undo
1501 1501
 define('LOG_ONLIINE_AGGREGATE_PERIOD_MINUTE_10', 1);
1502 1502
 
1503 1503
 define('BLITZ_REGISTER_DISABLED', 0);
1504
-define('BLITZ_REGISTER_OPEN'    , 1);
1505
-define('BLITZ_REGISTER_CLOSED'  , 2);
1504
+define('BLITZ_REGISTER_OPEN', 1);
1505
+define('BLITZ_REGISTER_CLOSED', 2);
1506 1506
 define('BLITZ_REGISTER_SHOW_LOGIN', 3);
1507 1507
 define('BLITZ_REGISTER_DISCLOSURE_NAMES', 4);
1508 1508
 
Please login to merge, or discard this patch.