@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function report_render_rounds(&$template_result, UBE $ube) { |
| 27 | 27 | $round_count = $this->count(); |
| 28 | - for($round = 1; $round <= $round_count - 1; $round++) { |
|
| 28 | + for ($round = 1; $round <= $round_count - 1; $round++) { |
|
| 29 | 29 | $template_result['.']['round'][] = array( |
| 30 | 30 | 'NUMBER' => $round, |
| 31 | 31 | '.' => array( |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function sql_generate_unit_array(array &$sql_perform_ube_report_unit, $ube_report_id, UBEFleetList $UBEFleetList) { |
| 50 | 50 | $unit_sort_order = 1; |
| 51 | - foreach($this->_container as $round_number => $UBERound) { |
|
| 51 | + foreach ($this->_container as $round_number => $UBERound) { |
|
| 52 | 52 | $outer_prefix = array( |
| 53 | 53 | $ube_report_id, |
| 54 | 54 | $round_number, |
@@ -66,9 +66,9 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function db_load_round_list_from_report_row($report_row, UBE $ube) { |
| 68 | 68 | $query = doquery("SELECT * FROM {{ube_report_unit}} WHERE `ube_report_id` = {$report_row['ube_report_id']} ORDER BY `ube_report_unit_id`"); |
| 69 | - while($report_unit_row = db_fetch($query)) { |
|
| 69 | + while ($report_unit_row = db_fetch($query)) { |
|
| 70 | 70 | $round_number = $report_unit_row['ube_report_unit_round']; |
| 71 | - if(!isset($this[$round_number])) { |
|
| 71 | + if (!isset($this[$round_number])) { |
|
| 72 | 72 | $this[$round_number] = new UBERound(); |
| 73 | 73 | $this[$round_number]->init_round_from_report_unit_row($report_unit_row); |
| 74 | 74 | } |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | * @version 2016-02-25 23:42:45 41a4.68 |
| 37 | 37 | */ |
| 38 | 38 | public function make_snapshot(UBEFleetList $UBEFleetList) { |
| 39 | - foreach($UBEFleetList->_container as $fleet_id => $UBEFleet) { |
|
| 40 | - foreach($UBEFleet->unit_list->_container as $UBEUnit) { |
|
| 39 | + foreach ($UBEFleetList->_container as $fleet_id => $UBEFleet) { |
|
| 40 | + foreach ($UBEFleet->unit_list->_container as $UBEUnit) { |
|
| 41 | 41 | $this->snapshot[$fleet_id][$UBEUnit->unitId] = new UBESnapshotUnit(); |
| 42 | 42 | $this->snapshot[$fleet_id][$UBEUnit->unitId]->init_from_UBEUnit($UBEUnit); |
| 43 | 43 | } |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | * @version 2016-02-25 23:42:45 41a4.68 |
| 54 | 54 | */ |
| 55 | 55 | public function sql_generate_unit_array(array &$sql_perform_ube_report_unit, &$unit_sort_order, UBEFleetList $UBEFleetList, array $outer_prefix) { |
| 56 | - foreach($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
| 56 | + foreach ($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
| 57 | 57 | $inner_prefix = array( |
| 58 | 58 | $UBEFleetList[$fleet_id]->owner_id, |
| 59 | 59 | $fleet_id, |
| 60 | 60 | ); |
| 61 | - foreach($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
| 61 | + foreach ($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
| 62 | 62 | $sql_perform_ube_report_unit[] = array_merge( |
| 63 | 63 | $outer_prefix, |
| 64 | 64 | $inner_prefix, |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | UBE_PLAYER_IS_DEFENDER => array(), |
| 102 | 102 | ); |
| 103 | 103 | |
| 104 | - foreach($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
| 104 | + foreach ($this->snapshot as $fleet_id => $fleet_snapshot) { |
|
| 105 | 105 | $fleet_owner_id = $ube->fleet_list[$fleet_id]->owner_id; |
| 106 | 106 | $planet_ube_row = $ube->fleet_list[$fleet_id]->UBE_PLANET; |
| 107 | 107 | |
@@ -111,13 +111,13 @@ discard block |
||
| 111 | 111 | 'PLAYER_NAME' => htmlentities($ube->players[$fleet_owner_id]->name, ENT_COMPAT, 'UTF-8'), |
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | - if(is_array($planet_ube_row)) { |
|
| 114 | + if (is_array($planet_ube_row)) { |
|
| 115 | 115 | $template_fleet += $planet_ube_row; |
| 116 | 116 | $template_fleet[PLANET_NAME] = $template_fleet[PLANET_NAME] ? htmlentities($template_fleet[PLANET_NAME], ENT_COMPAT, 'UTF-8') : ''; |
| 117 | 117 | $template_fleet['PLANET_TYPE_TEXT'] = $lang['sys_planet_type_sh'][$template_fleet['PLANET_TYPE']]; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - foreach($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
| 120 | + foreach ($fleet_snapshot as $unit_id => $unit_snapshot) { |
|
| 121 | 121 | $template_fleet['.']['ship'][] = $unit_snapshot->report_render_unit($prevSnapshot[$fleet_id][$unit_id]); |
| 122 | 122 | } |
| 123 | 123 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | public function __clone() { |
| 45 | - if(static::$_clonable == ArrayAccessV2::CLONE_NONE) { |
|
| 45 | + if (static::$_clonable == ArrayAccessV2::CLONE_NONE) { |
|
| 46 | 46 | return; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | protected static function _deep_clone(&$array) { |
| 53 | - foreach($array as &$value) { |
|
| 54 | - if(is_object($value)) { |
|
| 53 | + foreach ($array as &$value) { |
|
| 54 | + if (is_object($value)) { |
|
| 55 | 55 | $value = clone $value; |
| 56 | - } elseif(is_array($value) && static::$_clonable == ArrayAccessV2::CLONE_DEEP) { |
|
| 56 | + } elseif (is_array($value) && static::$_clonable == ArrayAccessV2::CLONE_DEEP) { |
|
| 57 | 57 | static::_deep_clone($value); |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function __call($method_name, array $arguments) { |
| 69 | 69 | $object_first = reset($this->_container); |
| 70 | - if($object_first !== false && method_exists($object_first, $method_name)) { |
|
| 71 | - foreach($this->_container as $unit_id => $object) { |
|
| 70 | + if ($object_first !== false && method_exists($object_first, $method_name)) { |
|
| 71 | + foreach ($this->_container as $unit_id => $object) { |
|
| 72 | 72 | call_user_func_array(array($object, $method_name), $arguments); |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function getSumProperty($property_name) { |
| 85 | 85 | $result = 0.0; |
| 86 | - foreach($this->_container as $object) { |
|
| 87 | - if(is_object($object) && property_exists($object, $property_name)) { |
|
| 86 | + foreach ($this->_container as $object) { |
|
| 87 | + if (is_object($object) && property_exists($object, $property_name)) { |
|
| 88 | 88 | $result += $object->$property_name; |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | * @return mixed |
| 101 | 101 | */ |
| 102 | 102 | public function aggregateByMethod($method_name, &$result) { |
| 103 | - foreach($this->_container as $object) { |
|
| 104 | - if(is_object($object) && method_exists($object, $method_name)) { |
|
| 103 | + foreach ($this->_container as $object) { |
|
| 104 | + if (is_object($object) && method_exists($object, $method_name)) { |
|
| 105 | 105 | call_user_func(array($object, $method_name), $result); |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | * @param $unit_level |
| 29 | 29 | */ |
| 30 | 30 | public function add_unit_by_snid($unit_id, $unit_level) { |
| 31 | - if(!$unit_level) { |
|
| 31 | + if (!$unit_level) { |
|
| 32 | 32 | return; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - foreach(static::$_bonus_group as $param_name => $unit_list) { |
|
| 36 | - if(!empty($unit_list[$unit_id])) { |
|
| 35 | + foreach (static::$_bonus_group as $param_name => $unit_list) { |
|
| 36 | + if (!empty($unit_list[$unit_id])) { |
|
| 37 | 37 | // Простейший вариант - мультипликатор по базе |
| 38 | 38 | // Общий мультипликатор добавляется в конец |
| 39 | 39 | $this->grants[$param_name][$unit_id] = $unit_level; |
@@ -82,16 +82,16 @@ discard block |
||
| 82 | 82 | // $this->grants[$param_name][$unit_id] = $unit_level * get_unit_param($unit_id, P_BONUS_VALUE) / 100;; |
| 83 | 83 | $value_add = floatval($base_value); |
| 84 | 84 | $cumulative = 1.0; // Для случая BONUS_PERCENT |
| 85 | - if(!empty($this->grants[$param]) && is_array($this->grants[$param])) { |
|
| 86 | - foreach($this->grants[$param] as $unit_id => $unit_level) { |
|
| 85 | + if (!empty($this->grants[$param]) && is_array($this->grants[$param])) { |
|
| 86 | + foreach ($this->grants[$param] as $unit_id => $unit_level) { |
|
| 87 | 87 | $unit_bonus = 0; |
| 88 | - if($unit_id < 0) { |
|
| 88 | + if ($unit_id < 0) { |
|
| 89 | 89 | // Meta-unit - leave as is |
| 90 | 90 | } else { |
| 91 | 91 | // TODO - Подумать, что будет при смешивании разных бонусов и как этого избежать |
| 92 | 92 | $bonus_value = get_unit_param($unit_id, P_BONUS_VALUE); |
| 93 | 93 | $bonus_type = get_unit_param($unit_id, P_BONUS_TYPE); |
| 94 | - switch($bonus_type) { |
|
| 94 | + switch ($bonus_type) { |
|
| 95 | 95 | case BONUS_PERCENT: |
| 96 | 96 | $unit_bonus = $unit_level * $bonus_value / 100; |
| 97 | 97 | $cumulative += $unit_bonus; |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | * @version 41a6.16 |
| 24 | 24 | */ |
| 25 | 25 | protected function db_load_player_by_id($player_id) { |
| 26 | - if(isset($this[$player_id])) { |
|
| 26 | + if (isset($this[$player_id])) { |
|
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -154,15 +154,15 @@ discard block |
||
| 154 | 154 | * @param string $group_name |
| 155 | 155 | */ |
| 156 | 156 | public static function _init($group_name = '') { |
| 157 | - if(static::$_is_static_init) { |
|
| 157 | + if (static::$_is_static_init) { |
|
| 158 | 158 | return; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - if($group_name) { |
|
| 161 | + if ($group_name) { |
|
| 162 | 162 | static::$_sn_group_name = $group_name; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if(static::$_sn_group_name) { |
|
| 165 | + if (static::$_sn_group_name) { |
|
| 166 | 166 | static::$_group_unit_id_list = sn_get_groups(static::$_sn_group_name); |
| 167 | 167 | empty(static::$_group_unit_id_list) ? static::$_group_unit_id_list = array() : false; |
| 168 | 168 | } |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | // TODO - Reset combat stats?? |
| 188 | 188 | $this->_unitId = $unitId; |
| 189 | 189 | |
| 190 | - if($this->_unitId) { |
|
| 190 | + if ($this->_unitId) { |
|
| 191 | 191 | $this->info = get_unit_param($this->_unitId); |
| 192 | 192 | $this->_type = $this->info[P_UNIT_TYPE]; |
| 193 | 193 | } else { |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | |
| 199 | 199 | protected function setCount($value) { |
| 200 | 200 | // TODO - Reset combat stats?? |
| 201 | - if($value < 0) { |
|
| 201 | + if ($value < 0) { |
|
| 202 | 202 | classSupernova::$debug->error('Can not set Unit::$count to negative value'); |
| 203 | 203 | } |
| 204 | 204 | $this->_count = $value; |
@@ -17,14 +17,14 @@ |
||
| 17 | 17 | function flt_mission_attack($objMission) { |
| 18 | 18 | $objFleet = $objMission->fleet; |
| 19 | 19 | |
| 20 | - if($objFleet->shipsGetTotal() <= 0) { |
|
| 20 | + if ($objFleet->shipsGetTotal() <= 0) { |
|
| 21 | 21 | return null; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | $destination_user = $objMission->dst_user; |
| 25 | 25 | $destination_planet = $objMission->dst_planet; |
| 26 | 26 | |
| 27 | - if( |
|
| 27 | + if ( |
|
| 28 | 28 | // Нет данных о планете назначения или её владельце |
| 29 | 29 | empty($destination_user) || empty($destination_planet) || !is_array($destination_user) || !is_array($destination_planet) |
| 30 | 30 | || |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | 'shield' => 10, |
| 36 | 36 | 'armor' => 400, |
| 37 | 37 | 'attack' => 5, |
| 38 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
| 38 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
| 39 | 39 | ), |
| 40 | 40 | SHIP_CARGO_BIG => array( |
| 41 | 41 | 'name' => 'big_ship_cargo', |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | 'shield' => 25, |
| 56 | 56 | 'armor' => 1200, |
| 57 | 57 | 'attack' => 5, |
| 58 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
| 58 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
| 59 | 59 | 'engine' => array( |
| 60 | 60 | array( |
| 61 | 61 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'shield' => 50, |
| 84 | 84 | 'armor' => 3000, |
| 85 | 85 | 'attack' => 10, |
| 86 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
| 86 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
| 87 | 87 | 'engine' => array( |
| 88 | 88 | array( |
| 89 | 89 | 'tech' => TECH_ENGINE_ION, |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | 'shield' => 200, |
| 112 | 112 | 'armor' => 70000, |
| 113 | 113 | 'attack' => 50, |
| 114 | - 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250, ), |
|
| 114 | + 'amplify' => array(SHIP_SPY => 100, SHIP_SATTELITE_SOLAR => 250,), |
|
| 115 | 115 | 'engine' => array( |
| 116 | 116 | array( |
| 117 | 117 | 'tech' => TECH_ENGINE_HYPER, |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | 'shield' => 100, |
| 141 | 141 | 'armor' => 3000, |
| 142 | 142 | 'attack' => 50, |
| 143 | - 'amplify' => array(SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21, ), |
|
| 143 | + 'amplify' => array(SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21,), |
|
| 144 | 144 | 'engine' => array( |
| 145 | 145 | array( |
| 146 | 146 | 'tech' => TECH_ENGINE_ION, |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | 'shield' => 10, |
| 169 | 169 | 'armor' => 1600, |
| 170 | 170 | 'attack' => 1, |
| 171 | - 'amplify' => array(SHIP_SPY => 500.05, SHIP_SATTELITE_SOLAR => 1050, ), |
|
| 171 | + 'amplify' => array(SHIP_SPY => 500.05, SHIP_SATTELITE_SOLAR => 1050,), |
|
| 172 | 172 | 'engine' => array( |
| 173 | 173 | array( |
| 174 | 174 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | 'shield' => 0.01, |
| 197 | 197 | 'armor' => 100, |
| 198 | 198 | 'attack' => 0.01, |
| 199 | - 'amplify' => array( SHIP_SPY => 1,), |
|
| 199 | + 'amplify' => array(SHIP_SPY => 1,), |
|
| 200 | 200 | 'engine' => array( |
| 201 | 201 | array( |
| 202 | 202 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | 'factor' => 1, |
| 221 | 221 | ), |
| 222 | 222 | P_UNIT_PRODUCTION => array( |
| 223 | - RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return ($planet_row["temp_max"] / 4 + 20) * $level * (0.1 * $production_factor);}, |
|
| 223 | + RES_ENERGY => function($level, $production_factor, $user, $planet_row) {return ($planet_row["temp_max"] / 4 + 20) * $level * (0.1 * $production_factor); }, |
|
| 224 | 224 | ), |
| 225 | 225 | P_MINING_IS_MANAGED => true, |
| 226 | 226 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | 'shield' => 10, |
| 230 | 230 | 'armor' => 200, |
| 231 | 231 | 'attack' => 1, |
| 232 | - 'amplify' => array(SHIP_SPY => 1, ), |
|
| 232 | + 'amplify' => array(SHIP_SPY => 1,), |
|
| 233 | 233 | 'engine' => array( |
| 234 | 234 | array( |
| 235 | 235 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | 'shield' => 10, |
| 262 | 262 | 'armor' => 400, |
| 263 | 263 | 'attack' => 50, |
| 264 | - 'amplify' => array(SHIP_CARGO_SMALL => 16.4, SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21, ), |
|
| 264 | + 'amplify' => array(SHIP_CARGO_SMALL => 16.4, SHIP_SPY => 10.001, SHIP_SATTELITE_SOLAR => 21,), |
|
| 265 | 265 | 'engine' => array( |
| 266 | 266 | array( |
| 267 | 267 | 'tech' => TECH_ENGINE_CHEMICAL, |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | 'shield' => 25, |
| 291 | 291 | 'armor' => 1000, |
| 292 | 292 | 'attack' => 150, |
| 293 | - 'amplify' => array(SHIP_CARGO_SMALL => 8.2, SHIP_SPY => 3.33367, SHIP_SATTELITE_SOLAR => 7, ), |
|
| 293 | + 'amplify' => array(SHIP_CARGO_SMALL => 8.2, SHIP_SPY => 3.33367, SHIP_SATTELITE_SOLAR => 7,), |
|
| 294 | 294 | 'engine' => array( |
| 295 | 295 | array( |
| 296 | 296 | 'tech' => TECH_ENGINE_ION, |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | 'shield' => 50, |
| 350 | 350 | 'armor' => 2700, |
| 351 | 351 | 'attack' => 400, |
| 352 | - 'amplify' => array(SHIP_SMALL_FIGHTER_LIGHT => 6.15, SHIP_SPY => 1.25013, SHIP_SATTELITE_SOLAR => 2.625, UNIT_DEF_TURRET_MISSILE => 5.5, ), |
|
| 352 | + 'amplify' => array(SHIP_SMALL_FIGHTER_LIGHT => 6.15, SHIP_SPY => 1.25013, SHIP_SATTELITE_SOLAR => 2.625, UNIT_DEF_TURRET_MISSILE => 5.5,), |
|
| 353 | 353 | 'engine' => array( |
| 354 | 354 | array( |
| 355 | 355 | 'tech' => TECH_ENGINE_ION, |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | 'shield' => 200, |
| 409 | 409 | 'armor' => 6000, |
| 410 | 410 | 'attack' => 1000, |
| 411 | - 'amplify' => array(SHIP_SPY => 0.50005, SHIP_SATTELITE_SOLAR => 1.05, UNIT_DEF_TURRET_MISSILE => 1.76, ), |
|
| 411 | + 'amplify' => array(SHIP_SPY => 0.50005, SHIP_SATTELITE_SOLAR => 1.05, UNIT_DEF_TURRET_MISSILE => 1.76,), |
|
| 412 | 412 | 'engine' => array( |
| 413 | 413 | array( |
| 414 | 414 | 'tech' => TECH_ENGINE_HYPER, |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | 'shield' => 500, |
| 505 | 505 | 'armor' => 11000, |
| 506 | 506 | 'attack' => 2000, |
| 507 | - 'amplify' => array(SHIP_SPY => 0.25003, SHIP_SATTELITE_SOLAR => 0.525, SHIP_LARGE_BATTLESHIP => 7.4, UNIT_DEF_TURRET_LASER_SMALL => 1.125, ), |
|
| 507 | + 'amplify' => array(SHIP_SPY => 0.25003, SHIP_SATTELITE_SOLAR => 0.525, SHIP_LARGE_BATTLESHIP => 7.4, UNIT_DEF_TURRET_LASER_SMALL => 1.125,), |
|
| 508 | 508 | 'engine' => array( |
| 509 | 509 | array( |
| 510 | 510 | 'tech' => TECH_ENGINE_HYPER, |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | 'shield' => 20, |
| 609 | 609 | 'armor' => 200, |
| 610 | 610 | 'attack' => 80, |
| 611 | - 'amplify' => array(SHIP_SPY => 7, ), |
|
| 611 | + 'amplify' => array(SHIP_SPY => 7,), |
|
| 612 | 612 | ), |
| 613 | 613 | UNIT_DEF_TURRET_LASER_SMALL => array( |
| 614 | 614 | 'name' => 'small_laser', |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | 'shield' => 25, |
| 627 | 627 | 'armor' => 200, |
| 628 | 628 | 'attack' => 100, |
| 629 | - 'amplify' => array(SHIP_SPY => 5, ), |
|
| 629 | + 'amplify' => array(SHIP_SPY => 5,), |
|
| 630 | 630 | ), |
| 631 | 631 | UNIT_DEF_TURRET_LASER_BIG => array( |
| 632 | 632 | 'name' => 'big_laser', |
@@ -644,7 +644,7 @@ discard block |
||
| 644 | 644 | 'shield' => 100, |
| 645 | 645 | 'armor' => 800, |
| 646 | 646 | 'attack' => 250, |
| 647 | - 'amplify' => array(SHIP_SPY => 2, ), |
|
| 647 | + 'amplify' => array(SHIP_SPY => 2,), |
|
| 648 | 648 | ), |
| 649 | 649 | UNIT_DEF_TURRET_GAUSS => array( |
| 650 | 650 | 'name' => 'gauss_canyon', |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | 'armor' => 3500, |
| 663 | 663 | 'shield' => 200, |
| 664 | 664 | 'attack' => 1100, |
| 665 | - 'amplify' => array(SHIP_SPY => 0.5, ), |
|
| 665 | + 'amplify' => array(SHIP_SPY => 0.5,), |
|
| 666 | 666 | ), |
| 667 | 667 | UNIT_DEF_TURRET_ION => array( |
| 668 | 668 | 'name' => 'ionic_canyon', |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | 'shield' => 500, |
| 681 | 681 | 'armor' => 800, |
| 682 | 682 | 'attack' => 150, |
| 683 | - 'amplify' => array(SHIP_SPY => 3.3, ), |
|
| 683 | + 'amplify' => array(SHIP_SPY => 3.3,), |
|
| 684 | 684 | ), |
| 685 | 685 | UNIT_DEF_TURRET_PLASMA => array( |
| 686 | 686 | 'name' => 'buster_canyon', |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | 'shield' => 300, |
| 699 | 699 | 'armor' => 10000, |
| 700 | 700 | 'attack' => 3000, |
| 701 | - 'amplify' => array(SHIP_SPY => 0.17, ), |
|
| 701 | + 'amplify' => array(SHIP_SPY => 0.17,), |
|
| 702 | 702 | ), |
| 703 | 703 | |
| 704 | 704 | UNIT_DEF_SHIELD_SMALL => array( |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | 'shield' => 2000, |
| 719 | 719 | 'armor' => 2000, |
| 720 | 720 | 'attack' => 1, |
| 721 | - 'amplify' => array(SHIP_SPY => 500, ), |
|
| 721 | + 'amplify' => array(SHIP_SPY => 500,), |
|
| 722 | 722 | ), |
| 723 | 723 | UNIT_DEF_SHIELD_BIG => array( |
| 724 | 724 | 'name' => 'big_protection_shield', |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | 'shield' => 2000, |
| 738 | 738 | 'armor' => 10000, |
| 739 | 739 | 'attack' => 1, |
| 740 | - 'amplify' => array(SHIP_SPY => 500, ), |
|
| 740 | + 'amplify' => array(SHIP_SPY => 500,), |
|
| 741 | 741 | ), |
| 742 | 742 | UNIT_DEF_SHIELD_PLANET => array( |
| 743 | 743 | 'name' => 'planet_protector', |
@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode) { |
| 23 | 23 | $unit_list = sn_get_groups($mode); |
| 24 | - if(empty($unit_list)) { |
|
| 24 | + if (empty($unit_list)) { |
|
| 25 | 25 | return; |
| 26 | 26 | } |
| 27 | 27 | $name_list = classLocale::$lang['tech']; |
| 28 | 28 | |
| 29 | - foreach($unit_list as $unit_id) { |
|
| 29 | + foreach ($unit_list as $unit_id) { |
|
| 30 | 30 | $template->assign_block_vars('unit', array( |
| 31 | 31 | 'ID' => $unit_id, |
| 32 | 32 | 'NAME' => $name_list[$unit_id], |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | function admin_planet_edit_query_string($unit_id, $unit_amount, $mode) { return sn_function_call(__FUNCTION__, array($unit_id, $unit_amount, $mode)); } |
| 40 | 40 | |
| 41 | 41 | function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode) { |
| 42 | - if($unit_amount && in_array($unit_id, sn_get_groups($mode))) { |
|
| 42 | + if ($unit_amount && in_array($unit_id, sn_get_groups($mode))) { |
|
| 43 | 43 | $unit_amount = round($unit_amount); |
| 44 | 44 | $unit_name = get_unit_param($unit_id, P_NAME); |
| 45 | 45 | $result = "{$unit_name} = GREATEST(0, {$unit_name} + ({$unit_amount}))"; |