]> granicus.if.org Git - nethack/commitdiff
Add boolean option "bones"
authorPasi Kallinen <paxed@alt.org>
Tue, 10 Mar 2015 17:48:04 +0000 (19:48 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 17 Mar 2015 16:47:22 +0000 (18:47 +0200)
Setting bones off prevents saving and loading bones files.

doc/Guidebook.mn
include/flag.h
include/patchlevel.h
src/bones.c
src/options.c

index 86094fe26122cd4fe05d019545f1a40f76548cdd..8ce5dbaad2af93a7c966a7db48e81b49202c441f 100644 (file)
@@ -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
index a34abe83949924f3807f37050552083ce1904e00..aaff7431cfa8d8763953f606ff9b2fe7b9c6ac11 100644 (file)
@@ -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
index 2399ca5b0650e81705d37e8ee4b457a331f04e60..00411a2c2385436c6ceace72a6c3ddb8a779cd66 100644 (file)
@@ -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"
index 926b9079e5e948c362225043466ae5bb4579b1bf..26915257885ced1749320e239a5301f75a241d4d 100644 (file)
@@ -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
index 229c2df918fb86328b503b13481ca6fd3520b487..98ab3724bc150c9972555328051fca5987fdc8fa 100644 (file)
@@ -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