# Patch name: The Last Patch You'll Ever Need # Patch version: 0.9.0 # Author's name: David Cheatham # Author's email: david@mush.cx # Version of PennMUSH: 1.7.5p9 # Date patch made: Wed Aug 28 08:56:33 EDT 2002 # Author is willing to support (yes/no): yes # Patch format: Context # # # This is a contributed PennMUSH patch. Its use is subject to the # same restrictions found in PennMUSH's hdrs/copyrite.h file. # # No warranty is given for this patch. It is not necessarily going # to work on your system, with any version of PennMUSH other than # the one above, etc. # # If the author given above was willing to support the patch, you # should write to the author if you have any questions or problems. Do # *NOT* send email messages to Javelin or any PennMUSH mailing list about # this patch! # # Below this line is the author's description of the patch, # followed by the patch itself. If the patch is in context diff # format, you'll probably apply it by typing: patch < patchfile # in your top-level MUSH directory, unless instructed otherwise # below. # # This is The Last Patch You'll Ever Need, really. Not because it has # everything you want, in fact, this patch does nothing by itself. # # However, this patch lets you add commands, functions, flags, etc, # without applying a patchfile. You just add what is basically a standard # C file called add-.c in the src directory, and pennmush will # now pick it up and compile it in. # # All well and good, but how do you make Pennmush do stuff in it? That # part is easy, too. At the start of your file, you need a line that # contains: # # Key: something # # (You obviously might want to stick this inside a comment block.) # # Pennmush will grep for something_setup, something_dump_database, # everything in local.c but with something_ instead of local_. So if you # have something that modifies local.c, it's a very simply job to add a Key # line and rename the local_* lines to something else. Note that you don't # need functions you're not using, you can just cut those out. # # But that's not all, you can also add flags (case matters) # # GENERIC Flag: {"EXAMPLE", '\0', NOTYPE, 0x80000000, F_ANY, F_ANY}, # PLAYER Flag: {"NUDE", '-', TYPE_PLAYER, 0x10000000, F_WIZARD, F_WIZARD}, # # There's no logic here, you just write the line verbatim as you would # stick it in flags.c. # # Don't forget to include the comma at the end, and you can have as many # lines as you want. (But note there's only one free slot for generic # flags, and be sure to check flags.h to see what slots are actually # free.) # # Oh, and while you can do # #define EXAMPLE 0x8000000 # and use EXAMPLE in the add-*.c file, you *cannot* use it when defining # the flag in '* Flag:', you must use the hex number. That line ends up in # an entirely different file, and preprocessor macros will not work on # it, at least not ones defined in this file. *** /home/pennmush/pennmush//src/Makefile Sat Jul 20 13:10:13 2002 --- src/Makefile Wed Aug 28 08:46:42 2002 *************** *** 127,134 **** netmud: $(O_FILES) @echo "Making netmud." -mv -f netmud netmud~ ! $(CC) $(LDFLAGS) $(CCFLAGS) -o netmud $(O_FILES) $(LIBS) # By default, db.c initially allocates enough space for 10000 objects, then # grows the space if needed. To change this value, include --- 127,136 ---- netmud: $(O_FILES) @echo "Making netmud." + (touch add-blank.c; cd ../utils; sh mklocal.sh) + (rm add-*.o ; $(CC) $(LDFLAGS) $(CCFLAGS) add-*.c -c) -mv -f netmud netmud~ ! $(CC) $(LDFLAGS) $(CCFLAGS) -o netmud $(O_FILES) add-*.o $(LIBS) # By default, db.c initially allocates enough space for 10000 objects, then # grows the space if needed. To change this value, include *************** *** 187,192 **** --- 189,198 ---- echo "********************************************************"; \ fi + ../hdrs/localinc.h: + (cd ../utils; sh mklocal.sh) + + ../hdrs/patches.h: if [ ! -f ../hdrs/patches.h ]; then \ (cd ../utils; sh mkcmds.sh); \ *************** *** 225,231 **** $$file ; done) clean: ! -rm -f *.o -rm -f a.out core gmon.out $(OUTFILES) distclean: clean --- 231,237 ---- $$file ; done) clean: ! -rm -f *.o ../hdrs/localinc.h -rm -f a.out core gmon.out $(OUTFILES) distclean: clean *************** *** 339,344 **** --- 345,351 ---- bsd.o: ../hdrs/ident.h bsd.o: ../hdrs/strtree.h bsd.o: ../hdrs/log.h + bsd.o: ../hdrs/localinc.h bsd.o: ../hdrs/memcheck.h bsd.o: ../hdrs/mymalloc.h bsd.o: ../hdrs/extchat.h *************** *** 479,484 **** --- 486,492 ---- create.o: ../hdrs/boolexp.h create.o: ../hdrs/parse.h create.o: ../hdrs/game.h + create.o: ../hdrs/localinc.h db.o: ../hdrs/copyrite.h db.o: ../config.h db.o: ../hdrs/conf.h *************** *** 516,521 **** --- 524,530 ---- destroy.o: ../hdrs/flags.h destroy.o: ../hdrs/lock.h destroy.o: ../hdrs/boolexp.h + destroy.o: ../hdrs/localinc.h extchat.o: ../hdrs/copyrite.h extchat.o: ../config.h extchat.o: ../hdrs/conf.h *************** *** 572,577 **** --- 581,587 ---- flags.o: ../hdrs/lock.h flags.o: ../hdrs/boolexp.h flags.o: ../hdrs/log.h + flags.o: ../hdrs/localinc.h function.o: ../hdrs/copyrite.h function.o: ../config.h function.o: ../hdrs/conf.h *************** *** 750,755 **** --- 760,766 ---- game.o: ../hdrs/flags.h game.o: ../hdrs/function.h game.o: ../hdrs/help.h + game.o: ../hdrs/localinc.h help.o: ../config.h help.o: ../hdrs/externs.h help.o: ../hdrs/copyrite.h *************** *** 1127,1132 **** --- 1138,1144 ---- timer.o: ../hdrs/log.h timer.o: ../hdrs/game.h timer.o: ../hdrs/help.h + timer.o: ../hdrs/localinc.h unparse.o: ../hdrs/copyrite.h unparse.o: ../config.h unparse.o: ../hdrs/conf.h *** /home/pennmush/pennmush//src/bsd.c Sat Jul 20 13:10:14 2002 --- src/bsd.c Tue Aug 27 13:05:04 2002 *************** *** 101,106 **** --- 101,107 ---- #include "ident.h" #include "strtree.h" #include "log.h" + #include "localinc.h" #ifdef MEM_CHECK #include "memcheck.h" *************** *** 778,784 **** dump_database(); ! local_shutdown(); end_all_logs(); --- 779,785 ---- dump_database(); ! ADDONS_shutdown end_all_logs(); *************** *** 3779,3785 **** ("Welcome back from vacation! Don't forget to unset your ON-VACATION flag")); } #endif ! local_connect(player, isnew, num); return 1; } --- 3780,3786 ---- ("Welcome back from vacation! Don't forget to unset your ON-VACATION flag")); } #endif ! ADDONS_connect(player, isnew, num) return 1; } *************** *** 4657,4663 **** tbuf1); } else flag_broadcast(0, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); ! local_disconnect(player, num); } void --- 4658,4664 ---- tbuf1); } else flag_broadcast(0, PLAYER_MONITOR, "%s %s", T("GAME:"), tbuf1); ! ADDONS_disconnect(player, num) } void *** /home/pennmush/pennmush//src/create.c Sat Jul 20 13:10:15 2002 --- src/create.c Tue Aug 27 12:53:30 2002 *************** *** 16,21 **** --- 16,22 ---- #include "lock.h" #include "parse.h" #include "game.h" + #include "localinc.h" #include "confmagic.h" static dbref parse_linkable_room(dbref player, const char *room_name); *************** *** 143,151 **** } } current_state.exits++; ! #ifdef LOCAL_DATA ! local_data_create(new_exit); ! #endif return new_exit; } return NOTHING; --- 144,150 ---- } } current_state.exits++; ! ADDONS_data_create(new_exit) return new_exit; } return NOTHING; *************** *** 375,383 **** do_real_open(player, argv[2], "here", room); } current_state.rooms++; ! #ifdef LOCAL_DATA ! local_data_create(room); ! #endif if (tport) { /* We need to use the full command, because we need NO_TEL * and Z_TEL checking */ --- 374,380 ---- do_real_open(player, argv[2], "here", room); } current_state.rooms++; ! ADDONS_data_create(room) if (tport) { /* We need to use the full command, because we need NO_TEL * and Z_TEL checking */ *************** *** 448,456 **** /* and we're done */ notify_format(player, "Created: Object %s.", unparse_dbref(thing)); current_state.things++; ! #ifdef LOCAL_DATA ! local_data_create(thing); ! #endif return thing; } return NOTHING; --- 445,451 ---- /* and we're done */ notify_format(player, "Created: Object %s.", unparse_dbref(thing)); current_state.things++; ! ADDONS_data_create(thing) return thing; } return NOTHING; *************** *** 560,566 **** current_state.things++; #ifdef LOCAL_DATA LocData(clone) = NULL; ! local_data_clone(clone, thing); #endif real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, wenv); --- 555,561 ---- current_state.things++; #ifdef LOCAL_DATA LocData(clone) = NULL; ! ADDONS_data_clone(clone, thing) #endif real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, wenv); *************** *** 580,586 **** current_state.rooms++; #ifdef LOCAL_DATA LocData(clone) = NULL; ! local_data_clone(clone, thing); #endif real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, wenv); --- 575,581 ---- current_state.rooms++; #ifdef LOCAL_DATA LocData(clone) = NULL; ! ADDONS_data_clone(clone, thing) #endif real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, wenv); *************** *** 646,652 **** notify_format(player, T("Cloned: Exit #%d."), clone); #ifdef LOCAL_DATA LocData(clone) = NULL; ! local_data_clone(clone, thing); #endif return clone; } --- 641,647 ---- notify_format(player, T("Cloned: Exit #%d."), clone); #ifdef LOCAL_DATA LocData(clone) = NULL; ! ADDONS_data_clone(clone, thing) #endif return clone; } *** /home/pennmush/pennmush//src/destroy.c Sat Jul 20 13:10:15 2002 --- src/destroy.c Tue Aug 27 12:51:16 2002 *************** *** 24,29 **** --- 24,30 ---- #include "dbdefs.h" #include "flags.h" #include "lock.h" + #include "localinc.h" #include "confmagic.h" /* These lengthy comments are by Ralph Melton, December 1995. */ *************** *** 575,583 **** dbref i, loc; if (!GoodObject(thing)) return; ! #ifdef LOCAL_DATA ! local_data_free(thing); ! #endif switch (Typeof(thing)) { case TYPE_THING: clear_thing(thing); --- 576,582 ---- dbref i, loc; if (!GoodObject(thing)) return; ! ADDONS_data_free(thing) switch (Typeof(thing)) { case TYPE_THING: clear_thing(thing); *************** *** 976,982 **** check_locations(); check_connected_rooms(); check_zones(); ! local_dbck(); } /* Do sanity checks on non-destroyed objects. */ --- 975,981 ---- check_locations(); check_connected_rooms(); check_zones(); ! ADDONS_dbck } /* Do sanity checks on non-destroyed objects. */ *** /home/pennmush/pennmush//src/flags.c Sat Jul 20 13:10:15 2002 --- src/flags.c Tue Aug 27 19:11:48 2002 *************** *** 21,26 **** --- 21,27 ---- #include "dbdefs.h" #include "lock.h" #include "log.h" + #include "localinc.h" #include "confmagic.h" typedef struct flag_info FLAG; *************** *** 103,108 **** --- 104,111 ---- {"TRANSPARENT", 't', NOTYPE, TRANSPARENTED, F_ANY, F_ANY}, {"VERBOSE", 'v', NOTYPE, VERBOSE, F_ANY, F_ANY}, + GENERICFLAGS + {"ANSI", 'A', TYPE_PLAYER, PLAYER_ANSI, F_ANY, F_ANY}, {"COLOR", 'C', TYPE_PLAYER, PLAYER_COLOR, F_ANY, F_ANY}, *************** *** 135,140 **** --- 138,145 ---- F_ANY | F_ODARK}, {"NOACCENTS", '~', TYPE_PLAYER, PLAYER_NOACCENTS, F_ANY, F_ANY}, + PLAYERFLAGS + {"MONITOR", 'M', TYPE_THING, THING_LISTEN, F_ANY, F_ANY}, {"DESTROY_OK", 'd', TYPE_THING, THING_DEST_OK, F_ANY, F_ANY}, {"PUPPET", 'p', TYPE_THING, THING_PUPPET, F_ANY, F_ANY}, *************** *** 142,147 **** --- 147,154 ---- {"LISTEN_PARENT", '^', TYPE_THING, THING_INHEARIT, F_ANY, F_ANY}, {"Z_TEL", 'Z', TYPE_THING, THING_Z_TEL, F_ANY, F_ANY}, + THINGFLAGS + {"ABODE", 'A', TYPE_ROOM, ROOM_ABODE, F_ANY, F_ANY}, {"FLOATING", 'F', TYPE_ROOM, ROOM_FLOATING, F_ANY, F_ANY}, {"JUMP_OK", 'J', TYPE_ROOM, ROOM_JUMP_OK, F_ANY, F_ANY}, *************** *** 153,164 **** --- 160,176 ---- {"UNINSPECTED", 'u', TYPE_ROOM, ROOM_UNINSPECT, F_ROYAL, F_ROYAL}, #endif + ROOMFLAGS + {"CLOUDY", 'x', TYPE_EXIT, EXIT_CLOUDY, F_ANY, F_ANY}, {"MARKED", '\0', NOTYPE, MARKED, F_INTERNAL | F_DARK, F_INTERNAL | F_DARK}, {"GOING_TWICE", '\0', NOTYPE, GOING_TWICE, F_INTERNAL | F_DARK, F_INTERNAL | F_DARK}, + + EXITFLAGS + {NULL, '\0', 0, 0, 0, 0} }; *** /home/pennmush/pennmush//src/game.c Sat Jul 20 13:10:15 2002 --- src/game.c Tue Aug 27 09:12:13 2002 *************** *** 69,74 **** --- 69,75 ---- #include "flags.h" #include "function.h" #include "help.h" + #include "localinc.h" #ifdef hpux #include *************** *** 338,344 **** T("GAME: ERROR! Database save failed!")); } else { #endif ! local_dump_database(); #ifdef ALWAYS_PARANOID paranoid_checkpt = db_top / 5; --- 339,345 ---- T("GAME: ERROR! Database save failed!")); } else { #endif ! ADDONS_dump_database #ifdef ALWAYS_PARANOID paranoid_checkpt = db_top / 5; *************** *** 844,850 **** #endif /* Call Local Startup */ ! local_startup(); /* everything else ok. Restart all objects. */ do_restart(); --- 845,851 ---- #endif /* Call Local Startup */ ! ADDONS_startup /* everything else ok. Restart all objects. */ do_restart(); *** /home/pennmush/pennmush//src/timer.c Sat Jul 20 13:10:17 2002 --- src/timer.c Tue Aug 27 12:51:38 2002 *************** *** 32,37 **** --- 32,38 ---- #include "log.h" #include "game.h" #include "help.h" + #include "localinc.h" #include "confmagic.h" *************** *** 161,165 **** } #endif ! local_timer(); } --- 162,166 ---- } #endif ! ADDONS_timer } *** /home/pennmush/pennmush/utils/mkcmds.sh Mon Aug 26 11:36:42 2002 --- utils/mkcmds.sh Tue Aug 27 19:52:31 2002 *************** *** 53,58 **** --- 53,60 ---- fi echo "Rebuilding command switch file" + flist=`ls ../src/*.c ../hdrs/*.h| grep -v switchinc.c|grep -v switches.h` + grep -hoE SWITCH_[A-Z]* $flist|sed s/SWITCH_//|sort|uniq|grep -v NONE|grep -v VALUE>../src/SWITCHES snum=1 echo "/* AUTOGENERATED FILE. DO NOT EDIT */" >> ../src/temp.c echo "/* AUTOGENERATED FILE. DO NOT EDIT */" >> ../hdrs/temp.h *** /dev/null Wed Dec 31 19:00:00 1969 --- utils/mklocal.sh Wed Aug 28 08:23:02 2002 *************** *** 0 **** --- 1,120 ---- + #!/bin/sh + # + # Make various tables and header files. + # We run this from the utils directory. + # + + rm -f ../hdrs/temp.h ../hdrs/temp2.h + + echo "/* AUTOGENERATED FILE. DO NOT EDIT */" >> ../hdrs/temp2.h + files=`ls ../src/add-*.c` + if [ "$files" ]; then + keys="`grep "^Key:" $files | cut -d' ' -f2`" + fi + + for type in startup dump_database shutdown dbck timer; do + echo "#define ADDONS_"$type" \\">>../hdrs/temp.h + if [ "$keys" ]; then + for key in $keys; do + tmp=`grep $key"_"$type $files` + if [ "$tmp" ]; then + echo $key"_"$type"(); \\">>../hdrs/temp.h + echo void $key"_"$type"(void);">>../hdrs/temp2.h + fi + done + fi + echo local_$type"();">>../hdrs/temp.h + echo "">>../hdrs/temp.h + done + + echo "#define ADDONS_connect(x,y,z) \\">>../hdrs/temp.h + if [ "$keys" ]; then + for key in $keys; do + tmp=`grep $key"_connect" $files` + if [ "$tmp" ]; then + echo $key"_connect(x,y,z); \\">>../hdrs/temp.h + echo void $key"_connect(dbref,int,int);">>../hdrs/temp2.h + fi + done + fi + echo "local_connect(x,y,z);">>../hdrs/temp.h + echo "">>../hdrs/temp.h + + echo "#define ADDONS_disconnect(x,y) \\">>../hdrs/temp.h + if [ "$keys" ]; then + for key in $keys; do + tmp=`grep $key"_disconnect" $files` + if [ "$tmp" ]; then + echo $key"_disconnect(x,y); \\">>../hdrs/temp.h + echo void $key"_disconnect(dbref,int);">>../hdrs/temp2.h + fi + done + fi + echo "local_disconnect(x,y);">>../hdrs/temp.h + echo "">>../hdrs/temp.h + echo "#ifdef LOCAL_DATA">>../hdrs/temp.h + + echo "#define ADDONS_data_create(x) \\">>../hdrs/temp.h + if [ "$keys" ]; then + for key in $keys; do + tmp=`grep $key"_data_create" $files` + if [ "$tmp" ]; then + echo $key"_data_create(x); \\">>../hdrs/temp.h + echo void $key"_data_create(dbref);">>../hdrs/temp2.h + fi + done + fi + echo "local_data_create(x);">>../hdrs/temp.h + echo "">>../hdrs/temp.h + + echo "#define ADDONS_data_clone(x,y) \\">>../hdrs/temp.h + if [ "$keys" ]; then + for key in $keys; do + tmp=`grep $key"_data_clone" $files` + if [ "$tmp" ]; then + echo $key"_data_clone(x,y); \\">>../hdrs/temp.h + echo void $key"_data_clone(dbref,dbref);">>../hdrs/temp2.h + fi + done + fi + echo "local_data_clone(x,y);">>../hdrs/temp.h + echo "">>../hdrs/temp.h + + echo "#define ADDONS_data_free(x) \\">>../hdrs/temp.h + if [ "$keys" ]; then + for key in $keys; do + tmp=`grep $key"_data_free" $files` + if [ "$tmp" ]; then + echo $key"_data_free(x); \\">>../hdrs/temp.h + echo void $key"_data_free(dbref);">>../hdrs/temp2.h + fi + done + fi + echo "local_data_free(x);">>../hdrs/temp.h + echo "">>../hdrs/temp.h + echo "#else /* LOCAL_DATA */">>../hdrs/temp.h + echo "#define ADDONS_data_create(x) ;">>../hdrs/temp.h + echo "#define ADDONS_data_clone(x,y) ;">>../hdrs/temp.h + echo "#define ADDONS_data_free(x) ;">>../hdrs/temp.h + echo "#endif /* LOCAL_DATA */">>../hdrs/temp.h + echo "">>../hdrs/temp.h + + for cflag in GENERIC PLAYER THING ROOM EXIT; do + echo "#define "$cflag"FLAGS \\">>../hdrs/temp.h + if [ "$files" ]; then + flags="`grep "^$cflag Flag:" $files | cut -d' ' -f3-`" + echo $flags" \\">>../hdrs/temp.h + fi + echo "">>../hdrs/temp.h + done + + cat ../hdrs/temp.h >>../hdrs/temp2.h + rm ../hdrs/temp.h + cmp -s ../hdrs/localinc.h ../hdrs/temp2.h + cmpstat=$? + if [ $cmpstat -eq 0 ]; then + rm -f ../hdrs/temp2.h + else + echo "Rebuilt list of addons." + mv -f ../hdrs/temp2.h ../hdrs/localinc.h + fi *** /dev/null Wed Dec 31 19:00:00 1969 --- src/add-example.c Wed Aug 28 09:00:14 2002 *************** *** 0 **** --- 1,174 ---- + /*----------------------------------------------------------------- + * This is slightly confusing...this file is grepped for various things. + * To remove something, you can simple put a # in front of, it has to + * match at the very start of the line. + + Key: example + + GENERIC Flag: {"EXAMPLE", '\0', NOTYPE, 0x80000000, F_ANY, F_ANY}, + PLAYER Flag: {"NUDE", '-', TYPE_PLAYER, 0x10000000, F_WIZARD, F_WIZARD}, + + * While these can technically go anywhere in the file, don't do that. + */ + + /* Here are some includes you're likely to need or want. + */ + #include "copyrite.h" + #include "config.h" + #ifdef I_STRING + #include + #else + #include + #endif + #ifdef I_SETJMP + #include + #endif + #include "externs.h" + #include "parse.h" + #include "htab.h" + #include "command.h" + #include "localinc.h" + #include "confmagic.h" + + #ifdef I_SETJMP + extern jmp_buf db_err; + #define OUTPUT(fun) do { if ((fun) < 0) longjmp(db_err, 1); } while (0) + #else + #define OUTPUT(fun) fun + #endif + + /* Called after all MUSH init is done. + */ + void + example_startup() + { + } + + /* Wrap any calls to stdio functions in local_dump_database() and stuff + * it calls in the OUTPUT() macro, which does error checking so we can + * report problems with a save so it's caught before damage is + * done and you loose a db. . putref(), putstring(), and such don't need + * them. + * For example: + * + * putref(fp, 18); + * OUTPUT(putc('\n', fp)); + */ + + /* Called when the database will be saved + * This is called JUST before we dump the + * database to disk + * Use to save any in-memory structures + * back to disk + */ + void + example_dump_database() + { + } + + /* Called when the MUSH is shutting down. + * The DB has been saved and descriptors closed + * The log files are still open though. + */ + void + example_shutdown() + { + } + + /* Called when the MUSH is performing a dbck database check, + * at the end of the check. A good place to add any regular + * consistency checking you require. + */ + void + example_dbck() + { + } + + /* This is called exactly once a second + * After the MUSH has done all it's stuff + */ + void + example_timer() + { + } + + /* Called when a player connects. If this is a new creation, + * isnew will be true. num gives the number of connections by + * that player (so if num > 1, this is a multiple connect). + */ + void + example_connect(dbref player __attribute__ ((__unused__)), + int isnew __attribute__ ((__unused__)), + int num __attribute__ ((__unused__))) + { + } + + /* Called when a player disconnects. If num > 1, this is + * a partial disconnect. + */ + void + example_disconnect(dbref player __attribute__ ((__unused__)), + int num __attribute__ ((__unused__))) + { + } + + + #ifdef LOCAL_DATA + /* For serious hackers only */ + + /* Those who are depraved enough to do so (Like me), can always + * abuse this as a new and better way of Always Doing Stuff + * to objects. + * Like, say you want to put out a message on the wizard + * channel every time an object is destroyed, do so in the + * local_data_destroy() routine. + */ + + /* Called when a object is created with @create (or @dig, @link) + * This is done AFTER object-specific setup, so the types + * etc will already be set, and object-specific initialization + * will be done. + * Note that the game will ALWAYS set the LocData to NULL before + * this routine is called. + */ + + /* For a well-commented example of how to use this code, + * see: ftp://bimbo.hive.no/pub/PennMUSH/coins.tar.gz + */ + + void + example_data_create(object) + dbref object; + { + } + + /* Called when an object is cloned. Since clone is a rather + * specific form of creation, it has it's own function. + * Note that local_data_create() is NOT called for this object + * first, but the system will always set LocData to NULL first. + * Clone is the 'new' object, while source is the one it's + * being copied from. + */ + + void + example_data_clone(clone, source) + dbref clone; + dbref source; + { + } + + /* Called when a object is REALLY destroyed, not just set + * Going. + */ + + void + example_data_free(object) + dbref object; + { + } + + /* Initiation of objects after a reload or dumping to disk should + * be handled in local_dump_database() and local_startup(). + */ + + #endif