2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2007, 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 * sate.c: Do satellite maps/reports.
30 * Known contributors to this file:
31 * Edward M. Rynes Esq, 1988
33 * Steve McClure, 1998-2000
46 static int sct_shp_or_lnd[] = { EF_SECTOR, EF_SHIP, EF_LAND, EF_BAD };
52 if (!player->argp[1] ||
54 !isdigit(*player->argp[1]) ||
55 (pln_uid = atoi(player->argp[1])) < 0)
58 if (!getplane(pln_uid, &plane)) {
59 pr("No such plane\n");
63 if (plane.pln_own != player->cnum && !player->god) {
64 pr("You don't own plane #%d\n", pln_uid);
68 if (!(plane.pln_flags & PLN_LAUNCHED)) {
69 pr("%s isn't in orbit\n", prplane(&plane));
72 if (plane.pln_mobil < plane_mob_max) {
73 pr("%s doesn't have enough mobility (needs %d)\n",
74 prplane(&plane), plane_mob_max);
77 if (player->argp[2]) {
78 type = ef_byname_from(player->argp[2], sct_shp_or_lnd);
84 if (plchr[(int)plane.pln_type].pl_flags & P_S)
85 pr("Satellite Spy Report:\n");
87 pr("Satellite Map Report:\n");
88 pr("%s at ", prplane(&plane));
89 tech = techfact(plane.pln_tech, 20.0);
90 satmap(plane.pln_x, plane.pln_y, plane.pln_effic,
91 (int)tech, plchr[(int)plane.pln_type].pl_flags, type);