]> git.pond.sub.org Git - empserver/commitdiff
(buil, vers, opt_NONUKES, show_nuke_build, show_nuke_capab):
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 12 Nov 2005 20:09:11 +0000 (20:09 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 12 Nov 2005 20:09:11 +0000 (20:09 +0000)
Remove opt_NONUKES options.  A nuke characteristics file can
be created with no entries to create the emulate the removed option.

include/options.h
include/optlist.h
src/lib/commands/buil.c
src/lib/commands/vers.c
src/lib/global/options.c
src/lib/subs/show.c

index 374b8bb9f790fb0200a982aed914a519e056f55a..2e055396276ba6fe5681aada4eb7423e5eaeb25d 100644 (file)
@@ -74,7 +74,6 @@
 /*#define LOSE_CONTACT*//* Allows contact to be lost after a few updates */
 
 /* Chainsaw Mods */
-/*#define NONUKES*//* Eliminates nukes */
 #ifndef NO_OIL                 /* Can't have fuel with no oil! */
 /*#define FUEL*//* Ships use fuel to move */
 #endif
index 506d366b559e5567187778613cac53f565c071e1..f9bcb12bda590643c881f8abd543176176538ae3 100644 (file)
@@ -71,7 +71,6 @@ extern int opt_MOB_ACCESS;
 extern int opt_NEUTRON;
 extern int opt_NOFOOD;
 extern int opt_NOMOBCOST;
-extern int opt_NONUKES;
 extern int opt_NO_FORT_FIRE;
 extern int opt_NO_HCMS;
 extern int opt_NO_LCMS;
index 19a60f5a6c5459d7b2807975e86646af5c480ef8..4bf2c8dfbf26e0b599ca02b30e635549b287696b 100644 (file)
@@ -188,7 +188,7 @@ buil(void)
            }
            break;
        case 'n':
-           if (opt_NONUKES) {
+           if (!ef_nelem(EF_NUKE_CHR)) {
                pr("There are no nukes in this game.\n");
                return RET_FAIL;
            }
index bead1608359c7668eb25a286f8ffd17b37323277..d3a64f9843f08d575355322c367325b50e12eff6 100644 (file)
@@ -44,6 +44,7 @@
 #include "ship.h"
 #include "optlist.h"
 #include "commands.h"
+#include "file.h"
 
 static void show_opts(int val);
 
@@ -149,7 +150,7 @@ vers(void)
        pr("The tax you pay on buying commodities on the market is %.1f%%\n\n", (buytax - 1.00) * 100.0);
     }
 
-    if (opt_NONUKES)
+    if (!ef_nelem(EF_NUKE_CHR))
        pr("Nukes are disabled.\n");
     else if (opt_DRNUKE) {     /* NUKES && DRNUKE enabled */
        pr("In order to build a nuke, you need %1.2f times the tech level in research\n", drnuke_const);
index 3b55cea6dc9c512f126255a4206e817e2f0761b6..d08b900d56f963df7b119114a64e474bc2f78276 100644 (file)
@@ -147,12 +147,6 @@ int opt_LOSE_CONTACT = 1;
 int opt_LOSE_CONTACT = 0;
 #endif
 
-#ifdef NONUKES
-int opt_NONUKES = 1;
-#else
-int opt_NONUKES = 0;
-#endif
-
 #ifdef FUEL
 int opt_FUEL = 1;
 #else
@@ -302,7 +296,6 @@ struct option_list Options[] = {
     {"NO_PLAGUE", &opt_NO_PLAGUE},
     {"NOFOOD", &opt_NOFOOD},
     {"NOMOBCOST", &opt_NOMOBCOST},
-    {"NONUKES", &opt_NONUKES},
     {"PINPOINTMISSILE", &opt_PINPOINTMISSILE},
     {"RES_POP", &opt_RES_POP},
     {"SAIL", &opt_SAIL},
index c9be221f5d7c1f106d10d2b99017f551396cc64e..e02ad633265aa6533936c255af6a9b8ea4d2f801 100644 (file)
@@ -186,8 +186,6 @@ show_nuke_build(int tlev)
     else
        pr("%13s lcm hcm  oil  rad avail tech $\n", "");
 
-    if (opt_NONUKES)
-       return;
     for (np = nchr; np->n_name; np++) {
        avail = NUK_BLD_WORK(np->n_lcm, np->n_hcm, np->n_oil, np->n_rad);
        if (np->n_tech > tlev)
@@ -218,8 +216,6 @@ show_nuke_capab(int tlev)
     else
        pr("%13s blst dam lbs tech $%7s abilities\n", "", "");
 
-    if (opt_NONUKES)
-       return;
     for (np = nchr; np->n_name; np++) {
        if (np->n_tech > tlev)
            continue;