Changeset 267

Show
Ignore:
Timestamp:
07/04/07 14:39:55 (1 year ago)
Author:
takkaria
Message:

Fix get_item() when working with floor stacks (closes #177).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/cmd3.c

    r265 r267  
    436436        cptr q, s; 
    437437 
    438         const char *inscrip; 
    439  
    440438        /* Get an item */ 
    441439        q = "Destroy which item? "; 
     
    490488        /* Verify destruction */ 
    491489        strnfmt(out_val, sizeof(out_val), "Really destroy %s? ", o_name); 
    492  
    493         inscrip = (o_ptr->note ? quark_str(o_ptr->note) : NULL); 
    494  
    495         /* Destroying a squelched item is prompt-free */ 
    496         if (!inscrip || !streq(inscrip, "squelch")) 
    497         { 
    498                 if (!get_check(out_val)) return; 
    499         } 
    500490 
    501491 
     
    558548        } 
    559549 
     550#if 0 
     551        /* 
     552         * We can only re-enable this when it can be made to interact well with 
     553         * the repeat code. 
     554         */ 
    560555 
    561556        /* We have destroyed a floor item, and the floor is not empty */ 
     
    566561                p_ptr->command_rep = 2; 
    567562        } 
     563#endif 
    568564} 
    569565 
  • trunk/src/object1.c

    r265 r267  
    31553155                                                break; 
    31563156                                        } 
    3157  
    3158                                         /* Hack -- Fix screen */ 
    3159                                         if (p_ptr->command_see) 
    3160                                         { 
    3161                                                 /* Load screen */ 
    3162                                                 screen_load(); 
    3163  
    3164                                                 /* Save screen */ 
    3165                                                 screen_save(); 
    3166                                         } 
    3167  
    3168                                         p_ptr->command_wrk = (USE_FLOOR); 
    3169  
    3170                                         break; 
    3171                                 } 
    3172  
     3157                                } 
     3158 
     3159                                /* Hack -- Fix screen */ 
     3160                                if (p_ptr->command_see) 
     3161                                { 
     3162                                        /* Load screen */ 
     3163                                        screen_load(); 
     3164 
     3165                                        /* Save screen */ 
     3166                                        screen_save(); 
     3167                                } 
     3168 
     3169                                p_ptr->command_wrk = (USE_FLOOR); 
     3170 
     3171#if 0 
    31733172                                /* Check each legal object */ 
    31743173                                for (i = 0; i < floor_num; ++i) 
     
    31893188                                        break; 
    31903189                                } 
     3190#endif 
    31913191 
    31923192                                break; 
  • trunk/src/util.c

    r249 r267  
    29592959                { 
    29602960                        /* Build a prompt */ 
    2961                         strnfmt(tmp, sizeof(tmp), "Quantity (0-%d): ", max); 
     2961                        strnfmt(tmp, sizeof(tmp), "Quantity (0-%d, *=all): ", max); 
    29622962 
    29632963                        /* Use that prompt */ 
     
    29742974                amt = atoi(buf); 
    29752975 
    2976                 /* A letter means "all" */ 
    2977                 if (isalpha((unsigned char)buf[0])) amt = max; 
     2976                /* A star or letter means "all" */ 
     2977                if ((buf[0] == '*') || isalpha((unsigned char)buf[0])) amt = max; 
    29782978        } 
    29792979