--- deliantra/server/include/object.h 2007/04/17 18:40:31 1.108 +++ deliantra/server/include/object.h 2007/05/03 10:39:46 1.115 @@ -31,6 +31,7 @@ #include "shstr.h" typedef int tag_t; + #define NUM_BODY_LOCATIONS 12 #define BODY_ARMS 1 @@ -275,6 +276,7 @@ MTH void set_owner (object *owner); MTH void set_speed (float speed); + MTH void set_weapon (object *ob); MTH void open_container (object *new_container); MTH void close_container () @@ -296,8 +298,7 @@ // info must hold 256 * 3 bytes currently const char *debug_desc (char *info) const; - MTH const char *debug_desc () const; - const char *debug_desc2 () const; // another debug_desc, pure convinience function + MTH const char *debug_desc () const; // uses at least 3 round-robin buffers const char *flag_desc (char *desc, int len) const; int number_of () const @@ -333,6 +334,7 @@ MTH bool is_arrow () const { return type == ARROW || (type == SPELL_EFFECT && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } + MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; } MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } @@ -363,6 +365,19 @@ return head ? head : this; } + MTH std::string long_desc (object *who = 0); + MTH std::string describe_monster (object *who = 0); + MTH std::string describe_item (object *who = 0); + MTH std::string describe (object *who = 0); + + // 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. + MTH void expand_tail (); + + MTH void create_treasure (treasurelist *tl, int flags = 0); + // 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); @@ -375,7 +390,7 @@ // set the givne flag on all objects in the inventory recursively MTH void set_flag_inv (int flag, int value = 1); - void enter_exit (object *exit);//PERL + void enter_exit (object *exit);//Perl MTH void enter_map (maptile *newmap, int x, int y); // returns the mapspace this object is in @@ -546,7 +561,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"