[DGD] kernel library:solutions

Natasha Koroleva natasha.i.koroleva at gmail.com
Tue Apr 23 16:00:02 CEST 2013


On Sun, Apr 21, 2013 at 5:02 PM, Littlefield, Tyler <tyler at tysdomain.com> wrote:
> hello all:
> I had a couple questions. First, I'd like to start extending the user
> object. I've already created my obj/user.c (which basically looks like this:
> #include <kernel/kernel.h>
> #include <kernel/user.h>
>
> inherit LIB_USER;
> static object player;
> nomask query_player()
> {
> return player;
> }
> nomask void set_player(object s)
> {
> player = s;
> }
>
> void create()
> {
> }
>
> From what I understand (does this have to be like this), the player object
> is separate with the user object just being something like the "connection"
> object. Is this how this is usually handled?

Seems to be so, but I am a complete newbie as you can tell.

But I it makes me to wonder about why it seems to be so. Why not to
write objects that reflects from our organisation of what is a
"player"? Upon entering into the system, depending from who is it,
then give to the user the proper object. Maybe it is so our
wizard/programmer/admins should inherit from the player object or may
be it is so that we do not want them "playing" at all.



More information about the DGD mailing list