]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/tran.c
Update copyright notice
[empserver] / src / lib / commands / tran.c
index 059f07cb038fc0fad4efb0ec7ba287ea2d3d5e55..0fd9f245edee518b0cd22f0743554eb6fc0868c3 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  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-2016, 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,
@@ -14,8 +14,7 @@
  *  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/>.
  *
  *  ---
  *
  *
  *  Known contributors to this file:
  *     Steve McClure, 2000
- *     Markus Armbruster, 2006-2009
+ *     Markus Armbruster, 2006-2011
  */
 
 #include <config.h>
 
 #include "commands.h"
-#include "land.h"
+#include "map.h"
 #include "nuke.h"
 #include "plane.h"
-#include "ship.h"
 
-static int tran_pmap(coord curx, coord cury, char *arg);
-static int tran_nmap(coord curx, coord cury, char *arg);
+static int tran_pmap(coord, coord, char *, char *);
+static int tran_nmap(coord, coord, char *, char *);
 static int tran_nuke(void);
 static int tran_plane(void);
 
@@ -170,7 +168,12 @@ tran_plane(void)
            continue;
        type = plane.pln_type;
        if (plane.pln_ship >= 0) {
-           pr("%s is at sea and can't be transported\n", prplane(&plane));
+           pr("%s is stowed on ship #%d, and can't be transported\n",
+              prplane(&plane), plane.pln_ship);
+           return RET_FAIL;
+       } else if (plane.pln_land >= 0) {
+           pr("%s is stowed on land #%d, and can't be transported\n",
+              prplane(&plane), plane.pln_land);
            return RET_FAIL;
        } else if (plane.pln_harden != 0) {
            pr("%s has been hardened and can't be transported\n",
@@ -245,13 +248,13 @@ tran_plane(void)
  */
 /*ARGSUSED*/
 static int
-tran_pmap(coord curx, coord cury, char *arg)
+tran_pmap(coord curx, coord cury, char *arg1, char *arg2)
 {
-    return display_region_map(0, EF_PLANE, curx, cury, arg);
+    return display_region_map(0, EF_PLANE, curx, cury, arg1, arg2);
 }
 
 static int
-tran_nmap(coord curx, coord cury, char *arg)
+tran_nmap(coord curx, coord cury, char *arg1, char *arg2)
 {
-    return display_region_map(0, EF_NUKE, curx, cury, arg);
+    return display_region_map(0, EF_NUKE, curx, cury, arg1, arg2);
 }