… | |
… | |
344 | MTH void copy_to (object *dst); |
344 | MTH void copy_to (object *dst); |
345 | MTH object *clone (); // create + copy_to a single object |
345 | MTH object *clone (); // create + copy_to a single object |
346 | MTH object *deep_clone (); // copy whole more chain and inventory |
346 | MTH object *deep_clone (); // copy whole more chain and inventory |
347 | void do_destroy (); |
347 | void do_destroy (); |
348 | void gather_callbacks (AV *&callbacks, event_type event) const; |
348 | void gather_callbacks (AV *&callbacks, event_type event) const; |
349 | MTH void destroy (bool destroy_inventory = false); |
349 | MTH void destroy (); |
|
|
350 | MTH void drop_and_destroy () |
|
|
351 | { |
|
|
352 | destroy_inv (true); |
|
|
353 | destroy (); |
|
|
354 | } |
350 | |
355 | |
351 | // recursively destroy all objects in inventory, optionally dropping them to the ground instead |
356 | // recursively destroy all objects in inventory, optionally dropping them to the ground instead |
352 | MTH void destroy_inv (bool drop_to_ground = false); |
357 | MTH void destroy_inv (bool drop_to_ground = false); |
353 | MTH object *insert (object *item); // insert into inventory |
358 | MTH object *insert (object *item); // insert into inventory |
354 | MTH void play_sound (faceidx sound); |
359 | MTH void play_sound (faceidx sound); |
… | |
… | |
515 | } |
520 | } |
516 | |
521 | |
517 | MTH bool is_on_map () const |
522 | MTH bool is_on_map () const |
518 | { |
523 | { |
519 | return !env && !flag [FLAG_REMOVED]; |
524 | return !env && !flag [FLAG_REMOVED]; |
|
|
525 | } |
|
|
526 | |
|
|
527 | MTH bool is_inserted () const |
|
|
528 | { |
|
|
529 | return !flag [FLAG_REMOVED]; |
520 | } |
530 | } |
521 | |
531 | |
522 | // returns the player that cna see this object, if any |
532 | // returns the player that cna see this object, if any |
523 | MTH object *visible_to () const; |
533 | MTH object *visible_to () const; |
524 | |
534 | |