Re: [Code] Outdoors/Indoors

From: John Evans (evansj@HI-LINE.NET)
Date: 10/01/97


On Wed, 1 Oct 1997, Aaron Miller wrote:

> Well, I was looking through weather.c today, and decided that it was silly
> only people otuside knew about the weather. So I went about a making a
> function called send_to_indoor, which was basically a copy of
> send_to_outdoor. I soon realized it would be easier to make a INSIDE
> logical in utils.h, so, also copying the OUTSIDE logical, I put this in..

Keep in mind, and not all indoor rooms are going to be in a building with
windows and such. It would be strange to be 2 miles under the surface of
the world in the darkest, most dangerous cavern and still be able to see
the sunrise and the rain fall.

It's your MUD, but I would feel negligent if I didn't bring that up.


> #define INSIDE(ch) (ROOM_FLAGGED((ch)->in_room, ROOM_INDOORS))
>
> which is basically a copy of OUTSIDE, except it has a ! preceedingly it
> all, which makes it true if that string is false, I believe.. I tried to
> use !OUTSIDE in my function, but the compiler didn't like that. Hrmph,
> whatever.. anyone help? Would OUTSIDE = 1 have worked for a check?

The !OUTSIDE(ch) should have worked, but I would personally go with the
#define and use INSIDE(ch). There may be flaws in that method, but that
is what I would use.

John Evans <evansj@hi-line.net>

May the source be with you.


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



This archive was generated by hypermail 2b30 : 12/08/00 PST