Date:	Tuesday August 15, 2000 @ 5:16
Author:	xyzzy

Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory swashbuckler.fortress.real-time.com:/var/tmp/cvs-serv7466

Modified Files:
	data.c data.h getentry.c interface.c main.c sysdefaults.h 
Log Message:
Added a new default, "SBPLANETS", which is the number of planets necessary to
get a SB, previously hardcoded at 5.  In chaos mode, the planet requirement
remains, previously it was hardcoded at 0 for chaos.  The system defaults page
in the MOTD will tell players the value.  I didn't add this default to GUM.


****************************************

Index: Vanilla/ntserv/data.c
diff -u Vanilla/ntserv/data.c:1.15 Vanilla/ntserv/data.c:1.16
--- Vanilla/ntserv/data.c:1.15	Sat May 27 04:46:25 2000
+++ Vanilla/ntserv/data.c	Tue Aug 15 05:16:28 2000
@@ -1,4 +1,4 @@
-/* $Id: data.c,v 1.15 2000/05/27 09:46:25 jeffno Exp $
+/* $Id: data.c,v 1.16 2000/08/15 10:16:28 xyzzy Exp $
  */
 
 #include "../ntserv/copyright.h"
@@ -80,6 +80,7 @@
 int	errorlevel=1;		/* controlling amount of error info */
 int	dead_warp=0;		/* use warp 14 for death detection */
 int	surrenderStart=1;	/* # of planets to start surrender counter */
+int	sbplanets=5;		/* # of planets to get a base */
 
 char *shipnames[NUM_TYPES] = {
       "Scout", "Destroyer", "Cruiser", "Battleship", 
Index: Vanilla/ntserv/data.h
diff -u Vanilla/ntserv/data.h:1.12 Vanilla/ntserv/data.h:1.13
--- Vanilla/ntserv/data.h:1.12	Sat May 27 04:46:25 2000
+++ Vanilla/ntserv/data.h	Tue Aug 15 05:16:28 2000
@@ -1,4 +1,4 @@
-/* $Id: data.h,v 1.12 2000/05/27 09:46:25 jeffno Exp $
+/* $Id: data.h,v 1.13 2000/08/15 10:16:28 xyzzy Exp $
  */
 
 #ifndef _h_data
@@ -124,6 +124,7 @@
 extern int	errorlevel;
 extern int	dead_warp;
 extern int	surrenderStart;
+extern int	sbplanets;
 
 
 #define WP_PLASMA 0
Index: Vanilla/ntserv/getentry.c
diff -u Vanilla/ntserv/getentry.c:1.6 Vanilla/ntserv/getentry.c:1.7
--- Vanilla/ntserv/getentry.c:1.6	Wed Dec 29 18:14:48 1999
+++ Vanilla/ntserv/getentry.c	Tue Aug 15 05:16:28 2000
@@ -199,7 +199,7 @@
 		    teamPick= -1;
 		    continue;
 		}
-		if (numPlanets(1<<teamPick) < 5 && !chaos && !topgun) {
+		if (numPlanets(1<<teamPick) < sbplanets && !topgun) {
         	if(send_short){
                   swarning(TEXTE,15,0);
 		}
Index: Vanilla/ntserv/interface.c
diff -u Vanilla/ntserv/interface.c:1.7 Vanilla/ntserv/interface.c:1.8
--- Vanilla/ntserv/interface.c:1.7	Thu Jul  6 17:56:24 2000
+++ Vanilla/ntserv/interface.c	Tue Aug 15 05:16:28 2000
@@ -527,7 +527,7 @@
 	    return;
 	}
     }
-    if (type == STARBASE && numPlanets(me->p_team) < 5 && !chaos && !topgun) {
+    if (type == STARBASE && numPlanets(me->p_team) < sbplanets && !topgun) {
         new_warning(61,"Your team's stuggling economy cannot support such an expenditure!");
 	return;
     }
Index: Vanilla/ntserv/main.c
diff -u Vanilla/ntserv/main.c:1.18 Vanilla/ntserv/main.c:1.19
--- Vanilla/ntserv/main.c:1.18	Fri Feb 25 01:43:21 2000
+++ Vanilla/ntserv/main.c	Tue Aug 15 05:16:28 2000
@@ -580,6 +580,9 @@
 	sendMotdLine(buf);	
     }
 
+    sprintf(buf, "%-30s: %d", "Planets Required for SB", sbplanets);
+    sendMotdLine(buf);
+
     sprintf(buf, "%-30s: ", "Hidden Mode");
     switch (hiddenenemy) {
     case 0:
Index: Vanilla/ntserv/sysdefaults.h
diff -u Vanilla/ntserv/sysdefaults.h:1.10 Vanilla/ntserv/sysdefaults.h:1.11
--- Vanilla/ntserv/sysdefaults.h:1.10	Fri Jun 23 04:12:58 2000
+++ Vanilla/ntserv/sysdefaults.h	Tue Aug 15 05:16:28 2000
@@ -1,4 +1,4 @@
-/* 	$Id: sysdefaults.h,v 1.10 2000/06/23 09:12:58 cameron Exp $	 */
+/* 	$Id: sysdefaults.h,v 1.11 2000/08/15 10:16:28 xyzzy Exp $	 */
 
 /* structure for default values that are represented as array of flags */
 struct sysdef_array {
@@ -96,8 +96,10 @@
     "Kills required before plasma granted on refit"	},
   { "SBRANK",		SYSDEF_INT,	&sbrank,
     "Rank required to refit to Starbase"	 	},
+  { "SBPLANETS",	SYSDEF_INT,	&sbplanets,
+    "Minimum planets for Starbase"			},
   { "CHAOS",		SYSDEF_INT,	&chaosmode,
-    "Enable CHAOS mode" },
+    "Enable CHAOS mode" 				},
 #ifdef SNAKEPATROL
   { "SNAKEPATROL",	SYSDEF_INT,	&snakepatrol,
     "Strange snake torpedo stream (unimplemented)"	},