]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/desi.c
Update copyright notice
[empserver] / src / lib / commands / desi.c
index 2f25e54ee2fa79768c63e7bf8f89caa708ebe7ed..c78a9a9ab1a41b7cd80b98a9bd1d588eef507f7f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, 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
 
 #include <config.h>
 
-#include "misc.h"
-#include "player.h"
-#include "sect.h"
-#include "xy.h"
-#include "path.h"
-#include "nsc.h"
-#include "file.h"
-#include "nat.h"
-#include "optlist.h"
 #include "commands.h"
+#include "map.h"
+#include "optlist.h"
+#include "path.h"
 
-static long do_desi(struct natstr *natp, s_char *sects, s_char *deschar,
-                   long int cash, int for_real);
+static long do_desi(struct natstr *natp, char *sects, char *deschar,
+                   long cash, int for_real);
 
 int
 desi(void)
@@ -67,11 +61,11 @@ desi(void)
 }
 
 static long
-do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
+do_desi(struct natstr *natp, char *sects, char *deschar, long cash,
        int for_real)
 {
     int n;
-    s_char *p;
+    char *p;
     int breaksanct;
     int cap_x;
     int cap_y;
@@ -79,8 +73,8 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
     struct nstr_sect nstr;
     struct sctstr sect;
     struct sctstr check;
-    s_char prompt[128];
-    s_char buf[1024];
+    char prompt[128];
+    char buf[1024];
     long cost = 0;
     int changed = 0;
     int warned = 0;
@@ -111,7 +105,8 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
        des = sct_typematch(p);
        if (des < 0 || (((des == SCT_BSPAN) || (des == SCT_BTOWER)) &&
                        !player->god)) {
-           pr("See \"info Sector-types\"\n");
+           pr("No such designation\n"
+              "See \"info Sector-types\" for possible designations\n");
            if (for_real)
                return (long)RET_FAIL;
            else
@@ -173,7 +168,7 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
        }
        if (sect.sct_type != des && (sect.sct_effic < 5 || player->god)) {
            if (player->god)
-               set_coastal(&sect, des);
+               set_coastal(&sect, sect.sct_type, des);
            sect.sct_type = des;
            sect.sct_effic = 0;
            changed += map_set(player->cnum, sect.sct_x, sect.sct_y,