ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/object.h
(Generate patch)

Comparing deliantra/server/include/object.h (file contents):
Revision 1.244 by root, Wed Apr 14 21:36:32 2010 UTC vs.
Revision 1.249 by root, Fri Apr 23 09:22:47 2010 UTC

64extern Body_Locations body_locations[NUM_BODY_LOCATIONS]; 64extern Body_Locations body_locations[NUM_BODY_LOCATIONS];
65 65
66#define NUM_COINS 4 /* number of coin types */ 66#define NUM_COINS 4 /* number of coin types */
67extern const char *const coins[NUM_COINS + 1]; 67extern const char *const coins[NUM_COINS + 1];
68 68
69// restart server when object_count reaches this value
70#define RESTART_COUNT 0xe0000000
71
69/* 72/*
70 * Each object (this also means archetypes!) could have a few of these 73 * Each object (this also means archetypes!) could have a few of these
71 * "dangling" from it; this could also end up containing 'parse errors'. 74 * "dangling" from it; this could also end up containing 'parse errors'.
72 * 75 *
73 * key and value are shared-strings. 76 * key and value are shared-strings.
567 570
568 static bool msg_has_dialogue (const char *msg) { return *msg == '@'; } 571 static bool msg_has_dialogue (const char *msg) { return *msg == '@'; }
569 572
570 MTH bool has_dialogue () const { return msg_has_dialogue (&msg); } 573 MTH bool has_dialogue () const { return msg_has_dialogue (&msg); }
571 574
575 /* need_identify returns true if the item should be identified. This
576 * function really should not exist - by default, any item not identified
577 * should need it.
578 */
579 MTH bool need_identify () const;
580
572 // returns the outermost owner, never returns 0 581 // returns the outermost owner, never returns 0
573 MTH object *outer_owner () 582 MTH object *outer_owner ()
574 { 583 {
575 object *op; 584 object *op;
576 585
643 MTH bool has_carried_lights () const 652 MTH bool has_carried_lights () const
644 { 653 {
645 return glow_radius; 654 return glow_radius;
646 } 655 }
647 656
648 // returns the player that cna see this object, if any 657 // returns the player that can see this object, if any
649 MTH object *visible_to () const; 658 MTH object *visible_to () const;
650 659
651 MTH std::string long_desc (object *who = 0); // query_name . " " . describe 660 MTH std::string long_desc (object *who = 0); // query_name . " " . describe
652 MTH std::string describe_monster (object *who = 0); 661 MTH std::string describe_monster (object *who = 0);
653 MTH std::string describe_item (object *who = 0); 662 MTH std::string describe_item (object *who = 0);
685 MTH void deactivate_recursive (); 694 MTH void deactivate_recursive ();
686 695
687 // set the given flag on all objects in the inventory recursively 696 // set the given flag on all objects in the inventory recursively
688 MTH void set_flag_inv (int flag, int value = 1); 697 MTH void set_flag_inv (int flag, int value = 1);
689 698
690 void enter_exit (object *exit);//Perl 699 void enter_exit (object *exit); // perl
691 MTH void enter_map (maptile *newmap, int x, int y); 700 MTH bool enter_map (maptile *newmap, int x, int y);
692 void player_goto (const_utf8_string path, int x, int y); // only for players 701 void player_goto (const_utf8_string path, int x, int y); // only for players
693 MTH bool apply (object *ob, int aflags = AP_APPLY); // ob may be 0 702 MTH bool apply (object *ob, int aflags = AP_APPLY); // ob may be 0
694 703
695 MTH object *mark () const; 704 MTH object *mark () const;
696 705
751 return weight + carrying; 760 return weight + carrying;
752 } 761 }
753 762
754 MTH struct region *region () const; 763 MTH struct region *region () const;
755 764
756 void statusmsg (const_utf8_string msg, int color = NDI_BLACK); 765 MTH void statusmsg (const_utf8_string msg, int color = NDI_BLACK);
757 void failmsg (const_utf8_string msg, int color = NDI_RED); 766 MTH void failmsg (const_utf8_string msg, int color = NDI_RED);
758 void failmsgf (const_utf8_string format, ...); // always NDI_RED... 767 void failmsgf (const_utf8_string format, ...); // always NDI_RED...
759 768
760 const_utf8_string query_inventory (object *who = 0, const_utf8_string indent = ""); 769 MTH const_utf8_string query_inventory (object *who = 0, const_utf8_string indent = "");
761 770
762 MTH const_octet_string ref () const; // creates and returns a consistent persistent object reference 771 MTH const_octet_string ref () const; // creates and returns a consistent persistent object reference
763 static object *deref (const_octet_string ref); // returns the object from the generated refreence, if possible 772 static object *deref (const_octet_string ref); // returns the object from the generated reference, if possible
764 773
765 // make some noise with given item into direction dir, 774 // make some noise with given item into direction dir,
766 // currently only used for players to make them temporarily visible 775 // currently only used for players to make them temporarily visible
767 // when they are invisible. 776 // when they are invisible.
768 MTH void make_noise (); 777 MTH void make_noise ();
952#define INS_NO_MERGE 0x0001 961#define INS_NO_MERGE 0x0001
953#define INS_ABOVE_FLOOR_ONLY 0x0002 962#define INS_ABOVE_FLOOR_ONLY 0x0002
954#define INS_NO_WALK_ON 0x0004 963#define INS_NO_WALK_ON 0x0004
955#define INS_ON_TOP 0x0008 964#define INS_ON_TOP 0x0008
956#define INS_BELOW_ORIGINATOR 0x0010 965#define INS_BELOW_ORIGINATOR 0x0010
966#define INS_NO_AUTO_EXIT 0x0020 // temporary, fix exits instead
957 967
958//-GPL 968//-GPL
959 969
960#endif 970#endif
961 971

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines