/*
* 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)
}
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;
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;
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
}
if (sect.sct_type != des && (sect.sct_effic < 5 || player->god)) {
if (player->god)
- set_coastal(§, des);
+ set_coastal(§, sect.sct_type, des);
sect.sct_type = des;
sect.sct_effic = 0;
changed += map_set(player->cnum, sect.sct_x, sect.sct_y,