/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* David Sharnoff, 1987
* Ken Stevens, 1995 (rewritten)
* Steve McClure, 1998-2000
- * Markus Armbruster, 2004-2009
+ * Markus Armbruster, 2004-2011
*/
#include <config.h>
#include <ctype.h>
#include "commands.h"
-#include "empobj.h"
#include "item.h"
#include "land.h"
#include "optlist.h"
gift(natid givee, natid giver, void *ptr, char *mesg)
{
if (giver != givee)
- wu(0, givee, "%s %s %s\n", cname(giver), obj_nameof(ptr), mesg);
+ wu(0, givee, "%s %s %s\n", cname(giver), unit_nameof(ptr), mesg);
unit_give_away(ptr, givee, 0);
}
int load_spy = 0;
if (load_unload == LOAD) {
- if (opt_LANDSPIES) {
- if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
- (mchr[(int)sp->shp_type].m_nland == 0)) {
- if (shp_nland(sp) >= 2) {
- pr("Non-land unit carrying subs can only carry up to two spy units.\n");
- return 0;
- }
- /* Eh, let 'em load a spy only */
- load_spy = 1;
+ if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
+ (mchr[(int)sp->shp_type].m_nland == 0)) {
+ if (shp_nland(sp) >= 2) {
+ pr("Non-land unit carrying subs can only carry up to two spy units.\n");
+ return 0;
}
+ /* Eh, let 'em load a spy only */
+ load_spy = 1;
}
if (!load_spy && shp_nland(sp) >= mchr[sp->shp_type].m_nland) {
if (noisy) {
/* Fit unit on ship */
if (load_unload == LOAD) {
/* We have to check again, since it may have changed */
- if (opt_LANDSPIES) {
- if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
- (mchr[(int)sp->shp_type].m_nland == 0)) {
- if (shp_nland(sp) >= 2) {
- pr("Non-land unit carrying subs can only carry up to two spy units.\n");
- return 0;
- }
- /* Eh, let 'em load a spy only */
- load_spy = 1;
+ if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
+ (mchr[(int)sp->shp_type].m_nland == 0)) {
+ if (shp_nland(sp) >= 2) {
+ pr("Non-land unit carrying subs can only carry up to two spy units.\n");
+ return 0;
}
+ /* Eh, let 'em load a spy only */
+ load_spy = 1;
}
if (!load_spy && shp_nland(sp) >= mchr[sp->shp_type].m_nland) {
if (noisy) {