diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-12-25 11:36:22 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-12-25 11:36:22 +0100 |
commit | 214c798064a28a48126a6faf487303fab25b2dd7 (patch) | |
tree | c4fb3745f80ff61fd3ec25c6a85fbab527b41bd0 /crawl-ref | |
parent | e711d4b1bb15d82886af6fbf557d63e74f2b5fd0 (diff) | |
download | crawl-ref-214c798064a28a48126a6faf487303fab25b2dd7.tar.gz crawl-ref-214c798064a28a48126a6faf487303fab25b2dd7.zip |
Add new inventory menu type for item knowledge.
This means the knowledge menu is not affected by the
main inventory sort options. In particular, this
fixes item knowledge sort order breaking down once
you know a lot of items of a given type.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/enum.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/itemname.cc | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 322a67c270..61dbeb3b2f 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1590,8 +1590,8 @@ enum menu_type MT_INVLIST, // List inventory MT_DROP, - - MT_PICKUP + MT_PICKUP, + MT_KNOW }; enum mon_holy_type diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 396f217e40..529cbf4b04 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -4038,7 +4038,8 @@ void menu_sort_condition::set_menu_type(std::string &s) { "any:", MT_ANY }, { "inv:", MT_INVLIST }, { "drop:", MT_DROP }, - { "pickup:", MT_PICKUP } + { "pickup:", MT_PICKUP }, + { "know:", MT_KNOW } }; for (unsigned mi = 0; mi < ARRAYSZ(menu_type_map); ++mi) diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index ee2e39b4b5..8d487d2682 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -1978,6 +1978,7 @@ bool check_item_knowledge(bool quiet) InvMenu menu; menu.set_title("You recognise:"); menu.set_flags(MF_NOSELECT); + menu.set_type(MT_KNOW); menu.load_items(items, discoveries_item_mangle); menu.show(); redraw_screen(); |