]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/rada.c
Update copyright notice
[empserver] / src / lib / commands / rada.c
index be0552cad9d50fa54735f2b2c0d8cc1ae485de8e..8d5a39a2d4fd188c09ae1b249b063b55639b147d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -33,8 +33,7 @@
 #include <config.h>
 
 #include "commands.h"
-#include "optlist.h"
-#include "empobj.h"
+#include "unit.h"
 
 int
 rada(void)
@@ -102,13 +101,19 @@ radar(int type)
                    continue;
                }
                if (item.land.lnd_ship >= 0) {
-                   pr("Units on ships can't use radar!\n");
+                   pr("%s is stowed on ship #%d, and can't use radar!\n",
+                      prland(&item.land), item.land.lnd_ship);
+                   continue;
+               }
+               if (item.land.lnd_land >= 0) {
+                   pr("%s is stowed on land #%d, and can't use radar!\n",
+                      prland(&item.land), item.land.lnd_land);
                    continue;
                }
                spy = lchr[item.land.lnd_type].l_spy;
            }
 
-           pr("%s at ", obj_nameof(&item.gen));
+           pr("%s at ", unit_nameof(&item.gen));
            radmap(item.gen.x, item.gen.y, item.gen.effic,
                   item.gen.tech, spy, tf);
        }