Re: CODE: Item desolve item extra flag?

From: Skylar (skylar@ifconfig.intserv.com)
Date: 07/07/96


On Sun, 7 Jul 1996, Sliver wrote:

> Does anyone have any idea how to code an Extra flag on items, so when you drop them, it 
> junks them automatically? Like sub-issue newbie eq in ROM2.4.


First, define your new flag in structs.h, with the other extra flags for 
objects...say under ITEM_NOSELL, around line 314 or so...

#define ITEM_AUTOJUNK	(1 << 17)    


Then go into act.item.c, function perform_drop(), around line 362, and add
a check after the one already in there for ITEM_NODROP... something like 
this would work well...

if (IS_OBJ_STAT(obj, ITEM_AUTOJUNK))
  mode = SCMD_JUNK;


The already existing code to junk stuff will take care of the rest.


I personally would favor bio-degrading objects over this system, using 
timers and an object_activity() function, but thats a whole other can of 
worms in itself...



-Sky



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