]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/vers.c
Remove option TRADESHIPS, customize table ship-chr instead
[empserver] / src / lib / commands / vers.c
index 5a1cbd009a8cf1eb59e1b66c4ce207b3d39b3815..31116dbc9fbd8ae9a96812ffcce81ba39c885d35 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -34,7 +33,7 @@
  *     Ken Stevens
  *     Steve McClure
  *     Ron Koenderink, 2005-2006
- *     Markus Armbruster, 2005-2008
+ *     Markus Armbruster, 2005-2011
  */
 
 #include <config.h>
@@ -45,6 +44,7 @@
 #include "ship.h"
 #include "version.h"
 
+static int have_trade_ships(void);
 static void show_custom(void);
 static void show_opts(int val);
 static char *prwrap(char *, char *, int *);
@@ -101,8 +101,6 @@ vers(void)
     if (rollover_avail_max)
        pr("Up to %d avail can roll over an update.\n",
           rollover_avail_max);
-    if (opt_SLOW_WAR)
-       pr("Declaring war will cost you $%i\n\n", War_Cost);
     pr("Happiness p.e. requires 1 happy stroller per %d civ.\n",
        (int)hap_cons / etu_per_update);
     pr("Education p.e. requires 1 class of graduates per %d civ.\n",
@@ -159,7 +157,7 @@ vers(void)
           -(etu_per_update / sect_mob_neg_factor));
     pr("\n");
     pr("Ships on autonavigation may use %i cargo holds per ship.\n", TMAX);
-    if (opt_TRADESHIPS) {
+    if (have_trade_ships()) {
        pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n",
           trade_1_dist, trade_1 * 100.0);
        pr("Trade-ships that go at least %d sectors get a return of %.1f%% per sector.\n",
@@ -234,6 +232,18 @@ vers(void)
     return RET_OK;
 }
 
+static int
+have_trade_ships(void)
+{
+    int i;
+
+    for (i = ef_nelem(EF_SHIP_CHR) - 1; i >= 0; i--) {
+       if (mchr[i].m_flags & M_TRADE)
+           return 1;
+    }
+    return 0;
+}
+
 static void
 show_custom(void)
 {