From: Pasi Kallinen Date: Tue, 10 Mar 2015 17:48:04 +0000 (+0200) Subject: Add boolean option "bones" X-Git-Tag: NetHack-3.6.0_RC01~492^2~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=770a92d259fde32484f6c3180b4d95d88ea0507c;p=nethack Add boolean option "bones" Setting bones off prevents saving and loading bones files. --- diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 86094fe26..8ce5dbaad 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1927,6 +1927,8 @@ quality of the weapon; you are free to manually fill your quiver or quiver sack or make ready with the `Q' command instead. If no weapon is found or the option is false, the `t' (throw) command is executed instead. (default false) +.lp bones +Allow saving and loading bones files. (default true) .lp boulder Set the character used to display boulders (default is rock class symbol). .lp catname diff --git a/include/flag.h b/include/flag.h index a34abe839..aaff7431c 100644 --- a/include/flag.h +++ b/include/flag.h @@ -21,6 +21,7 @@ struct flag { boolean autoquiver; /* Automatically fill quiver */ boolean beginner; boolean biff; /* enable checking for mail */ + boolean bones; /* allow saving/loading bones */ boolean confirm; /* confirm before hitting tame monsters */ boolean debug; /* in debugging mode */ #define wizard flags.debug diff --git a/include/patchlevel.h b/include/patchlevel.h index 2399ca5b0..00411a2c2 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 55 +#define EDITLEVEL 56 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-2012" diff --git a/src/bones.c b/src/bones.c index 926b9079e..269152578 100644 --- a/src/bones.c +++ b/src/bones.c @@ -287,6 +287,7 @@ can_make_bones() { register struct trap *ttmp; + if (!flags.bones) return FALSE; if (ledger_no(&u.uz) <= 0 || ledger_no(&u.uz) > maxledgerno()) return FALSE; if (no_bones_level(&u.uz)) @@ -533,6 +534,7 @@ getbones() if(discover) /* save bones files for real games */ return(0); + if (!flags.bones) return (0); /* wizard check added by GAN 02/05/87 */ if(rn2(3) /* only once in three times do we find bones */ && !wizard diff --git a/src/options.c b/src/options.c index 229c2df91..98ab3724b 100644 --- a/src/options.c +++ b/src/options.c @@ -85,6 +85,7 @@ static struct Bool_Opt #else {"BIOS", (boolean *)0, FALSE, SET_IN_FILE}, #endif + {"bones", &flags.bones, TRUE, SET_IN_FILE}, #ifdef INSURANCE {"checkpoint", &flags.ins_chkpt, TRUE, SET_IN_GAME}, #else