… | |
… | |
405 | { |
405 | { |
406 | open_container (0); |
406 | open_container (0); |
407 | } |
407 | } |
408 | |
408 | |
409 | MTH object *force_find (const shstr name); |
409 | MTH object *force_find (const shstr name); |
410 | MTH void force_add (const shstr name, int duration = 0); |
410 | MTH object *force_add (const shstr name, int duration = 0); |
411 | |
411 | |
412 | // overwrite the attachable should_invoke function with a version that also checks ev_want_type |
412 | // overwrite the attachable should_invoke function with a version that also checks ev_want_type |
413 | bool should_invoke (event_type event) |
413 | bool should_invoke (event_type event) |
414 | { |
414 | { |
415 | return ev_want_event [event] || ev_want_type [type] || cb; |
415 | return ev_want_event [event] || ev_want_type [type] || cb; |
… | |
… | |
538 | MTH bool is_inserted () const |
538 | MTH bool is_inserted () const |
539 | { |
539 | { |
540 | return !flag [FLAG_REMOVED]; |
540 | return !flag [FLAG_REMOVED]; |
541 | } |
541 | } |
542 | |
542 | |
|
|
543 | MTH bool affects_los () const |
|
|
544 | { |
|
|
545 | return glow_radius || flag [FLAG_BLOCKSVIEW]; |
|
|
546 | } |
|
|
547 | |
543 | // returns the player that cna see this object, if any |
548 | // returns the player that cna see this object, if any |
544 | MTH object *visible_to () const; |
549 | MTH object *visible_to () const; |
545 | |
550 | |
546 | MTH std::string long_desc (object *who = 0); |
551 | MTH std::string long_desc (object *who = 0); |
547 | MTH std::string describe_monster (object *who = 0); |
552 | MTH std::string describe_monster (object *who = 0); |
… | |
… | |
637 | |
642 | |
638 | const char *query_inventory (object *who = 0, const char *indent = ""); |
643 | const char *query_inventory (object *who = 0, const char *indent = ""); |
639 | |
644 | |
640 | MTH const_octet_string ref () const; // creates and returns a consistent persistent object reference |
645 | MTH const_octet_string ref () const; // creates and returns a consistent persistent object reference |
641 | static object *deref (const_octet_string ref); // returns the object from the generated refreence, if possible |
646 | static object *deref (const_octet_string ref); // returns the object from the generated refreence, if possible |
|
|
647 | |
|
|
648 | // make some noise with given item into direction dir, |
|
|
649 | // currently only used for players to make them temporarily visible |
|
|
650 | // when they are invisible. |
|
|
651 | MTH void make_noise (); |
642 | |
652 | |
643 | protected: |
653 | protected: |
644 | void link (); |
654 | void link (); |
645 | void unlink (); |
655 | void unlink (); |
646 | |
656 | |