]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/ldump.c
Update copyright notice
[empserver] / src / lib / commands / ldump.c
index aea66ad55d7f96688d56187790489b39625a4bce..97c84ca061d78f7e7a310a0885e817cff64e72b5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -19,9 +19,9 @@
  *
  *  ---
  *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
+ *  See files README, COPYING and CREDITS in the root of the source
+ *  tree for related information and legal notices.  It is expected
+ *  that future projects/authors will amend these files as needed.
  *
  *  ---
  *
 
 #include <config.h>
 
-#include "misc.h"
-#include "player.h"
-#include "xy.h"
-#include "sect.h"
+#include "commands.h"
 #include "land.h"
-#include "nat.h"
-#include "nsc.h"
-#include "file.h"
 #include "optlist.h"
-#include "commands.h"
 
 int
 ldump(void)
@@ -62,7 +55,7 @@ ldump(void)
     nunits = 0;
 
     if (!player->argp[2]) {
-       for (n = 1; n <= 39; n++)
+       for (n = 1; n <= 41; n++)
            field[n - 1] = n;
        field[n - 1] = 0;
     } else {
@@ -147,6 +140,10 @@ ldump(void)
                field[i++] = 38;
            } else if (!strcmp("aaf", player->argp[n])) {
                field[i++] = 39;
+           } else if (!strcmp("uw", player->argp[n])) {
+               field[i++] = 40;
+           } else if (!strcmp("civ", player->argp[n])) {
+               field[i++] = 41;
            } else {
                pr("Unrecognized field %s\n", player->argp[n]);
            }
@@ -285,6 +282,12 @@ ldump(void)
        case 39:
            pr(" aaf");
            break;
+       case 40:
+           pr(" uw");
+           break;
+       case 41:
+           pr(" civ");
+           break;
        }
        n++;
     }
@@ -316,16 +319,13 @@ ldump(void)
                pr(" %d", yrel(np, land.lnd_y));
                break;
            case 4:
-               if (land.lnd_army == ' ')
-                   pr(" ~");
-               else
-                   pr(" %c", land.lnd_army);
+               pr(" %c", land.lnd_army ? land.lnd_army : '~');
                break;
            case 5:
                pr(" %d", land.lnd_effic);
                break;
            case 6:
-               pr(" %d", lnd_getmil(&land));
+               pr(" %d", land.lnd_item[I_MILIT]);
                break;
            case 7:
                pr(" %d", land.lnd_harden);
@@ -429,6 +429,12 @@ ldump(void)
            case 39:
                pr(" %d", land.lnd_aaf);
                break;
+           case 40:
+               pr(" %d", land.lnd_item[I_UW]);
+               break;
+           case 41:
+               pr(" %d", land.lnd_item[I_CIVIL]);
+               break;
            }
        }
        pr("\n");