--- deliantra/server/include/object.h 2009/01/01 19:42:43 1.194 +++ deliantra/server/include/object.h 2009/01/08 03:03:24 1.196 @@ -138,6 +138,19 @@ signed char used:4; /* Calculated value based on items equipped */ }; +typedef struct oblnk +{ /* Used to link together several objects */ + object_ptr ob; + struct oblnk *next; +} objectlink; + +typedef struct oblinkpt +{ /* Used to link together several object links */ + struct oblnk *link; + struct oblinkpt *next; + shstr id; /* Used as connected value in buttons/gates */ +} oblinkpt; + INTERFACE_CLASS (object) // these are being copied struct object_copy : attachable @@ -417,6 +430,10 @@ MTH object *force_find (shstr_tmp name); MTH object *force_add (shstr_tmp name, int duration = 0); + oblinkpt *find_link () const; + MTH void add_link (maptile *map, shstr_tmp id); + MTH void remove_link (); + // overwrite the attachable should_invoke function with a version that also checks ev_want_type bool should_invoke (event_type event) { @@ -558,6 +575,11 @@ return glow_radius || flag [FLAG_BLOCKSVIEW]; } + MTH bool has_carried_lights () const + { + return glow_radius; + } + // returns the player that cna see this object, if any MTH object *visible_to () const; @@ -694,19 +716,6 @@ return ob; } -typedef struct oblnk -{ /* Used to link together several objects */ - object_ptr ob; - struct oblnk *next; -} objectlink; - -typedef struct oblinkpt -{ /* Used to link together several object links */ - struct oblnk *link; - sint32 value; /* Used as connected value in buttons/gates */ - struct oblinkpt *next; -} oblinkpt; - object *find_skill_by_name_fuzzy (object *who, const char *name); object *find_skill_by_name (object *who, shstr_cmp sh); object *find_skill_by_number (object *who, int skillno);