/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* ---
*
* plan.c: Do a plane report
- *
+ *
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 2000
int nplanes, noff;
struct nstr_item np;
struct plnstr plane;
+ struct nukstr nuke;
- if (!snxtitem(&np, EF_PLANE, player->argp[1]))
+ if (!snxtitem(&np, EF_PLANE, player->argp[1], NULL))
return RET_SYN;
nplanes = noff = 0;
while (nxtitem(&np, &plane)) {
pr("%5dL", plane.pln_land);
else
pr(" ");
- if (plane.pln_flags & PLN_SYNCHRONOUS)
- pr(" geosync");
- else if (plane.pln_flags & PLN_LAUNCHED)
- pr(" orbit");
- else if (plane.pln_nuketype >= 0)
+ if (pln_is_in_orbit(&plane))
+ pr((plane.pln_flags & PLN_SYNCHRONOUS) ? " geosync" : " orbit");
+ else if (getnuke(nuk_on_plane(&plane), &nuke))
pr(" %-5.5s %c",
- nchr[(int)plane.pln_nuketype].n_name,
+ nchr[nuke.nuk_type].n_name,
plane.pln_flags & PLN_AIRBURST ? 'A' : 'G');
pr("\n");
}