--- deliantra/server/include/object.h 2010/04/12 05:22:38 1.241 +++ deliantra/server/include/object.h 2010/04/28 11:19:09 1.251 @@ -66,6 +66,9 @@ #define NUM_COINS 4 /* number of coin types */ extern const char *const coins[NUM_COINS + 1]; +// restart server when object_count reaches this value +#define RESTART_COUNT 0xe0000000 + /* * Each object (this also means archetypes!) could have a few of these * "dangling" from it; this could also end up containing 'parse errors'. @@ -569,6 +572,12 @@ MTH bool has_dialogue () const { return msg_has_dialogue (&msg); } + /* need_identify returns true if the item should be identified. This + * function really should not exist - by default, any item not identified + * should need it. + */ + MTH bool need_identify () const; + // returns the outermost owner, never returns 0 MTH object *outer_owner () { @@ -645,7 +654,7 @@ return glow_radius; } - // returns the player that cna see this object, if any + // returns the player that can see this object, if any MTH object *visible_to () const; MTH std::string long_desc (object *who = 0); // query_name . " " . describe @@ -666,6 +675,12 @@ MTH void create_treasure (treasurelist *tl, int flags = 0); + // makes sure the player has the named skill, + // and also makes it innate if can_use is true. + // returns the new skill or 0 if no such skill exists. + MTH object *give_skill (shstr_cmp name, bool can_use = false); + MTH void become_follower (object *new_god); + // 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); @@ -681,11 +696,13 @@ // set the given flag on all objects in the inventory recursively MTH void set_flag_inv (int flag, int value = 1); - void enter_exit (object *exit);//Perl - MTH void enter_map (maptile *newmap, int x, int y); + void enter_exit (object *exit); // perl + MTH bool enter_map (maptile *newmap, int x, int y); void player_goto (const_utf8_string path, int x, int y); // only for players MTH bool apply (object *ob, int aflags = AP_APPLY); // ob may be 0 + MTH object *mark () const; + // returns the mapspace this object is in mapspace &ms () const; @@ -745,14 +762,14 @@ MTH struct region *region () const; - void statusmsg (const_utf8_string msg, int color = NDI_BLACK); - void failmsg (const_utf8_string msg, int color = NDI_RED); + MTH void statusmsg (const_utf8_string msg, int color = NDI_BLACK); + MTH void failmsg (const_utf8_string msg, int color = NDI_RED); void failmsgf (const_utf8_string format, ...); // always NDI_RED... - const_utf8_string query_inventory (object *who = 0, const_utf8_string indent = ""); + MTH const_utf8_string query_inventory (object *who = 0, const_utf8_string indent = ""); MTH const_octet_string ref () const; // creates and returns a consistent persistent object reference - static object *deref (const_octet_string ref); // returns the object from the generated refreence, if possible + static object *deref (const_octet_string ref); // returns the object from the generated reference, if possible // make some noise with given item into direction dir, // currently only used for players to make them temporarily visible @@ -946,6 +963,7 @@ #define INS_NO_WALK_ON 0x0004 #define INS_ON_TOP 0x0008 #define INS_BELOW_ORIGINATOR 0x0010 +#define INS_NO_AUTO_EXIT 0x0020 // temporary, fix exits instead //-GPL