| 510 | | /* No inscription */ |
|---|
| 511 | | if (!o_ptr->note) return (FALSE); |
|---|
| 512 | | |
|---|
| 513 | | /* Find a '=' */ |
|---|
| 514 | | s = strchr(quark_str(o_ptr->note), '='); |
|---|
| 515 | | |
|---|
| 516 | | /* Process inscription */ |
|---|
| 517 | | while (s) |
|---|
| 518 | | { |
|---|
| 519 | | /* Auto-pickup on "=g" */ |
|---|
| 520 | | if (s[1] == 'g') return (TRUE); |
|---|
| 521 | | |
|---|
| 522 | | /* Find another '=' */ |
|---|
| 523 | | s = strchr(s + 1, '='); |
|---|
| | 510 | /* Option to vacuum up things on the floor (not recommended) */ |
|---|
| | 511 | if ((always_pickup) && (!query_floor)) return (TRUE); |
|---|
| | 512 | |
|---|
| | 513 | /* Check inscription */ |
|---|
| | 514 | if (o_ptr->note) |
|---|
| | 515 | { |
|---|
| | 516 | /* Find a '=' */ |
|---|
| | 517 | s = strchr(quark_str(o_ptr->note), '='); |
|---|
| | 518 | |
|---|
| | 519 | /* Process permissions */ |
|---|
| | 520 | while (s) |
|---|
| | 521 | { |
|---|
| | 522 | /* =g ('g'et) means auto pickup */ |
|---|
| | 523 | if (s[1] == 'g') return (TRUE); |
|---|
| | 524 | |
|---|
| | 525 | /* Find another '=' */ |
|---|
| | 526 | s = strchr(s + 1, '='); |
|---|
| | 527 | } |
|---|
| | 528 | } |
|---|
| | 529 | |
|---|
| | 530 | /* Optionally, check the backpack */ |
|---|
| | 531 | if (check_pack) |
|---|
| | 532 | { |
|---|
| | 533 | int j; |
|---|
| | 534 | |
|---|
| | 535 | /* Look for similar and inscribed */ |
|---|
| | 536 | for (j = 0; j < INVEN_PACK; j++) |
|---|
| | 537 | { |
|---|
| | 538 | object_type *j_ptr = &inventory[j]; |
|---|
| | 539 | |
|---|
| | 540 | /* Skip non-objects */ |
|---|
| | 541 | if (!j_ptr->k_idx) continue; |
|---|
| | 542 | |
|---|
| | 543 | /* The two items must be able to combine */ |
|---|
| | 544 | if (!object_similar(j_ptr, o_ptr)) continue; |
|---|
| | 545 | |
|---|
| | 546 | /* The backpack item must be inscribed */ |
|---|
| | 547 | if (!j_ptr->note) continue; |
|---|
| | 548 | |
|---|
| | 549 | /* Find a '=' */ |
|---|
| | 550 | s = strchr(quark_str(j_ptr->note), '='); |
|---|
| | 551 | |
|---|
| | 552 | /* Process permissions */ |
|---|
| | 553 | while (s) |
|---|
| | 554 | { |
|---|
| | 555 | /* =g ('g'et) means auto pickup */ |
|---|
| | 556 | if (s[1] == 'g') return (TRUE); |
|---|
| | 557 | |
|---|
| | 558 | /* Find another '=' */ |
|---|
| | 559 | s = strchr(s + 1, '='); |
|---|
| | 560 | } |
|---|
| | 561 | } |
|---|
| 565 | | * Make the player carry everything in a grid. |
|---|
| 566 | | * |
|---|
| 567 | | * If "pickup" is FALSE then only gold will be picked up. |
|---|
| | 604 | * Pick up objects and treasure on the floor. -LM- |
|---|
| | 605 | * |
|---|
| | 606 | * Called with pickup: |
|---|
| | 607 | * 0 to grab gold and describe non-gold objects. |
|---|
| | 608 | * 1 to pick up objects either with or without displaying a menu. |
|---|
| | 609 | * 2 to pick up objects, allowing cancel and quick pickup of single objects. |
|---|
| | 610 | * 3 to pick up objects, forcing a menu for any number of objects. |
|---|
| | 611 | * |
|---|
| | 612 | * Use the "p_ptr->auto_pickup_okay" variable to allow or dis-allow |
|---|
| | 613 | * automatically picking things up that take time. (NOT INCLUDED) |
|---|
| | 614 | * |
|---|
| | 615 | * Scan the list of objects in that floor grid. Pick up gold automatically. |
|---|
| | 616 | * Pick up objects automatically until pile or backpack space is full if |
|---|
| | 617 | * auto-pickup option is on, carry_query_floor option is not, and menus are |
|---|
| | 618 | * not forced (which the "get" command does). Otherwise, store objects on |
|---|
| | 619 | * floor in an array, and tally both how many there are and can be picked up. |
|---|
| | 620 | * |
|---|
| | 621 | * If not picking up anything, indicate objects on the floor. Show more |
|---|
| | 622 | * details if the "query_floor" option is set. Do the same thing if we |
|---|
| | 623 | * don't have room for anything. |
|---|
| | 624 | * |
|---|
| | 625 | * If we are picking up objects automatically, and have room for at least |
|---|
| | 626 | * one, allow the "query_floor" option to display information about objects |
|---|
| | 627 | * and prompt the player. Otherwise, automatically pick up a single object |
|---|
| | 628 | * or use a menu for more than one (this "blind" autopickup option is |
|---|
| | 629 | * deprecated). |
|---|
| | 630 | * |
|---|
| | 631 | * Pick up multiple objects using Tim Baker's menu system. Recursively |
|---|
| | 632 | * call this function (forcing menus for any number of objects) until |
|---|
| | 633 | * objects are gone, backpack is full, or player is satisfied. |
|---|
| | 634 | * |
|---|
| | 635 | * We keep track of number of objects picked up to calculate time spent. |
|---|
| | 636 | * This tally is incremented even for automatic pickup, so we are careful |
|---|
| | 637 | * (in "dungeon.c" and elsewhere) to handle pickup as either a separate |
|---|
| | 638 | * automated move or a no-cost part of the stay still or 'g'et command. |
|---|
| | 639 | * |
|---|
| | 640 | * Note the lack of chance for the character to be disturbed by unmarked |
|---|
| | 641 | * objects. They are truly "unknown". |
|---|
| 669 | | /* Easy Floor */ |
|---|
| 670 | | if (easy_floor && !do_not_pickup) |
|---|
| 671 | | { |
|---|
| 672 | | /* Pickup if possible */ |
|---|
| 673 | | if (pickup && inven_carry_okay(o_ptr)) |
|---|
| 674 | | { |
|---|
| 675 | | /* Pick up if allowed */ |
|---|
| 676 | | if (!carry_query_flag) |
|---|
| 677 | | { |
|---|
| 678 | | /* Pick up the object */ |
|---|
| 679 | | py_pickup_aux(this_o_idx); |
|---|
| 680 | | } |
|---|
| 681 | | |
|---|
| 682 | | /* Else count */ |
|---|
| 683 | | else |
|---|
| 684 | | { |
|---|
| 685 | | /* Remember */ |
|---|
| 686 | | last_o_idx = this_o_idx; |
|---|
| 687 | | |
|---|
| 688 | | /* Count */ |
|---|
| 689 | | ++can_pickup; |
|---|
| 690 | | } |
|---|
| 691 | | } |
|---|
| 692 | | |
|---|
| 693 | | /* Else count */ |
|---|
| | 735 | /* Tally objects and store them in an array. */ |
|---|
| | 736 | |
|---|
| | 737 | /* Remember this object index */ |
|---|
| | 738 | floor_list[floor_num] = this_o_idx; |
|---|
| | 739 | |
|---|
| | 740 | /* Count non-gold objects that remain on the floor. */ |
|---|
| | 741 | floor_num++; |
|---|
| | 742 | |
|---|
| | 743 | /* Remember this index */ |
|---|
| | 744 | floor_o_idx = this_o_idx; |
|---|
| | 745 | |
|---|
| | 746 | /* Tally objects that can be picked up.*/ |
|---|
| | 747 | if (inven_carry_okay(o_ptr)) |
|---|
| | 748 | { |
|---|
| | 749 | can_pickup++; |
|---|
| | 750 | } |
|---|
| | 751 | |
|---|
| | 752 | /* XXX Hack -- Enforce limit */ |
|---|
| | 753 | if (floor_num == MAX_FLOOR_STACK) break; |
|---|
| | 754 | } |
|---|
| | 755 | |
|---|
| | 756 | /* There are no objects left */ |
|---|
| | 757 | if (!floor_num) return (objs_picked_up); |
|---|
| | 758 | |
|---|
| | 759 | |
|---|
| | 760 | /* Mention the objects if player is not picking them up. */ |
|---|
| | 761 | if (!pickup) |
|---|
| | 762 | { |
|---|
| | 763 | /* Optionally, display more information about floor items */ |
|---|
| | 764 | if (query_floor) |
|---|
| | 765 | { |
|---|
| | 766 | /* Scan all marked objects in the grid */ |
|---|
| | 767 | (void)scan_floor(floor_list, &floor_num, py, px, 0x03); |
|---|
| | 768 | |
|---|
| | 769 | /* Save screen */ |
|---|
| | 770 | screen_save(); |
|---|
| | 771 | |
|---|
| | 772 | /* Display objects on the floor */ |
|---|
| | 773 | show_floor(floor_list, floor_num, FALSE); |
|---|
| | 774 | |
|---|
| | 775 | /* Display prompt */ |
|---|
| | 776 | prt(format("You %s: ", |
|---|
| | 777 | (blind ? "feel something on the floor" : "see")), 0, 0); |
|---|
| | 778 | |
|---|
| | 779 | /* Move cursor back to character, if needed */ |
|---|
| | 780 | if (hilite_player) move_cursor_relative(p_ptr->py, p_ptr->px); |
|---|
| | 781 | |
|---|
| | 782 | /* Wait for it. Use key as next command. */ |
|---|
| | 783 | p_ptr->command_new = inkey(); |
|---|
| | 784 | |
|---|
| | 785 | /* Restore screen */ |
|---|
| | 786 | screen_load(); |
|---|
| | 787 | } |
|---|
| | 788 | |
|---|
| | 789 | /* Display compact information */ |
|---|
| | 790 | else |
|---|
| | 791 | { |
|---|
| | 792 | /* One object */ |
|---|
| | 793 | if (floor_num == 1) |
|---|
| | 794 | { |
|---|
| | 795 | /* Get the object */ |
|---|
| | 796 | o_ptr = &o_list[floor_o_idx]; |
|---|
| | 797 | |
|---|
| | 798 | /* Describe the object. Less detail if blind. */ |
|---|
| | 799 | if (blind) object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 0); |
|---|
| | 800 | else object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 3); |
|---|
| | 801 | |
|---|
| | 802 | message_flush(); |
|---|
| | 803 | |
|---|
| | 804 | /* Message */ |
|---|
| | 805 | msg_format("You %s %s.", (blind ? "feel" : "see"), |
|---|
| | 806 | o_name); |
|---|
| | 807 | } |
|---|
| | 808 | |
|---|
| | 809 | /* Several objects */ |
|---|
| 696 | | /* Remember */ |
|---|
| 697 | | last_o_idx = this_o_idx; |
|---|
| 698 | | |
|---|
| 699 | | /* Count */ |
|---|
| 700 | | ++not_pickup; |
|---|
| 701 | | } |
|---|
| 702 | | |
|---|
| 703 | | /* Check the next object */ |
|---|
| 704 | | continue; |
|---|
| 705 | | } |
|---|
| 706 | | |
|---|
| 707 | | /* Describe the object */ |
|---|
| 708 | | if (!pickup || do_not_pickup) |
|---|
| 709 | | { |
|---|
| 710 | | msg_format("You see %s.", o_name); |
|---|
| 711 | | |
|---|
| 712 | | /* Check the next object */ |
|---|
| 713 | | continue; |
|---|
| 714 | | } |
|---|
| 715 | | |
|---|
| 716 | | /* Note that the pack is too full */ |
|---|
| 717 | | if (!inven_carry_okay(o_ptr)) |
|---|
| 718 | | { |
|---|
| | 812 | message_flush(); |
|---|
| | 813 | |
|---|
| | 814 | /* Message */ |
|---|
| | 815 | msg_format("You %s a pile of %d items.", |
|---|
| | 816 | (blind ? "feel" : "see"), floor_num); |
|---|
| | 817 | } |
|---|
| | 818 | } |
|---|
| | 819 | |
|---|
| | 820 | /* Done */ |
|---|
| | 821 | return (objs_picked_up); |
|---|
| | 822 | } |
|---|
| | 823 | |
|---|
| | 824 | |
|---|
| | 825 | /* The player has no room for anything on the floor. */ |
|---|
| | 826 | if (!can_pickup) |
|---|
| | 827 | { |
|---|
| | 828 | /* |
|---|
| | 829 | * One object -- Always display compact information. This |
|---|
| | 830 | * should change if more information would actually be helpful. |
|---|
| | 831 | */ |
|---|
| | 832 | if (floor_num == 1) |
|---|
| | 833 | { |
|---|
| | 834 | /* Get the object */ |
|---|
| | 835 | o_ptr = &o_list[floor_o_idx]; |
|---|
| | 836 | |
|---|
| | 837 | /* Describe the object. Less detail if blind. */ |
|---|
| | 838 | if (blind) object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 0); |
|---|
| | 839 | else object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 3); |
|---|
| | 840 | |
|---|
| | 841 | /* Message */ |
|---|
| | 842 | message_flush(); |
|---|
| 720 | | |
|---|
| 721 | | /* Check the next object */ |
|---|
| 722 | | continue; |
|---|
| 723 | | } |
|---|
| 724 | | |
|---|
| 725 | | /* Query before picking up */ |
|---|
| 726 | | if (carry_query_flag) |
|---|
| 727 | | { |
|---|
| 728 | | char out_val[160]; |
|---|
| 729 | | strnfmt(out_val, sizeof(out_val), "Pick up %s? ", o_name); |
|---|
| 730 | | if (!get_check(out_val)) continue; |
|---|
| 731 | | } |
|---|
| 732 | | |
|---|
| | 844 | } |
|---|
| | 845 | |
|---|
| | 846 | /* Several items */ |
|---|
| | 847 | else |
|---|
| | 848 | { |
|---|
| | 849 | /* Optionally, display more information about floor items */ |
|---|
| | 850 | if ((query_floor) || (force_display_list)) |
|---|
| | 851 | { |
|---|
| | 852 | /* Scan all marked objects in the grid */ |
|---|
| | 853 | (void)scan_floor(floor_list, &floor_num, py, px, 0x03); |
|---|
| | 854 | |
|---|
| | 855 | /* Save screen */ |
|---|
| | 856 | screen_save(); |
|---|
| | 857 | |
|---|
| | 858 | /* Display objects on the floor */ |
|---|
| | 859 | show_floor(floor_list, floor_num, FALSE); |
|---|
| | 860 | |
|---|
| | 861 | /* Display prompt */ |
|---|
| | 862 | prt("You have no room for the following objects: ", 0, 0); |
|---|
| | 863 | |
|---|
| | 864 | /* Move cursor back to character, if needed */ |
|---|
| | 865 | if (hilite_player) move_cursor_relative(p_ptr->py, p_ptr->px); |
|---|
| | 866 | |
|---|
| | 867 | /* Wait for it. Use key as next command. */ |
|---|
| | 868 | p_ptr->command_new = inkey(); |
|---|
| | 869 | |
|---|
| | 870 | /* Restore screen */ |
|---|
| | 871 | screen_load(); |
|---|
| | 872 | } |
|---|
| | 873 | |
|---|
| | 874 | /* Display compact information */ |
|---|
| | 875 | else |
|---|
| | 876 | { |
|---|
| | 877 | /* Message -- not very informative */ |
|---|
| | 878 | message_flush(); |
|---|
| | 879 | msg_print("You have no room for any of the items on the floor."); |
|---|
| | 880 | } |
|---|
| | 881 | } |
|---|
| | 882 | |
|---|
| | 883 | /* Done */ |
|---|
| | 884 | return (objs_picked_up); |
|---|
| | 885 | } |
|---|
| | 886 | |
|---|
| | 887 | |
|---|
| | 888 | /* We can pick up objects. Menus are not requested (yet). */ |
|---|
| | 889 | if (pickup != 3) |
|---|
| | 890 | { |
|---|
| | 891 | /* Scan all marked objects in the grid (again) */ |
|---|
| | 892 | (void)scan_floor(floor_list, &floor_num, py, px, 0x03); |
|---|
| | 893 | |
|---|
| | 894 | /* |
|---|
| | 895 | * If not deliberately picking up objects, and if requested or |
|---|
| | 896 | * potentially unsafe, ask the player to confirm all pickups. |
|---|
| | 897 | */ |
|---|
| | 898 | if ((query_floor) && (pickup <= 1)) |
|---|
| | 899 | { |
|---|
| | 900 | /* Save screen */ |
|---|
| | 901 | screen_save(); |
|---|
| | 902 | |
|---|
| | 903 | /* Display objects on the floor */ |
|---|
| | 904 | show_floor(floor_list, floor_num, FALSE); |
|---|
| | 905 | |
|---|
| | 906 | /* Display prompt */ |
|---|
| | 907 | if (floor_num == 1) |
|---|
| | 908 | { |
|---|
| | 909 | prt("Press Return to pick up this object: ", 0, 0); |
|---|
| | 910 | } |
|---|
| | 911 | else |
|---|
| | 912 | { |
|---|
| | 913 | prt("Press Return to pick up any of the following objects: ", |
|---|
| | 914 | 0, 0); |
|---|
| | 915 | } |
|---|
| | 916 | |
|---|
| | 917 | /* Move cursor back to character, if needed */ |
|---|
| | 918 | if (hilite_player) move_cursor_relative(p_ptr->py, p_ptr->px); |
|---|
| | 919 | |
|---|
| | 920 | /* Get response */ |
|---|
| | 921 | ch = inkey(); |
|---|
| | 922 | |
|---|
| | 923 | /* Restore screen */ |
|---|
| | 924 | screen_load(); |
|---|
| | 925 | |
|---|
| | 926 | /* We don't want to pick up this item */ |
|---|
| | 927 | if ((ch != '\r') && (ch != '\n') && (ch != 'g')) |
|---|
| | 928 | { |
|---|
| | 929 | /* Attempt to turn this command into a direction */ |
|---|
| | 930 | int dir = target_dir(ch); |
|---|
| | 931 | |
|---|
| | 932 | /* We used a movement command */ |
|---|
| | 933 | if (dir) |
|---|
| | 934 | { |
|---|
| | 935 | /* Save as a new command; move later */ |
|---|
| | 936 | p_ptr->command_new = ch; |
|---|
| | 937 | } |
|---|
| | 938 | |
|---|
| | 939 | /* Done */ |
|---|
| | 940 | return (objs_picked_up); |
|---|
| | 941 | } |
|---|
| | 942 | } |
|---|
| | 943 | |
|---|
| | 944 | /* Use a menu interface for multiple objects */ |
|---|
| | 945 | if (floor_num > 1) |
|---|
| | 946 | { |
|---|
| | 947 | pickup = 3; |
|---|
| | 948 | } |
|---|
| | 949 | |
|---|
| | 950 | /* Automatically pick up a single object */ |
|---|
| | 951 | else |
|---|
| | 952 | { |
|---|
| | 953 | /* Remember the object to pick up */ |
|---|
| | 954 | this_o_idx = floor_o_idx; |
|---|
| | 955 | } |
|---|
| | 956 | } |
|---|
| | 957 | |
|---|
| | 958 | /* Display a list if requested. */ |
|---|
| | 959 | if (pickup == 3) |
|---|
| | 960 | { |
|---|
| | 961 | cptr q, s; |
|---|
| | 962 | |
|---|
| | 963 | int item; |
|---|
| | 964 | |
|---|
| | 965 | /* Restrict the choices */ |
|---|
| | 966 | item_tester_hook = inven_carry_okay; |
|---|
| | 967 | |
|---|
| | 968 | /* Request a list */ |
|---|
| | 969 | p_ptr->command_see = TRUE; |
|---|
| | 970 | |
|---|
| | 971 | /* Get an object or exit. */ |
|---|
| | 972 | q = "Get which item?"; |
|---|
| | 973 | s = "You see nothing there."; |
|---|
| | 974 | if (get_item(&item, q, s, (USE_FLOOR))) |
|---|
| | 975 | { |
|---|
| | 976 | this_o_idx = 0 - item; |
|---|
| | 977 | call_function_again = TRUE; |
|---|
| | 978 | } |
|---|
| | 979 | else |
|---|
| | 980 | { |
|---|
| | 981 | return (objs_picked_up); |
|---|
| | 982 | } |
|---|
| | 983 | |
|---|
| | 984 | /* With a list, we do not need explicit pickup messages */ |
|---|
| | 985 | msg = FALSE; |
|---|
| | 986 | } |
|---|
| | 987 | |
|---|
| | 988 | /* Pick up object, if legal */ |
|---|
| | 989 | if (this_o_idx) |
|---|
| | 990 | { |
|---|
| 734 | | py_pickup_aux(this_o_idx); |
|---|
| 735 | | } |
|---|
| 736 | | |
|---|
| 737 | | /* Easy floor, objects left */ |
|---|
| 738 | | if (easy_floor && (can_pickup + not_pickup > 0)) |
|---|
| 739 | | { |
|---|
| 740 | | /* Not picking up */ |
|---|
| 741 | | if (!pickup) |
|---|
| 742 | | { |
|---|
| 743 | | /* One object */ |
|---|
| 744 | | if (not_pickup == 1) |
|---|
| 745 | | { |
|---|
| 746 | | /* Get the object */ |
|---|
| 747 | | o_ptr = &o_list[last_o_idx]; |
|---|
| 748 | | |
|---|
| 749 | | /* Describe the object */ |
|---|
| 750 | | object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 3); |
|---|
| 751 | | |
|---|
| 752 | | /* Message */ |
|---|
| 753 | | msg_format("You see %s.", o_name); |
|---|
| 754 | | } |
|---|
| 755 | | |
|---|
| 756 | | /* Multiple objects */ |
|---|
| 757 | | else |
|---|
| 758 | | { |
|---|
| 759 | | /* Message */ |
|---|
| 760 | | msg_format("You see a pile of %d objects.", not_pickup); |
|---|
| 761 | | } |
|---|
| 762 | | |
|---|
| 763 | | /* Done */ |
|---|
| 764 | | return; |
|---|
| 765 | | } |
|---|
| 766 | | |
|---|
| 767 | | /* No room */ |
|---|
| 768 | | if (!can_pickup) |
|---|
| 769 | | { |
|---|
| 770 | | /* One object */ |
|---|
| 771 | | if (not_pickup == 1) |
|---|
| 772 | | { |
|---|
| 773 | | /* Get the object */ |
|---|
| 774 | | o_ptr = &o_list[last_o_idx]; |
|---|
| 775 | | |
|---|
| 776 | | /* Describe the object */ |
|---|
| 777 | | object_desc(o_name, sizeof(o_name), o_ptr, TRUE, 3); |
|---|
| 778 | | |
|---|
| 779 | | /* Message */ |
|---|
| 780 | | msg_format("You have no room for %s.", o_name); |
|---|
| 781 | | } |
|---|
| 782 | | |
|---|
| 783 | | /* Multiple objects */ |
|---|
| 784 | | else |
|---|
| 785 | | { |
|---|
| 786 | | /* Message */ |
|---|
| 787 | | msg_print("You have no room for any of the objects on the floor."); |
|---|
| 788 | | } |
|---|
| 789 | | |
|---|
| 790 | | /* Done */ |
|---|
| 791 | | return; |
|---|
| 792 | | } |
|---|
| 793 | | |
|---|
| 794 | | /* Pick up objects */ |
|---|
| 795 | | while (1) |
|---|
| 796 | | { |
|---|
| 797 | | cptr q, s; |
|---|
| 798 | | |
|---|
| 799 | | int item; |
|---|
| 800 | | |
|---|
| 801 | | /* Restrict the choices */ |
|---|
| 802 | | item_tester_hook = inven_carry_okay; |
|---|
| 803 | | |
|---|
| 804 | | /* Get an object*/ |
|---|
| 805 | | q = "Get which item? "; |
|---|
| 806 | | s = NULL; |
|---|
| 807 | | if (!get_item(&item, q, s, (USE_FLOOR))) break; |
|---|
| 808 | | |
|---|
| 809 | | /* Pick up the object */ |
|---|
| 810 | | py_pickup_aux(0 - item); |
|---|
| 811 | | } |
|---|
| 812 | | } |
|---|
| | 992 | py_pickup_aux(this_o_idx, msg); |
|---|
| | 993 | |
|---|
| | 994 | /* Indicate an object picked up. */ |
|---|
| | 995 | objs_picked_up = 1; |
|---|
| | 996 | } |
|---|
| | 997 | |
|---|
| | 998 | /* |
|---|
| | 999 | * If requested, call this function recursively. Count objects picked |
|---|
| | 1000 | * up. Force the display of a menu in all cases. |
|---|
| | 1001 | */ |
|---|
| | 1002 | if (call_function_again) objs_picked_up += py_pickup(3); |
|---|
| | 1003 | |
|---|
| | 1004 | /* Indicate how many objects have been picked up. */ |
|---|
| | 1005 | return (objs_picked_up); |
|---|