/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
return RET_OK;
}
-static void
-warn_deprecated_arg(char *what, char *arg, char *use)
-{
- pr("%s '%s' is deprecated and will go away in a future release.\n"
- "Use %s instead.\n",
- what, arg, use);
-}
-
static int
parse_map_flags(int bmap, char *str)
{
int map_flags;
char *p;
- int tflags = 0;
- char *tp = NULL;
switch (bmap) {
default: CANT_REACH();
if (bmap != 'b')
goto bad_flag;
map_flags |= MAP_ALT;
- /*
- * Flags following 't' used to be ignored. That breaks
- * perfectly sensible "ts". Try to continue, but save
- * state for when a bad flag is found.
- */
- if (!tflags) {
- tflags = map_flags;
- tp = p;
- }
break;
- case 'r':
- if (bmap != 'b' || tflags)
- goto bad_flag;
- warn_deprecated_arg("Map flag", "r", "argument 'revert'");
- return MAP_BMAP_REVERT;
default:
bad_flag:
- if (tflags) {
- /* ignore bad flags following 't' */
- warn_deprecated_arg("Argument", tp, "map flag 't'");
- return tflags;
- }
pr("Bad flag %c!\n", *p);
return -1;
}
}
/*
- * Return character to use in maps for sector type TYPE owned by OWN.
- * If OWNER_OR_GOD, the map is for the sector's owner or a deity.
+ * Return character to use in maps for sector type @type owned by @own.
+ * If @owner_or_god, the map is for the sector's owner or a deity.
*/
static char
map_char(int type, natid own, int owner_or_god)