@@ -189,62 +189,62 @@ discard block |
||
189 | 189 | ); |
190 | 190 | |
191 | 191 | $sn_message_class_list = array( |
192 | - MSG_TYPE_NEW => array( |
|
193 | - 'name' => 'new_message', |
|
194 | - 'switchable' => false, |
|
195 | - 'email' => false, |
|
196 | - ), |
|
197 | - MSG_TYPE_ADMIN => array( |
|
198 | - 'name' => 'msg_admin', |
|
199 | - 'switchable' => false, |
|
200 | - 'email' => true, |
|
201 | - ), |
|
202 | - MSG_TYPE_PLAYER => array( |
|
203 | - 'name' => 'mnl_joueur', |
|
204 | - 'switchable' => false, |
|
205 | - 'email' => true, |
|
206 | - ), |
|
207 | - MSG_TYPE_ALLIANCE => array( |
|
208 | - 'name' => 'mnl_alliance', |
|
209 | - 'switchable' => false, |
|
210 | - 'email' => true, |
|
211 | - ), |
|
212 | - MSG_TYPE_SPY => array( |
|
213 | - 'name' => 'mnl_spy', |
|
214 | - 'switchable' => true, |
|
215 | - 'email' => true, |
|
216 | - ), |
|
217 | - MSG_TYPE_COMBAT => array( |
|
218 | - 'name' => 'mnl_attaque', |
|
219 | - 'switchable' => true, |
|
220 | - 'email' => true, |
|
221 | - ), |
|
222 | - MSG_TYPE_TRANSPORT => array( |
|
223 | - 'name' => 'mnl_transport', |
|
224 | - 'switchable' => true, |
|
225 | - 'email' => true, |
|
226 | - ), |
|
227 | - MSG_TYPE_RECYCLE => array( |
|
228 | - 'name' => 'mnl_exploit', |
|
229 | - 'switchable' => true, |
|
230 | - 'email' => true, |
|
231 | - ), |
|
232 | - MSG_TYPE_EXPLORE => array( |
|
233 | - 'name' => 'mnl_expedition', |
|
234 | - 'switchable' => true, |
|
235 | - 'email' => true, |
|
236 | - ), |
|
237 | - // 97 => 'mnl_general', |
|
238 | - MSG_TYPE_QUE => array( |
|
239 | - 'name' => 'mnl_buildlist', |
|
240 | - 'switchable' => true, |
|
241 | - 'email' => true, |
|
242 | - ), |
|
243 | - MSG_TYPE_OUTBOX => array( |
|
244 | - 'name' => 'mnl_outbox', |
|
245 | - 'switchable' => false, |
|
246 | - 'email' => false, |
|
247 | - ), |
|
192 | + MSG_TYPE_NEW => array( |
|
193 | + 'name' => 'new_message', |
|
194 | + 'switchable' => false, |
|
195 | + 'email' => false, |
|
196 | + ), |
|
197 | + MSG_TYPE_ADMIN => array( |
|
198 | + 'name' => 'msg_admin', |
|
199 | + 'switchable' => false, |
|
200 | + 'email' => true, |
|
201 | + ), |
|
202 | + MSG_TYPE_PLAYER => array( |
|
203 | + 'name' => 'mnl_joueur', |
|
204 | + 'switchable' => false, |
|
205 | + 'email' => true, |
|
206 | + ), |
|
207 | + MSG_TYPE_ALLIANCE => array( |
|
208 | + 'name' => 'mnl_alliance', |
|
209 | + 'switchable' => false, |
|
210 | + 'email' => true, |
|
211 | + ), |
|
212 | + MSG_TYPE_SPY => array( |
|
213 | + 'name' => 'mnl_spy', |
|
214 | + 'switchable' => true, |
|
215 | + 'email' => true, |
|
216 | + ), |
|
217 | + MSG_TYPE_COMBAT => array( |
|
218 | + 'name' => 'mnl_attaque', |
|
219 | + 'switchable' => true, |
|
220 | + 'email' => true, |
|
221 | + ), |
|
222 | + MSG_TYPE_TRANSPORT => array( |
|
223 | + 'name' => 'mnl_transport', |
|
224 | + 'switchable' => true, |
|
225 | + 'email' => true, |
|
226 | + ), |
|
227 | + MSG_TYPE_RECYCLE => array( |
|
228 | + 'name' => 'mnl_exploit', |
|
229 | + 'switchable' => true, |
|
230 | + 'email' => true, |
|
231 | + ), |
|
232 | + MSG_TYPE_EXPLORE => array( |
|
233 | + 'name' => 'mnl_expedition', |
|
234 | + 'switchable' => true, |
|
235 | + 'email' => true, |
|
236 | + ), |
|
237 | + // 97 => 'mnl_general', |
|
238 | + MSG_TYPE_QUE => array( |
|
239 | + 'name' => 'mnl_buildlist', |
|
240 | + 'switchable' => true, |
|
241 | + 'email' => true, |
|
242 | + ), |
|
243 | + MSG_TYPE_OUTBOX => array( |
|
244 | + 'name' => 'mnl_outbox', |
|
245 | + 'switchable' => false, |
|
246 | + 'email' => false, |
|
247 | + ), |
|
248 | 248 | ); |
249 | 249 | |
250 | 250 | $sn_message_groups = array( |
@@ -1096,7 +1096,7 @@ discard block |
||
1096 | 1096 | SHIP_HUGE_DEATH_STAR => SHIP_HUGE_DEATH_STAR, SHIP_HUGE_SUPERNOVA => SHIP_HUGE_SUPERNOVA, |
1097 | 1097 | SHIP_CARGO_SMALL => SHIP_CARGO_SMALL, SHIP_CARGO_BIG => SHIP_CARGO_BIG, SHIP_CARGO_SUPER => SHIP_CARGO_SUPER, SHIP_CARGO_HYPER => SHIP_CARGO_HYPER, |
1098 | 1098 | SHIP_RECYCLER => SHIP_RECYCLER, SHIP_COLONIZER => SHIP_COLONIZER, SHIP_SPY => SHIP_SPY, SHIP_SATTELITE_SOLAR => SHIP_SATTELITE_SOLAR |
1099 | - ), |
|
1099 | + ), |
|
1100 | 1100 | // Defensive building list |
1101 | 1101 | 'defense' => array (UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
1102 | 1102 | UNIT_DEF_TURRET_LASER_BIG => UNIT_DEF_TURRET_LASER_BIG, UNIT_DEF_TURRET_GAUSS => UNIT_DEF_TURRET_GAUSS, |
@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | protected $_repository; |
31 | 31 | |
32 | - /** |
|
32 | + /** |
|
33 | 33 | * @var ContainerPlus $_oldRepo |
34 | 34 | */ |
35 | 35 | protected $_oldRepo; |
@@ -239,35 +239,35 @@ discard block |
||
239 | 239 | $user_activity = floor((SN_TIME_NOW - $uni_galaxyRowUser['onlinetime'])/(60*60*24)); |
240 | 240 | |
241 | 241 | $templatizedPlanet = array_merge([ |
242 | - 'PLANET_ID' => $uni_galaxyRowPlanet['id'], |
|
243 | - 'PLANET_NUM' => $Planet, |
|
244 | - 'PLANET_NAME' => $uni_galaxyRowPlanet['name'], |
|
245 | - 'PLANET_NAME_JS' => js_safe_string($uni_galaxyRowPlanet['name']), |
|
246 | - 'PLANET_DESTROYED' => $uni_galaxyRowPlanet["destruyed"], |
|
247 | - 'PLANET_TYPE' => $uni_galaxyRowPlanet["planet_type"], |
|
248 | - 'PLANET_ACTIVITY' => floor((SN_TIME_NOW - $uni_galaxyRowPlanet['last_update'])/60), |
|
249 | - 'PLANET_IMAGE' => $uni_galaxyRowPlanet['image'], |
|
250 | - 'PLANET_FLEET_ID' => $planet_fleet_id, |
|
251 | - 'PLANET_DIAMETER' => number_format($uni_galaxyRowPlanet['diameter'], 0, '', '.'), |
|
252 | - |
|
253 | - 'USER_ID' => $uni_galaxyRowUser['id'], |
|
254 | - 'USER_NAME' => player_nick_render_to_html($uni_galaxyRowUser), |
|
255 | - 'USER_NAME_JS' => js_safe_string(player_nick_render_to_html($uni_galaxyRowUser)), |
|
256 | - 'USER_RANK' => in_array($uni_galaxyRowUser['id'], $user_skip_list) ? '-' : $uni_galaxyRowUser['total_rank'], |
|
257 | - 'USER_BANNED' => $uni_galaxyRowUser['banaday'], |
|
258 | - 'USER_VACATION' => $uni_galaxyRowUser['vacation'], |
|
259 | - 'USER_ACTIVITY' => $user_activity, |
|
260 | - 'USER_ATTACKABLE' => $user_activity >= 7, |
|
261 | - 'USER_INACTIVE' => $user_activity >= 28, |
|
262 | - 'USER_PROTECTED'=> $RowUserPoints <= classSupernova::$config->game_noob_points, |
|
263 | - 'USER_NOOB' => $RowUserPoints * classSupernova::$config->game_noob_factor < $CurrentPoints && classSupernova::$config->game_noob_factor, |
|
264 | - 'USER_STRONG' => $CurrentPoints * classSupernova::$config->game_noob_factor < $RowUserPoints && classSupernova::$config->game_noob_factor, |
|
265 | - 'USER_AUTH' => $uni_galaxyRowUser['authlevel'], |
|
266 | - 'USER_ADMIN' => $lang['user_level_shortcut'][$uni_galaxyRowUser['authlevel']], |
|
267 | - 'USER_BIRTHDAY' => $birthday_array['month'] == $time_now_parsed['mon'] && $birthday_array['day'] == $time_now_parsed['mday'] ? date(FMT_DATE, SN_TIME_NOW) : 0, |
|
268 | - |
|
269 | - 'ALLY_ID' => $uni_galaxyRowUser['ally_id'], |
|
270 | - 'ALLY_TAG' => $uni_galaxyRowUser['ally_tag'], |
|
242 | + 'PLANET_ID' => $uni_galaxyRowPlanet['id'], |
|
243 | + 'PLANET_NUM' => $Planet, |
|
244 | + 'PLANET_NAME' => $uni_galaxyRowPlanet['name'], |
|
245 | + 'PLANET_NAME_JS' => js_safe_string($uni_galaxyRowPlanet['name']), |
|
246 | + 'PLANET_DESTROYED' => $uni_galaxyRowPlanet["destruyed"], |
|
247 | + 'PLANET_TYPE' => $uni_galaxyRowPlanet["planet_type"], |
|
248 | + 'PLANET_ACTIVITY' => floor((SN_TIME_NOW - $uni_galaxyRowPlanet['last_update'])/60), |
|
249 | + 'PLANET_IMAGE' => $uni_galaxyRowPlanet['image'], |
|
250 | + 'PLANET_FLEET_ID' => $planet_fleet_id, |
|
251 | + 'PLANET_DIAMETER' => number_format($uni_galaxyRowPlanet['diameter'], 0, '', '.'), |
|
252 | + |
|
253 | + 'USER_ID' => $uni_galaxyRowUser['id'], |
|
254 | + 'USER_NAME' => player_nick_render_to_html($uni_galaxyRowUser), |
|
255 | + 'USER_NAME_JS' => js_safe_string(player_nick_render_to_html($uni_galaxyRowUser)), |
|
256 | + 'USER_RANK' => in_array($uni_galaxyRowUser['id'], $user_skip_list) ? '-' : $uni_galaxyRowUser['total_rank'], |
|
257 | + 'USER_BANNED' => $uni_galaxyRowUser['banaday'], |
|
258 | + 'USER_VACATION' => $uni_galaxyRowUser['vacation'], |
|
259 | + 'USER_ACTIVITY' => $user_activity, |
|
260 | + 'USER_ATTACKABLE' => $user_activity >= 7, |
|
261 | + 'USER_INACTIVE' => $user_activity >= 28, |
|
262 | + 'USER_PROTECTED'=> $RowUserPoints <= classSupernova::$config->game_noob_points, |
|
263 | + 'USER_NOOB' => $RowUserPoints * classSupernova::$config->game_noob_factor < $CurrentPoints && classSupernova::$config->game_noob_factor, |
|
264 | + 'USER_STRONG' => $CurrentPoints * classSupernova::$config->game_noob_factor < $RowUserPoints && classSupernova::$config->game_noob_factor, |
|
265 | + 'USER_AUTH' => $uni_galaxyRowUser['authlevel'], |
|
266 | + 'USER_ADMIN' => $lang['user_level_shortcut'][$uni_galaxyRowUser['authlevel']], |
|
267 | + 'USER_BIRTHDAY' => $birthday_array['month'] == $time_now_parsed['mon'] && $birthday_array['day'] == $time_now_parsed['mday'] ? date(FMT_DATE, SN_TIME_NOW) : 0, |
|
268 | + |
|
269 | + 'ALLY_ID' => $uni_galaxyRowUser['ally_id'], |
|
270 | + 'ALLY_TAG' => $uni_galaxyRowUser['ally_tag'], |
|
271 | 271 | ], $templatizedMoon, $debrisTemplatized); |
272 | 272 | $template->assign_block_vars('galaxyrow', $templatizedPlanet); |
273 | 273 | } |
@@ -338,52 +338,52 @@ discard block |
||
338 | 338 | |
339 | 339 | $template->assign_vars(array( |
340 | 340 | // 'rows' => $Result, |
341 | - 'userCount' => classSupernova::$config->users_amount, |
|
342 | - 'ALLY_COUNT' => $ally_count['ally_count'], |
|
343 | - 'PLANET_EXPEDITION' => classSupernova::$config->game_maxPlanet + 1, |
|
344 | - 'curPlanetID' => $planetrow['id'], |
|
345 | - 'curPlanetG' => $planetrow['galaxy'], |
|
346 | - 'curPlanetS' => $planetrow['system'], |
|
347 | - 'curPlanetP' => $planetrow['planet'], |
|
348 | - 'curPlanetPT' => $planetrow['planet_type'], |
|
349 | - 'deathStars' => mrc_get_level($user, $planetrow, SHIP_HUGE_DEATH_STAR, false, true), |
|
350 | - 'galaxy' => $uni_galaxy, |
|
351 | - 'system' => $uni_system, |
|
352 | - 'planet' => $planet, |
|
353 | - 'MIPs' => round($CurrentMIP), |
|
354 | - 'MODE' => $mode, |
|
355 | - 'planets' => $planetcount, |
|
356 | - 'SPs' => pretty_number(mrc_get_level($user, $planetrow, SHIP_SPY, false, true)), |
|
357 | - 'SHOW_ADMIN' => SHOW_ADMIN, |
|
358 | - 'fleet_count' => $flying_fleet_count, |
|
359 | - 'fleet_max' => $fleetmax, |
|
360 | - 'ALLY_ID' => $user['ally_id'], |
|
361 | - 'USER_ID' => $user['id'], |
|
362 | - 'ACT_SPIO' => classSupernova::$user_options[PLAYER_OPTION_FLEET_SPY_DEFAULT], |
|
363 | - 'ACT_SPY' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_SPYING], |
|
364 | - 'ACT_WRITE' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PM], |
|
365 | - 'ACT_STATISTICS' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_STATS], |
|
366 | - 'ACT_INFO' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PROFILE], |
|
367 | - 'ACT_FRIEND' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_BUDDY], |
|
368 | - 'opt_uni_tooltip_time'=> classSupernova::$user_options[PLAYER_OPTION_TOOLTIP_DELAY], |
|
369 | - 'opt_uni_avatar_user' => $user['opt_uni_avatar_user'], |
|
370 | - 'opt_uni_avatar_ally' => $user['opt_uni_avatar_ally'], |
|
371 | - 'ACT_MISSILE' => $is_missile, |
|
372 | - 'PLANET_PHALANX' => $HavePhalanx && $uni_galaxy == $CurrentGalaxy && $uni_system >= $CurrentSystem - $PhalanxRange && $uni_system <= $CurrentSystem + $PhalanxRange, |
|
373 | - 'PAGE_HINT' => $lang['gal_sys_hint'], |
|
374 | - 'PLANET_RECYCLERS' => $planet_recyclers_orbiting, |
|
375 | - 'PLANET_RECYCLERS_TEXT' => pretty_number($planet_recyclers_orbiting), |
|
376 | - 'GALAXY_NAME' => $galaxy_name['universe_name'], |
|
377 | - 'SYSTEM_NAME' => $system_name['universe_name'], |
|
378 | - 'COL_SPAN' => $colspan + 9, |
|
379 | - 'COL_SPAN_PLUS' => $colspan + 3, |
|
380 | - |
|
381 | - 'COL_SPAN_NEW' => $colspan + 4, |
|
382 | - 'COL_SPAN_NEW_COLONIZE' => $colspan - 2, |
|
383 | - |
|
384 | - 'PLAYER_OPTION_UNIVERSE_OLD' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_OLD], |
|
385 | - 'PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE], |
|
386 | - ) |
|
341 | + 'userCount' => classSupernova::$config->users_amount, |
|
342 | + 'ALLY_COUNT' => $ally_count['ally_count'], |
|
343 | + 'PLANET_EXPEDITION' => classSupernova::$config->game_maxPlanet + 1, |
|
344 | + 'curPlanetID' => $planetrow['id'], |
|
345 | + 'curPlanetG' => $planetrow['galaxy'], |
|
346 | + 'curPlanetS' => $planetrow['system'], |
|
347 | + 'curPlanetP' => $planetrow['planet'], |
|
348 | + 'curPlanetPT' => $planetrow['planet_type'], |
|
349 | + 'deathStars' => mrc_get_level($user, $planetrow, SHIP_HUGE_DEATH_STAR, false, true), |
|
350 | + 'galaxy' => $uni_galaxy, |
|
351 | + 'system' => $uni_system, |
|
352 | + 'planet' => $planet, |
|
353 | + 'MIPs' => round($CurrentMIP), |
|
354 | + 'MODE' => $mode, |
|
355 | + 'planets' => $planetcount, |
|
356 | + 'SPs' => pretty_number(mrc_get_level($user, $planetrow, SHIP_SPY, false, true)), |
|
357 | + 'SHOW_ADMIN' => SHOW_ADMIN, |
|
358 | + 'fleet_count' => $flying_fleet_count, |
|
359 | + 'fleet_max' => $fleetmax, |
|
360 | + 'ALLY_ID' => $user['ally_id'], |
|
361 | + 'USER_ID' => $user['id'], |
|
362 | + 'ACT_SPIO' => classSupernova::$user_options[PLAYER_OPTION_FLEET_SPY_DEFAULT], |
|
363 | + 'ACT_SPY' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_SPYING], |
|
364 | + 'ACT_WRITE' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PM], |
|
365 | + 'ACT_STATISTICS' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_STATS], |
|
366 | + 'ACT_INFO' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PROFILE], |
|
367 | + 'ACT_FRIEND' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_BUDDY], |
|
368 | + 'opt_uni_tooltip_time'=> classSupernova::$user_options[PLAYER_OPTION_TOOLTIP_DELAY], |
|
369 | + 'opt_uni_avatar_user' => $user['opt_uni_avatar_user'], |
|
370 | + 'opt_uni_avatar_ally' => $user['opt_uni_avatar_ally'], |
|
371 | + 'ACT_MISSILE' => $is_missile, |
|
372 | + 'PLANET_PHALANX' => $HavePhalanx && $uni_galaxy == $CurrentGalaxy && $uni_system >= $CurrentSystem - $PhalanxRange && $uni_system <= $CurrentSystem + $PhalanxRange, |
|
373 | + 'PAGE_HINT' => $lang['gal_sys_hint'], |
|
374 | + 'PLANET_RECYCLERS' => $planet_recyclers_orbiting, |
|
375 | + 'PLANET_RECYCLERS_TEXT' => pretty_number($planet_recyclers_orbiting), |
|
376 | + 'GALAXY_NAME' => $galaxy_name['universe_name'], |
|
377 | + 'SYSTEM_NAME' => $system_name['universe_name'], |
|
378 | + 'COL_SPAN' => $colspan + 9, |
|
379 | + 'COL_SPAN_PLUS' => $colspan + 3, |
|
380 | + |
|
381 | + 'COL_SPAN_NEW' => $colspan + 4, |
|
382 | + 'COL_SPAN_NEW_COLONIZE' => $colspan - 2, |
|
383 | + |
|
384 | + 'PLAYER_OPTION_UNIVERSE_OLD' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_OLD], |
|
385 | + 'PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE], |
|
386 | + ) |
|
387 | 387 | ); |
388 | 388 | |
389 | 389 | if($scan) { |