@@ -96,9 +96,9 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | for ($Option = 10; $Option >= 0; $Option--) |
| 98 | 98 | { |
| 99 | - $template->assign_block_vars('option', array( |
|
| 100 | - 'VALUE' => $Option * 10, |
|
| 101 | - )); |
|
| 99 | + $template->assign_block_vars('option', array( |
|
| 100 | + 'VALUE' => $Option * 10, |
|
| 101 | + )); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | $capsObj = new ResourceCalculations(); |
@@ -165,12 +165,12 @@ discard block |
||
| 165 | 165 | int_calc_storage_bar(RES_DEUTERIUM, $capsObj); |
| 166 | 166 | |
| 167 | 167 | $template->assign_vars(array( |
| 168 | - 'PLANET_NAME' => $planetrow['name'], |
|
| 169 | - 'PLANET_TYPE' => $planetrow['planet_type'], |
|
| 168 | + 'PLANET_NAME' => $planetrow['name'], |
|
| 169 | + 'PLANET_TYPE' => $planetrow['planet_type'], |
|
| 170 | 170 | |
| 171 | - 'PRODUCTION_LEVEL' => floor($capsObj->efficiency * 100), |
|
| 171 | + 'PRODUCTION_LEVEL' => floor($capsObj->efficiency * 100), |
|
| 172 | 172 | |
| 173 | - 'PAGE_HINT' => $lang['res_hint'], |
|
| 173 | + 'PAGE_HINT' => $lang['res_hint'], |
|
| 174 | 174 | )); |
| 175 | 175 | |
| 176 | 176 | display($template, $lang['res_planet_production']); |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | ]); |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | -$ValidList['percent'] = array ( 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ); |
|
| 53 | +$ValidList['percent'] = array(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100); |
|
| 54 | 54 | $template = gettemplate('resources', true); |
| 55 | 55 | |
| 56 | 56 | $planet = new \Planet\Planet($planetrow['id']); |
| 57 | -if(!empty($transmutation_result = $planet->sn_sys_planet_core_transmute($user))) { |
|
| 57 | +if (!empty($transmutation_result = $planet->sn_sys_planet_core_transmute($user))) { |
|
| 58 | 58 | $template->assign_block_vars('result', $transmutation_result); |
| 59 | 59 | $planet = new \Planet\Planet($planetrow['id']); |
| 60 | 60 | } |
@@ -63,20 +63,20 @@ discard block |
||
| 63 | 63 | $production = $_POST['production']; |
| 64 | 64 | //$SubQry = ''; |
| 65 | 65 | $SubQry = array(); |
| 66 | -if(is_array($production)) { |
|
| 67 | - foreach($production as $prod_id => $percent) { |
|
| 68 | - if($percent > 100 || $percent < 0) { |
|
| 66 | +if (is_array($production)) { |
|
| 67 | + foreach ($production as $prod_id => $percent) { |
|
| 68 | + if ($percent > 100 || $percent < 0) { |
|
| 69 | 69 | $debug->warning('Supplying wrong production percent (less then 0 or greater then 100)', 'Hack attempt', 302, array('base_dump' => true)); |
| 70 | 70 | die(); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $prod_id = intval($prod_id); |
| 74 | - if(in_array($prod_id, $sn_group_factories) && get_unit_param($prod_id, P_MINING_IS_MANAGED)) { |
|
| 74 | + if (in_array($prod_id, $sn_group_factories) && get_unit_param($prod_id, P_MINING_IS_MANAGED)) { |
|
| 75 | 75 | $field_name = pname_factory_production_field_name($prod_id); |
| 76 | 76 | $percent = floor($percent / 10); |
| 77 | 77 | $planetrow[$field_name] = $percent; |
| 78 | 78 | //$SubQry .= "`{$field_name}` = '{$percent}',"; |
| 79 | - $SubQry[] = "`{$field_name}` = '{$percent}'"; |
|
| 79 | + $SubQry[] = "`{$field_name}` = '{$percent}'"; |
|
| 80 | 80 | } else { |
| 81 | 81 | $debug->warning('Supplying wrong ID in production array - attempt to change some field - ID' . $prod_id, 'Resource Page', 301); |
| 82 | 82 | continue; |
@@ -113,9 +113,9 @@ discard block |
||
| 113 | 113 | 'ENERGY_TYPE' => prettyNumberStyledDefault($capsObj->productionCurrentMatrix[RES_ENERGY][0]), |
| 114 | 114 | )); |
| 115 | 115 | |
| 116 | -foreach($sn_group_factories as $unit_id) |
|
| 116 | +foreach ($sn_group_factories as $unit_id) |
|
| 117 | 117 | { |
| 118 | - if(mrc_get_level($user, $planetrow, $unit_id) > 0 && get_unit_param($unit_id)) |
|
| 118 | + if (mrc_get_level($user, $planetrow, $unit_id) > 0 && get_unit_param($unit_id)) |
|
| 119 | 119 | { |
| 120 | 120 | $level_plain = mrc_get_level($user, $planetrow, $unit_id, false, true); |
| 121 | 121 | $template->assign_block_vars('production', array( |
@@ -126,9 +126,9 @@ discard block |
||
| 126 | 126 | 'advGoogleLeftMenuCode' => '(Place here code for banner)', |
| 127 | 127 | |
| 128 | 128 | // Alliance bonus calculations |
| 129 | - 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
| 129 | + 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
| 130 | 130 | 'ali_bonus_brackets' => 10, // Brackets count for ALI_BONUS_BY_RANK |
| 131 | - 'ali_bonus_brackets_divisor' => 10,// Bonus divisor for ALI_BONUS_BY_RANK |
|
| 131 | + 'ali_bonus_brackets_divisor' => 10, // Bonus divisor for ALI_BONUS_BY_RANK |
|
| 132 | 132 | 'ali_bonus_divisor' => 10000000, // Rank divisor for ALI_BONUS_BY_POINTS |
| 133 | 133 | 'ali_bonus_members' => 10, // Minimum alliance size to start using bonus |
| 134 | 134 | |
@@ -164,17 +164,17 @@ discard block |
||
| 164 | 164 | 'deuterium_basic_income' => 0, |
| 165 | 165 | 'eco_scale_storage' => 1, |
| 166 | 166 | 'eco_stockman_fleet' => '', // Black Market - Starting amount of s/h ship merchant to sell |
| 167 | - 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
| 167 | + 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
| 168 | 168 | 'empire_mercenary_base_period' => PERIOD_MONTH, // Base |
| 169 | 169 | 'empire_mercenary_temporary' => 0, // Temporary empire-wide mercenaries |
| 170 | 170 | 'energy_basic_income' => 0, |
| 171 | 171 | |
| 172 | 172 | // Bashing protection settings |
| 173 | - 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
| 174 | - 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
| 175 | - 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
| 176 | - 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
| 177 | - 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
| 173 | + 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
| 174 | + 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
| 175 | + 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
| 176 | + 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
| 177 | + 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
| 178 | 178 | |
| 179 | 179 | 'Fleet_Cdr' => 30, |
| 180 | 180 | 'fleet_speed' => 1, |
@@ -182,8 +182,8 @@ discard block |
||
| 182 | 182 | 'fleet_update_interval' => 4, |
| 183 | 183 | 'fleet_update_lock' => '', // SQL time when lock was acquired |
| 184 | 184 | |
| 185 | - 'game_adminEmail' => 'root@localhost', // Admin's email to show to users |
|
| 186 | - 'game_counter' => 0, // Does built-in page hit counter is on? |
|
| 185 | + 'game_adminEmail' => 'root@localhost', // Admin's email to show to users |
|
| 186 | + 'game_counter' => 0, // Does built-in page hit counter is on? |
|
| 187 | 187 | // Defaults |
| 188 | 188 | 'game_default_language' => 'ru', |
| 189 | 189 | 'game_default_skin' => 'skins/EpicBlue/', |
@@ -197,14 +197,14 @@ discard block |
||
| 197 | 197 | 'game_maxSystem' => 199, |
| 198 | 198 | 'game_maxPlanet' => 15, |
| 199 | 199 | // Game global settings |
| 200 | - 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
| 200 | + 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
| 201 | 201 | 'game_name' => 'SuperNova', // Server name (would be on banners and on top of left menu) |
| 202 | 202 | |
| 203 | 203 | 'game_news_actual' => PERIOD_DAY_3, // How long announcement would be marked as "New". In seconds. Default - 3 days |
| 204 | - 'game_news_overview' => 3, // How much last news to show in Overview page |
|
| 205 | - 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
| 204 | + 'game_news_overview' => 3, // How much last news to show in Overview page |
|
| 205 | + 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
| 206 | 206 | // Noob protection |
| 207 | - 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
| 207 | + 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
| 208 | 208 | 'game_noob_points' => 5000, // Below this point user threated as noob. 0 to disable |
| 209 | 209 | |
| 210 | 210 | 'game_multiaccount_enabled' => 0, // 1 - allow interactions for players with same IP (multiaccounts) |
@@ -259,8 +259,8 @@ discard block |
||
| 259 | 259 | 'payment_currency_exchange_wmu' => 30, |
| 260 | 260 | 'payment_currency_exchange_wmz' => 1, |
| 261 | 261 | |
| 262 | - 'payment_lot_price' => 1, // Lot price in default currency |
|
| 263 | - 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
| 262 | + 'payment_lot_price' => 1, // Lot price in default currency |
|
| 263 | + 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
| 264 | 264 | |
| 265 | 265 | 'planet_capital_cost' => 25000, // Cost in DM to move Capital to current planet |
| 266 | 266 | 'planet_teleport_cost' => 50000, // Cost of planet teleportation |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | 'resource_multiplier' => 1, |
| 283 | 283 | |
| 284 | 284 | //Roleplay system |
| 285 | - 'rpg_bonus_divisor' => 10, // Amount of DM referral shoud get for partner have 1 DM bonus |
|
| 285 | + 'rpg_bonus_divisor' => 10, // Amount of DM referral shoud get for partner have 1 DM bonus |
|
| 286 | 286 | 'rpg_bonus_minimum' => 10000, // Minimum DM ammount for starting paying bonuses to affiliate |
| 287 | 287 | |
| 288 | 288 | // Black Market - General |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | * @return int |
| 106 | 106 | */ |
| 107 | 107 | public function getMaxLevel() { |
| 108 | - $snId = $this->getSnId(); |
|
| 108 | + $snId = $this->getSnId(); |
|
| 109 | 109 | return !empty($snId) ? get_unit_param($snId, P_MAX_STACK) : 0; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | $dbq->setWhereArray(static::translateNames($propertyFilter, static::PROPERTIES_TO_FIELDS)); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - if(static::$_forUpdate == DbQuery::DB_FOR_UPDATE) { |
|
| 139 | + if (static::$_forUpdate == DbQuery::DB_FOR_UPDATE) { |
|
| 140 | 140 | $dbq->setForUpdate(); |
| 141 | 141 | static::$_forUpdate = DbQuery::DB_SHARED; |
| 142 | 142 | } |