From 2e655eaf9612f7e2ca99db7fb91989c8532f42fb Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sat, 12 Nov 2005 20:09:11 +0000 Subject: [PATCH] (buil, vers, opt_NONUKES, show_nuke_build, show_nuke_capab): Remove opt_NONUKES options. A nuke characteristics file can be created with no entries to create the emulate the removed option. --- include/options.h | 1 - include/optlist.h | 1 - src/lib/commands/buil.c | 2 +- src/lib/commands/vers.c | 3 ++- src/lib/global/options.c | 7 ------- src/lib/subs/show.c | 4 ---- 6 files changed, 3 insertions(+), 15 deletions(-) diff --git a/include/options.h b/include/options.h index 374b8bb9f..2e0553962 100644 --- a/include/options.h +++ b/include/options.h @@ -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 diff --git a/include/optlist.h b/include/optlist.h index 506d366b5..f9bcb12bd 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -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; diff --git a/src/lib/commands/buil.c b/src/lib/commands/buil.c index 19a60f5a6..4bf2c8dfb 100644 --- a/src/lib/commands/buil.c +++ b/src/lib/commands/buil.c @@ -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; } diff --git a/src/lib/commands/vers.c b/src/lib/commands/vers.c index bead16083..d3a64f984 100644 --- a/src/lib/commands/vers.c +++ b/src/lib/commands/vers.c @@ -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); diff --git a/src/lib/global/options.c b/src/lib/global/options.c index 3b55cea6d..d08b900d5 100644 --- a/src/lib/global/options.c +++ b/src/lib/global/options.c @@ -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}, diff --git a/src/lib/subs/show.c b/src/lib/subs/show.c index c9be221f5..e02ad6332 100644 --- a/src/lib/subs/show.c +++ b/src/lib/subs/show.c @@ -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; -- 2.43.0