From: Markus Armbruster Date: Sun, 23 Oct 2005 20:52:46 +0000 (+0000) Subject: (START_UNITS, start_unit_type, deity_build_land, new): Remove X-Git-Tag: PZ5~552 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=dab1f0bc7dbd104ca7f8bdc07bd3e3ccf7157725 (START_UNITS, start_unit_type, deity_build_land, new): Remove undocumented compile-time option START_UNITS. It hasn't been used in ages; writing a quick build script is easier than recompiling the server. --- diff --git a/include/options.h b/include/options.h index 387655143..374b8bb9f 100644 --- a/include/options.h +++ b/include/options.h @@ -59,9 +59,6 @@ 2. Changing name doesn't take any btus or $$ enables BLITZ updates, also turns on NOFOOD, below */ -/*#define START_UNITS 2 *//* How many free start units you get. Types are - specified in src/lib/global/constants.c */ - /* #define GO_RENEW *//* Gold and Oil are renewable resources */ /* #define GUINEA_PIGS *//* Experimental stuff not ready for prime time */ /* #define DEFENSE_INFRA *//* Allow the improvement of defensive infrastructure */ diff --git a/include/optlist.h b/include/optlist.h index cc608285d..506d366b5 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -93,11 +93,6 @@ extern int opt_UPDATESCHED; #include "econfig-spec.h" #undef EMP_CONFIG_H_OUTPUT -/* Game parameters that cannot be set in econfig (yet) */ -#ifdef START_UNITS -int start_unit_type[]; -#endif - /* Variables that get values derived from econfig */ extern char *motdfil; extern char *downfil; diff --git a/src/lib/commands/new.c b/src/lib/commands/new.c index e7ecb7981..2bf8290c4 100644 --- a/src/lib/commands/new.c +++ b/src/lib/commands/new.c @@ -47,9 +47,6 @@ #include -#ifdef START_UNITS -static int deity_build_land(int, coord, coord, natid, int); -#endif static int isok(int x, int y); static void ok(s_char *map, int x, int y); @@ -208,10 +205,6 @@ new(void) natp->nat_b[i] = newrealms; natp->nat_tgms = 0; (void)close(open(mailbox(buf, num), O_RDWR | O_TRUNC | O_CREAT, 0660)); -#ifdef START_UNITS - for (n = 0; n < START_UNITS; n++) - deity_build_land(start_unit_type[n], x, y, num, 0); -#endif /* START_UNITS */ putnat(natp); return 0; } @@ -287,78 +280,3 @@ ok(s_char *map, int x, int y) for (dir = DIR_FIRST; dir <= DIR_LAST; dir++) ok(map, diroff[dir][0] + x, diroff[dir][1] + y); } - -#ifdef START_UNITS -static int -deity_build_land(int type, coord x, coord y, natid own, int tlev) -{ - struct lndstr land; - struct lchrstr *lp; - struct nstr_item nstr; - struct natstr *natp; - int extend = 1; - - natp = getnatp(own); - - snxtitem_all(&nstr, EF_LAND); - while (nxtitem(&nstr, &land)) { - if (land.lnd_own == 0) { - extend = 0; - break; - } - } - if (extend) - ef_extend(EF_LAND, 50); - land.lnd_x = x; - land.lnd_y = y; - land.lnd_own = own; - land.lnd_mission = 0; - land.lnd_type = type; - land.lnd_effic = 100; - land.lnd_mobil = land_mob_max; - land.lnd_tech = tlev; - land.lnd_uid = nstr.cur; - land.lnd_army = ' '; - land.lnd_flags = 0; - land.lnd_ship = -1; - land.lnd_land = -1; - land.lnd_nland = 0; - land.lnd_harden = 0; - time(&land.lnd_access); - - land.lnd_retreat = morale_base; - - lp = &lchr[type]; - land.lnd_fuel = lp->l_fuelc; - land.lnd_nxlight = 0; - land.lnd_rflags = 0; - memset(land.lnd_rpath, 0, sizeof(land.lnd_rpath)); - land.lnd_rad_max = lp->l_rad; - memset(land.lnd_item, 0, sizeof(land.lnd_item)); - - land.lnd_att = (float)LND_ATTDEF(lp->l_att, tlev - lp->l_tech); - land.lnd_def = (float)LND_ATTDEF(lp->l_def, tlev - lp->l_tech); - land.lnd_vul = (int)LND_VUL(lp->l_vul, tlev - lp->l_tech); - land.lnd_spd = (int)LND_SPD(lp->l_spd, tlev - lp->l_tech); - land.lnd_vis = (int)LND_VIS(lp->l_vis, tlev - lp->l_tech); - land.lnd_spy = (int)LND_SPY(lp->l_spy, tlev - lp->l_tech); - land.lnd_rad = (int)LND_RAD(lp->l_rad, tlev - lp->l_tech); - land.lnd_frg = (int)LND_FRG(lp->l_frg, tlev - lp->l_tech); - land.lnd_acc = (int)LND_ACC(lp->l_acc, tlev - lp->l_tech); - land.lnd_dam = (int)LND_DAM(lp->l_dam, tlev - lp->l_tech); - land.lnd_ammo = (int)LND_AMM(lp->l_ammo, lp->l_dam, tlev - lp->l_tech); - land.lnd_aaf = (int)LND_AAF(lp->l_aaf, tlev - lp->l_tech); - land.lnd_fuelc = (int)LND_FC(lp->l_fuelc, tlev - lp->l_tech); - land.lnd_fuelu = (int)LND_FU(lp->l_fuelu, tlev - lp->l_tech); - land.lnd_maxlight = (int)LND_XPL(lp->l_nxlight, tlev - lp->l_tech); - land.lnd_maxland = (int)LND_MXL(lp->l_mxland, tlev - lp->l_tech); - land.lnd_item[I_FOOD] = lp->l_item[I_FOOD]; - - putland(land.lnd_uid, &land); - makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x, - land.lnd_y); - pr("%s", prland(&land)); - pr(" built in sector %s\n", xyas(x, y, player->cnum)); - return 1; -} -#endif /* START_UNITS */ diff --git a/src/lib/global/constants.c b/src/lib/global/constants.c index 5979a7626..fc9dd78d6 100644 --- a/src/lib/global/constants.c +++ b/src/lib/global/constants.c @@ -99,11 +99,6 @@ double people_damage = 1.00; /* Civs/mil/uw take this fraction of damage */ double collateral_dam = 0.10; /* Side effect damage to sector */ double assault_penalty = 0.50; /* attack factor for para & assault troops */ -/* START_UNITS */ -#ifdef START_UNITS -int start_unit_type[START_UNITS] = { 0, 1 }; /* type of unit */ -#endif /* START_UNITS */ - /* opt_FUEL */ int fuel_mult = 10; /* 1 fuel = 10 mob */