2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * See files README, COPYING and CREDITS in the root of the source
23 * tree for related information and legal notices. It is expected
24 * that future projects/authors will amend these files as needed.
28 * show.c: Give info on empire objects, planes, boats, nukes, etc.
30 * Known contributors to this file:
54 p = getstarg(player->argp[1], "Show what ('?' to list options)? ", buf);
58 pr("bridge, item, land, news, nuke, plane, sect, ship, product, tower, updates\n");
62 natp = getnatp(player->cnum);
63 rlev = (int)(1.25 * natp->nat_level[NAT_RLEV]);
65 if (!player->argp[3]) {
66 tlev = (int)(1.25 * natp->nat_level[NAT_TLEV]);
70 tlev = (int)atoi(player->argp[3]);
71 if (tlev > (int)(1.25 * natp->nat_level[NAT_TLEV]) && !player->god)
72 tlev = (int)(1.25 * natp->nat_level[NAT_TLEV]);
87 if (*(p + 1) == 'e') {
91 if (drnuke_const > MIN_DRNUKE_CONST)
92 tlev = ((rlev / drnuke_const) > tlev ? tlev :
93 (rlev / drnuke_const));
94 bfunc = show_nuke_build;
95 cfunc = show_nuke_capab;
96 sfunc = show_nuke_stats;
99 bfunc = show_land_build;
100 sfunc = show_land_stats;
101 cfunc = show_land_capab;
108 bfunc = show_plane_build;
109 sfunc = show_plane_stats;
110 cfunc = show_plane_capab;
113 if (*(p + 1) == 'e') {
114 bfunc = show_sect_build;
115 sfunc = show_sect_stats;
116 cfunc = show_sect_capab;
118 bfunc = show_ship_build;
119 sfunc = show_ship_stats;
120 cfunc = show_ship_capab;
124 show_updates(player->argp[2] ? atoi(player->argp[2]) : 8);
130 p = getstarg(player->argp[2],
131 "Build, stats, or capability data (b,s,c)? ", buf);
134 pr("Printing for tech level '%d'\n", tlev);
135 if (*p == 'B' || *p == 'b')
137 else if (*p == 'C' || *p == 'c')
139 else if (*p == 'S' || *p == 's')