pettype=horse
Accept OPTIONS=pettype:horse quietly instead of issuing "unrecognized
pet type 'horse'" message. It doesn't actually do anything from player's
perspective--knights always get a pony and other roles always get a cat or
dog, as before.
I had a much more elaborate version which recognized "pony" (plus
"kitten", "little dog", "puppy" and assorted other variations of the
acceptable types), but it was absurd overkill for something that never
come up during actual play. If someone tries to specify "kitten" and gets
"unrecongized type", it shouldn't take him longer to figure out "cat" is
what's needed even without resorting to actually reading the Guidebook.
Can someone generate an up to date Guidebook.txt and check it in?
This commit is contained in:
@@ -1200,21 +1200,26 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if ((op = string_for_env_opt(fullname, opts, negated)) != 0) {
|
||||
if (negated) bad_negation(fullname, TRUE);
|
||||
else switch (*op) {
|
||||
else switch (lowc(*op)) {
|
||||
case 'd': /* dog */
|
||||
case 'D':
|
||||
preferred_pet = 'd';
|
||||
break;
|
||||
case 'c': /* cat */
|
||||
case 'C':
|
||||
case 'f': /* feline */
|
||||
case 'F':
|
||||
preferred_pet = 'c';
|
||||
break;
|
||||
case 'h': /* horse */
|
||||
case 'q': /* quadruped */
|
||||
/* avoids giving "unrecognized type of pet" but
|
||||
pet_type(dog.c) won't actually honor this */
|
||||
preferred_pet = 'h';
|
||||
break;
|
||||
case 'n': /* no pet */
|
||||
case 'N':
|
||||
preferred_pet = 'n';
|
||||
break;
|
||||
case '*': /* random */
|
||||
preferred_pet = '\0';
|
||||
break;
|
||||
default:
|
||||
pline("Unrecognized pet type '%s'.", op);
|
||||
break;
|
||||
@@ -3271,6 +3276,7 @@ char *buf;
|
||||
else if (!strcmp(optname, "pettype"))
|
||||
Sprintf(buf, "%s", (preferred_pet == 'c') ? "cat" :
|
||||
(preferred_pet == 'd') ? "dog" :
|
||||
(preferred_pet == 'h') ? "horse" :
|
||||
(preferred_pet == 'n') ? "none" : "random");
|
||||
else if (!strcmp(optname, "pickup_burden"))
|
||||
Sprintf(buf, "%s", burdentype[flags.pickup_burden] );
|
||||
|
||||
Reference in New Issue
Block a user