Re: Sit on objects. -0700"

From: James Turner (turnerjh@XTN.NET)
Date: 04/29/98


Doppleganger Software <doppsoft@TZC.COM> writes:

> The spells are kinda fun.  You don't NEED to have the chair cast spells
> (in fact, by default they don't, you have to set them to do so)  One way
> to solve the at problem is to add in support in the at command to look
> for chairs....just save the chair if they happen to be sitting, then,
> after the command, set them back in it.  It's seamless, and transparent.

Yah there's no big deal with the at command, just never got around to
it.  Two added lines, no biggie... but there are so many other nice
bugs to fix first, plus millions of features to add...

> That's the main reason I have the pointer back to the player, so you can
> get them off their butts if the chair vanishes.  The only problem it
> creates is a lack of multiple player sitting support....but that's easily
> fixed if you don't mind adding adding another linked list to struct
> char_data for next_in_chair.  If there are other ways that are more
> efficient, I would love to hear them.

Unless the objects need to have the pointing for spells, you might
consider removing it.  That's at least 4 bytes per object saved (no
huge amount of memory by any means, but it's surprising how a little
here and a little there can help).  Just have a many-to-one relation
set up between chars in a room and an object they sit on.  A player
can't sit on two pieces of furniture at once, so it works well.

Even if you need the reverse pointer for spells, it would be very easy
to figure out who is sitting in a piece of furniture.  Just iterate
through the people in the room, returning a char_data if exactly one
is sitting in it, NULL if no one or multiples.

Don't add the next_in_chair... unnecessary.  Save memory and speed
(worrying about list management for something that doesn't really need
it).

> Yeah, new object type is the best way.  As to the message, you can always
> use the action_description for that.  It's not used on most object
> anyways :)

Definitely more flexible... but it makes it less obvious to builders.
Value fields are very nice, and not many people need to sit on
arbitrary objects (last time someone sat on a sword they didn't stay
there long enough to worry about it ;)

Hmm there is a possibility with that. Standing on an object to keep
someone from picking it up... or guarding it with your body, etc.
*ponder*


--
James Turner               turnerjh@xtn.net
                           http://www.vuse.vanderbilt.edu/~turnerjh/


     +------------------------------------------------------------+
     | 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/15/00 PST