From psmithnews@spod-central.org Sun Jan 28 18:19:02 2001
Path: ulcc.ac.uk!server3.netnews.ja.net!newspeer.clara.net!news.clara.net!dispose.news.demon.net!news.demon.co.uk!demon!curmudgeon.spod-central.org!not-for-mail
From: psmithnews@spod-central.org (Dylan O'Donnell)
Newsgroups: rec.games.roguelike.nethack
Subject: Re: Pet Hatred
Date: 19 Jan 2001 13:51:48 +0000
Organization: Spod Central
Sender: psmith@curmudgeon.spod-central.org
Message-ID: <m3lms78xaj.fsf@curmudgeon.spod-central.org>
References: <948mns$o90$1@nnrp1.deja.com> <t6frhksgaldr68@corp.supernews.com> <slrn96g2p9.eeg.harri@tolppa.kotisivupalvelu.fi>
Reply-To: psmith@spod-central.org
NNTP-Posting-Host: curmudgeon.spod-central.org
X-NNTP-Posting-Host: curmudgeon.spod-central.org:195.173.172.171
X-Trace: news.demon.co.uk 979912308 nnrp-07:619 NO-IDENT curmudgeon.spod-central.org:195.173.172.171
X-Complaints-To: abuse@demon.net
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 127
Xref: ulcc.ac.uk rec.games.roguelike.nethack:123157

harri@tolppa.kotisivupalvelu.fi (Harri Haataja) writes:
> Ray Chason wrote:
> >Paul <plangton@my-deja.com> wrote:
> >
> >>I know its a well worn theme, but I wish there was an option to remove
> >>them from the game altogether.
> >
> >I don't care much for playing with pets. 
> 
> Isn't there a define for that?

No. It'd be better as added functionality to the 'pettype' option
in any case, I think:

--- nethack-3.3.1/dat/opthelp   Sat Jul 15 19:05:10 2000
+++ nethack-3.3.1bis/dat/opthelp        Fri Jan 19 13:38:03 2001
@@ -177,7 +177,7 @@
 objects    like dungeon, but for object symbols
            default:  ])[="(%!?+/$*`0_.
 pettype    your preferred type of pet (cat or dog), if your character
-           class uses both types  [RANDOM]
+           class uses both types; or none for no pet  [RANDOM]
 race       Your starting race (e.g., race:Human, race:Elf).  [RANDOM]
 role       Your starting role (e.g., role:Barbarian, role:Valk).
            Although you can specify just the first letter(s), it will
--- nethack-3.3.1/doc/Guidebook.mn      Fri Aug  4 23:50:01 2000
+++ nethack-3.3.1bis/doc/Guidebook.mn   Fri Jan 19 13:39:53 2001
@@ -1868,7 +1868,8 @@
 makes sense for windowing system interfaces that implement this feature.
 .lp pettype
 Specify the type of your initial pet, if you are playing a character class
-that uses multiple types of pets.  Possible values are ``cat'' and ``dog''.
+that uses multiple types of pets; or choose to have no initial pet at all.
+Possible values are ``cat'', ``dog'', and ``none''.
 Cannot be set with the `O' command.
 .lp pickup_burden
 When you pick up an item that would exceed this encumbrance
--- nethack-3.3.1/doc/Guidebook.tex     Fri Aug  4 23:50:03 2000
+++ nethack-3.3.1bis/doc/Guidebook.tex  Fri Jan 19 13:41:13 2001
@@ -2303,8 +2303,8 @@
 %.lp
 \item[\ib{pettype}]
 Specify the type of your initial pet, if you are playing a character class
-that uses multiple types of pets.  Possible values are ``{\tt cat}''
-and ``{\tt dog}''.
+that uses multiple types of pets; or choose to have no initial pet at all.
+Possible values are ``{\tt cat}'', ``{\tt dog}'', and ``{\tt none}''.
 Cannot be set with the `{\tt O}' command.
 %.Ip
 \item[\ib{pickup\_burden}]
--- nethack-3.3.1/doc/Guidebook.txt     Sat Aug  5 02:23:22 2000
+++ nethack-3.3.1bis/doc/Guidebook.txt  Fri Jan 19 13:42:23 2001
@@ -2427,9 +2427,9 @@
 
           pettype
                Specify the type of your initial pet, if you are  playing  a
-               character  class that uses multiple types of pets.  Possible
-               values are ``cat'' and ``dog''.  Cannot be set with the  `O'
-               command.
+               character  class that uses multiple types of pets; or choose
+               to have no initial pet at all.  Possible values are ``cat'',
+               ``dog'', and ``none''.  Cannot be set with the  `O' command.
 
           pickup_burden
                When you pick up an item that would exceed this  encumbrance
--- nethack-3.3.1/src/decl.c    Wed May 10 01:50:12 2000
+++ nethack-3.3.1bis/src/decl.c Fri Jan 19 13:28:47 2001
@@ -193,7 +193,7 @@
 NEARDATA char dogname[PL_PSIZ] = DUMMY;
 NEARDATA char catname[PL_PSIZ] = DUMMY;
 NEARDATA char horsename[PL_PSIZ] = DUMMY;
-char preferred_pet;    /* '\0', 'c', 'd' */
+char preferred_pet;    /* '\0', 'c', 'd', 'n' (none) */
 /* monsters that went down/up together with @ */
 NEARDATA struct monst *mydogs = (struct monst *)0;
 /* monsters that are moving to another dungeon level */
--- nethack-3.3.1/src/dog.c     Sun Jul 16 23:15:49 2000
+++ nethack-3.3.1bis/src/dog.c  Fri Jan 19 13:32:04 2001
@@ -118,6 +118,8 @@
        int   pettype;
        static int petname_used = 0;
 
+       if (preferred_pet == 'n') return((struct monst *) 0);
+
        pettype = pet_type();
        if (pettype == PM_LITTLE_DOG)
                petname = dogname;
--- nethack-3.3.1/src/options.c Wed Aug  9 19:33:01 2000
+++ nethack-3.3.1bis/src/options.c      Fri Jan 19 13:28:12 2001
@@ -983,11 +983,15 @@
                        case 'F':
                            preferred_pet = 'c';
                            break;
+                       case 'n':       /* no pet */
+                       case 'N':
+                           preferred_pet = 'n';
+                           break;
                        default:
                            pline("Unrecognized pet type '%s'", op);
                            break;
                    }
-               } else if (negated) preferred_pet = 0;
+               } else if (negated) preferred_pet = 'n';
                return;
        }
 
@@ -2158,7 +2162,9 @@
 #endif
        else if (!strcmp(optname, "pettype")) 
                Sprintf(buf, "%s", (preferred_pet == 'c') ? "cat" :
-                               (preferred_pet == 'd') ? "dog" : "random" );
+                               (preferred_pet == 'd') ? "dog" :
+                               (preferred_pet == 'n') ? "none" :
+                               "random" );
        else if (!strcmp(optname, "pickup_burden"))
                Sprintf(buf, "%s", burdentype[flags.pickup_burden] );
        else if (!strcmp(optname, "pickup_types")) {
 

(Moderate testing shows no immediate breakage with that patch. Usual
disclaimers apply :-)

-- 
:  Dylan O'Donnell                     http://www.spod-central.org/~psmith/  :
:    "For the sun will rise, and the moon will set, and you learn how to     :
:     settle for what you get. It will all go on, if we're here or not;      :
:     so who cares? So what?"           -- Fred Ebb, "Cabaret"               :

