[CODE] A small patch to Peter Ajamian's multi-exit code

From: Adam Scriven (scriven@lore.com)
Date: 09/27/00


Hey all.

I just joined, just getting back into MUDding after a many year absence.

I figured that I'd wait to delurk until I had something to contribute, and I
do!

The following is for PL17, with only the random-typo code added, so it's pretty
stock.

I installed Peter Ajamian's wonderful multi-exit code, but it omits one thing.
When you type "look <direction>", it works OK for everything but IN, because
you can obviously already "look in bag", for instance.
So the code as it stands doesn't allow you to actually "look in", meaning
look in the "IN" direction.
So here's the minor change that I made:

In act.informative.c, in the function do_look, look for:
    else if (is_abbrev(arg, "in"))
      look_in_obj(ch, arg2);

and change it to:
    else if ((is_abbrev(arg, "in")) && (*arg2))
      look_in_obj(ch, arg2);

What this little piece of code does is look for the existance of a 2nd
argument (bag, sack, crate, whatever) and if that exists, "look into" it.
But if it doesn't exist, it gets passed onto the next section of code, which
is the "look <direction>" code.

I've tested it, it works just peachy keen!

Thanks for all the wonderful help, now back to lurking.
I hope this was an acceptable de-lurk message.
8-)

Adam


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT