/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
- * Ken Stevens, Steve McClure
+ * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Ken Stevens, Steve McClure, Markus Armbruster
*
- * This program is free software; you can redistribute it and/or modify
+ * Empire is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ---
*
/*
* The values 1 and -1 are important below, don't change them.
*/
-#define LOAD 1
-#define UNLOAD -1
+#define LOAD 1
+#define UNLOAD -1
static int load_plane_ship(struct sctstr *sectp, struct shpstr *sp,
int noisy, int load_unload, int *nshipsp);
if (!player->owner) {
if (load_unload == UNLOAD || !noisy)
continue;
- if (getrel(getnatp(ship.shp_own), player->cnum) < FRIENDLY)
+ if (relations_with(ship.shp_own, player->cnum) < FRIENDLY)
continue;
}
xyas(sect.sct_x, sect.sct_y, player->cnum));
continue;
}
- if (!player->owner && load_unload == UNLOAD
- && getrel(getnatp(sect.sct_own), player->cnum) < FRIENDLY) {
+ if (load_unload == UNLOAD
+ && !player->owner
+ && relations_with(sect.sct_own, player->cnum) < FRIENDLY) {
if (noisy)
pr("You can't unload into an unfriendly %s\n",
dchr[sect.sct_type].d_name);
if (!player->owner) {
if (load_unload == UNLOAD || !noisy)
continue;
- if (getrel(getnatp(land.lnd_own), player->cnum) != ALLIED)
+ if (relations_with(land.lnd_own, player->cnum) != ALLIED)
continue;
}
xyas(sect.sct_x, sect.sct_y, player->cnum));
continue;
}
- if (getrel(getnatp(sect.sct_own), player->cnum) != ALLIED) {
+ if (relations_with(sect.sct_own, player->cnum) != ALLIED) {
pr("Sector %s is not yours.\n",
xyas(sect.sct_x, sect.sct_y, player->cnum));
continue;
static int
move_amount(int sect_amt, int unit_amt, int unit_max,
- int load_unload, int amount)
+ int load_unload, int amount)
{
int move_amt;
land.lnd_harden = 0;
putland(land.lnd_uid, &land);
#if 0
- /*
- * FIXME if this supplies from the sector, the putsect in
- * load() / lload() duplicates those supplies, causing a
- * seqno mismatch
- */
+ /*
+ * FIXME if this supplies from the sector, the putsect in
+ * load() / lload() duplicates those supplies, causing a
+ * seqno mismatch
+ */
if (!lnd_supply_all(&land))
pr("WARNING: %s is out of supply!\n", prland(&land));
#else
land.lnd_harden = 0;
putland(land.lnd_uid, &land);
#if 0
- /* FIXME same issue as in load_land_ship() */
+ /* FIXME same issue as in load_land_ship() */
if (!lnd_supply_all(&land))
pr("WARNING: %s is out of supply!\n", prland(&land));
#else