[DGD] How to stop an object from loading?

Michael McKiel crashnbrn71 at yahoo.ca
Sun Mar 7 05:48:18 CET 2004


I have the following design concept, though I am not exactly sure how to make
it work, heres the base simple funcs:

/* To make this work, we are going to give rooms a realname */
nomask int is_pc()      { return (!!realname &&  alive); }
nomask int is_npc()     { return ( !realname &&  alive); }
nomask int is_room()    { return (!!realname && !alive); }
nomask int is_obj()     { return ( !realname && !alive); }

/*
 * so we have to make an object fail to load if it hasn't called a function
 * to declare what it is, and thus called_make will be 0.
 */
make_room() { called_make = 1; realname = "";  alive = 0; }
make_obj()  { called_make = 1; realname = nil; alive = 0; }
make_npc()  { called_make = 1; realname = nil; alive = 1; }

Without hacking on the kernel, beyond my slight changes...
Is it possible to make an object error() if it hasn't defined a crucial
variable? or if it hasn't called a crucial function? 
in this case it would be 'called_make'

I notice there is a way to stop inheritance with an object manager...
But is there any way to stop the object from loading at all and dump out an
error message with an object manager or something else?




______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list