Passed
Push — master ( bc874f...230097 )
by SuperNova.WS
04:01
created
includes/includes/flt_mission_hold.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 function flt_mission_hold(&$mission_data)
4 4
 {
5
-  if($mission_data['fleet']['fleet_end_stay'] < SN_TIME_NOW)
5
+  if ($mission_data['fleet']['fleet_end_stay'] < SN_TIME_NOW)
6 6
   {
7 7
     fleet_send_back($mission_data['fleet']);
8 8
     // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = '{$fleet_row['fleet_id']}' LIMIT 1;");
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-function flt_mission_hold(&$mission_data)
4
-{
3
+function flt_mission_hold(&$mission_data) {
5 4
   if($mission_data['fleet']['fleet_end_stay'] < SN_TIME_NOW)
6 5
   {
7 6
     fleet_send_back($mission_data['fleet']);
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 = DBStaticPlanet::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'] == ATTACK_ALLOWED) {
163
+  foreach ($planet_list as $planet_id => $planet_data) {
164
+    if ($planet_data['RESULT'] == ATTACK_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'] = $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'] == ATTACK_ALLOWED) {
172
-      foreach($planet_data['FLEET'] as $unit_id => $amount) {
171
+    if (!empty($planet_data['FLEET']) && $planet_data['RESULT'] == ATTACK_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'   => $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']) : $lang['flt_no_fuel'];
187 187
   $template->assign_block_vars('colonies', $planet_data);
188 188
 }
Please login to merge, or discard this patch.
includes/includes/flt_page4.inc 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(SN_IN_FLEET !== true) {
3
+if (SN_IN_FLEET !== true) {
4 4
   $debug->error("Attempt to call FLEET page mode {$mode} directly - not from fleet.php", 'Forbidden', 403);
5 5
 }
6 6
 
7 7
 $fleetid = sys_get_param_id('fleetid');
8 8
 
9
-if(!is_numeric($fleetid) || empty($fleetid)) {
9
+if (!is_numeric($fleetid) || empty($fleetid)) {
10 10
   header("Location: fleet.php");
11 11
   exit();
12 12
 }
13 13
 
14 14
 $fleet = db_fleet_get($fleetid);
15
-if(!$fleet) {
15
+if (!$fleet) {
16 16
   message($lang['fl_fleet_not_exists'], $lang['fl_error']);
17 17
 }
18 18
 //$query = doquery("SELECT * FROM `{{fleets}}` WHERE fleet_id = '{$fleetid}'");
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
   message($lang['fl_isback'], $lang['fl_error']);
27 27
 }
28 28
 
29
-if($fleet['fleet_owner'] != $user['id']) {
30
-  $debug->warning($lang['fl_aks_hack_wrong_fleet'],'Wrong Fleet Owner',301);
29
+if ($fleet['fleet_owner'] != $user['id']) {
30
+  $debug->warning($lang['fl_aks_hack_wrong_fleet'], 'Wrong Fleet Owner', 301);
31 31
   message($lang['fl_aks_hack_wrong_fleet'], $lang['fl_error']);
32 32
 }
33 33
 
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
 
38 38
 !$aks && !$userToAdd_unsafe ? $userToAdd_unsafe = $user['username'] : false;
39 39
 
40
-if($userToAdd_unsafe) {
40
+if ($userToAdd_unsafe) {
41 41
   $userToAdd = db_escape($userToAdd_unsafe);
42 42
   $userToAddID = db_user_by_username($userToAdd_unsafe, false, 'id', true, true);
43 43
   $userToAddID = $userToAddID['id'];
44 44
 
45
-  if($fleet['fleet_target_owner'] == $userToAddID) {
45
+  if ($fleet['fleet_target_owner'] == $userToAddID) {
46 46
     message($lang['flt_aks_player_same'], $lang['fl_error']);
47 47
   }
48 48
 
49
-  if($userToAddID) {
50
-    if(!$aks) {
49
+  if ($userToAddID) {
50
+    if (!$aks) {
51 51
       // No AСS exists - making one
52
-      if(!$fleet['fleet_group']) {
52
+      if (!$fleet['fleet_group']) {
53 53
         doquery("INSERT INTO {{aks}} SET
54 54
           `name` = '" . db_escape($lang['flt_acs_prefix'] . $fleetid) . "',
55 55
           `teilnehmer` = '" . $user['id'] . "',
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
           `planet` = '" . $fleet['fleet_end_planet'] . "',
61 61
           `planet_type` = '" . $fleet['fleet_end_type'] . "',
62 62
           `eingeladen` = '" . $user['id'] . "',
63
-          `fleet_end_time` = '" . $fleet['fleet_end_time']. "'");
63
+          `fleet_end_time` = '" . $fleet['fleet_end_time'] . "'");
64 64
 
65 65
         $aks = doquery("SELECT * FROM {{aks}} WHERE `flotten` = {$fleetid} LIMIT 1;", true);
66 66
 
@@ -78,26 +78,26 @@  discard block
 block discarded – undo
78 78
 
79 79
     $isUserExists = false;
80 80
     $invited_ar = explode(",", $aks['eingeladen']);
81
-    foreach($invited_ar as $inv) {
81
+    foreach ($invited_ar as $inv) {
82 82
       if ($userToAddID == $inv) {
83 83
         $isUserExists = true;
84 84
       }
85 85
     }
86 86
 
87
-    if(count($invited_ar) >= 5) {
87
+    if (count($invited_ar) >= 5) {
88 88
       message($lang['flt_aks_error_too_much_players'], $lang['fl_error']);
89 89
     }
90 90
 
91
-    if($isUserExists) {
91
+    if ($isUserExists) {
92 92
       $userToAdd_unsafe != $user['username'] ? $add_user_message_mr = sprintf($lang['fl_aks_player_invited_already'], $userToAdd) : false;
93 93
     } else {
94 94
       $add_user_message_mr = sprintf($lang['fl_aks_player_invited'], $userToAdd);
95 95
       doquery("UPDATE `{{aks}}` SET `eingeladen` = concat(`eingeladen`, ',{$userToAddID}') WHERE `flotten` = {$fleetid};")
96
-        or die(sprintf($lang['fl_aks_adding_error'],db_error()));
96
+        or die(sprintf($lang['fl_aks_adding_error'], db_error()));
97 97
       $aks['eingeladen'] .= ',' . $userToAddID;
98 98
     }
99
-    msg_send_simple_message ( $userToAddID, $user['id'], SN_TIME_NOW, MSG_TYPE_COMBAT, $user['username'],
100
-      $lang['fl_aks_invite_message_header'], sprintf( $lang['fl_aks_invite_message'], $user['username']));
99
+    msg_send_simple_message($userToAddID, $user['id'], SN_TIME_NOW, MSG_TYPE_COMBAT, $user['username'],
100
+      $lang['fl_aks_invite_message_header'], sprintf($lang['fl_aks_invite_message'], $user['username']));
101 101
   } else {
102 102
     $add_user_message_mr = sprintf($lang['fl_aks_player_error'], $userToAdd);
103 103
   }
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
   'MISSION_NAME' => $lang['type_mission'][MT_AKS],
112 112
 ));
113 113
 
114
-if($aks['eingeladen'] && is_array($members = classSupernova::db_get_record_list(LOC_USER, "`id` in ({$aks['eingeladen']})")) && !empty($members)) {
115
-  foreach($members as $row) {
114
+if ($aks['eingeladen'] && is_array($members = classSupernova::db_get_record_list(LOC_USER, "`id` in ({$aks['eingeladen']})")) && !empty($members)) {
115
+  foreach ($members as $row) {
116 116
     $template->assign_block_vars('invited', array(
117 117
       'NAME' => $row['username'],
118 118
     ));
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 $fleet_data = tpl_parse_fleet_db($fleet_row, $i, $user);
130 130
 $template->assign_block_vars('fleets', $fleet_data['fleet']);
131
-foreach($fleet_data['ships'] as $ship_data) {
131
+foreach ($fleet_data['ships'] as $ship_data) {
132 132
   $template->assign_block_vars('fleets.ships', $ship_data);
133 133
 }
134 134
 
Please login to merge, or discard this patch.
includes/includes/flt_mission_recycle.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
   $fleet_row          = &$mission_data['fleet'];
13 13
   $destination_planet = &$mission_data['dst_planet'];
14 14
 
15
-  if(!$fleet_row)
15
+  if (!$fleet_row)
16 16
   {
17 17
     return CACHE_NOTHING;
18 18
   }
19 19
 
20
-  if(!isset($destination_planet['id']))
20
+  if (!isset($destination_planet['id']))
21 21
   {
22 22
     // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;");
23 23
     fleet_send_back($mission_data['fleet']);
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
   $RecyclerCapacity    = 0;
30 30
   $OtherFleetCapacity  = 0;
31 31
   $fleet_array = sys_unit_str2arr($fleet_row['fleet_array']);
32
-  foreach($fleet_array as $unit_id => $unit_count)
32
+  foreach ($fleet_array as $unit_id => $unit_count)
33 33
   {
34
-    if(in_array($unit_id, sn_get_groups('fleet')))
34
+    if (in_array($unit_id, sn_get_groups('fleet')))
35 35
     {
36 36
       $capacity = get_unit_param($unit_id, P_CAPACITY) * $unit_count;
37
-      if(in_array($unit_id, sn_get_groups('flt_recyclers')))
37
+      if (in_array($unit_id, sn_get_groups('flt_recyclers')))
38 38
       {
39 39
         $RecyclerCapacity += $capacity;
40 40
       }
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
   }
47 47
 
48 48
   $IncomingFleetGoods = $fleet_row["fleet_resource_metal"] + $fleet_row["fleet_resource_crystal"] + $fleet_row["fleet_resource_deuterium"];
49
-  if($IncomingFleetGoods > $OtherFleetCapacity)
49
+  if ($IncomingFleetGoods > $OtherFleetCapacity)
50 50
   {
51 51
     $RecyclerCapacity -= ($IncomingFleetGoods - $OtherFleetCapacity);
52 52
   }
53 53
 
54
-  if(($destination_planet["debris_metal"] + $destination_planet["debris_crystal"]) <= $RecyclerCapacity)
54
+  if (($destination_planet["debris_metal"] + $destination_planet["debris_crystal"]) <= $RecyclerCapacity)
55 55
   {
56 56
     $RecycledGoods["metal"]   = $destination_planet["debris_metal"];
57 57
     $RecycledGoods["crystal"] = $destination_planet["debris_crystal"];
58 58
   }
59 59
   else
60 60
   {
61
-    if (($destination_planet["debris_metal"]   > $RecyclerCapacity / 2) AND
61
+    if (($destination_planet["debris_metal"] > $RecyclerCapacity / 2) AND
62 62
       ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2))
63 63
       {
64 64
       $RecycledGoods["metal"]   = $RecyclerCapacity / 2;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
       }
93 93
     }
94 94
   }
95
-  $NewCargo['Metal']     = $fleet_row["fleet_resource_metal"]   + $RecycledGoods["metal"];
95
+  $NewCargo['Metal']     = $fleet_row["fleet_resource_metal"] + $RecycledGoods["metal"];
96 96
   $NewCargo['Crystal']   = $fleet_row["fleet_resource_crystal"] + $RecycledGoods["crystal"];
97 97
   $NewCargo['Deuterium'] = $fleet_row["fleet_resource_deuterium"];
98 98
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
   );
102 102
 
103 103
   $Message = sprintf($lang['sys_recy_gotten'], pretty_number($RecycledGoods["metal"]), $lang['Metal'], pretty_number($RecycledGoods["crystal"]), $lang['Crystal']);
104
-  msg_send_simple_message ( $fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_RECYCLE, $lang['sys_mess_spy_control'], $lang['sys_recy_report'], $Message);
104
+  msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_RECYCLE, $lang['sys_mess_spy_control'], $lang['sys_recy_report'], $Message);
105 105
 
106 106
 //  $QryUpdateFleet  = "UPDATE {{fleets}} SET `fleet_mess` = 1,`fleet_resource_metal` = '{$NewCargo['Metal']}',`fleet_resource_crystal` = '{$NewCargo['Crystal']}',`fleet_resource_deuterium` = '{$NewCargo['Deuterium']}' ";
107 107
 //  $QryUpdateFleet .= "WHERE `fleet_id` = '{$fleet_row['fleet_id']}' LIMIT 1;";
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
  * @copyright 2008 By Chlorel for XNova
8 8
  */
9 9
 
10
-function flt_mission_recycle(&$mission_data)
11
-{
10
+function flt_mission_recycle(&$mission_data) {
12 11
   $fleet_row          = &$mission_data['fleet'];
13 12
   $destination_planet = &$mission_data['dst_planet'];
14 13
 
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
       if(in_array($unit_id, sn_get_groups('flt_recyclers')))
38 37
       {
39 38
         $RecyclerCapacity += $capacity;
40
-      }
41
-      else
39
+      } else
42 40
       {
43 41
         $OtherFleetCapacity += $capacity;
44 42
       }
@@ -55,16 +53,14 @@  discard block
 block discarded – undo
55 53
   {
56 54
     $RecycledGoods["metal"]   = $destination_planet["debris_metal"];
57 55
     $RecycledGoods["crystal"] = $destination_planet["debris_crystal"];
58
-  }
59
-  else
56
+  } else
60 57
   {
61 58
     if (($destination_planet["debris_metal"]   > $RecyclerCapacity / 2) AND
62 59
       ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2))
63 60
       {
64 61
       $RecycledGoods["metal"]   = $RecyclerCapacity / 2;
65 62
       $RecycledGoods["crystal"] = $RecyclerCapacity / 2;
66
-    }
67
-    else
63
+    } else
68 64
     {
69 65
       if ($destination_planet["debris_metal"] > $destination_planet["debris_crystal"])
70 66
       {
@@ -72,20 +68,17 @@  discard block
 block discarded – undo
72 68
         if ($destination_planet["debris_metal"] > ($RecyclerCapacity - $RecycledGoods["crystal"]))
73 69
         {
74 70
           $RecycledGoods["metal"] = $RecyclerCapacity - $RecycledGoods["crystal"];
75
-        }
76
-        else
71
+        } else
77 72
         {
78 73
           $RecycledGoods["metal"] = $destination_planet["debris_metal"];
79 74
         }
80
-      }
81
-      else
75
+      } else
82 76
       {
83 77
         $RecycledGoods["metal"] = $destination_planet["debris_metal"];
84 78
         if ($destination_planet["debris_crystal"] > ($RecyclerCapacity - $RecycledGoods["metal"]))
85 79
         {
86 80
           $RecycledGoods["crystal"] = $RecyclerCapacity - $RecycledGoods["metal"];
87
-        }
88
-        else
81
+        } else
89 82
         {
90 83
           $RecycledGoods["crystal"] = $destination_planet["debris_crystal"];
91 84
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
   }
59 59
   else
60 60
   {
61
-    if (($destination_planet["debris_metal"]   > $RecyclerCapacity / 2) AND
61
+    if (($destination_planet["debris_metal"]   > $RecyclerCapacity / 2) and
62 62
       ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2))
63 63
       {
64 64
       $RecycledGoods["metal"]   = $RecyclerCapacity / 2;
Please login to merge, or discard this patch.
includes/includes/flt_mission_explore.php 1 patch
Spacing   +37 added lines, -38 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 
15 15
   $fleet_left = 1 - mt_rand(1, 3) * mt_rand(200000, 300000) / 1000000;
16 16
   $fleet_lost = array();
17
-  foreach($fleet as $unit_id => &$unit_amount) {
17
+  foreach ($fleet as $unit_id => &$unit_amount) {
18 18
     $ships_left = floor($unit_amount * $fleet_left);
19 19
     $fleet_lost[$unit_id] = $unit_amount - $ships_left;
20 20
     $unit_amount = $ships_left;
21
-    if(!$unit_amount) {
21
+    if (!$unit_amount) {
22 22
       unset($fleet[$unit_id]);
23 23
     }
24 24
   }
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 //  $fleet = array();
32 32
 }
33 33
 
34
-function flt_mission_explore_addon(&$result){return sn_function_call('flt_mission_explore_addon', array(&$result));}
34
+function flt_mission_explore_addon(&$result) {return sn_function_call('flt_mission_explore_addon', array(&$result)); }
35 35
 function sn_flt_mission_explore_addon(&$result) {
36 36
   return $result;
37 37
 }
38 38
 
39 39
 
40 40
 function flt_mission_explore(&$mission_data) {
41
-  if(!isset($mission_data['fleet_event']) || $mission_data['fleet_event'] != EVENT_FLT_ACOMPLISH) {
41
+  if (!isset($mission_data['fleet_event']) || $mission_data['fleet_event'] != EVENT_FLT_ACOMPLISH) {
42 42
     return CACHE_NONE;
43 43
   }
44 44
 
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
   $outcome_list = &$result['$outcome_list'];
72 72
   $fleet_metal_points = &$result['$fleet_metal_points'];
73 73
 
74
-  if(!$ship_data) {
75
-    foreach(sn_get_groups('fleet') as $unit_id) {
74
+  if (!$ship_data) {
75
+    foreach (sn_get_groups('fleet') as $unit_id) {
76 76
       $unit_info = get_unit_param($unit_id);
77
-      if($unit_info[P_UNIT_TYPE] != UNIT_SHIPS || !isset($unit_info['engine'][0]['speed']) || !$unit_info['engine'][0]['speed']) {
77
+      if ($unit_info[P_UNIT_TYPE] != UNIT_SHIPS || !isset($unit_info['engine'][0]['speed']) || !$unit_info['engine'][0]['speed']) {
78 78
         continue;
79 79
       }
80 80
       $ship_data[$unit_id][P_COST_METAL] = get_unit_cost_in($unit_info[P_COST]);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
   $fleet = sys_unit_str2arr($fleet_row['fleet_array']);
87 87
   $fleet_capacity = 0;
88 88
   $fleet_metal_points = 0;
89
-  foreach($fleet as $ship_id => $ship_amount) {
89
+  foreach ($fleet as $ship_id => $ship_amount) {
90 90
     $unit_info = get_unit_param($ship_id);
91 91
     $fleet_capacity += $ship_amount * $unit_info[P_CAPACITY];
92 92
     $fleet_metal_points += $ship_amount * $ship_data[$ship_id][P_COST_METAL];
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
   $flt_stay_hours = ($fleet_row['fleet_end_stay'] - $fleet_row['fleet_start_time']) / 3600 * ($config->game_speed_expedition ? $config->game_speed_expedition : 1);
97 97
 
98 98
   $outcome_list = sn_get_groups('mission_explore_outcome_list');
99
-  $outcome_list[FLT_EXPEDITION_OUTCOME_NONE]['chance'] = ceil(200 / pow($flt_stay_hours, 1/1.7));
99
+  $outcome_list[FLT_EXPEDITION_OUTCOME_NONE]['chance'] = ceil(200 / pow($flt_stay_hours, 1 / 1.7));
100 100
 
101 101
   $chance_max = 0;
102
-  foreach($outcome_list as $key => &$value) {
103
-    if(!$value['chance']) {
102
+  foreach ($outcome_list as $key => &$value) {
103
+    if (!$value['chance']) {
104 104
       unset($outcome_list[$key]);
105 105
       continue;
106 106
     }
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
   $outcome_value = mt_rand(0, $chance_max);
110 110
 // $outcome_value = 409;
111 111
   $outcome_description = &$outcome_list[$mission_outcome = FLT_EXPEDITION_OUTCOME_NONE];
112
-  foreach($outcome_list as $key => &$value) {
113
-    if(!$value['chance']) {
112
+  foreach ($outcome_list as $key => &$value) {
113
+    if (!$value['chance']) {
114 114
       continue;
115 115
     }
116 116
     $mission_outcome = $key;
117 117
     $outcome_description = $value;
118
-    if($outcome_value <= $outcome_description['value']) {
118
+    if ($outcome_value <= $outcome_description['value']) {
119 119
       break;
120 120
     }
121 121
   }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
   $found_dark_matter = 0;
132 132
 //  $outcome_mission_sub = -1;
133 133
 
134
-  switch($mission_outcome) {
134
+  switch ($mission_outcome) {
135 135
 //  switch(FLT_EXPEDITION_OUTCOME_LOST_FLEET) { // TODO DEBUG!
136 136
     case FLT_EXPEDITION_OUTCOME_LOST_FLEET:
137 137
       flt_mission_explore_outcome_lost_fleet($result);
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
 
167 167
       // Рассчитываем стоимость самого дорого корабля в металле
168 168
       $max_metal_cost = 0;
169
-      foreach($fleet as $ship_id => $ship_amount) {
169
+      foreach ($fleet as $ship_id => $ship_amount) {
170 170
         $max_metal_cost = max($max_metal_cost, $ship_data[$ship_id]['metal_cost']);
171 171
       }
172 172
 
173 173
       // Ограничиваем корабли только теми, чья стоимость в металле меньше или равно стоимости самого дорогого корабля
174 174
       $can_be_found = array();
175
-      foreach($ship_data as $ship_id => $ship_info) {
176
-        if($ship_info['metal_cost'] < $max_metal_cost) {
175
+      foreach ($ship_data as $ship_id => $ship_info) {
176
+        if ($ship_info['metal_cost'] < $max_metal_cost) {
177 177
           $can_be_found[$ship_id] = $ship_info['metal_cost'];
178 178
         }
179 179
       }
@@ -182,13 +182,13 @@  discard block
 block discarded – undo
182 182
       unset($can_be_found[SHIP_SPY]);
183 183
 
184 184
       $fleet_found = array();
185
-      while(count($can_be_found) && $found_in_metal >= max($can_be_found)) {
185
+      while (count($can_be_found) && $found_in_metal >= max($can_be_found)) {
186 186
         $found_index = mt_rand(1, count($can_be_found)) - 1;
187 187
         $found_ship = array_slice($can_be_found, $found_index, 1, true);
188 188
         $found_ship_cost = reset($found_ship);
189 189
         $found_ship_id = key($found_ship);
190 190
 
191
-        if($found_ship_cost > $found_in_metal) {
191
+        if ($found_ship_cost > $found_in_metal) {
192 192
           unset($can_be_found[$found_ship_id]);
193 193
         } else {
194 194
           $found_ship_count = mt_rand(1, floor($found_in_metal / $found_ship_cost));
@@ -197,10 +197,10 @@  discard block
 block discarded – undo
197 197
         }
198 198
       }
199 199
 
200
-      if(empty($fleet_found)) {
200
+      if (empty($fleet_found)) {
201 201
         $msg_text_addon = $lang['flt_mission_expedition']['outcomes'][$mission_outcome]['no_result'];
202 202
       } else {
203
-        foreach($fleet_found as $unit_id => $unit_amount) {
203
+        foreach ($fleet_found as $unit_id => $unit_amount) {
204 204
           $fleet[$unit_id] += $unit_amount;
205 205
         }
206 206
       }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
       $fleet_row['fleet_resource_crystal'] += $resources_found[RES_CRYSTAL];
227 227
       $fleet_row['fleet_resource_deuterium'] += $resources_found[RES_DEUTERIUM];
228 228
 
229
-      if(array_sum($resources_found) == 0) {
229
+      if (array_sum($resources_found) == 0) {
230 230
         $msg_text_addon = $lang['flt_mission_expedition']['outcomes'][$mission_outcome]['no_result'];
231 231
       }
232 232
     break;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
       // Рассчитываем количество найденной ТМ
238 238
       $found_dark_matter = floor(min($outcome_percent * $fleet_metal_points / $rates[RES_DARK_MATTER], 10000) * mt_rand(750000, 1000000) / 1000000);
239 239
 
240
-      if(!$found_dark_matter) {
240
+      if (!$found_dark_matter) {
241 241
         $msg_text_addon = $lang['flt_mission_expedition']['outcomes'][$mission_outcome]['no_result'];
242 242
       }
243 243
     break;
@@ -251,31 +251,31 @@  discard block
 block discarded – undo
251 251
 
252 252
   flt_mission_explore_addon($result);
253 253
 
254
-  if($found_dark_matter) {
254
+  if ($found_dark_matter) {
255 255
     rpg_points_change($fleet_row['fleet_owner'], RPG_EXPEDITION, $found_dark_matter, 'Expedition Bonus');
256 256
     $msg_text_addon = sprintf($lang['flt_mission_expedition']['found_dark_matter'], $found_dark_matter);
257 257
   }
258 258
 
259
-  if(!empty($fleet_lost)) {
259
+  if (!empty($fleet_lost)) {
260 260
     $msg_text_addon = $lang['flt_mission_expedition']['lost_fleet'];
261
-    foreach($fleet_lost as $ship_id => $ship_amount) {
261
+    foreach ($fleet_lost as $ship_id => $ship_amount) {
262 262
       $msg_text_addon .= $lang['tech'][$ship_id] . ' - ' . $ship_amount . "\r\n";
263 263
     }
264 264
   }
265 265
 
266 266
   $fleet_row['fleet_amount'] = array_sum($fleet);
267
-  if(!empty($fleet) && $fleet_row['fleet_amount']) {
268
-    if(!empty($fleet_found)) {
267
+  if (!empty($fleet) && $fleet_row['fleet_amount']) {
268
+    if (!empty($fleet_found)) {
269 269
       $msg_text_addon = $lang['flt_mission_expedition']['found_fleet'];
270
-      foreach($fleet_found as $ship_id => $ship_amount) {
270
+      foreach ($fleet_found as $ship_id => $ship_amount) {
271 271
         $msg_text_addon .= $lang['tech'][$ship_id] . ' - ' . $ship_amount . "\r\n";
272 272
       }
273 273
     }
274 274
 
275 275
     $query_delta = array();
276
-    if(!empty($resources_found) && array_sum($resources_found) > 0) {
276
+    if (!empty($resources_found) && array_sum($resources_found) > 0) {
277 277
       $msg_text_addon = $lang['flt_mission_expedition']['found_resources'];
278
-      foreach($resources_found as $ship_id => $ship_amount) {
278
+      foreach ($resources_found as $ship_id => $ship_amount) {
279 279
         $msg_text_addon .= $lang['tech'][$ship_id] . ' - ' . $ship_amount . "\r\n";
280 280
       }
281 281
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     }
289 289
 
290 290
     $query_data = array();
291
-    if(!empty($fleet_lost) || !empty($fleet_found)) {
291
+    if (!empty($fleet_lost) || !empty($fleet_found)) {
292 292
       $fleet_row['fleet_array'] = sys_unit_arr2str($fleet);
293 293
 
294 294
 //      $query_data[] = "`fleet_amount` = {$fleet_row['fleet_amount']}";
@@ -316,17 +316,16 @@  discard block
 block discarded – undo
316 316
 
317 317
   db_user_set_by_id($fleet_row['fleet_owner'], "`player_rpg_explore_xp` = `player_rpg_explore_xp` + 1");
318 318
 
319
-  if(!$msg_text) {
319
+  if (!$msg_text) {
320 320
     $messages = &$lang['flt_mission_expedition']['outcomes'][$mission_outcome]['messages'];
321
-    if($outcome_mission_sub >= 0 && is_array($messages)) {
321
+    if ($outcome_mission_sub >= 0 && is_array($messages)) {
322 322
       $messages = &$messages[$outcome_mission_sub];
323 323
     }
324 324
 
325
-    $msg_text = is_string($messages) ? $messages :
326
-      (is_array($messages) ? $messages[mt_rand(0, count($messages) - 1)] : '');
325
+    $msg_text = is_string($messages) ? $messages : (is_array($messages) ? $messages[mt_rand(0, count($messages) - 1)] : '');
327 326
   }
328 327
   $msg_text = sprintf($msg_text, $fleet_row['fleet_id'], uni_render_coordinates($fleet_row, 'fleet_end_')) .
329
-    ($msg_text_addon ? "\r\n" . $msg_text_addon: '');
328
+    ($msg_text_addon ? "\r\n" . $msg_text_addon : '');
330 329
 
331 330
   msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_end_stay'], MSG_TYPE_EXPLORE, $msg_sender, $msg_title, $msg_text);
332 331
 
Please login to merge, or discard this patch.
includes/includes/flt_mission_relocate.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
   $fleet_row          = &$mission_data['fleet'];
14 14
   $destination_planet = &$mission_data['dst_planet'];
15 15
 
16
-  if(!$destination_planet || !is_array($destination_planet) || $fleet_row['fleet_owner'] != $destination_planet['id_owner'])
16
+  if (!$destination_planet || !is_array($destination_planet) || $fleet_row['fleet_owner'] != $destination_planet['id_owner'])
17 17
   {
18 18
     // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;");
19 19
     fleet_send_back($mission_data['fleet']);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
       $mission_data['src_planet']['name'], uni_render_coordinates_href($fleet_row, 'fleet_start_', 3, ''), $destination_planet['name'], uni_render_coordinates_href($fleet_row, 'fleet_end_', 3, ''),
27 27
     $fleet_row['fleet_resource_metal'], $lang['Metal'], $fleet_row['fleet_resource_crystal'], $lang['Crystal'], $fleet_row['fleet_resource_deuterium'], $lang['Deuterium']) .
28 28
   '<br />' . $lang['sys_relocate_mess_user'];
29
-  foreach(sys_unit_str2arr($fleet_row['fleet_array']) as $ship_id => $ship_count)
29
+  foreach (sys_unit_str2arr($fleet_row['fleet_array']) as $ship_id => $ship_count)
30 30
   {
31 31
     $Message .= $lang['tech'][$ship_id] . ' - ' . $ship_count . '<br />';
32 32
   }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @version 1.1
9 9
  * @copyright 2008 by Chlorel for XNova
10 10
  */
11
-function flt_mission_relocate($mission_data)
12
-{
11
+function flt_mission_relocate($mission_data) {
13 12
   $fleet_row          = &$mission_data['fleet'];
14 13
   $destination_planet = &$mission_data['dst_planet'];
15 14
 
Please login to merge, or discard this patch.
includes/includes/flt_mission_destroy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 function flt_mission_destroy($mission_data) {
9 9
   $fleet_row = $mission_data['fleet'];
10 10
   $destination_planet = $mission_data['dst_planet'];
11
-  if(!$destination_planet || !is_array($destination_planet) || $destination_planet['planet_type'] != PT_MOON) {
11
+  if (!$destination_planet || !is_array($destination_planet) || $destination_planet['planet_type'] != PT_MOON) {
12 12
     fleet_send_back($fleet_row);
13 13
 
14 14
     return CACHE_FLEET;
Please login to merge, or discard this patch.
includes/includes/flt_page1.inc 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@  discard block
 block discarded – undo
4 4
 // @version 1.0
5 5
 // @copyright 2008 by Chlorel for XNova
6 6
 
7
-if(SN_IN_FLEET !== true) {
7
+if (SN_IN_FLEET !== true) {
8 8
   $debug->error("Attempt to call FLEET page mode {$mode} directly - not from fleet.php", 'Forbidden', 403);
9 9
 }
10 10
 
11 11
 $template = gettemplate('fleet1', true);
12 12
 
13 13
 $ships = sys_get_param('ships', array());
14
-if(!is_array($ships)) {
14
+if (!is_array($ships)) {
15 15
   $ships = array();
16 16
 }
17 17
 
18
-foreach(array(PT_PLANET, PT_DEBRIS, PT_MOON) as $possible_planet_type_id) {
18
+foreach (array(PT_PLANET, PT_DEBRIS, PT_MOON) as $possible_planet_type_id) {
19 19
   $template->assign_block_vars('possible_planet_type_id', array(
20 20
     'ID' => $possible_planet_type_id,
21 21
     'NAME' => $lang['sys_planet_type_sh'][$possible_planet_type_id],
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   'START_NAME'         => $planetrow['name'],
29 29
 );
30 30
 
31
-if(!empty($TargetPlanet)) {
31
+if (!empty($TargetPlanet)) {
32 32
   $template_route += array(
33 33
     'END_TYPE_TEXT_SH' => $lang['sys_planet_type_sh'][$TargetPlanet['planet_type']],
34 34
     'END_COORDS'       => uni_render_coordinates($TargetPlanet),
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 $template->assign_block_vars('fleets', $template_route);
40 40
 
41 41
 $sn_groups_fleet = sn_get_groups('fleet');
42
-foreach($ships as $ship_id => $ship_count) {
43
-  if(in_array($ship_id, $sn_groups_fleet) && $ship_count) {
42
+foreach ($ships as $ship_id => $ship_count) {
43
+  if (in_array($ship_id, $sn_groups_fleet) && $ship_count) {
44 44
     $ship_info = get_unit_param($ship_id);
45
-    if($ship_count > mrc_get_level($user, $planetrow, $ship_id, false, true)) {
45
+    if ($ship_count > mrc_get_level($user, $planetrow, $ship_id, false, true)) {
46 46
       $page .= $lang['fl_noenought'];
47 47
     } else {
48 48
       $fleet['fleetarray'][$ship_id]  = $ship_count;
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
   }
62 62
 }
63 63
 
64
-if(empty($fleet['fleetarray'])) {
64
+if (empty($fleet['fleetarray'])) {
65 65
   message($lang['fl_err_no_ships'], $lang['fl_error'], 'fleet' . DOT_PHP_EX, 5);
66 66
 }
67 67
 
68 68
 // Building list of shortcuts
69 69
 $query = doquery("SELECT * FROM {{notes}} WHERE `owner` = {$user['id']} AND `galaxy` <> 0 AND `system` <> 0 AND `planet` <> 0 ORDER BY `priority` DESC, `galaxy`, `system`, `planet`, `planet_type`;");
70
-while($shortcut = db_fetch($query)) {
70
+while ($shortcut = db_fetch($query)) {
71 71
   $template->assign_block_vars('shortcut', array(
72 72
     'NAME'       => $shortcut['title'],
73 73
     'GALAXY'     => $shortcut['galaxy'],
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 // Building list of own planets & moons
84
-$colonies = DBStaticPlanet::db_planet_list_sorted ( $user );
85
-if(count($colonies) > 1) {
84
+$colonies = DBStaticPlanet::db_planet_list_sorted($user);
85
+if (count($colonies) > 1) {
86 86
   // while($row = db_fetch($colonies))
87
-  foreach($colonies as $row) {
87
+  foreach ($colonies as $row) {
88 88
     $template->assign_block_vars('colonies', array(
89 89
       'NAME'       => $row['name'],
90 90
       'GALAXY'     => $row['galaxy'],
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 //ACS Start
100 100
 //Need to look for acs attacks.
101 101
 $aks_madnessred = doquery('SELECT * FROM {{aks}};');
102
-while($row = db_fetch($aks_madnessred)) {
102
+while ($row = db_fetch($aks_madnessred)) {
103 103
   $members = explode(',', $row['eingeladen']);
104
-  foreach($members as $a => $b) {
104
+  foreach ($members as $a => $b) {
105 105
     if ($b == $user['id']) {
106 106
       $template->assign_block_vars('acss', array(
107 107
         'ID'         => $row['id'],
Please login to merge, or discard this patch.
includes/includes/flt_mission_transport.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $source_planet      = &$mission_data['src_planet'];
15 15
   $destination_planet = &$mission_data['dst_planet'];
16 16
 
17
-  if(!isset($destination_planet['id']) || !$destination_planet['id_owner'])
17
+  if (!isset($destination_planet['id']) || !$destination_planet['id_owner'])
18 18
   {
19 19
     // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;");
20 20
     fleet_send_back($fleet_row);
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
     $destination_planet['name'], uni_render_coordinates_href($fleet_row, 'fleet_end_', 3, ''),
28 28
     $fleet_row['fleet_resource_metal'], $lang['Metal'],
29 29
     $fleet_row['fleet_resource_crystal'], $lang['Crystal'],
30
-    $fleet_row['fleet_resource_deuterium'], $lang['Deuterium'] );
30
+    $fleet_row['fleet_resource_deuterium'], $lang['Deuterium']);
31 31
   msg_send_simple_message($fleet_row['fleet_target_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
32 32
 
33
-  if($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner'])
33
+  if ($fleet_row['fleet_target_owner'] <> $fleet_row['fleet_owner'])
34 34
   {
35 35
     msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
36 36
   }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @copyright 2008 By Chlorel for XNova
9 9
  */
10 10
 
11
-function flt_mission_transport(&$mission_data)
12
-{
11
+function flt_mission_transport(&$mission_data) {
13 12
   $fleet_row          = &$mission_data['fleet'];
14 13
   $source_planet      = &$mission_data['src_planet'];
15 14
   $destination_planet = &$mission_data['dst_planet'];
Please login to merge, or discard this patch.