} //loop through all ships foreach ($ship_types as $ship_class => $ship_stats) { if ($ship_class == 1) { //skip ship type 1 continue 1; } //list selected ships only if ($ship_stats['tcost'] > 0 && $shipno == -2 || $ship_stats['tcost'] <= 0 && $shipno == -1 || $shipno > 1) { $ship_stats['cost'] = number_format($ship_stats['cost']); $ship_stats['tcost'] = number_format($ship_stats['tcost']); $out_str .= $table_str; //popup needs different table made $img_txt = "<tr><td colspan=2><center><a href=./images/ships/ship_{$ship_stats['type_id']}.jpg target='_blank'><img border=0 height=120 width=160 src='./images/ships/ship_{$ship_stats['type_id']}_tn.jpg' /></a></center></td></tr>"; $out_str .= "<tr><td colspan=2 align='center' bgcolor='#555555'><b>{$ship_stats['name']}</b> ({$ship_stats['class_abbr']}) </td></tr>{$img_txt}"; $out_str .= quick_row("<b>" . $cw['size'] . "</b>", discern_size($ship_stats['size'])); $out_str .= quick_row("<b>" . $cw['type'] . "</b>", "{$ship_stats['type']}"); $out_str .= quick_row("<b>" . $cw['fighters'] . "</b>", "{$ship_stats['fighters']}/{$ship_stats['max_fighters']}"); $out_str .= quick_row("<b>" . $cw['max_shields'] . "</b>", "{$ship_stats['max_shields']}"); $out_str .= quick_row("<b>" . $cw['armour'] . "</b>", "{$ship_stats['max_armour']}"); $out_str .= quick_row("<b>" . $cw['cargo_bays'] . "</b>", "{$ship_stats['cargo_bays']}"); if ($GAME_VARS['alternate_play_1'] == 1) { $out_str .= quick_row("<b>" . $cw['mining_rate'] . ": " . $cw['metal'] . "</b>", "{$ship_stats['mine_rate_metal']}"); $out_str .= quick_row("<b>" . $cw['mining_rate'] . ": " . $cw['fuel'] . "</b>", "{$ship_stats['mine_rate_fuel']}"); } else { $quick_maths = $ship_stats['mine_rate_metal'] + $ship_stats['mine_rate_fuel']; $out_str .= quick_row("<b>" . $cw['mining_rate'] . "</b>", "{$quick_maths}"); } if ($GAME_VARS['ship_warp_cost'] < 0) { $out_str .= quick_row("<b>" . $cw['move_cost'] . " (</b>" . $cw['turns'] . "<b>)</b>", "{$ship_stats['move_turn_cost']}"); }
!isset($ships['config']) ? $ships['config'] = "" : 1; #reset cloaked ship info. $cloak_str_start = ""; $cloak_str_end = ""; #player is able to see only non-cloaked ships, unless conditions are met. if (!config_check("ls", $ships) && !config_check("hs", $ships) || $ships['clan_id'] == $user['clan_id'] && $user['clan_id'] > 0 || config_check("ls", $ships) && config_check("sc", $ships) || $user['login_id'] == 1) { $error_str .= print_name($ships); #sets some cloak text into a string, if a ship is cloaked. if (config_check("ls", $ships) || config_check("hs", $ships)) { $cloak_str_start = "<b class=cloak>"; $cloak_str_end = "</b>"; } $error_str .= "{$cloak_str_start}\t{$ships['ship_name']} ({$ships['class_name']} w/ <b>{$ships['fighters']}</b> " . $cw['fighters'] . ")" . $cloak_str_end; } elseif (config_check("hs", $ships) && !config_check("sc", $ships)) { #hs without scanner $error_str .= "<b class=cloak>::::: " . discern_size($ships['size']) . " " . $cw['disturbance_detected'] . ":::::</b>"; } elseif (config_check("hs", $ships) && config_check("sc", $ships)) { # hs, with scanner. $error_str .= "<b>" . $cw['unknown_owner'] . "</b><b class=cloak> {$ships['ship_name']} ({$ships['class_name']} w/ <b>{$ships['fighters']}</b> " . $cw['fighters'] . ")</b>"; } elseif (config_check("hs", $ships) && config_check("sc", $ships)) { # ls, no scanner. $error_str .= sprintf($st[60], $ships[class_name]); } if ($ships['clan_id'] == $user['clan_id'] && $user['clan_id'] > 0 && $GAME_VARS['clan_fleet_attacking'] == 1) { $error_str .= " - " . $cw['can_fleet'] . ": <b>{$ships['clan_fleet_id']}</b>"; } //attack link won't be shown if: //player cannot attack //target is admin //is a clanmate //target in safe_turns
$ship = dbr(1); //nothing found, so almost certainly not the players own ship. if (empty($ship)) { print_s_page($st[83]); } $text = sprintf($st[84], $ship[ship_name]); $text .= make_table(array("", "")); $text .= quick_row($cw['name'], $ship['ship_name']); $text .= quick_row($cw['type'], $ship['class_name']); $text .= quick_row($cw['location'], $cw['sys'] . " # {$ship['location']}"); $text .= quick_row($cw['fleet'] . " #", $ship['fleet_id']); $text .= quick_row("", ""); $text .= quick_row($cw['fighters'], "{$ship['fighters']}/{$ship['max_fighters']}"); $text .= quick_row($cw['shields'], "{$ship['shields']}/{$ship['max_shields']}"); $text .= quick_row($cw['armour'], "{$ship['armour']}/{$ship['max_armour']}"); $text .= quick_row($cw['size'], discern_size($ship['size'])); $text .= quick_row($cw['cargo_bays'], bay_storage($ship)); if ($GAME_VARS['alternate_play_1'] == 1) { $text .= quick_row($cw['mining_rate'] . ": " . $cw['metal'], $ship['mine_rate_metal']); $text .= quick_row($cw['mining_rate'] . ": " . $cw['fuel'], $ship['mine_rate_fuel']); } else { $quick_maths = $ship['mine_rate_metal'] + $ship['mine_rate_fuel']; $text .= quick_row($cw['mining_rate'], $quick_maths); } $text .= quick_row($cw['speed_move_cost'], $ship['move_turn_cost']); $text .= quick_row("", ""); $text .= quick_row($cw['upgrade_pods'], $ship['upgrade_slots']); $text .= quick_row($cw['specials'], config_list(0, $ship['config'])); $text .= quick_row("# " . $cw['offensive_turrets'], $ship['num_ot']); $text .= quick_row("# " . $cw['defensive_turrets'], $ship['num_dt']); $text .= quick_row("# " . $cw['plasma_turrets'], $ship['num_pc']);