Changeset 1461

Show
Ignore:
Timestamp:
07/02/09 22:14:31 (14 months ago)
Author:
takkaria
Message:

Rough sketch of using the object knowledge menu for setting sval squelch.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/cmd-know.c

    r1437 r1461  
    464464 
    465465                        if (otherfields) 
    466                                 prt(otherfields, 4, 55); 
     466                                prt(otherfields, 4, 46); 
    467467 
    468468 
     
    11671167 
    11681168        display_knowledge("monsters", monsters, m_count, r_funcs, m_funcs, 
    1169                                                 "          Sym  Kills"); 
     1169                        "                   Sym  Kills"); 
    11701170        FREE(default_join); 
    11711171        FREE(monsters); 
     
    13471347        a_count = collect_known_artifacts(artifacts, z_info->a_max); 
    13481348 
    1349         display_knowledge("artifacts", artifacts, a_count, obj_f, art_f, 0); 
     1349        display_knowledge("artifacts", artifacts, a_count, obj_f, art_f, NULL); 
    13501350        FREE(artifacts); 
    13511351} 
     
    14821482        } 
    14831483 
    1484         display_knowledge("ego items", egoitems, e_count, obj_f, ego_f, ""); 
     1484        display_knowledge("ego items", egoitems, e_count, obj_f, ego_f, NULL); 
    14851485 
    14861486        FREE(default_join); 
     
    15541554        /* Display the name */ 
    15551555        c_prt(attr, o_name, row, col); 
     1556 
     1557        /* Show squelch status */ 
     1558        if (k_ptr->squelch) 
     1559                c_put_str(attr, "Yes", row, 46); 
    15561560 
    15571561        /* Show autoinscription if around */ 
     
    16841688        s16b idx = get_autoinscription_index(oid); 
    16851689 
    1686         const char *no_insc = ", 'r' to recall, '{'"; 
    1687         const char *with_insc = ", 'r' to recall, '{', '}'"; 
     1690        const char *no_insc = ", 's' to toggle squelch, 'r'ecall, '{'"; 
     1691        const char *with_insc = ", 's' to toggle squelch, 'r'ecall, '{', '}'"; 
    16881692 
    16891693 
     
    17071711        s16b idx = get_autoinscription_index(oid); 
    17081712 
     1713        /* Toggle squelch */ 
     1714        if (ch == 's' || ch == 'S') 
     1715        { 
     1716                if (squelch_tval(k_ptr->tval)) 
     1717                        k_ptr->squelch = !k_ptr->squelch; 
     1718                return; 
     1719        } 
     1720 
    17091721        /* Forget it if we've never seen the thing */ 
    17101722        if (k_ptr->flavor && !k_ptr->aware) 
     
    17821794        } 
    17831795 
    1784         display_knowledge("known objects", objects, o_count, kind_f, obj_f, "Inscribed          Sym"); 
     1796        display_knowledge("known objects", objects, o_count, kind_f, obj_f, "Squelch  Inscribed          Sym"); 
    17851797 
    17861798        FREE(objects); 
     
    18651877        } 
    18661878 
    1867         display_knowledge("features", features, f_count, fkind_f, feat_f, "           Sym"); 
     1879        display_knowledge("features", features, f_count, fkind_f, feat_f, 
     1880                "                    Sym"); 
    18681881        FREE(features); 
    18691882}