--- deliantra/server/include/object.h 2007/04/16 06:23:41 1.105 +++ deliantra/server/include/object.h 2007/04/21 16:56:32 1.109 @@ -31,6 +31,7 @@ #include "shstr.h" typedef int tag_t; + #define NUM_BODY_LOCATIONS 12 #define BODY_ARMS 1 @@ -363,6 +364,12 @@ return head ? head : this; } + // If this object has no extra parts but should have them, + // add them, effectively expanding heads into multipart + // objects. This method only works on objects not inserted + // anywhere. + void expand_tail (); + // insert object at same map position as 'where' // handles both inventory and map "positions" MTH object *insert_at (object *where, object *originator = 0, int flags = 0); @@ -484,8 +491,8 @@ ~archetype (); void gather_callbacks (AV *&callbacks, event_type event) const; - static archetype *get (const char *name); // find or create static archetype *read (object_thawer &f); + static archetype *get (const char *name); // find or create static archetype *find (const char *name); void hash_add (); // add to hashtable @@ -497,6 +504,7 @@ struct archetype *ACC (RW, more); /* Next part of a linked object */ object ACC (RO, clone); /* An object from which to do ->copy_to () */ uint32 ACC (RW, editable); /* editable flags (mainly for editor) */ + bool ACC (RW, linked); // linked into list of heads sint8 ACC (RW, tail_x), ACC (RW, tail_y); /* Where the lower right most portion of the object is * in comparison to the head. */ @@ -545,7 +553,6 @@ #define INS_MAP_LOAD 0x0020 #define ARCH_SINGULARITY "singularity" -#define ARCH_SINGULARITY_LEN 11 #define ARCH_DETECT_MAGIC "detect_magic" #define ARCH_DEPLETION "depletion" #define ARCH_SYMPTOM "symptom"